mirror of
https://github.com/HermanChen/mpp.git
synced 2026-07-04 15:06:55 +00:00
fix[hal_rkdec]: Fix duplicate align on ver_stride in fbc mode
When MPP_DEC_SET_FRAME_INFO configures fbc format with height not 16-aligned, vdpu_afbc_align_calc aligns height to 16 first. Then mpp_sys_dec_buf_chk_proc adds 8 expand and aligns to 16 again, causing ver_stride to be 24 larger than expected. Use the existing ver_stride from frame if already set, to avoid duplicate alignment. Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com> Change-Id: I79b24b045768b4fbee3b394cbff546e8b1c09df8
This commit is contained in:
@@ -19,7 +19,7 @@ RK_S32 vdpu_compare_rcb_size(const void *a, const void *b)
|
||||
|
||||
void vdpu_afbc_align_calc(MppBufSlots slots, MppFrame frame, RK_U32 expand)
|
||||
{
|
||||
RK_U32 ver_stride = 0;
|
||||
RK_U32 ver_stride = mpp_frame_get_ver_stride(frame);
|
||||
RK_U32 img_height = mpp_frame_get_height(frame);
|
||||
RK_U32 img_width = mpp_frame_get_width(frame);
|
||||
RK_U32 hdr_stride = (*compat_ext_fbc_hdr_256_odd) ?
|
||||
@@ -31,7 +31,7 @@ void vdpu_afbc_align_calc(MppBufSlots slots, MppFrame frame, RK_U32 expand)
|
||||
|
||||
mpp_frame_set_fbc_hdr_stride(frame, hdr_stride);
|
||||
|
||||
ver_stride = mpp_align_16(img_height);
|
||||
ver_stride = ver_stride ? ver_stride : img_height;
|
||||
if (*compat_ext_fbc_buf_size) {
|
||||
ver_stride += expand;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user