fix[mpp_sys_cfg]: Fix abnormal stride calculation.

Platform: General

Error case:
If the specification specifies a stride, it should be
configured according to the specification's stride rather
than calculated based on width and height, especially
in scenarios involving H.264 field-based sources.
For the case of FBC, hor_stride needs to be processed
based on pixels and is unrelated to bit depth.

Reported-by: Johnson Ding <johnson.ding@rock-chips.com>

Source: rk_32.h264

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I02058432f2baeeea4c5a87c6845b24de8a78b276
This commit is contained in:
Hongjin Li 2025-01-09 14:29:29 +08:00 committed by Herman Chen
parent 6253c0982c
commit 70b572a2c0
6 changed files with 55 additions and 38 deletions

View file

@ -23,6 +23,8 @@ typedef enum MppSysDecBufCkhCfgChange_e {
MPP_SYS_DEC_BUF_CHK_CFG_CHANGE_CROP_RIGHT = (1 << 10),
MPP_SYS_DEC_BUF_CHK_CFG_CHANGE_FLAG_METADATA = (1 << 11),
MPP_SYS_DEC_BUF_CHK_CFG_CHANGE_FLAG_THUMBNAIL = (1 << 12),
MPP_SYS_DEC_BUF_CHK_CFG_CHANGE_H_STRIDE_BYTE = (1 << 13),
MPP_SYS_DEC_BUF_CHK_CFG_CHANGE_V_STRIDE = (1 << 14),
MPP_SYS_DEC_BUF_CHK_CFG_CHANGE_ALL = (0xFFFFFFFF),
} MppSysDecBufCkhChange;

View file

@ -16,6 +16,7 @@ typedef struct MppSysCfgStHStrd_t {
MppCodingType type;
RK_U32 fmt_fbc;
RK_U32 width;
RK_U32 h_stride_by_byte;
/* output args start */
RK_U32 h_stride_by_pixel;
@ -28,7 +29,7 @@ typedef struct MppSysCfgStHByteStrd_t {
RK_U32 fmt_fbc;
RK_U32 width;
/* output args start */
/* in/output args start */
RK_U32 h_stride_by_byte;
} MppSysCfgStHByteStrd;
@ -38,7 +39,7 @@ typedef struct MppSysCfgStVStrd_t {
RK_U32 fmt_fbc;
RK_U32 height;
/* output args start */
/* in/output args start */
RK_U32 v_stride;
} MppSysCfgStVStrd;
@ -50,10 +51,12 @@ typedef struct MppSysCfgStSize_t {
RK_U32 width;
RK_U32 height;
/* output args start */
RK_U32 h_stride_by_pixel;
/* in/output args start */
RK_U32 h_stride_by_byte;
RK_U32 v_stride;
/* output args start */
RK_U32 h_stride_by_pixel;
RK_U32 size_total;
RK_U32 size_fbc_hdr;
RK_U32 size_fbc_bdy;