mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-09-26 21:15:53 +08:00
fix[sys_cfg]: Align to CTU64 to avoid info change.
Platform: General Spec: avs2 Error case: In AVS2, CTU supports both 64 and 32 alignment. The sys_cfg defaults to 64 alignment. However, if the parsed CTU size is 32, it may cause additional info changes. This is because, initially, when calculating the stride, there is no external stride configuration, so it defaults to 64 alignment. After parsing the video sequence, the stride is configured, and calculations should then follow the configured stride. Solution: During the parsing process, the stride is not set and is entirely calculated by sys_cfg. Reported-by: Liming Xu <rimon.xu@rock-chips.com> Source: test_avs2_160x90.av1 Signed-off-by: Hongjin Li <vic.hong@rock-chips.com> Change-Id: I0fed8b86391a03651f22ef859ec2ff1c02647b12
This commit is contained in:
@@ -472,9 +472,6 @@ static Avs2dFrame_t *dpb_alloc_frame(Avs2dCtx_t *p_dec, HalDecTask *task)
|
||||
Avs2dPicHeader_t *ph = &p_dec->ph;
|
||||
Avs2dSeqExtHeader_t *exh = &p_dec->exh;
|
||||
Avs2dFrameMgr_t *mgr = &p_dec->frm_mgr;
|
||||
RK_U32 ctu_size = 1 << (p_dec->vsh.lcu_size);
|
||||
RK_U32 bitdepth = p_dec->vsh.bit_depth;
|
||||
RK_U32 ver_stride = vsh->vertical_size;
|
||||
|
||||
avs2d_dbg_dpb("In.");
|
||||
frm = dpb_get_one_frame(mgr, vsh, ph);
|
||||
@@ -512,7 +509,6 @@ static Avs2dFrame_t *dpb_alloc_frame(Avs2dCtx_t *p_dec, HalDecTask *task)
|
||||
mpp_frame_set_fbc_hdr_stride(mframe, fbc_hdr_stride);
|
||||
// fbc output frame update
|
||||
mpp_frame_set_offset_y(mframe, 8);
|
||||
ver_stride += 16;
|
||||
} else if (MPP_FRAME_FMT_IS_TILE(p_dec->init.cfg->base.out_fmt))
|
||||
mpp_frame_set_fmt(mframe, mpp_frame_get_fmt(mframe) | (p_dec->init.cfg->base.out_fmt & (MPP_FRAME_TILE_FLAG)));
|
||||
|
||||
@@ -526,8 +522,6 @@ static Avs2dFrame_t *dpb_alloc_frame(Avs2dCtx_t *p_dec, HalDecTask *task)
|
||||
|
||||
mpp_frame_set_width(mframe, vsh->horizontal_size);
|
||||
mpp_frame_set_height(mframe, vsh->vertical_size);
|
||||
mpp_frame_set_hor_stride(mframe, (MPP_ALIGN(vsh->horizontal_size, ctu_size) * bitdepth + 7) / 8);
|
||||
mpp_frame_set_ver_stride(mframe, MPP_ALIGN(ver_stride, ctu_size));
|
||||
mpp_frame_set_pts(mframe, mpp_packet_get_pts(task->input_packet));
|
||||
mpp_frame_set_dts(mframe, mpp_packet_get_dts(task->input_packet));
|
||||
mpp_frame_set_errinfo(mframe, 0);
|
||||
|
Reference in New Issue
Block a user