ed8ccf52b1dbd7e1a996038e1513826b430e7c16
[cascardo/linux.git] / Documentation / media / uapi / v4l / pixfmt-uyvy.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _V4L2-PIX-FMT-UYVY:
4
5 **************************
6 V4L2_PIX_FMT_UYVY ('UYVY')
7 **************************
8
9
10 Variation of ``V4L2_PIX_FMT_YUYV`` with different order of samples in
11 memory
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.
21
22 **Byte Order.**
23 Each cell is one byte.
24
25
26 .. flat-table::
27     :header-rows:  0
28     :stub-columns: 0
29
30
31     -  .. row 1
32
33        -  start + 0:
34
35        -  Cb\ :sub:`00`
36
37        -  Y'\ :sub:`00`
38
39        -  Cr\ :sub:`00`
40
41        -  Y'\ :sub:`01`
42
43        -  Cb\ :sub:`01`
44
45        -  Y'\ :sub:`02`
46
47        -  Cr\ :sub:`01`
48
49        -  Y'\ :sub:`03`
50
51     -  .. row 2
52
53        -  start + 8:
54
55        -  Cb\ :sub:`10`
56
57        -  Y'\ :sub:`10`
58
59        -  Cr\ :sub:`10`
60
61        -  Y'\ :sub:`11`
62
63        -  Cb\ :sub:`11`
64
65        -  Y'\ :sub:`12`
66
67        -  Cr\ :sub:`11`
68
69        -  Y'\ :sub:`13`
70
71     -  .. row 3
72
73        -  start + 16:
74
75        -  Cb\ :sub:`20`
76
77        -  Y'\ :sub:`20`
78
79        -  Cr\ :sub:`20`
80
81        -  Y'\ :sub:`21`
82
83        -  Cb\ :sub:`21`
84
85        -  Y'\ :sub:`22`
86
87        -  Cr\ :sub:`21`
88
89        -  Y'\ :sub:`23`
90
91     -  .. row 4
92
93        -  start + 24:
94
95        -  Cb\ :sub:`30`
96
97        -  Y'\ :sub:`30`
98
99        -  Cr\ :sub:`30`
100
101        -  Y'\ :sub:`31`
102
103        -  Cb\ :sub:`31`
104
105        -  Y'\ :sub:`32`
106
107        -  Cr\ :sub:`31`
108
109        -  Y'\ :sub:`33`
110
111
112 **Color Sample Location..**
113
114
115
116 .. flat-table::
117     :header-rows:  0
118     :stub-columns: 0
119
120
121     -  .. row 1
122
123        -
124        -  0
125
126        -
127        -  1
128
129        -  2
130
131        -
132        -  3
133
134     -  .. row 2
135
136        -  0
137
138        -  Y
139
140        -  C
141
142        -  Y
143
144        -  Y
145
146        -  C
147
148        -  Y
149
150     -  .. row 3
151
152        -  1
153
154        -  Y
155
156        -  C
157
158        -  Y
159
160        -  Y
161
162        -  C
163
164        -  Y
165
166     -  .. row 4
167
168        -  2
169
170        -  Y
171
172        -  C
173
174        -  Y
175
176        -  Y
177
178        -  C
179
180        -  Y
181
182     -  .. row 5
183
184        -  3
185
186        -  Y
187
188        -  C
189
190        -  Y
191
192        -  Y
193
194        -  C
195
196        -  Y