Introduce a new pixel format, V4L2_PIX_FMT_AV1, to the
Video4Linux2(V4L2) API. This format is intended for AV1
bitstreams in stateful decoding/encoding workflows.
The fourcc code 'AV10' is used to distinguish
this format from the existing V4L2_PIX_FMT_AV1_FRAME,
which is used for stateless AV1 decoder implementation.
Signed-off-by: Deepa Guthyappa Madivalara <deepa.madivalara@oss.qualcomm.com>
---
Documentation/userspace-api/media/v4l/pixfmt-compressed.rst | 8 ++++++++
include/uapi/linux/videodev2.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
index 806ed73ac474ce0e6df00f902850db9fd0db240e..043ec57d7d48a36005f2a0121a5bc7b733d06590 100644
--- a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
+++ b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
@@ -274,6 +274,14 @@ Compressed Formats
of macroblocks to decode a full corresponding frame to the matching
capture buffer.
+ * .. _V4L2-PIX-FMT-AV1:
+
+ - ``V4L2_PIX_FMT_AV1``
+ - 'AV10'
+ - AV1 compressed video frame. This format is adapted for implementing AV1
+ pipeline as stateful video decoder. The decoder expects one Temporal
+ Unit per buffer from OBU-stream or AnnexB.
+ The encoder generates one Temporal Unit per buffer.
.. raw:: latex
\normalsize
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index becd08fdbddb857f8f2bf205d2164dc6e20e80b2..4c07ad6afd45d6a56d19d65fd25f091d81725823 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -775,6 +775,7 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */
#define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */
#define V4L2_PIX_FMT_AV1_FRAME v4l2_fourcc('A', 'V', '1', 'F') /* AV1 parsed frame */
+#define V4L2_PIX_FMT_AV1 v4l2_fourcc('A', 'V', '1', '0') /* AV1 (stateful) */
#define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson Spark */
#define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8 */
#define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0') /* RealVideo 9 & 10 */
--
2.34.1
Hi,
Le mercredi 01 octobre 2025 à 12:00 -0700, Deepa Guthyappa Madivalara a écrit :
> Introduce a new pixel format, V4L2_PIX_FMT_AV1, to the
> Video4Linux2(V4L2) API. This format is intended for AV1
> bitstreams in stateful decoding/encoding workflows.
> The fourcc code 'AV10' is used to distinguish
> this format from the existing V4L2_PIX_FMT_AV1_FRAME,
> which is used for stateless AV1 decoder implementation.
>
> Signed-off-by: Deepa Guthyappa Madivalara <deepa.madivalara@oss.qualcomm.com>
> ---
> Documentation/userspace-api/media/v4l/pixfmt-compressed.rst | 8 ++++++++
> include/uapi/linux/videodev2.h | 1 +
> 2 files changed, 9 insertions(+)
>
> diff --git a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
> b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
> index
> 806ed73ac474ce0e6df00f902850db9fd0db240e..043ec57d7d48a36005f2a0121a5bc7b733d0
> 6590 100644
> --- a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
> +++ b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
> @@ -274,6 +274,14 @@ Compressed Formats
> of macroblocks to decode a full corresponding frame to the matching
> capture buffer.
>
> + * .. _V4L2-PIX-FMT-AV1:
> +
> + - ``V4L2_PIX_FMT_AV1``
> + - 'AV10'
> + - AV1 compressed video frame. This format is adapted for implementing
> AV1
> + pipeline as stateful video decoder. The decoder expects one Temporal
I would do a small edit here. Instead of stating that this is for decoders, I
would rather document the intended behaviour for video codec. This way the spec
remains open for CAPTURE driver to produce AV1 in the future, or OUTPUT driver
consuming it in the future.
> + Unit per buffer from OBU-stream or AnnexB.
> + The encoder generates one Temporal Unit per buffer.
Otherwise I'm fine with the proposal of using TU aligned. Similar to other
codecs, we can always allow adapting the behaviour using controls, keeping this
as the mandatory default so it just works regardless of the HW we run on.
regards,
Nicolas
> .. raw:: latex
>
> \normalsize
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index
> becd08fdbddb857f8f2bf205d2164dc6e20e80b2..4c07ad6afd45d6a56d19d65fd25f091d8172
> 5823 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -775,6 +775,7 @@ struct v4l2_pix_format {
> #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264
> parsed slices */
> #define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC
> parsed slices */
> #define V4L2_PIX_FMT_AV1_FRAME v4l2_fourcc('A', 'V', '1', 'F') /* AV1 parsed
> frame */
> +#define V4L2_PIX_FMT_AV1 v4l2_fourcc('A', 'V', '1', '0') /* AV1
> (stateful) */
> #define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson
> Spark */
> #define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8
> */
> #define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0') /* RealVideo 9
> & 10 */
On 10/2/2025 12:42 PM, Nicolas Dufresne wrote:
> Hi,
>
> Le mercredi 01 octobre 2025 à 12:00 -0700, Deepa Guthyappa Madivalara a écrit :
>> Introduce a new pixel format, V4L2_PIX_FMT_AV1, to the
>> Video4Linux2(V4L2) API. This format is intended for AV1
>> bitstreams in stateful decoding/encoding workflows.
>> The fourcc code 'AV10' is used to distinguish
>> this format from the existing V4L2_PIX_FMT_AV1_FRAME,
>> which is used for stateless AV1 decoder implementation.
>>
>> Signed-off-by: Deepa Guthyappa Madivalara <deepa.madivalara@oss.qualcomm.com>
>> ---
>> Documentation/userspace-api/media/v4l/pixfmt-compressed.rst | 8 ++++++++
>> include/uapi/linux/videodev2.h | 1 +
>> 2 files changed, 9 insertions(+)
>>
>> diff --git a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
>> b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
>> index
>> 806ed73ac474ce0e6df00f902850db9fd0db240e..043ec57d7d48a36005f2a0121a5bc7b733d0
>> 6590 100644
>> --- a/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
>> +++ b/Documentation/userspace-api/media/v4l/pixfmt-compressed.rst
>> @@ -274,6 +274,14 @@ Compressed Formats
>> of macroblocks to decode a full corresponding frame to the matching
>> capture buffer.
>>
>> + * .. _V4L2-PIX-FMT-AV1:
>> +
>> + - ``V4L2_PIX_FMT_AV1``
>> + - 'AV10'
>> + - AV1 compressed video frame. This format is adapted for implementing
>> AV1
>> + pipeline as stateful video decoder. The decoder expects one Temporal
> I would do a small edit here. Instead of stating that this is for decoders, I
> would rather document the intended behaviour for video codec. This way the spec
> remains open for CAPTURE driver to produce AV1 in the future, or OUTPUT driver
> consuming it in the future.
>
>> + Unit per buffer from OBU-stream or AnnexB.
>> + The encoder generates one Temporal Unit per buffer.
> Otherwise I'm fine with the proposal of using TU aligned. Similar to other
> codecs, we can always allow adapting the behaviour using controls, keeping this
> as the mandatory default so it just works regardless of the HW we run on.
>
> regards,
> Nicolas
Agreed. Thank you. I will update it in the next patch.
Regards,
Deepa
>> .. raw:: latex
>>
>> \normalsize
>> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
>> index
>> becd08fdbddb857f8f2bf205d2164dc6e20e80b2..4c07ad6afd45d6a56d19d65fd25f091d8172
>> 5823 100644
>> --- a/include/uapi/linux/videodev2.h
>> +++ b/include/uapi/linux/videodev2.h
>> @@ -775,6 +775,7 @@ struct v4l2_pix_format {
>> #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264
>> parsed slices */
>> #define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC
>> parsed slices */
>> #define V4L2_PIX_FMT_AV1_FRAME v4l2_fourcc('A', 'V', '1', 'F') /* AV1 parsed
>> frame */
>> +#define V4L2_PIX_FMT_AV1 v4l2_fourcc('A', 'V', '1', '0') /* AV1
>> (stateful) */
>> #define V4L2_PIX_FMT_SPK v4l2_fourcc('S', 'P', 'K', '0') /* Sorenson
>> Spark */
>> #define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8
>> */
>> #define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0') /* RealVideo 9
>> & 10 */
© 2016 - 2026 Red Hat, Inc.