Merge branch 'linux-5.3' of git://github.com/skeggsb/linux into drm-fixes
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-compressed.rst
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.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 ******************
11 Compressed Formats
12 ******************
13
14
15 .. _compressed-formats:
16
17 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
18
19 .. flat-table:: Compressed Image Formats
20     :header-rows:  1
21     :stub-columns: 0
22     :widths:       3 1 4
23
24     * - Identifier
25       - Code
26       - Details
27     * .. _V4L2-PIX-FMT-JPEG:
28
29       - ``V4L2_PIX_FMT_JPEG``
30       - '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:
34
35       - ``V4L2_PIX_FMT_MPEG``
36       - '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:
41
42       - ``V4L2_PIX_FMT_H264``
43       - 'H264'
44       - H264 video elementary stream with start codes.
45     * .. _V4L2-PIX-FMT-H264-NO-SC:
46
47       - ``V4L2_PIX_FMT_H264_NO_SC``
48       - 'AVC1'
49       - H264 video elementary stream without start codes.
50     * .. _V4L2-PIX-FMT-H264-MVC:
51
52       - ``V4L2_PIX_FMT_H264_MVC``
53       - 'M264'
54       - H264 MVC video elementary stream.
55     * .. _V4L2-PIX-FMT-H264-SLICE-RAW:
56
57       - ``V4L2_PIX_FMT_H264_SLICE_RAW``
58       - 'S264'
59       - H264 parsed slice data, without the start code and as
60         extracted from the H264 bitstream.  This format is adapted for
61         stateless video decoders that implement an H264 pipeline
62         (using the :ref:`mem2mem` and :ref:`media-request-api`).
63         Metadata associated with the frame to decode are required to
64         be passed through the ``V4L2_CID_MPEG_VIDEO_H264_SPS``,
65         ``V4L2_CID_MPEG_VIDEO_H264_PPS``,
66         ``V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX``,
67         ``V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAMS`` and
68         ``V4L2_CID_MPEG_VIDEO_H264_DECODE_PARAMS`` controls.  See the
69         :ref:`associated Codec Control IDs <v4l2-mpeg-h264>`.  Exactly
70         one output and one capture buffer must be provided for use
71         with this pixel format. The output buffer must contain the
72         appropriate number of macroblocks to decode a full
73         corresponding frame to the matching capture buffer.
74
75         .. note::
76
77            This format is not yet part of the public kernel API and it
78            is expected to change.
79
80     * .. _V4L2-PIX-FMT-H263:
81
82       - ``V4L2_PIX_FMT_H263``
83       - 'H263'
84       - H263 video elementary stream.
85     * .. _V4L2-PIX-FMT-MPEG1:
86
87       - ``V4L2_PIX_FMT_MPEG1``
88       - 'MPG1'
89       - MPEG1 video elementary stream.
90     * .. _V4L2-PIX-FMT-MPEG2:
91
92       - ``V4L2_PIX_FMT_MPEG2``
93       - 'MPG2'
94       - MPEG2 video elementary stream.
95     * .. _V4L2-PIX-FMT-MPEG2-SLICE:
96
97       - ``V4L2_PIX_FMT_MPEG2_SLICE``
98       - 'MG2S'
99       - MPEG-2 parsed slice data, as extracted from the MPEG-2 bitstream.
100         This format is adapted for stateless video decoders that implement a
101         MPEG-2 pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
102         Metadata associated with the frame to decode is required to be passed
103         through the ``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS`` control and
104         quantization matrices can optionally be specified through the
105         ``V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION`` control.
106         See the :ref:`associated Codec Control IDs <v4l2-mpeg-mpeg2>`.
107         Exactly one output and one capture buffer must be provided for use with
108         this pixel format. The output buffer must contain the appropriate number
109         of macroblocks to decode a full corresponding frame to the matching
110         capture buffer.
111     * .. _V4L2-PIX-FMT-MPEG4:
112
113       - ``V4L2_PIX_FMT_MPEG4``
114       - 'MPG4'
115       - MPEG4 video elementary stream.
116     * .. _V4L2-PIX-FMT-XVID:
117
118       - ``V4L2_PIX_FMT_XVID``
119       - 'XVID'
120       - Xvid video elementary stream.
121     * .. _V4L2-PIX-FMT-VC1-ANNEX-G:
122
123       - ``V4L2_PIX_FMT_VC1_ANNEX_G``
124       - 'VC1G'
125       - VC1, SMPTE 421M Annex G compliant stream.
126     * .. _V4L2-PIX-FMT-VC1-ANNEX-L:
127
128       - ``V4L2_PIX_FMT_VC1_ANNEX_L``
129       - 'VC1L'
130       - VC1, SMPTE 421M Annex L compliant stream.
131     * .. _V4L2-PIX-FMT-VP8:
132
133       - ``V4L2_PIX_FMT_VP8``
134       - 'VP80'
135       - VP8 video elementary stream.
136     * .. _V4L2-PIX-FMT-VP9:
137
138       - ``V4L2_PIX_FMT_VP9``
139       - 'VP90'
140       - VP9 video elementary stream.
141     * .. _V4L2-PIX-FMT-HEVC:
142
143       - ``V4L2_PIX_FMT_HEVC``
144       - 'HEVC'
145       - HEVC/H.265 video elementary stream.
146     * .. _V4L2-PIX-FMT-FWHT:
147
148       - ``V4L2_PIX_FMT_FWHT``
149       - 'FWHT'
150       - Video elementary stream using a codec based on the Fast Walsh Hadamard
151         Transform. This codec is implemented by the vicodec ('Virtual Codec')
152         driver. See the codec-fwht.h header for more details.
153     * .. _V4L2-PIX-FMT-FWHT-STATELESS:
154
155       - ``V4L2_PIX_FMT_FWHT_STATELESS``
156       - 'SFWH'
157       - Same format as V4L2_PIX_FMT_FWHT but requires stateless codec implementation.
158         See the :ref:`associated Codec Control IDs <v4l2-mpeg-fwht>`.