1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
9 Similarly to the packed RGB formats, the packed YUV formats store the Y, Cb and
10 Cr components consecutively in memory. They may apply subsampling to the chroma
11 components and thus differ in how they interlave the three components.
15 - In all the tables that follow, bit 7 is the most significant bit in a byte.
16 - 'Y', 'Cb' and 'Cr' denote bits of the luma, blue chroma (also known as
17 'U') and red chroma (also known as 'V') components respectively. 'A'
18 denotes bits of the alpha component (if supported by the format), and 'X'
25 These formats do not subsample the chroma components and store each pixels as a
26 full triplet of Y, Cb and Cr values.
28 The next table lists the packed YUV 4:4:4 formats with less than 8 bits per
29 component. They are named based on the order of the Y, Cb and Cr components as
30 seen in a 16-bit word, which is then stored in memory in little endian byte
31 order, and on the number of bits for each component. For instance the YUV565
32 format stores a pixel in a 16-bit word [15:0] laid out at as [Y'\ :sub:`4-0`
33 Cb\ :sub:`5-0` Cr\ :sub:`4-0`], and stored in memory in two bytes,
34 [Cb\ :sub:`2-0` Cr\ :sub:`4-0`] followed by [Y'\ :sub:`4-0` Cb\ :sub:`5-3`].
40 \setlength{\tabcolsep}{2pt}
42 .. tabularcolumns:: |p{2.5cm}|p{0.69cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|p{0.31cm}|
44 .. flat-table:: Packed YUV 4:4:4 Image Formats (less than 8bpc)
51 - :cspan:`7` Byte 0 in memory
75 * .. _V4L2-PIX-FMT-YUV444:
77 - ``V4L2_PIX_FMT_YUV444``
98 * .. _V4L2-PIX-FMT-YUV555:
100 - ``V4L2_PIX_FMT_YUV555``
121 * .. _V4L2-PIX-FMT-YUV565:
123 - ``V4L2_PIX_FMT_YUV565``
150 For the YUV444 and YUV555 formats, the value of alpha bits is undefined
151 when reading from the driver, ignored when writing to the driver, except
152 when alpha blending has been negotiated for a :ref:`Video Overlay
153 <overlay>` or :ref:`Video Output Overlay <osd>`.
156 The next table lists the packed YUV 4:4:4 formats with 8 bits per component.
157 They are named based on the order of the Y, Cb and Cr components as stored in
158 memory, and on the total number of bits per pixel. For instance, the VUYX32
159 format stores a pixel with Cr\ :sub:`7-0` in the first byte, Cb\ :sub:`7-0` in
160 the second byte and Y'\ :sub:`7-0` in the third byte.
162 .. flat-table:: Packed YUV Image Formats (8bpc)
173 * .. _V4L2-PIX-FMT-YUV32:
175 - ``V4L2_PIX_FMT_YUV32``
183 * .. _V4L2-PIX-FMT-AYUV32:
185 - ``V4L2_PIX_FMT_AYUV32``
193 * .. _V4L2-PIX-FMT-XYUV32:
195 - ``V4L2_PIX_FMT_XYUV32``
203 * .. _V4L2-PIX-FMT-VUYA32:
205 - ``V4L2_PIX_FMT_VUYA32``
213 * .. _V4L2-PIX-FMT-VUYX32:
215 - ``V4L2_PIX_FMT_VUYX32``
225 - The alpha component is expected to contain a meaningful value that can be
226 used by drivers and applications.
227 - The padding bits contain undefined values that must be ignored by all
228 applications and drivers.
234 These formats, commonly referred to as YUYV or YUY2, subsample the chroma
235 components horizontally by 2, storing 2 pixels in 4 bytes.
237 .. flat-table:: Packed YUV 4:2:2 Formats
251 * .. _V4L2-PIX-FMT-UYVY:
253 - ``V4L2_PIX_FMT_UYVY``
264 * .. _V4L2-PIX-FMT-VYUY:
266 - ``V4L2_PIX_FMT_VYUY``
277 * .. _V4L2-PIX-FMT-YUYV:
279 - ``V4L2_PIX_FMT_YUYV``
290 * .. _V4L2-PIX-FMT-YVYU:
292 - ``V4L2_PIX_FMT_YVYU``
304 **Color Sample Location:**
305 Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>`
312 This format subsamples the chroma components horizontally by 4, storing 8
315 .. flat-table:: Packed YUV 4:1:1 Formats
333 * .. _V4L2-PIX-FMT-Y41P:
335 - ``V4L2_PIX_FMT_Y41P``
353 Do not confuse ``V4L2_PIX_FMT_Y41P`` with
354 :ref:`V4L2_PIX_FMT_YUV411P <V4L2-PIX-FMT-YUV411P>`. Y41P is derived from
355 "YUV 4:1:1 *packed*", while YUV411P stands for "YUV 4:1:1 *planar*".
357 **Color Sample Location:**
358 Chroma samples are :ref:`interstitially sited<yuv-chroma-centered>`