mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
deinterlace: add pulldown info to vframe. [1/2]
PD#SWPL-11389 Problem: PQ need work around for 1080i(based on VLSI's suggestions) co-work with yanling/mingliang Solution: add pulldown information to vframe; u32 di_pulldown: -bit 3: interlace -bit 2: flmxx -bit 1: flm22 -bit 0: flm32 Verify: TL1 Change-Id: I9ff06ffa7aaa9516a3e64cec9768272499678fd5 Signed-off-by: Jihong Sui <jihong.sui@amlogic.com>
This commit is contained in:
@@ -3520,6 +3520,7 @@ static void pre_de_done_buf_config(void)
|
||||
struct di_buf_s *post_wr_buf = NULL;
|
||||
unsigned int glb_frame_mot_num = 0;
|
||||
unsigned int glb_field_mot_num = 0;
|
||||
unsigned int pull_down_info = 0;
|
||||
|
||||
ddbg_mod_save(eDI_DBG_MOD_PRE_DONEB, 0, di_pre_stru.in_seq);/*dbg*/
|
||||
if (di_pre_stru.di_wr_buf) {
|
||||
@@ -3542,13 +3543,22 @@ static void pre_de_done_buf_config(void)
|
||||
di_pre_stru.di_post_wr_buf = di_pre_stru.di_wr_buf;
|
||||
post_wr_buf = di_pre_stru.di_post_wr_buf;
|
||||
|
||||
if (post_wr_buf)
|
||||
post_wr_buf->vframe->di_pulldown = 0;
|
||||
|
||||
if (post_wr_buf && !di_pre_stru.cur_prog_flag) {
|
||||
read_pulldown_info(&glb_frame_mot_num,
|
||||
&glb_field_mot_num);
|
||||
if (pulldown_enable)
|
||||
pulldown_detection(&post_wr_buf->pd_config,
|
||||
if (pulldown_enable) {
|
||||
pull_down_info = pulldown_detection(
|
||||
&post_wr_buf->pd_config,
|
||||
di_pre_stru.mtn_status, overturn,
|
||||
di_pre_stru.di_inp_buf->vframe);
|
||||
post_wr_buf->vframe->di_pulldown
|
||||
= pull_down_info;
|
||||
|
||||
}
|
||||
post_wr_buf->vframe->di_pulldown |= 0x08;
|
||||
if (combing_fix_en)
|
||||
cur_lev = adaptive_combing_fixing(
|
||||
di_pre_stru.mtn_status,
|
||||
|
||||
@@ -874,6 +874,7 @@ void dump_vframe(struct vframe_s *vf)
|
||||
vf->process_fun, vf->private_data);
|
||||
pr_info("pixel_ratio %d list %p\n",
|
||||
vf->pixel_ratio, &vf->list);
|
||||
pr_info("di_pulldown 0x%x\n", vf->di_pulldown);
|
||||
}
|
||||
|
||||
void print_di_buf(struct di_buf_s *di_buf, int format)
|
||||
|
||||
@@ -119,6 +119,7 @@ unsigned int pulldown_detection(struct pulldown_detected_s *res,
|
||||
unsigned int flm22_surenum = flm22_sure_num;
|
||||
int difflag = 2;
|
||||
bool flm32 = false, flm22 = false, flmxx = false;
|
||||
unsigned int pulldown_info;
|
||||
|
||||
read_pulldown_info(&glb_frame_mot_num,
|
||||
&glb_field_mot_num);
|
||||
@@ -335,7 +336,12 @@ unsigned int pulldown_detection(struct pulldown_detected_s *res,
|
||||
res->regs[1].blend_mode = 0;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
pulldown_info = flm32 ? 1 : 0;
|
||||
pulldown_info |= flm22 ? 0x02 : 0;
|
||||
pulldown_info |= flmxx ? 0x04 : 0;
|
||||
|
||||
return pulldown_info;
|
||||
}
|
||||
|
||||
unsigned char pulldown_init(unsigned short width, unsigned short height)
|
||||
|
||||
@@ -423,6 +423,14 @@ struct vframe_s {
|
||||
|
||||
u32 sar_width;
|
||||
u32 sar_height;
|
||||
/*****************
|
||||
* di pulldown info
|
||||
* bit 3: interlace
|
||||
* bit 2: flmxx
|
||||
* bit 1: flm22
|
||||
* bit 0: flm32
|
||||
*****************/
|
||||
u32 di_pulldown;
|
||||
} /*vframe_t */;
|
||||
|
||||
#if 0
|
||||
|
||||
Reference in New Issue
Block a user