Merge branch 'pm-cpufreq'
[cascardo/linux.git] / Documentation / media / uapi / v4l / pixfmt-packed-yuv.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _packed-yuv:
4
5 ******************
6 Packed YUV formats
7 ******************
8
9 Description
10 ===========
11
12 Similar to the packed RGB formats these formats store the Y, Cb and Cr
13 component of each pixel in one 16 or 32 bit word.
14
15 .. raw:: latex
16
17     \newline\newline\begin{adjustbox}{width=\columnwidth}
18
19 .. _packed-yuv-formats:
20
21 .. tabularcolumns:: |p{4.5cm}|p{3.3cm}|p{0.7cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{1.7cm}|
22
23 .. flat-table:: Packed YUV Image Formats
24     :header-rows:  2
25     :stub-columns: 0
26
27     * - Identifier
28       - Code
29       -
30       - :cspan:`7` Byte 0 in memory
31       -
32       - :cspan:`7` Byte 1
33       -
34       - :cspan:`7` Byte 2
35       -
36       - :cspan:`7` Byte 3
37     * -
38       -
39       - Bit
40       - 7
41       - 6
42       - 5
43       - 4
44       - 3
45       - 2
46       - 1
47       - 0
48       -
49       - 7
50       - 6
51       - 5
52       - 4
53       - 3
54       - 2
55       - 1
56       - 0
57       -
58       - 7
59       - 6
60       - 5
61       - 4
62       - 3
63       - 2
64       - 1
65       - 0
66       -
67       - 7
68       - 6
69       - 5
70       - 4
71       - 3
72       - 2
73       - 1
74       - 0
75     * .. _V4L2-PIX-FMT-YUV444:
76
77       - ``V4L2_PIX_FMT_YUV444``
78       - 'Y444'
79       -
80       - Cb\ :sub:`3`
81       - Cb\ :sub:`2`
82       - Cb\ :sub:`1`
83       - Cb\ :sub:`0`
84       - Cr\ :sub:`3`
85       - Cr\ :sub:`2`
86       - Cr\ :sub:`1`
87       - Cr\ :sub:`0`
88       -
89       - a\ :sub:`3`
90       - a\ :sub:`2`
91       - a\ :sub:`1`
92       - a\ :sub:`0`
93       - Y'\ :sub:`3`
94       - Y'\ :sub:`2`
95       - Y'\ :sub:`1`
96       - Y'\ :sub:`0`
97     * .. _V4L2-PIX-FMT-YUV555:
98
99       - ``V4L2_PIX_FMT_YUV555``
100       - 'YUVO'
101       -
102       - Cb\ :sub:`2`
103       - Cb\ :sub:`1`
104       - Cb\ :sub:`0`
105       - Cr\ :sub:`4`
106       - Cr\ :sub:`3`
107       - Cr\ :sub:`2`
108       - Cr\ :sub:`1`
109       - Cr\ :sub:`0`
110       -
111       - a
112       - Y'\ :sub:`4`
113       - Y'\ :sub:`3`
114       - Y'\ :sub:`2`
115       - Y'\ :sub:`1`
116       - Y'\ :sub:`0`
117       - Cb\ :sub:`4`
118       - Cb\ :sub:`3`
119     * .. _V4L2-PIX-FMT-YUV565:
120
121       - ``V4L2_PIX_FMT_YUV565``
122       - 'YUVP'
123       -
124       - Cb\ :sub:`2`
125       - Cb\ :sub:`1`
126       - Cb\ :sub:`0`
127       - Cr\ :sub:`4`
128       - Cr\ :sub:`3`
129       - Cr\ :sub:`2`
130       - Cr\ :sub:`1`
131       - Cr\ :sub:`0`
132       -
133       - Y'\ :sub:`4`
134       - Y'\ :sub:`3`
135       - Y'\ :sub:`2`
136       - Y'\ :sub:`1`
137       - Y'\ :sub:`0`
138       - Cb\ :sub:`5`
139       - Cb\ :sub:`4`
140       - Cb\ :sub:`3`
141     * .. _V4L2-PIX-FMT-YUV32:
142
143       - ``V4L2_PIX_FMT_YUV32``
144       - 'YUV4'
145       -
146       - a\ :sub:`7`
147       - a\ :sub:`6`
148       - a\ :sub:`5`
149       - a\ :sub:`4`
150       - a\ :sub:`3`
151       - a\ :sub:`2`
152       - a\ :sub:`1`
153       - a\ :sub:`0`
154       -
155       - Y'\ :sub:`7`
156       - Y'\ :sub:`6`
157       - Y'\ :sub:`5`
158       - Y'\ :sub:`4`
159       - Y'\ :sub:`3`
160       - Y'\ :sub:`2`
161       - Y'\ :sub:`1`
162       - Y'\ :sub:`0`
163       -
164       - Cb\ :sub:`7`
165       - Cb\ :sub:`6`
166       - Cb\ :sub:`5`
167       - Cb\ :sub:`4`
168       - Cb\ :sub:`3`
169       - Cb\ :sub:`2`
170       - Cb\ :sub:`1`
171       - Cb\ :sub:`0`
172       -
173       - Cr\ :sub:`7`
174       - Cr\ :sub:`6`
175       - Cr\ :sub:`5`
176       - Cr\ :sub:`4`
177       - Cr\ :sub:`3`
178       - Cr\ :sub:`2`
179       - Cr\ :sub:`1`
180       - Cr\ :sub:`0`
181
182 .. raw:: latex
183
184     \end{adjustbox}\newline\newline
185
186 .. note::
187
188     #) Bit 7 is the most significant bit;
189
190     #) The value of a = alpha bits is undefined when reading from the driver,
191        ignored when writing to the driver, except when alpha blending has
192        been negotiated for a :ref:`Video Overlay <overlay>` or
193        :ref:`Video Output Overlay <osd>`.