1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
15 .. _compressed-formats:
17 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
19 .. flat-table:: Compressed Image Formats
27 * .. _V4L2-PIX-FMT-JPEG:
29 - ``V4L2_PIX_FMT_JPEG``
31 - TBD. See also :ref:`VIDIOC_G_JPEGCOMP <VIDIOC_G_JPEGCOMP>`,
32 :ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`.
33 * .. _V4L2-PIX-FMT-MPEG:
35 - ``V4L2_PIX_FMT_MPEG``
37 - MPEG multiplexed stream. The actual format is determined by
38 extended control ``V4L2_CID_MPEG_STREAM_TYPE``, see
39 :ref:`mpeg-control-id`.
40 * .. _V4L2-PIX-FMT-H264:
42 - ``V4L2_PIX_FMT_H264``
45 The decoder expects one Access Unit per buffer.
46 The encoder generates one Access Unit per buffer.
47 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
48 then the decoder has no requirements since it can parse all the
49 information from the raw bytestream.
50 * .. _V4L2-PIX-FMT-H264-NO-SC:
52 - ``V4L2_PIX_FMT_H264_NO_SC``
54 - H264 video elementary stream without start codes.
55 * .. _V4L2-PIX-FMT-H264-MVC:
57 - ``V4L2_PIX_FMT_H264_MVC``
59 - H264 MVC video elementary stream.
60 * .. _V4L2-PIX-FMT-H264-SLICE:
62 - ``V4L2_PIX_FMT_H264_SLICE``
64 - H264 parsed slice data, without the start code and as
65 extracted from the H264 bitstream. This format is adapted for
66 stateless video decoders that implement an H264 pipeline
67 (using the :ref:`mem2mem` and :ref:`media-request-api`).
68 This pixelformat has two modifiers that must be set at least once
69 through the ``V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE``
70 and ``V4L2_CID_MPEG_VIDEO_H264_START_CODE`` controls.
71 In addition, metadata associated with the frame to decode are
72 required to be passed through the ``V4L2_CID_MPEG_VIDEO_H264_SPS``,
73 ``V4L2_CID_MPEG_VIDEO_H264_PPS``,
74 ``V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX``,
75 ``V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAMS`` and
76 ``V4L2_CID_MPEG_VIDEO_H264_DECODE_PARAMS`` controls. See the
77 :ref:`associated Codec Control IDs <v4l2-mpeg-h264>`. Exactly
78 one output and one capture buffer must be provided for use
79 with this pixel format. The output buffer must contain the
80 appropriate number of macroblocks to decode a full
81 corresponding frame to the matching capture buffer.
85 This format is not yet part of the public kernel API and it
86 is expected to change.
88 * .. _V4L2-PIX-FMT-H263:
90 - ``V4L2_PIX_FMT_H263``
92 - H263 video elementary stream.
93 * .. _V4L2-PIX-FMT-MPEG1:
95 - ``V4L2_PIX_FMT_MPEG1``
97 - MPEG1 Picture. Each buffer starts with a Picture header, followed
98 by other headers as needed and ending with the Picture data.
99 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
100 then the decoder has no requirements since it can parse all the
101 information from the raw bytestream.
102 * .. _V4L2-PIX-FMT-MPEG2:
104 - ``V4L2_PIX_FMT_MPEG2``
106 - MPEG2 Picture. Each buffer starts with a Picture header, followed
107 by other headers as needed and ending with the Picture data.
108 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
109 then the decoder has no requirements since it can parse all the
110 information from the raw bytestream.
111 * .. _V4L2-PIX-FMT-MPEG2-SLICE:
113 - ``V4L2_PIX_FMT_MPEG2_SLICE``
115 - MPEG-2 parsed slice data, as extracted from the MPEG-2 bitstream.
116 This format is adapted for stateless video decoders that implement a
117 MPEG-2 pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
118 Metadata associated with the frame to decode is required to be passed
119 through the ``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS`` control and
120 quantization matrices can optionally be specified through the
121 ``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION`` control.
122 See the :ref:`associated Codec Control IDs <v4l2-mpeg-mpeg2>`.
123 Exactly one output and one capture buffer must be provided for use with
124 this pixel format. The output buffer must contain the appropriate number
125 of macroblocks to decode a full corresponding frame to the matching
127 * .. _V4L2-PIX-FMT-MPEG4:
129 - ``V4L2_PIX_FMT_MPEG4``
131 - MPEG4 video elementary stream.
132 * .. _V4L2-PIX-FMT-XVID:
134 - ``V4L2_PIX_FMT_XVID``
136 - Xvid video elementary stream.
137 * .. _V4L2-PIX-FMT-VC1-ANNEX-G:
139 - ``V4L2_PIX_FMT_VC1_ANNEX_G``
141 - VC1, SMPTE 421M Annex G compliant stream.
142 * .. _V4L2-PIX-FMT-VC1-ANNEX-L:
144 - ``V4L2_PIX_FMT_VC1_ANNEX_L``
146 - VC1, SMPTE 421M Annex L compliant stream.
147 * .. _V4L2-PIX-FMT-VP8:
149 - ``V4L2_PIX_FMT_VP8``
151 - VP8 compressed video frame. The encoder generates one
152 compressed frame per buffer, and the decoder requires one
153 compressed frame per buffer.
154 * .. _V4L2-PIX-FMT-VP8-FRAME:
156 - ``V4L2_PIX_FMT_VP8_FRAME``
158 - VP8 parsed frame, as extracted from the container.
159 This format is adapted for stateless video decoders that implement a
160 VP8 pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
161 Metadata associated with the frame to decode is required to be passed
162 through the ``V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER`` control.
163 See the :ref:`associated Codec Control IDs <v4l2-mpeg-vp8>`.
164 Exactly one output and one capture buffer must be provided for use with
165 this pixel format. The output buffer must contain the appropriate number
166 of macroblocks to decode a full corresponding frame to the matching
171 This format is not yet part of the public kernel API and it
172 is expected to change.
174 * .. _V4L2-PIX-FMT-VP9:
176 - ``V4L2_PIX_FMT_VP9``
178 - VP9 compressed video frame. The encoder generates one
179 compressed frame per buffer, and the decoder requires one
180 compressed frame per buffer.
181 * .. _V4L2-PIX-FMT-HEVC:
183 - ``V4L2_PIX_FMT_HEVC``
185 - HEVC/H.265 Access Unit.
186 The decoder expects one Access Unit per buffer.
187 The encoder generates one Access Unit per buffer.
188 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
189 then the decoder has no requirements since it can parse all the
190 information from the raw bytestream.
191 * .. _V4L2-PIX-FMT-FWHT:
193 - ``V4L2_PIX_FMT_FWHT``
195 - Video elementary stream using a codec based on the Fast Walsh Hadamard
196 Transform. This codec is implemented by the vicodec ('Virtual Codec')
197 driver. See the codec-fwht.h header for more details.
198 :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
199 since the decoder can parse all the information from the raw bytestream.
200 * .. _V4L2-PIX-FMT-FWHT-STATELESS:
202 - ``V4L2_PIX_FMT_FWHT_STATELESS``
204 - Same format as V4L2_PIX_FMT_FWHT but requires stateless codec implementation.
205 See the :ref:`associated Codec Control IDs <v4l2-mpeg-fwht>`.