dolby: demo-debug.apk test fail [1/1]

PD#SWPL-10167

Problem:
Apk drop several frames at beginning, but
dolby frames are not consumed, decoder has
no idle buffers.

Solution:
Ignore drop for dual layer dolby video

Verify:
verified on u212

Change-Id: I732d82e71c190c62a14c05accea44b4c55d04239
Signed-off-by: yao liu <yao.liu@amlogic.com>
This commit is contained in:
yao liu
2019-06-28 21:16:21 +08:00
committed by Yao Liu
parent 455f583dc8
commit 44318e5c20
3 changed files with 34 additions and 1 deletions

View File

@@ -4122,6 +4122,28 @@ bool is_dovi_frame(struct vframe_s *vf)
}
EXPORT_SYMBOL(is_dovi_frame);
bool is_dovi_dual_layer_frame(struct vframe_s *vf)
{
struct provider_aux_req_s req;
req.vf = vf;
req.bot_flag = 0;
req.aux_buf = NULL;
req.aux_size = 0;
req.dv_enhance_exist = 0;
if (vf->source_type == VFRAME_SOURCE_TYPE_OTHERS) {
vf_notify_provider_by_name("dvbldec",
VFRAME_EVENT_RECEIVER_GET_AUX_DATA,
(void *)&req);
if (req.dv_enhance_exist)
return true;
}
return false;
}
EXPORT_SYMBOL(is_dovi_dual_layer_frame);
#define signal_color_primaries ((vf->signal_type >> 16) & 0xff)
#define signal_transfer_characteristic ((vf->signal_type >> 8) & 0xff)
static bool is_hdr10_frame(struct vframe_s *vf)

View File

@@ -9286,7 +9286,7 @@ static void set_omx_pts(u32 *p)
}
/* kodi may render first frame, then drop dozens of frames */
if (set_from_hwc == 0 && omx_run == true && frame_num <= 2
&& not_reset == 0) {
&& not_reset == 0 && omx_pts_set_from_hwc_count > 0) {
pr_info("reset omx_run to false.\n");
omx_run = false;
}
@@ -9309,6 +9309,7 @@ static void set_omx_pts(u32 *p)
} else if (set_from_hwc == 0 && !omx_run) {
struct vframe_s *vf = NULL;
u32 donot_drop = 0;
u32 dovi_dual_layer = 0;
while (try_cnt--) {
vf = vf_peek(RECEIVER_NAME);
@@ -9318,6 +9319,8 @@ static void set_omx_pts(u32 *p)
pr_info("set_omx_pts ignore the omx %d frames drop for dv frame\n",
frame_num);
donot_drop = 1;
if (is_dovi_dual_layer_frame(vf))
dovi_dual_layer = 1;
break;
}
#endif
@@ -9337,6 +9340,13 @@ static void set_omx_pts(u32 *p)
pr_info("reset omx_run to true.\n");
omx_run = true;
}
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
if (dovi_dual_layer) {
omx_run = true;
omx_drop_done = true;
pr_info("dolby dual layer donot drop.\n");
}
#endif
}
mutex_unlock(&omx_mutex);
}

View File

@@ -76,4 +76,5 @@ extern bool is_dovi_frame(struct vframe_s *vf);
extern void update_graphic_width_height(unsigned int width,
unsigned int height);
extern bool is_dolby_vision_el_disable(void);
extern bool is_dovi_dual_layer_frame(struct vframe_s *vf);
#endif