vmh264: fixed the MB count error on decoding. [1/1]
authorNanxin Qin <nanxin.qin@amlogic.com>
Fri, 5 Jun 2020 09:05:38 +0000 (17:05 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Mon, 8 Jun 2020 04:48:48 +0000 (21:48 -0700)
PD#SWPL-27454

Problem:
the source of h264 with ippp playback abnormal.

Solution:
has some wrong with first I frame so will be checked
on the decoding, then the frame will be show if the
error rate below 5%, but now the mb with calculation is
incorrect which cause it do not a chance to display.

Verify:
w200

Change-Id: I865dd6bec6a8aa9bd830f9800afdf037d7843e23
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
drivers/frame_provider/decoder/h264_multi/vmh264.c

index 85ec217fd21548bd4b88961d339946b2f587d3d5..7d7daab67e3d8950a3d9457a4c21f5ef233a13de 100644 (file)
@@ -5623,7 +5623,7 @@ static void check_decoded_pic_error(struct vdec_h264_hw_s *hw)
        unsigned mby_mbx = READ_VREG(MBY_MBX);
        unsigned mb_total = (hw->seq_info2 >> 8) & 0xffff;
        unsigned decode_mb_count =
-               ((mby_mbx & 0xff) * hw->mb_width +
+               ((mby_mbx & 0xff) * (hw->seq_info2 & 0xff) +
                (((mby_mbx >> 8) & 0xff) + 1));
        if (mby_mbx == 0)
                return;