summaryrefslogtreecommitdiff
path: root/drivers/media/v4l2-core/v4l2-ctrls-core.c
diff options
context:
space:
mode:
authorPavan Bobba <opensource206@gmail.com>2025-10-28 11:56:23 +0530
committerHans Verkuil <hverkuil+cisco@kernel.org>2025-10-28 11:06:11 +0100
commitc218ce4f98eccf5a40de64c559c52d61e9cc78ee (patch)
tree5009cefaed24795d0ffa30ab0d2df85dc4e4138e /drivers/media/v4l2-core/v4l2-ctrls-core.c
parentea299a2164262ff787c9d33f46049acccd120672 (diff)
media: v4l2-ctrls: set AV1 sequence flags for testing
Initialize additional AV1 sequence parameters in std_init_compound() to make the default AV1 sequence control compatible with compliance and userspace testing tools. Specifically, set: - enable both SUBSAMPLING_X and SUBSAMPLING_Y flags These defaults help ensure that V4L2_CID_AV1_SEQUENCE behaves consistently during validation and v4l2-compliance tests. Signed-off-by: Pavan Bobba <opensource206@gmail.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> [hverkuil: align everything a bit better] [hverkuil: replaced Pavan's comment with comment suggested by Nicolas] Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'drivers/media/v4l2-core/v4l2-ctrls-core.c')
-rw-r--r--drivers/media/v4l2-core/v4l2-ctrls-core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c
index 7c660cd61e48..209bc05883bb 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
@@ -160,7 +160,13 @@ static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx,
break;
case V4L2_CTRL_TYPE_AV1_SEQUENCE:
p_av1_sequence = p;
+ /*
+ * The initial profile is 0 which only allows YUV 420 subsampled
+ * data. Set the subsampling flags accordingly.
+ */
p_av1_sequence->bit_depth = 8;
+ p_av1_sequence->flags |= V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X |
+ V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y;
break;
case V4L2_CTRL_TYPE_FWHT_PARAMS:
p_fwht_params = p;