diff --git a/mpp/hal/rkenc/h265e/hal_h265e_vepu541.c b/mpp/hal/rkenc/h265e/hal_h265e_vepu541.c index 331d9e1a..f1da1737 100644 --- a/mpp/hal/rkenc/h265e/hal_h265e_vepu541.c +++ b/mpp/hal/rkenc/h265e/hal_h265e_vepu541.c @@ -193,7 +193,7 @@ static MPP_RET vepu54x_h265_setup_hal_bufs(H265eV541HalContext *ctx) hal_h265e_enter(); mb_wd64 = (prep->width + 63) / 64; - mb_h64 = (prep->height + 63) / 64; + mb_h64 = (prep->height + 63) / 64 + 1; frame_size = MPP_ALIGN(prep->width, 16) * MPP_ALIGN(prep->height, 16); vepu541_set_fmt(fmt, ctx->cfg->prep.format); diff --git a/mpp/hal/rkenc/h265e/hal_h265e_vepu580.c b/mpp/hal/rkenc/h265e/hal_h265e_vepu580.c index eb40c1e6..8378b624 100644 --- a/mpp/hal/rkenc/h265e/hal_h265e_vepu580.c +++ b/mpp/hal/rkenc/h265e/hal_h265e_vepu580.c @@ -291,7 +291,7 @@ static MPP_RET vepu580_h265_setup_hal_bufs(H265eV580HalContext *ctx) hal_h265e_enter(); mb_wd64 = (prep->width + 63) / 64; - mb_h64 = (prep->height + 63) / 64; + mb_h64 = (prep->height + 63) / 64 + 1; frame_size = MPP_ALIGN(prep->width, 16) * MPP_ALIGN(prep->height, 16); vepu541_set_fmt(fmt, ctx->cfg->prep.format);