vmh264: fix field picture display abnormal at start. [1/1]
authormiaohong chen <miaohong.chen@amlogic.com>
Fri, 16 Oct 2020 07:50:16 +0000 (15:50 +0800)
committerMiaohong Chen <miaohong.chen@amlogic.com>
Fri, 16 Oct 2020 08:22:47 +0000 (01:22 -0700)
PD#SWPL-15094

Problem:
h264 display abnormal when start play or seek.

Solution:
first frame combined with I top field and p bottom field,
set list0 size 1 when decode p field.

Verify:
t962x2

Change-Id: I5b64de94414887e4360d33077cb827ab8a1a2834
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
drivers/frame_provider/decoder/h264_multi/h264_dpb.c

index ae485a9d388f41349fa6f609403ac38bcfe51a90..874b5f37ffb1f44f2f4d5d9175ca855c903b0d12 100644 (file)
@@ -5270,7 +5270,8 @@ static void reorder_lists(struct Slice *currSlice)
                }
                /* that's a definition */
                currSlice->listXsize[0] =
-                       (char)currSlice->num_ref_idx_active[LIST_0];
+                       (char) imin(currSlice->listXsize[0],
+                       currSlice->num_ref_idx_active[LIST_0]);
                CHECK_VALID(currSlice->listXsize[0], 0);
                if (h264_debug_flag & PRINT_FLAG_DPB_DETAIL) {
                        dpb_print(p_H264_Dpb->decoder_index,