24fa9bbb67b689f3c8fccd34aaf07bf21afd74c8
[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 .. tabularcolumns:: |p{3.5cm}|p{1.8cm}|p{1.8cm}|p{1.8cm}|p{1.8cm}|p{1.8cm}|p{1.8cm}|p{1.8cm}|p{1.4cm}|
30
31 .. flat-table::
32     :header-rows:  0
33     :stub-columns: 0
34     :widths:       2 1 1 1 1 1 1 1 1
35
36
37     -  .. row 1
38
39        -  start + 0:
40
41        -  Y'\ :sub:`00`
42
43        -  Cb\ :sub:`00`
44
45        -  Y'\ :sub:`01`
46
47        -  Cr\ :sub:`00`
48
49        -  Y'\ :sub:`02`
50
51        -  Cb\ :sub:`01`
52
53        -  Y'\ :sub:`03`
54
55        -  Cr\ :sub:`01`
56
57     -  .. row 2
58
59        -  start + 8:
60
61        -  Y'\ :sub:`10`
62
63        -  Cb\ :sub:`10`
64
65        -  Y'\ :sub:`11`
66
67        -  Cr\ :sub:`10`
68
69        -  Y'\ :sub:`12`
70
71        -  Cb\ :sub:`11`
72
73        -  Y'\ :sub:`13`
74
75        -  Cr\ :sub:`11`
76
77     -  .. row 3
78
79        -  start + 16:
80
81        -  Y'\ :sub:`20`
82
83        -  Cb\ :sub:`20`
84
85        -  Y'\ :sub:`21`
86
87        -  Cr\ :sub:`20`
88
89        -  Y'\ :sub:`22`
90
91        -  Cb\ :sub:`21`
92
93        -  Y'\ :sub:`23`
94
95        -  Cr\ :sub:`21`
96
97     -  .. row 4
98
99        -  start + 24:
100
101        -  Y'\ :sub:`30`
102
103        -  Cb\ :sub:`30`
104
105        -  Y'\ :sub:`31`
106
107        -  Cr\ :sub:`30`
108
109        -  Y'\ :sub:`32`
110
111        -  Cb\ :sub:`31`
112
113        -  Y'\ :sub:`33`
114
115        -  Cr\ :sub:`31`
116
117
118 **Color Sample Location..**
119
120
121
122 .. flat-table::
123     :header-rows:  0
124     :stub-columns: 0
125
126
127     -  .. row 1
128
129        -
130        -  0
131
132        -
133        -  1
134
135        -
136        -  2
137
138        -
139        -  3
140
141     -  .. row 2
142
143        -  0
144
145        -  Y
146
147        -  C
148
149        -  Y
150
151        -
152        -  Y
153
154        -  C
155
156        -  Y
157
158     -  .. row 3
159
160        -  1
161
162        -  Y
163
164        -  C
165
166        -  Y
167
168        -
169        -  Y
170
171        -  C
172
173        -  Y
174
175     -  .. row 4
176
177        -  2
178
179        -  Y
180
181        -  C
182
183        -  Y
184
185        -
186        -  Y
187
188        -  C
189
190        -  Y
191
192     -  .. row 5
193
194        -  3
195
196        -  Y
197
198        -  C
199
200        -  Y
201
202        -
203        -  Y
204
205        -  C
206
207        -  Y