mirror of
https://github.com/nyanmisaka/mpp.git
synced 2026-01-24 01:10:39 +01:00
fix[hal_rcb]: Fix rcb buf size calc issue
Platform: RV1126B/RK3576 Spec: h265/h264/avs2/vp9/av1 Signed-off-by: Hongjin Li <vic.hong@rock-chips.com> Change-Id: I29e673dc40813e13fe8028b0191aa29d704eb6d8
This commit is contained in:
parent
ca28df6a4f
commit
4ca7bace36
7 changed files with 7 additions and 7 deletions
|
|
@ -1894,7 +1894,7 @@ static void av1d_refine_rcb_size(Vdpu383RcbInfo *rcb_info,
|
|||
if (width > 4096)
|
||||
filterd_row_append = 27648;
|
||||
rcb_bits = (RK_U32)(MPP_ALIGN(width, 64) * (32 * bit_depth + 10));
|
||||
rcb_info[RCB_FILTERD_ROW].size = MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_ROW].size = filterd_row_append + MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_PROTECT_ROW].size = filterd_row_append + MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_bits += ext_row_align_size;
|
||||
if (tile_row_num > 1)
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ static void avs2d_refine_rcb_size(Vdpu383RcbInfo *rcb_info,
|
|||
if (width > 4096)
|
||||
filterd_row_append = 27648;
|
||||
rcb_bits = MPP_ALIGN(width, 64) * (30 * bit_depth + 9);
|
||||
rcb_info[RCB_FILTERD_ROW].size = MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_ROW].size = filterd_row_append + MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_PROTECT_ROW].size = filterd_row_append + MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_TILE_ROW].size = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -762,7 +762,7 @@ static void h264d_refine_rcb_size(H264dHalCtx_t *p_hal, Vdpu383RcbInfo *rcb_info
|
|||
rcb_bits = width * 17 * ((6 + 3 * row_uv_para) * (mbaff ? 2 : 1) + 2 * row_uv_para + 1.5);
|
||||
if (width > 4096)
|
||||
filterd_row_append = 27648;
|
||||
rcb_info[RCB_FILTERD_ROW].size = MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_ROW].size = filterd_row_append + MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_PROTECT_ROW].size = filterd_row_append + MPP_RCB_BYTES(rcb_bits / 2);
|
||||
|
||||
rcb_info[RCB_FILTERD_TILE_ROW].size = 0;
|
||||
|
|
|
|||
|
|
@ -708,7 +708,7 @@ static void h264d_refine_rcb_size(H264dHalCtx_t *p_hal, Vdpu384aRcbInfo *rcb_inf
|
|||
rcb_bits = width * 13 * ((6 + 3 * row_uv_para) * (mbaff ? 2 : 1) + 2 * row_uv_para + 1.5);
|
||||
if (width > 4096)
|
||||
filterd_row_append = 27648;
|
||||
rcb_info[RCB_FILTERD_ROW].size = MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_ROW].size = filterd_row_append + MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_PROTECT_ROW].size = filterd_row_append + MPP_RCB_BYTES(rcb_bits / 2);
|
||||
|
||||
rcb_info[RCB_FILTERD_TILE_ROW].size = 0;
|
||||
|
|
|
|||
|
|
@ -704,7 +704,7 @@ static void h265d_refine_rcb_size(Vdpu383RcbInfo *rcb_info,
|
|||
// save space mode : half for RCB_FILTERD_ROW, half for RCB_FILTERD_PROTECT_ROW
|
||||
if (width > 4096)
|
||||
filterd_row_append = 27648;
|
||||
rcb_info[RCB_FILTERD_ROW].size = MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_ROW].size = MPP_RCB_BYTES(rcb_bits / 2) + filterd_row_append;
|
||||
rcb_info[RCB_FILTERD_PROTECT_ROW].size = MPP_RCB_BYTES(rcb_bits / 2) + filterd_row_append;
|
||||
rcb_bits += ext_row_align_size;
|
||||
if (tile_row_cut_num)
|
||||
|
|
|
|||
|
|
@ -698,7 +698,7 @@ static void h265d_refine_rcb_size(Vdpu384aRcbInfo *rcb_info,
|
|||
// save space mode : half for RCB_FILTERD_ROW, half for RCB_FILTERD_PROTECT_ROW
|
||||
if (width > 4096)
|
||||
filterd_row_append = 27648;
|
||||
rcb_info[RCB_FILTERD_ROW].size = MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_ROW].size = MPP_RCB_BYTES(rcb_bits / 2) + filterd_row_append;
|
||||
rcb_info[RCB_FILTERD_PROTECT_ROW].size = MPP_RCB_BYTES(rcb_bits / 2) + filterd_row_append;
|
||||
rcb_bits += ext_row_align_size;
|
||||
if (tile_row_cut_num)
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ static void vp9d_refine_rcb_size(Vdpu383RcbInfo *rcb_info,
|
|||
if (width > 4096)
|
||||
filterd_row_append = 27648;
|
||||
rcb_bits = (RK_U32)(MPP_ALIGN(width, 64) * (41 * bit_depth + 13));
|
||||
rcb_info[RCB_FILTERD_ROW].size = MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_ROW].size = filterd_row_append + MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_info[RCB_FILTERD_PROTECT_ROW].size = filterd_row_append + MPP_RCB_BYTES(rcb_bits / 2);
|
||||
rcb_bits += ext_row_align_size;
|
||||
if (tile_row_num > 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue