ppmgr: Detection of top and bottom for interlace sources. [2/6]
authorrenjiang.han <renjiang.han@amlogic.com>
Tue, 4 Jun 2019 07:28:39 +0000 (15:28 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Mon, 24 Jun 2019 09:53:45 +0000 (02:53 -0700)
PD#SWPL-9350

Problem:
HDMI connection vertical screen, 1080i signal picture jitter.

Solution:
The interlace source is extracted based on the top and bottom values.

Verify:
on U212

Change-Id: I38f91fda32d1275dcc286fbb33034b4fd099e18f
Signed-off-by: renjiang.han <renjiang.han@amlogic.com>
drivers/amlogic/media/video_processor/ppmgr/ppmgr_vpp.c

index b7b5b9e..f0e70d4 100644 (file)
@@ -1666,7 +1666,6 @@ static int process_vf_deinterlace(struct vframe_s *vf,
        return 1;
 }
 
-static int mycount;
 static void process_vf_rotate(struct vframe_s *vf,
                struct ge2d_context_s *context,
                struct config_para_ex_s *ge2d_config,
@@ -1768,13 +1767,10 @@ static void process_vf_rotate(struct vframe_s *vf,
                return;
        }
 #ifdef INTERLACE_DROP_MODE
-       if (interlace_mode) {
-               mycount++;
-               if (mycount % 2 == 0) {
-                       ppmgr_vf_put_dec(vf);
-                       vfq_push(&q_free, new_vf);
-                       return;
-               }
+       if (interlace_mode == VIDTYPE_INTERLACE_BOTTOM) {
+               ppmgr_vf_put_dec(vf);
+               vfq_push(&q_free, new_vf);
+               return;
        }
        pp_vf->angle = cur_angle;
        if (interlace_mode)
@@ -3378,9 +3374,7 @@ int ppmgr_buffer_init(int vout_mode)
        struct vinfo_s vinfo = {.width = 1280, .height = 720, };
        /* int flags = CODEC_MM_FLAGS_DMA; */
        int flags = CODEC_MM_FLAGS_DMA | CODEC_MM_FLAGS_CMA_CLEAR;
-#ifdef INTERLACE_DROP_MODE
-       mycount = 0;
-#endif
+
        switch (ppmgr_buffer_status) {
        case 0:/*not config*/
                break;