Merge remote-tracking branches 'asoc/topic/sgtl5000', 'asoc/topic/simple', 'asoc...
[cascardo/linux.git] / Documentation / media / uapi / v4l / pixfmt-yuyv.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _V4L2-PIX-FMT-YUYV:
4
5 **************************
6 V4L2_PIX_FMT_YUYV ('YUYV')
7 **************************
8
9 *man V4L2_PIX_FMT_YUYV(2)*
10
11 Packed format with ½ horizontal chroma resolution, also known as YUV
12 4:2:2
13
14
15 Description
16 ===========
17
18 In this format each four bytes is two pixels. Each four bytes is two
19 Y's, a Cb and a Cr. Each Y goes to one of the pixels, and the Cb and Cr
20 belong to both pixels. As you can see, the Cr and Cb components have
21 half the horizontal resolution of the Y component. ``V4L2_PIX_FMT_YUYV``
22 is known in the Windows environment as YUY2.
23
24 **Byte Order.**
25 Each cell is one byte.
26
27
28
29 .. flat-table::
30     :header-rows:  0
31     :stub-columns: 0
32     :widths:       2 1 1 1 1 1 1 1 1
33
34
35     -  .. row 1
36
37        -  start + 0:
38
39        -  Y'\ :sub:`00`
40
41        -  Cb\ :sub:`00`
42
43        -  Y'\ :sub:`01`
44
45        -  Cr\ :sub:`00`
46
47        -  Y'\ :sub:`02`
48
49        -  Cb\ :sub:`01`
50
51        -  Y'\ :sub:`03`
52
53        -  Cr\ :sub:`01`
54
55     -  .. row 2
56
57        -  start + 8:
58
59        -  Y'\ :sub:`10`
60
61        -  Cb\ :sub:`10`
62
63        -  Y'\ :sub:`11`
64
65        -  Cr\ :sub:`10`
66
67        -  Y'\ :sub:`12`
68
69        -  Cb\ :sub:`11`
70
71        -  Y'\ :sub:`13`
72
73        -  Cr\ :sub:`11`
74
75     -  .. row 3
76
77        -  start + 16:
78
79        -  Y'\ :sub:`20`
80
81        -  Cb\ :sub:`20`
82
83        -  Y'\ :sub:`21`
84
85        -  Cr\ :sub:`20`
86
87        -  Y'\ :sub:`22`
88
89        -  Cb\ :sub:`21`
90
91        -  Y'\ :sub:`23`
92
93        -  Cr\ :sub:`21`
94
95     -  .. row 4
96
97        -  start + 24:
98
99        -  Y'\ :sub:`30`
100
101        -  Cb\ :sub:`30`
102
103        -  Y'\ :sub:`31`
104
105        -  Cr\ :sub:`30`
106
107        -  Y'\ :sub:`32`
108
109        -  Cb\ :sub:`31`
110
111        -  Y'\ :sub:`33`
112
113        -  Cr\ :sub:`31`
114
115
116 **Color Sample Location..**
117
118
119
120 .. flat-table::
121     :header-rows:  0
122     :stub-columns: 0
123
124
125     -  .. row 1
126
127        -
128        -  0
129
130        -
131        -  1
132
133        -
134        -  2
135
136        -
137        -  3
138
139     -  .. row 2
140
141        -  0
142
143        -  Y
144
145        -  C
146
147        -  Y
148
149        -
150        -  Y
151
152        -  C
153
154        -  Y
155
156     -  .. row 3
157
158        -  1
159
160        -  Y
161
162        -  C
163
164        -  Y
165
166        -
167        -  Y
168
169        -  C
170
171        -  Y
172
173     -  .. row 4
174
175        -  2
176
177        -  Y
178
179        -  C
180
181        -  Y
182
183        -
184        -  Y
185
186        -  C
187
188        -  Y
189
190     -  .. row 5
191
192        -  3
193
194        -  Y
195
196        -  C
197
198        -  Y
199
200        -
201        -  Y
202
203        -  C
204
205        -  Y