From: Peng yixin Date: Thu, 11 Jun 2020 02:33:11 +0000 (+0800) Subject: media_module: fixed can not playback 4k resolution file. [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=23847e1b262534a33fc5dd4e83fbd83a6759752c;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_media.git media_module: fixed can not playback 4k resolution file. [1/1] PD#SWPL-27638 Problem: When the width of the video file is 4096, it cannot be played due to the total MB was incorrectly calculated. Solution: Modify the logic so that the correct calculations MB to solve the problem Verify: U215 Change-Id: Iccc116705b0d6a3a1c580162e7e2a5f577afe063 Signed-off-by: Peng yixin --- diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c index 7ecbbe2..dbd07c0 100644 --- a/drivers/frame_provider/decoder/h264_multi/vmh264.c +++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c @@ -5629,8 +5629,11 @@ static void check_decoded_pic_error(struct vdec_h264_hw_s *hw) struct StorablePicture *p = p_H264_Dpb->mVideo.dec_picture; unsigned mby_mbx = READ_VREG(MBY_MBX); unsigned mb_total = (hw->seq_info2 >> 8) & 0xffff; - unsigned decode_mb_count = - ((mby_mbx & 0xff) * (hw->seq_info2 & 0xff) + + unsigned mb_width = hw->seq_info2 & 0xff; + unsigned decode_mb_count; + if (!mb_width && mb_total) /*for 4k2k*/ + mb_width = 256; + decode_mb_count = ((mby_mbx & 0xff) * mb_width + (((mby_mbx >> 8) & 0xff) + 1)); if (mby_mbx == 0) return;