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:
Yandong Lin
2026-05-27 21:12:36 +08:00
committed by Herman Chen
parent 42392e55c5
commit fd85477c2c
+2 -2
View File
@@ -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;
}