[PATCH v7 2/3] media: verisilicon: AV1: Fix luma size

Nicolas Dufresne nicolas.dufresne at collabora.com
Mon Nov 23 19:30:54 PST 2026


Le vendredi 20 novembre 2026 à 15:31 +0100, Benjamin Gaignard a écrit :
> Use the values computed by v4l2 helpers to get luma size.
> Unlile before this will also take care of padding.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
> Fixes: 727a400686a2c ("media: verisilicon: Add Rockchip AV1 decoder")

Reviewed-by: Nicolas Dufresne <nicolas.dufresne at collabora.com>

> ---
>  drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c b/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c
> index 5da59104a966..5e0cd5268f22 100644
> --- a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c
> +++ b/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c
> @@ -221,7 +221,7 @@ static void rockchip_vpu981_av1_dec_clean_refs(struct hantro_ctx *ctx)
>  
>  static size_t rockchip_vpu981_av1_dec_luma_size(struct hantro_ctx *ctx)
>  {
> -	return ctx->dst_fmt.width * ctx->dst_fmt.height * ctx->bit_depth / 8;
> +	return ctx->ref_fmt.plane_fmt[0].bytesperline * ctx->ref_fmt.height;
>  }
>  
>  static size_t rockchip_vpu981_av1_dec_chroma_size(struct hantro_ctx *ctx)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20261123/9d86b1f5/attachment.sig>


More information about the Linux-rockchip mailing list