1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
8 .. _compressed-formats:
10 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
12 .. flat-table:: Compressed Image Formats
20 * .. _V4L2-PIX-FMT-JPEG:
22 - ``V4L2_PIX_FMT_JPEG``
24 - TBD. See also :ref:`VIDIOC_G_JPEGCOMP <VIDIOC_G_JPEGCOMP>`,
25 :ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`.
26 * .. _V4L2-PIX-FMT-MPEG:
28 - ``V4L2_PIX_FMT_MPEG``
30 - MPEG multiplexed stream. The actual format is determined by
31 extended control ``V4L2_CID_MPEG_STREAM_TYPE``, see
32 :ref:`mpeg-control-id`.
33 * .. _V4L2-PIX-FMT-H264:
35 - ``V4L2_PIX_FMT_H264``
38 The decoder expects one Access Unit per buffer.
39 The encoder generates one Access Unit per buffer.
40 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
41 then the decoder has no requirements since it can parse all the
42 information from the raw bytestream.
43 * .. _V4L2-PIX-FMT-H264-NO-SC:
45 - ``V4L2_PIX_FMT_H264_NO_SC``
47 - H264 video elementary stream without start codes.
48 * .. _V4L2-PIX-FMT-H264-MVC:
50 - ``V4L2_PIX_FMT_H264_MVC``
52 - H264 MVC video elementary stream.
53 * .. _V4L2-PIX-FMT-H264-SLICE:
55 - ``V4L2_PIX_FMT_H264_SLICE``
57 - H264 parsed slice data, including slice headers, either with or
58 without the start code, as extracted from the H264 bitstream.
59 This format is adapted for stateless video decoders that implement an
60 H264 pipeline with the :ref:`stateless_decoder`.
61 This pixelformat has two modifiers that must be set at least once
62 through the ``V4L2_CID_STATELESS_H264_DECODE_MODE``
63 and ``V4L2_CID_STATELESS_H264_START_CODE`` controls.
64 In addition, metadata associated with the frame to decode are
65 required to be passed through the ``V4L2_CID_STATELESS_H264_SPS``,
66 ``V4L2_CID_STATELESS_H264_PPS``,
67 ``V4L2_CID_STATELESS_H264_SCALING_MATRIX``,
68 ``V4L2_CID_STATELESS_H264_SLICE_PARAMS`` and
69 ``V4L2_CID_STATELESS_H264_DECODE_PARAMS`` controls. See the
70 :ref:`associated Codec Control IDs <v4l2-codec-stateless-h264>`.
71 Exactly one output and one capture buffer must be provided for use
72 with this pixel format. The output buffer must contain the
73 appropriate number of macroblocks to decode a full
74 corresponding frame to the matching capture buffer.
76 The syntax for this format is documented in :ref:`h264`, section
77 7.3.2.8 "Slice layer without partitioning RBSP syntax" and the following
80 * .. _V4L2-PIX-FMT-H263:
82 - ``V4L2_PIX_FMT_H263``
84 - H263 video elementary stream.
85 * .. _V4L2-PIX-FMT-MPEG1:
87 - ``V4L2_PIX_FMT_MPEG1``
89 - MPEG1 Picture. Each buffer starts with a Picture header, followed
90 by other headers as needed and ending with the Picture data.
91 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
92 then the decoder has no requirements since it can parse all the
93 information from the raw bytestream.
94 * .. _V4L2-PIX-FMT-MPEG2:
96 - ``V4L2_PIX_FMT_MPEG2``
98 - MPEG2 Picture. Each buffer starts with a Picture header, followed
99 by other headers as needed and ending with the Picture data.
100 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
101 then the decoder has no requirements since it can parse all the
102 information from the raw bytestream.
103 * .. _V4L2-PIX-FMT-MPEG2-SLICE:
105 - ``V4L2_PIX_FMT_MPEG2_SLICE``
107 - MPEG-2 parsed slice data, as extracted from the MPEG-2 bitstream.
108 This format is adapted for stateless video decoders that implement a
109 MPEG-2 pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
110 Metadata associated with the frame to decode is required to be passed
111 through the ``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS`` control and
112 quantization matrices can optionally be specified through the
113 ``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION`` control.
114 See the :ref:`associated Codec Control IDs <v4l2-mpeg-mpeg2>`.
115 Exactly one output and one capture buffer must be provided for use with
116 this pixel format. The output buffer must contain the appropriate number
117 of macroblocks to decode a full corresponding frame to the matching
119 * .. _V4L2-PIX-FMT-MPEG4:
121 - ``V4L2_PIX_FMT_MPEG4``
123 - MPEG4 video elementary stream.
124 * .. _V4L2-PIX-FMT-XVID:
126 - ``V4L2_PIX_FMT_XVID``
128 - Xvid video elementary stream.
129 * .. _V4L2-PIX-FMT-VC1-ANNEX-G:
131 - ``V4L2_PIX_FMT_VC1_ANNEX_G``
133 - VC1, SMPTE 421M Annex G compliant stream.
134 * .. _V4L2-PIX-FMT-VC1-ANNEX-L:
136 - ``V4L2_PIX_FMT_VC1_ANNEX_L``
138 - VC1, SMPTE 421M Annex L compliant stream.
139 * .. _V4L2-PIX-FMT-VP8:
141 - ``V4L2_PIX_FMT_VP8``
143 - VP8 compressed video frame. The encoder generates one
144 compressed frame per buffer, and the decoder requires one
145 compressed frame per buffer.
146 * .. _V4L2-PIX-FMT-VP8-FRAME:
148 - ``V4L2_PIX_FMT_VP8_FRAME``
150 - VP8 parsed frame, as extracted from the container.
151 This format is adapted for stateless video decoders that implement a
152 VP8 pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
153 Metadata associated with the frame to decode is required to be passed
154 through the ``V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER`` control.
155 See the :ref:`associated Codec Control IDs <v4l2-mpeg-vp8>`.
156 Exactly one output and one capture buffer must be provided for use with
157 this pixel format. The output buffer must contain the appropriate number
158 of macroblocks to decode a full corresponding frame to the matching
163 This format is not yet part of the public kernel API and it
164 is expected to change.
166 * .. _V4L2-PIX-FMT-VP9:
168 - ``V4L2_PIX_FMT_VP9``
170 - VP9 compressed video frame. The encoder generates one
171 compressed frame per buffer, and the decoder requires one
172 compressed frame per buffer.
173 * .. _V4L2-PIX-FMT-HEVC:
175 - ``V4L2_PIX_FMT_HEVC``
177 - HEVC/H.265 Access Unit.
178 The decoder expects one Access Unit per buffer.
179 The encoder generates one Access Unit per buffer.
180 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
181 then the decoder has no requirements since it can parse all the
182 information from the raw bytestream.
183 * .. _V4L2-PIX-FMT-HEVC-SLICE:
185 - ``V4L2_PIX_FMT_HEVC_SLICE``
187 - HEVC parsed slice data, as extracted from the HEVC bitstream.
188 This format is adapted for stateless video decoders that implement a
189 HEVC pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
190 This pixelformat has two modifiers that must be set at least once
191 through the ``V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE``
192 and ``V4L2_CID_MPEG_VIDEO_HEVC_START_CODE`` controls.
193 Metadata associated with the frame to decode is required to be passed
194 through the following controls:
195 ``V4L2_CID_MPEG_VIDEO_HEVC_SPS``,
196 ``V4L2_CID_MPEG_VIDEO_HEVC_PPS``, and
197 ``V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS``.
198 See the :ref:`associated Codec Control IDs <v4l2-mpeg-hevc>`.
199 Buffers associated with this pixel format must contain the appropriate
200 number of macroblocks to decode a full corresponding frame.
204 This format is not yet part of the public kernel API and it
205 is expected to change.
206 * .. _V4L2-PIX-FMT-FWHT:
208 - ``V4L2_PIX_FMT_FWHT``
210 - Video elementary stream using a codec based on the Fast Walsh Hadamard
211 Transform. This codec is implemented by the vicodec ('Virtual Codec')
212 driver. See the codec-fwht.h header for more details.
213 :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
214 since the decoder can parse all the information from the raw bytestream.
215 * .. _V4L2-PIX-FMT-FWHT-STATELESS:
217 - ``V4L2_PIX_FMT_FWHT_STATELESS``
219 - Same format as V4L2_PIX_FMT_FWHT but requires stateless codec implementation.
220 Metadata associated with the frame to decode is required to be passed
221 through the ``V4L2_CID_STATELESS_FWHT_PARAMS`` control.
222 See the :ref:`associated Codec Control ID <codec-stateless-fwht>`.