[PATCH v6] media: verisilicon: Create AV1 helper library

Nicolas Dufresne nicolas.dufresne at collabora.com
Thu Nov 19 13:45:25 PST 2026


Hi,

Le lundi 16 novembre 2026 à 14:33 +0100, Benjamin Gaignard a écrit :
> Le 10/09/2026 à 11:20, Benjamin Gaignard a écrit :
> > Regroup all none hardware related AV1 functions into a helper library.
> > The goal is to avoid code duplication for future AV1 codecs.
> > 
> > Tested on rock 5b board Fluster score remains the same 204/241.
> > 
> > Signed-off-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
> > Reviewed-by: Nicolas Dufresne <nicolas.dufresne at collabora.com>
> 
> Gentle ping on this patch.

Nice ping, but it does not apply. I've manually applied it, but will leave to
you to retest.

https://gitlab.freedesktop.org/linux-media/users/ndufresne/-/commit/c98580a49562a26d2cfc11fc0eb88e6e75f329d8

While doing so I notice few hidden changes:

rockchip_vpu981_av1_dec_luma_size -> hantro_av1_luma_size:

-	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;


Change is really good, and it allows for padding, but totally undocumented, and
would be better placed in its own commit. And then couple of bound check, which:


int hantro_av1_get_frame_index(struct hantro_ctx *ctx, int ref):
+	if (ref < 0 || ref >= V4L2_AV1_REFS_PER_FRAME)
+		return AV1_INVALID_IDX;

void hantro_av1_set_prob(struct hantro_ctx *ctx):
 	} else {
+		if (frame->primary_ref_frame < 0 ||
+		    frame->primary_ref_frame >= V4L2_AV1_REFS_PER_FRAME)
+			return;


These should clearly be prepend patches with Fixes tag for backport, and not
hidden in the rework. Looking for your v7.

Nicolas
-------------- 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/20261119/f2a97ef7/attachment-0001.sig>


More information about the Linux-rockchip mailing list