vpp: increase the vskip count to 8 for scale down

PD#163431: vpp: increase the vskip count to 8 for scale down

Change-Id: I2022a031a95c0598ad31276e7a2aebd5ba2a977c
Signed-off-by: Brian Zhu <brian.zhu@amlogic.com>
This commit is contained in:
Brian Zhu
2018-03-29 18:01:20 +08:00
committed by Yixun Lan
parent 9137c54d5f
commit 428e770673
3 changed files with 21 additions and 13 deletions

View File

@@ -2579,7 +2579,8 @@ static void viu_set_dcu(struct vpp_frame_par_s *frame_par, struct vframe_s *vf)
u32 r;
u32 vphase, vini_phase, vformatter;
u32 pat, loop;
static const u32 vpat[] = { 0, 0x8, 0x9, 0xa, 0xb, 0xc };
static const u32 vpat[MAX_VSKIP_COUNT + 1] = {
0, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf};
u32 u, v;
u32 type = vf->type, bit_mode = 0;
bool vf_with_el = false;
@@ -3131,7 +3132,8 @@ static void vd2_set_dcu(struct vpp_frame_par_s *frame_par, struct vframe_s *vf)
u32 r;
u32 vphase, vini_phase;
u32 pat, loop;
static const u32 vpat[] = { 0, 0x8, 0x9, 0xa, 0xb, 0xc };
static const u32 vpat[MAX_VSKIP_COUNT + 1] = {
0, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf};
u32 u, v;
u32 type = vf->type, bit_mode = 0;
@@ -3432,8 +3434,8 @@ static void vd2_set_dcu(struct vpp_frame_par_s *frame_par, struct vframe_s *vf)
if (type & VIDTYPE_VIU_FIELD) {
loop = 0;
if (type & VIDTYPE_INTERLACE)
pat = vpat[frame_par->vscale_skip_count >> 1];
if (type & VIDTYPE_INTERLACE)
pat = vpat[frame_par->vscale_skip_count >> 1];
} else if (type & VIDTYPE_MVC) {
loop = 0x11;
pat = 0x80;

View File

@@ -841,6 +841,7 @@ vpp_set_filters2(u32 process_3d_type, u32 width_in,
u32 orig_aspect = 0;
u32 screen_aspect = 0;
bool skip_policy_check = true;
int cur_skip_count = 0;
if (get_cpu_type() >= MESON_CPU_MAJOR_ID_GXTVBB) {
if (likely(w_in >
@@ -1352,7 +1353,9 @@ RESTART:
* if we need skip half resolution on source side for progressive
* frames.
*/
if ((next_frame_par->vscale_skip_count < 4)
/* one more time to check skip for trigger h skip */
if ((next_frame_par->vscale_skip_count
< (MAX_VSKIP_COUNT + 1))
&& (!(vpp_flags & VPP_FLAG_VSCALE_DISABLE))) {
int skip = vpp_process_speed_check(
(next_frame_par->VPP_hd_end_lines_ -
@@ -1370,20 +1373,21 @@ RESTART:
vf);
if (skip == SPEED_CHECK_VSKIP) {
if (vpp_flags & VPP_FLAG_INTERLACE_IN)
next_frame_par->vscale_skip_count += 2;
else {
if (cur_skip_count < MAX_VSKIP_COUNT) {
if (vpp_flags & VPP_FLAG_INTERLACE_IN)
next_frame_par->vscale_skip_count += 2;
#ifdef TV_3D_FUNCTION_OPEN
if ((next_frame_par->vpp_3d_mode ==
else if ((next_frame_par->vpp_3d_mode ==
VPP_3D_MODE_LA)
&& (process_3d_type & MODE_3D_ENABLE))
next_frame_par->vscale_skip_count += 2;
else
#endif
else
next_frame_par->vscale_skip_count++;
}
goto RESTART;
cur_skip_count++;
goto RESTART;
} else
next_frame_par->hscale_skip_count = 1;
} else if (skip == SPEED_CHECK_HSKIP)
next_frame_par->hscale_skip_count = 1;
}

View File

@@ -37,6 +37,8 @@
#define ASPECT_4_3 ((3<<8)/4)
#define ASPECT_16_9 ((9<<8)/16)
#define MAX_VSKIP_COUNT 8
#define SPEED_CHECK_DONE 0
#define SPEED_CHECK_HSKIP 1
#define SPEED_CHECK_VSKIP 2