stb_dv: fix the dv dual layer playing out-sync

PD#163116:
	1. vfm: increase the receiver size from 16 to 32
	2. vpp: put el vframe toggle when omx dropping frame

Change-Id: Iecb0686e08a0bfb66ef259ea5fc32333fbbbd3e4
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
This commit is contained in:
Brian Zhu
2018-03-27 23:09:19 +08:00
committed by Yixun Lan
parent 199636b244
commit 965bc34532
4 changed files with 26 additions and 5 deletions

View File

@@ -28,7 +28,7 @@
/* Local headers */
#include "vfm.h"
#define MAX_RECEIVER_NUM 16
#define MAX_RECEIVER_NUM 32
struct vframe_receiver_s *receiver_table[MAX_RECEIVER_NUM];
int receiver_list(char *buf)

View File

@@ -3399,7 +3399,7 @@ static int dolby_vision_policy_process(
return mode_change;
}
static bool is_dovi_frame(struct vframe_s *vf)
bool is_dovi_frame(struct vframe_s *vf)
{
struct provider_aux_req_s req;
char *p;
@@ -3447,6 +3447,7 @@ static bool is_dovi_frame(struct vframe_s *vf)
}
return false;
}
EXPORT_SYMBOL(is_dovi_frame);
#define signal_color_primaries ((vf->signal_type >> 16) & 0xff)
#define signal_transfer_characteristic ((vf->signal_type >> 8) & 0xff)

View File

@@ -4402,13 +4402,24 @@ static irqreturn_t vsync_isr_in(int irq, void *dev_id)
struct vframe_s *vf = NULL;
while (1) {
vf = vf_peek(RECEIVER_NAME);
vf = video_vf_peek();
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
if (is_dolby_vision_enable()
&& vf && is_dovi_frame(vf)) {
pr_info("vsync_isr_in, ignore the omx %d frames drop for dv frame\n",
omx_need_drop_frame_num);
omx_need_drop_frame_num = 0;
omx_drop_done = true;
break;
}
#endif
if (vf) {
if (omx_need_drop_frame_num >= vf->omx_index) {
//pr_info("vsync drop omx_index %d\n",
//vf->omx_index);
vf = vf_get(RECEIVER_NAME);
vf_put(vf, RECEIVER_NAME);
vf = video_vf_get();
video_vf_put(vf);
} else {
omx_drop_done = true;
break;
@@ -6349,6 +6360,14 @@ static void set_omx_pts(u32 *p)
while (try_cnt--) {
vf = vf_peek(RECEIVER_NAME);
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
if (is_dolby_vision_enable()
&& vf && is_dovi_frame(vf)) {
pr_info("set_omx_pts ignore the omx %d frames drop for dv frame\n",
frame_num);
break;
}
#endif
if (vf) {
if (frame_num >= vf->omx_index) {
vf = vf_get(RECEIVER_NAME);

View File

@@ -49,5 +49,6 @@ extern void tv_dolby_vision_el_info(void);
extern int enable_rgb_to_yuv_matrix_for_dvll(
int32_t on, uint32_t *coeff_orig, uint32_t bits);
extern bool is_dovi_frame(struct vframe_s *vf);
#endif