Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-packed-yuv.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 .. _packed-yuv:
11
12 ******************
13 Packed YUV formats
14 ******************
15
16 Description
17 ===========
18
19 Similar to the packed RGB formats these formats store the Y, Cb and Cr
20 component of each pixel in one 16 or 32 bit word.
21
22
23 .. raw:: latex
24
25     \begingroup
26     \tiny
27     \setlength{\tabcolsep}{2pt}
28
29 .. _packed-yuv-formats:
30
31 .. tabularcolumns:: |p{2.0cm}|p{0.67cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|p{0.29cm}|
32
33 .. flat-table:: Packed YUV Image Formats
34     :header-rows:  2
35     :stub-columns: 0
36
37     * - Identifier
38       - Code
39
40       - :cspan:`7` Byte 0 in memory
41
42       - :cspan:`7` Byte 1
43
44       - :cspan:`7` Byte 2
45
46       - :cspan:`7` Byte 3
47     * -
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
76       - 7
77       - 6
78       - 5
79       - 4
80       - 3
81       - 2
82       - 1
83       - 0
84     * .. _V4L2-PIX-FMT-YUV444:
85
86       - ``V4L2_PIX_FMT_YUV444``
87       - 'Y444'
88
89       - Cb\ :sub:`3`
90       - Cb\ :sub:`2`
91       - Cb\ :sub:`1`
92       - Cb\ :sub:`0`
93       - Cr\ :sub:`3`
94       - Cr\ :sub:`2`
95       - Cr\ :sub:`1`
96       - Cr\ :sub:`0`
97
98       - a\ :sub:`3`
99       - a\ :sub:`2`
100       - a\ :sub:`1`
101       - a\ :sub:`0`
102       - Y'\ :sub:`3`
103       - Y'\ :sub:`2`
104       - Y'\ :sub:`1`
105       - Y'\ :sub:`0`
106       -
107     * .. _V4L2-PIX-FMT-YUV555:
108
109       - ``V4L2_PIX_FMT_YUV555``
110       - 'YUVO'
111
112       - Cb\ :sub:`2`
113       - Cb\ :sub:`1`
114       - Cb\ :sub:`0`
115       - Cr\ :sub:`4`
116       - Cr\ :sub:`3`
117       - Cr\ :sub:`2`
118       - Cr\ :sub:`1`
119       - Cr\ :sub:`0`
120
121       - a
122       - Y'\ :sub:`4`
123       - Y'\ :sub:`3`
124       - Y'\ :sub:`2`
125       - Y'\ :sub:`1`
126       - Y'\ :sub:`0`
127       - Cb\ :sub:`4`
128       - Cb\ :sub:`3`
129       -
130     * .. _V4L2-PIX-FMT-YUV565:
131
132       - ``V4L2_PIX_FMT_YUV565``
133       - 'YUVP'
134
135       - Cb\ :sub:`2`
136       - Cb\ :sub:`1`
137       - Cb\ :sub:`0`
138       - Cr\ :sub:`4`
139       - Cr\ :sub:`3`
140       - Cr\ :sub:`2`
141       - Cr\ :sub:`1`
142       - Cr\ :sub:`0`
143
144       - Y'\ :sub:`4`
145       - Y'\ :sub:`3`
146       - Y'\ :sub:`2`
147       - Y'\ :sub:`1`
148       - Y'\ :sub:`0`
149       - Cb\ :sub:`5`
150       - Cb\ :sub:`4`
151       - Cb\ :sub:`3`
152       -
153     * .. _V4L2-PIX-FMT-YUV32:
154
155       - ``V4L2_PIX_FMT_YUV32``
156       - 'YUV4'
157
158       - a\ :sub:`7`
159       - a\ :sub:`6`
160       - a\ :sub:`5`
161       - a\ :sub:`4`
162       - a\ :sub:`3`
163       - a\ :sub:`2`
164       - a\ :sub:`1`
165       - a\ :sub:`0`
166
167       - Y'\ :sub:`7`
168       - Y'\ :sub:`6`
169       - Y'\ :sub:`5`
170       - Y'\ :sub:`4`
171       - Y'\ :sub:`3`
172       - Y'\ :sub:`2`
173       - Y'\ :sub:`1`
174       - Y'\ :sub:`0`
175
176       - Cb\ :sub:`7`
177       - Cb\ :sub:`6`
178       - Cb\ :sub:`5`
179       - Cb\ :sub:`4`
180       - Cb\ :sub:`3`
181       - Cb\ :sub:`2`
182       - Cb\ :sub:`1`
183       - Cb\ :sub:`0`
184
185       - Cr\ :sub:`7`
186       - Cr\ :sub:`6`
187       - Cr\ :sub:`5`
188       - Cr\ :sub:`4`
189       - Cr\ :sub:`3`
190       - Cr\ :sub:`2`
191       - Cr\ :sub:`1`
192       - Cr\ :sub:`0`
193
194 .. raw:: latex
195
196     \endgroup
197
198 .. note::
199
200     #) Bit 7 is the most significant bit;
201
202     #) The value of a = alpha bits is undefined when reading from the driver,
203        ignored when writing to the driver, except when alpha blending has
204        been negotiated for a :ref:`Video Overlay <overlay>` or
205        :ref:`Video Output Overlay <osd>`.