media: verisilicon: Fix auxiliary buffer allocation size

Use v4l2_av1_tile_info->tile_cols to get the number of columns
in the frame and make auxiliary buffer memory size computation
more accurate.

Fixes: 727a400686 ("media: verisilicon: Add Rockchip AV1 decoder")
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
Benjamin Gaignard 2024-03-28 10:34:39 +01:00 committed by Hans Verkuil
parent 3be11cda62
commit 65e9f52ffd

View File

@ -257,7 +257,8 @@ static int rockchip_vpu981_av1_dec_tiles_reallocate(struct hantro_ctx *ctx)
struct hantro_dev *vpu = ctx->dev;
struct hantro_av1_dec_hw_ctx *av1_dec = &ctx->av1_dec;
struct hantro_av1_dec_ctrls *ctrls = &av1_dec->ctrls;
unsigned int num_tile_cols = 1 << ctrls->tile_group_entry->tile_col;
const struct v4l2_av1_tile_info *tile_info = &ctrls->frame->tile_info;
unsigned int num_tile_cols = tile_info->tile_cols;
unsigned int height = ALIGN(ctrls->frame->frame_height_minus_1 + 1, 64);
unsigned int height_in_sb = height / 64;
unsigned int stripe_num = ((height + 8) + 63) / 64;