vh265: fix h265 dv frame mode overdecode error. [1/1]
authorshihong.zheng <shihong.zheng@amlogic.com>
Mon, 27 Jul 2020 06:04:26 +0000 (14:04 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Tue, 28 Jul 2020 02:10:30 +0000 (19:10 -0700)
PD#SWPL-30305

Problem:
dv frame mode overdecode when resolution change.

Solution:
do not check empty and shift status when dv mode
detected EOS

Verify:
ah212

Change-Id: Icbc04376f9aed259660f24e26b89ae04cfec250f
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
drivers/frame_provider/decoder/h265/vh265.c

index 5a89fc987e06a05e5e53c3b379674a5e28f391fa..886d879922b723d14f0ead63a978ef58d1ebf3e8 100644 (file)
@@ -10072,7 +10072,7 @@ pic_done:
                                        }
                                }
                                /*Detects the first frame whether has an over decode error*/
-                               if (vdec->master == NULL && vdec->slave == NULL &&
+                               if ((!vdec_dual(vdec)) &&
                                        hevc->empty_flag == 0) {
                                        hevc->over_decode =
                                                (READ_VREG(HEVC_SHIFT_STATUS) >> 15) & 0x1;
@@ -10264,7 +10264,7 @@ force_output:
                        }
 #endif
                        /*Detects frame whether has an over decode error*/
-                       if (vdec->master == NULL && vdec->slave == NULL &&
+                       if ((!vdec_dual(vdec)) &&
                                        hevc->empty_flag == 0) {
                                        hevc->over_decode =
                                                (READ_VREG(HEVC_SHIFT_STATUS) >> 15) & 0x1;
@@ -12335,7 +12335,7 @@ static void vh265_work_implement(struct hevc_state_s *hevc,
                        READ_VREG(HEVC_PARSER_LCU_START)
                        & 0xffffff;
 
-               if (vdec->master == NULL && vdec->slave == NULL &&
+               if ((!vdec_dual(vdec)) &&
                        hevc->empty_flag == 0) {
                        hevc->over_decode =
                                (READ_VREG(HEVC_SHIFT_STATUS) >> 15) & 0x1;
@@ -12911,7 +12911,6 @@ static void run(struct vdec_s *vdec, unsigned long mask,
                init_pic_list_hw(hevc);
 
        backup_decode_state(hevc);
-
        start_process_time(hevc);
        mod_timer(&hevc->timer, jiffies);
        hevc->stat |= STAT_TIMER_ARM;