[PATCH v3 05/17] media: v4l2-ctrls: validate vp9 tile_rows_log2

Nicolas Dufresne nicolas at ndufresne.ca
Thu Nov 26 19:14:10 PST 2026


Le mercredi 25 novembre 2026 à 10:17 +0100, Sofus Forstreuter a écrit :
> On Tue, Nov 24, 2026 at 05:16:47PM -0500, Nicolas Dufresne wrote:
> > Le mardi 20 octobre 2026 à 11:37 +0200, Sofus Forstreuter a écrit :
> > > Reviewed-by: Neal Gompa <neal at gompa.dev>
> > > Signed-off-by: Sofus Forstreuter <sofus.c at icloud.com>
> > > ---
> > >  drivers/media/v4l2-core/v4l2-ctrls-core.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c
> > > index 922cf74c4eb8..384ff77771ea 100644
> > > --- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
> > > +++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
> > > @@ -638,7 +638,7 @@ validate_vp9_frame(struct v4l2_ctrl_vp9_frame *frame)
> > >  	 * According to the spec, tile_cols_log2 shall be less than or equal
> > >  	 * to 6.
> > >  	 */
> > > -	if (frame->tile_cols_log2 > 6)
> > > +	if (frame->tile_cols_log2 > 6 || frame->tile_rows_log2 > 2)
> > 
> > Shouldn't this be 6 too? (log2(64)).
> > 
> 
> The max for tile_rows_log2 is derived from the spec (6.2.13 Tile info syntax):
> 
> tile_rows_log2 = f(1)
> if (tile_rows_log2 == 1)
>   tile_rows_log2 += f(1)
> 
> This is also what eg. gstreamer does. I will add that to the commit message.

Thanks, note that I was also confusing AV1, my fault for hopping codecs that are
similar but different.

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/20261126/8ea41e7e/attachment.sig>


More information about the Linux-rockchip mailing list