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/userspace-api/media/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, including slice headers, either with or
65 without the start code, as extracted from the H264 bitstream.
66 This format is adapted for stateless video decoders that implement an
67 H264 pipeline (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.
83 The syntax for this format is documented in :ref:`h264`, section
84 7.3.2.8 "Slice layer without partitioning RBSP syntax" and the following
89 This format is not yet part of the public kernel API and it
90 is expected to change.
92 * .. _V4L2-PIX-FMT-H263:
94 - ``V4L2_PIX_FMT_H263``
96 - H263 video elementary stream.
97 * .. _V4L2-PIX-FMT-MPEG1:
99 - ``V4L2_PIX_FMT_MPEG1``
101 - MPEG1 Picture. Each buffer starts with a Picture header, followed
102 by other headers as needed and ending with the Picture data.
103 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
104 then the decoder has no requirements since it can parse all the
105 information from the raw bytestream.
106 * .. _V4L2-PIX-FMT-MPEG2:
108 - ``V4L2_PIX_FMT_MPEG2``
110 - MPEG2 Picture. Each buffer starts with a Picture header, followed
111 by other headers as needed and ending with the Picture data.
112 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
113 then the decoder has no requirements since it can parse all the
114 information from the raw bytestream.
115 * .. _V4L2-PIX-FMT-MPEG2-SLICE:
117 - ``V4L2_PIX_FMT_MPEG2_SLICE``
119 - MPEG-2 parsed slice data, as extracted from the MPEG-2 bitstream.
120 This format is adapted for stateless video decoders that implement a
121 MPEG-2 pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
122 Metadata associated with the frame to decode is required to be passed
123 through the ``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS`` control and
124 quantization matrices can optionally be specified through the
125 ``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION`` control.
126 See the :ref:`associated Codec Control IDs <v4l2-mpeg-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, as extracted from the container.
163 This format is adapted for stateless video decoders that implement a
164 VP8 pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
165 Metadata associated with the frame to decode is required to be passed
166 through the ``V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER`` control.
167 See the :ref:`associated Codec Control IDs <v4l2-mpeg-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
175 This format is not yet part of the public kernel API and it
176 is expected to change.
178 * .. _V4L2-PIX-FMT-VP9:
180 - ``V4L2_PIX_FMT_VP9``
182 - VP9 compressed video frame. The encoder generates one
183 compressed frame per buffer, and the decoder requires one
184 compressed frame per buffer.
185 * .. _V4L2-PIX-FMT-HEVC:
187 - ``V4L2_PIX_FMT_HEVC``
189 - HEVC/H.265 Access Unit.
190 The decoder expects one Access Unit per buffer.
191 The encoder generates one Access Unit per buffer.
192 If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
193 then the decoder has no requirements since it can parse all the
194 information from the raw bytestream.
195 * .. _V4L2-PIX-FMT-HEVC-SLICE:
197 - ``V4L2_PIX_FMT_HEVC_SLICE``
199 - HEVC parsed slice data, as extracted from the HEVC bitstream.
200 This format is adapted for stateless video decoders that implement a
201 HEVC pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
202 This pixelformat has two modifiers that must be set at least once
203 through the ``V4L2_CID_MPEG_VIDEO_HEVC_DECODE_MODE``
204 and ``V4L2_CID_MPEG_VIDEO_HEVC_START_CODE`` controls.
205 Metadata associated with the frame to decode is required to be passed
206 through the following controls :
207 * ``V4L2_CID_MPEG_VIDEO_HEVC_SPS``
208 * ``V4L2_CID_MPEG_VIDEO_HEVC_PPS``
209 * ``V4L2_CID_MPEG_VIDEO_HEVC_SLICE_PARAMS``
210 See the :ref:`associated Codec Control IDs <v4l2-mpeg-hevc>`.
211 Buffers associated with this pixel format must contain the appropriate
212 number of macroblocks to decode a full corresponding frame.
216 This format is not yet part of the public kernel API and it
217 is expected to change.
218 * .. _V4L2-PIX-FMT-FWHT:
220 - ``V4L2_PIX_FMT_FWHT``
222 - Video elementary stream using a codec based on the Fast Walsh Hadamard
223 Transform. This codec is implemented by the vicodec ('Virtual Codec')
224 driver. See the codec-fwht.h header for more details.
225 :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
226 since the decoder can parse all the information from the raw bytestream.
227 * .. _V4L2-PIX-FMT-FWHT-STATELESS:
229 - ``V4L2_PIX_FMT_FWHT_STATELESS``
231 - Same format as V4L2_PIX_FMT_FWHT but requires stateless codec implementation.
232 See the :ref:`associated Codec Control IDs <v4l2-mpeg-fwht>`.