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