1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
8 .. _compressed-formats:
14 .. tabularcolumns:: |p{5.8cm}|p{1.2cm}|p{10.3cm}|
16 .. cssclass:: longtable
18 .. flat-table:: Compressed Image Formats
26 * .. _V4L2-PIX-FMT-JPEG:
28 - ``V4L2_PIX_FMT_JPEG``
30 - TBD. See also :ref:`VIDIOC_G_JPEGCOMP <VIDIOC_G_JPEGCOMP>`,
31 :ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`.
32 * .. _V4L2-PIX-FMT-MPEG:
34 - ``V4L2_PIX_FMT_MPEG``
36 - MPEG multiplexed stream. The actual format is determined by
37 extended control ``V4L2_CID_MPEG_STREAM_TYPE``, see
38 :ref:`mpeg-control-id`.
39 * .. _V4L2-PIX-FMT-H264:
41 - ``V4L2_PIX_FMT_H264``
44 The decoder expects one Access Unit per buffer.
45 The encoder generates one Access Unit per buffer.
46 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
47 then the decoder has no requirements since it can parse all the
48 information from the raw bytestream.
49 * .. _V4L2-PIX-FMT-H264-NO-SC:
51 - ``V4L2_PIX_FMT_H264_NO_SC``
53 - H264 video elementary stream without start codes.
54 * .. _V4L2-PIX-FMT-H264-MVC:
56 - ``V4L2_PIX_FMT_H264_MVC``
58 - H264 MVC video elementary stream.
59 * .. _V4L2-PIX-FMT-H264-SLICE:
61 - ``V4L2_PIX_FMT_H264_SLICE``
63 - H264 parsed slice data, including slice headers, either with or
64 without the start code, as extracted from the H264 bitstream.
65 This format is adapted for stateless video decoders that implement an
66 H264 pipeline with the :ref:`stateless_decoder`.
67 This pixelformat has two modifiers that must be set at least once
68 through the ``V4L2_CID_STATELESS_H264_DECODE_MODE``
69 and ``V4L2_CID_STATELESS_H264_START_CODE`` controls.
70 In addition, metadata associated with the frame to decode are
71 required to be passed through the ``V4L2_CID_STATELESS_H264_SPS``,
72 ``V4L2_CID_STATELESS_H264_PPS``,
73 ``V4L2_CID_STATELESS_H264_SCALING_MATRIX``,
74 ``V4L2_CID_STATELESS_H264_SLICE_PARAMS`` and
75 ``V4L2_CID_STATELESS_H264_DECODE_PARAMS`` controls. See the
76 :ref:`associated Codec Control IDs <v4l2-codec-stateless-h264>`.
77 Exactly one output and one capture buffer must be provided for use
78 with this pixel format. The output buffer must contain the
79 appropriate number of macroblocks to decode a full
80 corresponding frame to the matching capture buffer.
82 The syntax for this format is documented in :ref:`h264`, section
83 7.3.2.8 "Slice layer without partitioning RBSP syntax" and the following
86 * .. _V4L2-PIX-FMT-H263:
88 - ``V4L2_PIX_FMT_H263``
90 - H263 video elementary stream.
91 * .. _V4L2-PIX-FMT-SPK:
93 - ``V4L2_PIX_FMT_SPK``
95 - Sorenson Spark is an implementation of H.263 for use in Flash Video and Adobe Flash files
96 * .. _V4L2-PIX-FMT-MPEG1:
98 - ``V4L2_PIX_FMT_MPEG1``
100 - MPEG1 Picture. Each buffer starts with a Picture header, followed
101 by other headers as needed and ending with the Picture data.
102 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
103 then the decoder has no requirements since it can parse all the
104 information from the raw bytestream.
105 * .. _V4L2-PIX-FMT-MPEG2:
107 - ``V4L2_PIX_FMT_MPEG2``
109 - MPEG2 Picture. Each buffer starts with a Picture header, followed
110 by other headers as needed and ending with the Picture data.
111 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
112 then the decoder has no requirements since it can parse all the
113 information from the raw bytestream.
114 * .. _V4L2-PIX-FMT-MPEG2-SLICE:
116 - ``V4L2_PIX_FMT_MPEG2_SLICE``
118 - MPEG-2 parsed slice data, as extracted from the MPEG-2 bitstream.
119 This format is adapted for stateless video decoders that implement a
120 MPEG-2 pipeline with the :ref:`stateless_decoder`.
121 Metadata associated with the frame to decode is required to be passed
122 through the ``V4L2_CID_STATELESS_MPEG2_SEQUENCE`` and
123 ``V4L2_CID_STATELESS_MPEG2_PICTURE`` controls.
124 Quantisation matrices can optionally be specified through the
125 ``V4L2_CID_STATELESS_MPEG2_QUANTISATION`` control.
126 See the :ref:`associated Codec Control IDs <v4l2-codec-stateless-mpeg2>`.
127 Exactly one output and one capture buffer must be provided for use with
128 this pixel format. The output buffer must contain the appropriate number
129 of macroblocks to decode a full corresponding frame to the matching
131 * .. _V4L2-PIX-FMT-MPEG4:
133 - ``V4L2_PIX_FMT_MPEG4``
135 - MPEG4 video elementary stream.
136 * .. _V4L2-PIX-FMT-XVID:
138 - ``V4L2_PIX_FMT_XVID``
140 - Xvid video elementary stream.
141 * .. _V4L2-PIX-FMT-VC1-ANNEX-G:
143 - ``V4L2_PIX_FMT_VC1_ANNEX_G``
145 - VC1, SMPTE 421M Annex G compliant stream.
146 * .. _V4L2-PIX-FMT-VC1-ANNEX-L:
148 - ``V4L2_PIX_FMT_VC1_ANNEX_L``
150 - VC1, SMPTE 421M Annex L compliant stream.
151 * .. _V4L2-PIX-FMT-VP8:
153 - ``V4L2_PIX_FMT_VP8``
155 - VP8 compressed video frame. The encoder generates one
156 compressed frame per buffer, and the decoder requires one
157 compressed frame per buffer.
158 * .. _V4L2-PIX-FMT-VP8-FRAME:
160 - ``V4L2_PIX_FMT_VP8_FRAME``
162 - VP8 parsed frame, including the frame header, as extracted from the container.
163 This format is adapted for stateless video decoders that implement an
164 VP8 pipeline with the :ref:`stateless_decoder`.
165 Metadata associated with the frame to decode is required to be passed
166 through the ``V4L2_CID_STATELESS_VP8_FRAME`` control.
167 See the :ref:`associated Codec Control IDs <v4l2-codec-stateless-vp8>`.
168 Exactly one output and one capture buffer must be provided for use with
169 this pixel format. The output buffer must contain the appropriate number
170 of macroblocks to decode a full corresponding frame to the matching
173 * .. _V4L2-PIX-FMT-VP9:
175 - ``V4L2_PIX_FMT_VP9``
177 - VP9 compressed video frame. The encoder generates one
178 compressed frame per buffer, and the decoder requires one
179 compressed frame per buffer.
180 * .. _V4L2-PIX-FMT-VP9-FRAME:
182 - ``V4L2_PIX_FMT_VP9_FRAME``
184 - VP9 parsed frame, including the frame header, as extracted from the container.
185 This format is adapted for stateless video decoders that implement a
186 VP9 pipeline with the :ref:`stateless_decoder`.
187 Metadata associated with the frame to decode is required to be passed
188 through the ``V4L2_CID_STATELESS_VP9_FRAME`` and
189 the ``V4L2_CID_STATELESS_VP9_COMPRESSED_HDR`` controls.
190 See the :ref:`associated Codec Control IDs <v4l2-codec-stateless-vp9>`.
191 Exactly one output and one capture buffer must be provided for use with
192 this pixel format. The output buffer must contain the appropriate number
193 of macroblocks to decode a full corresponding frame to the matching
195 * .. _V4L2-PIX-FMT-HEVC:
197 - ``V4L2_PIX_FMT_HEVC``
199 - HEVC/H.265 Access Unit.
200 The decoder expects one Access Unit per buffer.
201 The encoder generates one Access Unit per buffer.
202 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
203 then the decoder has no requirements since it can parse all the
204 information from the raw bytestream.
205 * .. _V4L2-PIX-FMT-HEVC-SLICE:
207 - ``V4L2_PIX_FMT_HEVC_SLICE``
209 - HEVC parsed slice data, as extracted from the HEVC bitstream.
210 This format is adapted for stateless video decoders that implement a
211 HEVC pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
212 This pixelformat has two modifiers that must be set at least once
213 through the ``V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE``
214 and ``V4L2_CID_MPEG_VIDEO_HEVC_START_CODE`` controls.
215 Metadata associated with the frame to decode is required to be passed
216 through the following controls:
217 ``V4L2_CID_MPEG_VIDEO_HEVC_SPS``,
218 ``V4L2_CID_MPEG_VIDEO_HEVC_PPS``, and
219 ``V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS``.
220 See the :ref:`associated Codec Control IDs <v4l2-codec-stateless-hevc>`.
221 Buffers associated with this pixel format must contain the appropriate
222 number of macroblocks to decode a full corresponding frame.
223 * .. _V4L2-PIX-FMT-FWHT:
225 - ``V4L2_PIX_FMT_FWHT``
227 - Video elementary stream using a codec based on the Fast Walsh Hadamard
228 Transform. This codec is implemented by the vicodec ('Virtual Codec')
229 driver. See the codec-fwht.h header for more details.
230 :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
231 since the decoder can parse all the information from the raw bytestream.
232 * .. _V4L2-PIX-FMT-FWHT-STATELESS:
234 - ``V4L2_PIX_FMT_FWHT_STATELESS``
236 - Same format as V4L2_PIX_FMT_FWHT but requires stateless codec implementation.
237 Metadata associated with the frame to decode is required to be passed
238 through the ``V4L2_CID_STATELESS_FWHT_PARAMS`` control.
239 See the :ref:`associated Codec Control ID <codec-stateless-fwht>`.
240 * .. _V4L2-PIX-FMT-RV30:
242 - ``V4L2_PIX_FMT_RV30``
244 - RealVideo, or also spelled as Real Video, is a suite of
245 proprietary video compression formats developed by
246 RealNetworks - the specific format changes with the version.
247 RealVideo codecs are identified by four-character codes.
248 RV30 corresponds to RealVideo 8, suspected to be based
249 largely on an early draft of H.264
250 * .. _V4L2-PIX-FMT-RV40:
252 - ``V4L2_PIX_FMT_RV40``
254 - RV40 represents RealVideo 9 and RealVideo 10.
255 RealVideo 9, suspected to be based on H.264.
256 RealVideo 10, aka RV9 EHQ, This refers to an improved encoder
257 for the RV9 format that is fully backwards compatible with
258 RV9 players - the format and decoder did not change, only
259 the encoder did. As a result, it uses the same FourCC.
261 * .. _V4L2-PIX-FMT-AV1-FRAME:
263 - ``V4L2_PIX_FMT_AV1_FRAME``
265 - AV1 parsed frame, including the frame header, as extracted from the container.
266 This format is adapted for stateless video decoders that implement a AV1
267 pipeline with the :ref:`stateless_decoder`. Metadata associated with the
268 frame to decode is required to be passed through the
269 ``V4L2_CID_STATELESS_AV1_SEQUENCE``, ``V4L2_CID_STATELESS_AV1_FRAME``,
270 and ``V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY`` controls.
271 See the :ref:`associated Codec Control IDs <v4l2-codec-stateless-av1>`.
272 Exactly one output and one capture buffer must be provided for use with
273 this pixel format. The output buffer must contain the appropriate number
274 of macroblocks to decode a full corresponding frame to the matching