diff options
| author | Pavan Bobba <opensource206@gmail.com> | 2025-09-13 16:22:46 +0530 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2025-10-20 09:23:17 +0200 |
| commit | 2ce45197befbdc60f72288346c67930db3a4489e (patch) | |
| tree | b4bf5613ada970060e2b50d8f6ff4eb3606b8da4 /drivers/media/platform/allegro-dvt/allegro-core.c | |
| parent | cdd0f118ef87db8a664fb5ea366fd1766d2df1cd (diff) | |
media: v4l2-ctrls: add full AV1 profile validation in validate_av1_sequence()
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.
Signed-off-by: Pavan Bobba <opensource206@gmail.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'drivers/media/platform/allegro-dvt/allegro-core.c')
0 files changed, 0 insertions, 0 deletions