Skip to contentSkip to conversation

media: v4l2-ctrls: set AV1 sequence flags for testing

PATCH In review Pavan Bobba 3 participants 3 messages Oct 28, 2025 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/media/v4l2-core/v4l2-ctrls-core.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/media/v4l2-core/v4l2-ctrls-core.c +6 -0
index fa03341588e4..8809912797d2 100644
@@ -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;
+		/*
+		 *setting below parameters to make AV1 sequence compatible
+		 *for the testing
+		 */
 		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;
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Le mardi 28 octobre 2025 à 11:56 +0530, Pavan Bobba a écrit :

Quoted 28 lines

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.

---
 drivers/media/v4l2-core/v4l2-ctrls-core.c | 6 ++++++

 1 file changed, 6 insertions(+)
drivers/media/v4l2-core/v4l2-ctrls-core.c +0 -0
index fa03341588e4..8809912797d2 100644
@@ -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;

drivers/media/v4l2-core/v4l2-ctrls-core.c +4 -0
+		/*
+		 *setting below parameters to make AV1 sequence compatible
+		 *for the testing
+		 */

  p_av1_sequence->bit_depth = 8;

drivers/media/v4l2-core/v4l2-ctrls-core.c static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx, · line 169

Quoted 2 lines
drivers/media/v4l2-core/v4l2-ctrls-core.c +2 -0
+		p_av1_sequence->flags |= V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X |
+			V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y;

There is a bit of a lack of clarity upon why we do this. I would comment on that.

/**
* The initial profile is 0 which only allows YUV 420 subsampled data. Set the
* subsampling flags accordingly.
*/

With the correction:

cheers,
Nicolas

Quoted 3 lines

  break;
  case V4L2_CTRL_TYPE_FWHT_PARAMS:
  p_fwht_params = p;

#2 lore raw
Quoted 37 lines · Nicolas Dufresne

Hi,

Le mardi 28 octobre 2025 à 11:56 +0530, Pavan Bobba a écrit :

Quoted 28 lines

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.

---
 drivers/media/v4l2-core/v4l2-ctrls-core.c | 6 ++++++

 1 file changed, 6 insertions(+)
drivers/media/v4l2-core/v4l2-ctrls-core.c +0 -0
index fa03341588e4..8809912797d2 100644
@@ -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;

drivers/media/v4l2-core/v4l2-ctrls-core.c +4 -0
+		/*
+		 *setting below parameters to make AV1 sequence compatible
+		 *for the testing
+		 */

  p_av1_sequence->bit_depth = 8;

drivers/media/v4l2-core/v4l2-ctrls-core.c static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx, · line 169

Quoted 2 lines
drivers/media/v4l2-core/v4l2-ctrls-core.c +2 -0
+		p_av1_sequence->flags |= V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_X |
+			V4L2_AV1_SEQUENCE_FLAG_SUBSAMPLING_Y;

There is a bit of a lack of clarity upon why we do this. I would comment on that.

Quoted 7 lines

/**
* The initial profile is 0 which only allows YUV 420 subsampled data. Set the
* subsampling flags accordingly.
*/

With the correction:

I'll add that and fast-track this patch so the virtme CI regression tests work again.

Thank you!

Hans

Quoted 7 lines

cheers,
Nicolas

Quoted 3 lines

  break;
  case V4L2_CTRL_TYPE_FWHT_PARAMS:
  p_fwht_params = p;