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

From: Nicolas Dufresne

Date: Thu Nov 19 2026 - 16:45:40 EST


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@xxxxxxxxxxxxx>
> > Reviewed-by: Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx>
>
> 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

Attachment: signature.asc
Description: This is a digitally signed message part