vpp: fix vpp covertiy error [1/1]
authorwenfeng.guo <wenfeng.guo@amlogic.com>
Fri, 23 Nov 2018 09:38:00 +0000 (17:38 +0800)
committerLuan Yuan <luan.yuan@amlogic.com>
Mon, 17 Dec 2018 02:58:24 +0000 (10:58 +0800)
PD#SWPL-2458

Problem:
vpp has covertiy error

Solution:
fix vpp covertiy error

Verify:
r311

Change-Id: Ic755420107b72fa0a56d73e288b708ab421f7609
Signed-off-by: Wenfeng Guo <wenfeng.guo@amlogic.com>
drivers/amlogic/media/video_sink/vpp.c

index b663469..f165f43 100644 (file)
@@ -643,6 +643,8 @@ vpp_process_speed_check(s32 width_in,
 
        if (vf)
                cur_vf_type = vf->type;
+       else
+               return 0;
        if (force_vskip_cnt == 0xff)/*for debug*/
                return SPEED_CHECK_DONE;
        if (next_frame_par->vscale_skip_count < force_vskip_cnt)
@@ -1536,14 +1538,12 @@ RESTART:
        }
 
        /* force overwrite filter setting */
-       if ((vert_scaler_filter >= COEF_BICUBIC) &&
-               (vert_scaler_filter <= COEF_3D_FILTER)) {
+       if (vert_scaler_filter <= COEF_3D_FILTER) {
                filter->vpp_vert_coeff = filter_table[vert_scaler_filter];
                filter->vpp_vert_filter = vert_scaler_filter;
        }
        if (vert_chroma_filter_force_en &&
-               (vert_chroma_scaler_filter >= COEF_BICUBIC) &&
-               (vert_chroma_scaler_filter <= COEF_3D_FILTER)) {
+               vert_chroma_scaler_filter <= COEF_3D_FILTER) {
                cur_vert_chroma_filter = vert_chroma_scaler_filter;
                        filter->vpp_vert_chroma_coeff
                                = filter_table[cur_vert_chroma_filter];
@@ -1553,8 +1553,7 @@ RESTART:
                filter->vpp_vert_chroma_filter_en = false;
        }
 
-       if ((horz_scaler_filter >= COEF_BICUBIC) &&
-               (horz_scaler_filter <= COEF_3D_FILTER)) {
+       if (horz_scaler_filter <= COEF_3D_FILTER) {
                filter->vpp_horz_coeff = filter_table[horz_scaler_filter];
                filter->vpp_horz_filter = horz_scaler_filter;
        }