From: Daniel Almeida <daniel.almeida@collabora.com>
To: opensource india <opensource206@gmail.com>
Cc: mchehab@kernel.org, hverkuil@kernel.org, ribalda@chromium.org,
laurent.pinchart@ideasonboard.com, yunkec@google.com,
sakari.ailus@linux.intel.com, james.cowgill@blaize.com,
hansg@kernel.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org
Subject: Re: [PATCH v3] media: v4l2-ctrls: add full AV1 profile validation in validate_av1_sequence()
Date: Sat, 27 Sep 2025 10:56:46 +0200 [thread overview]
Message-ID: <873C85C5-2BCB-4631-BA18-919CE448A7CE@collabora.com> (raw)
In-Reply-To: <CAKPKb882DgYB2fZXRDU_y1Xqz6GtFEErvzzET9eOAm=db0ns1g@mail.gmail.com>
Hi, I’ll review this in the coming weeks.
> On 27 Sep 2025, at 06:51, opensource india <opensource206@gmail.com> wrote:
>
> On Sat, Sep 13, 2025 at 4:23 PM Pavan Bobba <opensource206@gmail.com> wrote:
>>
>> Complete the "TODO: PROFILES" by enforcing profile-specific and
>> monochrome constraints as defined by the AV1 specification
>> (Section 5.5.2, "Color config syntax").
>>
>> The validator now checks:
>>
>> - Flags: reject any unknown bits set in sequence->flags
>> - Profile range: only profiles 0..2 are valid
>> - Profile 0: 8/10-bit only, subsampling must be 4:2:0 (sx=1, sy=1),
>> monochrome allowed
>> - Profile 1: 8/10-bit only, subsampling must be 4:4:4 (sx=0, sy=0),
>> monochrome forbidden
>> - Profile 2:
>> * 8/10-bit: only 4:2:2 allowed (sx=1, sy=0)
>> * 12-bit: 4:4:4 (sx=0, sy=0), 4:2:2 (sx=1, sy=0), or 4:2:0 (sx=1, sy=1)
>> allowed
>> - Monochrome path (all profiles except 1): forces subsampling_x=1,
>> subsampling_y=1, separate_uv_delta_q=0
>>
>> These checks prevent userspace from providing invalid AV1 sequence
>> headers that would otherwise be accepted, leading to undefined driver
>> or hardware behavior.
Mauro,
A reminder that I have been warning about this for quite a while [0], which
includes mentioning that patches like this, although welcome, do not solve the
root issue completely.
I keep working on what I believe to be the solution [1][2]. I would appreciate if
we could restart this discussion.
[0]: https://lwn.net/Articles/970565/
[1]: https://lore.kernel.org/linux-media/20250818-v4l2-v1-0-6887e772aac2@collabora.com/
[2]: https://lwn.net/Articles/963966/
next prev parent reply other threads:[~2025-09-27 8:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-13 10:52 Pavan Bobba
2025-09-27 4:51 ` opensource india
2025-09-27 8:56 ` Daniel Almeida [this message]
2025-10-07 10:50 ` opensource india
2025-10-07 13:49 ` Daniel Almeida
2025-10-18 9:21 ` opensource india
2025-10-22 7:14 ` Hans Verkuil
2025-10-23 10:32 ` opensource india
2025-10-23 10:43 ` Hans Verkuil
2025-10-23 13:03 ` John Cox
2025-10-23 13:14 ` Hans Verkuil
[not found] ` <CAKPKb88Tov27+c227p8k0KAuZtm_LNNxDkf=5YBfDYw94afFPw@mail.gmail.com>
2025-10-27 15:54 ` Hans Verkuil
2025-10-28 6:35 ` opensource india
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873C85C5-2BCB-4631-BA18-919CE448A7CE@collabora.com \
--to=daniel.almeida@collabora.com \
--cc=hansg@kernel.org \
--cc=hverkuil@kernel.org \
--cc=james.cowgill@blaize.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=opensource206@gmail.com \
--cc=ribalda@chromium.org \
--cc=sakari.ailus@linux.intel.com \
--cc=yunkec@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®