mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 17:16:50 +08:00
fix[enc_roi]: Fix cu_map init in vepu_54x_roi
Change-Id: Icdc9c44778ce3ecbf9234ffe4294aff8ffd4165d Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
This commit is contained in:
@@ -673,6 +673,8 @@ MPP_RET mpp_enc_roi_init(MppEncRoiCtx *ctx, RK_U32 w, RK_U32 h, MppCodingType ty
|
||||
case ROI_TYPE_1 : {
|
||||
RK_S32 mb_w = MPP_ALIGN(impl->w, 16) / 16;
|
||||
RK_S32 mb_h = MPP_ALIGN(impl->h, 16) / 16;
|
||||
RK_U32 ctu_w = MPP_ALIGN(impl->w, 64) / 64;
|
||||
RK_U32 ctu_h = MPP_ALIGN(impl->w, 64) / 64;
|
||||
RK_S32 stride_h = MPP_ALIGN(mb_w, 4);
|
||||
RK_S32 stride_v = MPP_ALIGN(mb_h, 4);
|
||||
|
||||
@@ -690,7 +692,14 @@ MPP_RET mpp_enc_roi_init(MppEncRoiCtx *ctx, RK_U32 w, RK_U32 h, MppCodingType ty
|
||||
/* create tmp buffer for hevc */
|
||||
if (type == MPP_VIDEO_CodingHEVC) {
|
||||
impl->tmp = mpp_malloc(Vepu541RoiCfg, stride_h * stride_v);
|
||||
if (!impl->tmp)
|
||||
impl->cu_map = mpp_calloc(RK_U8, ctu_w * ctu_h);
|
||||
impl->cu_size = ctu_w * ctu_h;
|
||||
if (!impl->tmp || !impl->cu_map)
|
||||
goto done;
|
||||
} else {
|
||||
impl->cu_map = mpp_calloc(RK_U8, mb_w * mb_h);
|
||||
impl->cu_size = mb_w * mb_h;
|
||||
if (!impl->cu_map)
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user