Merge remote-tracking branch 'battery/for-next'
[deliverable/linux.git] / Documentation / media / uapi / v4l / pixfmt-yuv420.rst
CommitLineData
5377d91f
MH
1.. -*- coding: utf-8; mode: rst -*-
2
3.. _V4L2-PIX-FMT-YVU420:
ac4141ce 4.. _V4L2-PIX-FMT-YUV420:
5377d91f
MH
5
6**********************************************************
7V4L2_PIX_FMT_YVU420 ('YV12'), V4L2_PIX_FMT_YUV420 ('YU12')
8**********************************************************
9
5377d91f
MH
10
11V4L2_PIX_FMT_YUV420
12Planar formats with ½ horizontal and vertical chroma resolution, also
13known as YUV 4:2:0
14
15
16Description
17===========
18
19These are planar formats, as opposed to a packed format. The three
20components are separated into three sub- images or planes. The Y plane
21is first. The Y plane has one byte per pixel. For
22``V4L2_PIX_FMT_YVU420``, the Cr plane immediately follows the Y plane in
23memory. The Cr plane is half the width and half the height of the Y
24plane (and of the image). Each Cr belongs to four pixels, a two-by-two
25square of the image. For example, Cr\ :sub:`0` belongs to Y'\ :sub:`00`,
26Y'\ :sub:`01`, Y'\ :sub:`10`, and Y'\ :sub:`11`. Following the Cr plane
27is the Cb plane, just like the Cr plane. ``V4L2_PIX_FMT_YUV420`` is the
28same except the Cb plane comes first, then the Cr plane.
29
30If the Y plane has pad bytes after each row, then the Cr and Cb planes
31have half as many pad bytes after their rows. In other words, two Cx
32rows (including padding) is exactly as long as one Y row (including
33padding).
34
056d2ee6 35**Byte Order.**
5377d91f
MH
36Each cell is one byte.
37
38
39
5bd4bb78 40
5377d91f
MH
41.. flat-table::
42 :header-rows: 0
43 :stub-columns: 0
5377d91f
MH
44
45
46 - .. row 1
47
48 - start + 0:
49
50 - Y'\ :sub:`00`
51
52 - Y'\ :sub:`01`
53
54 - Y'\ :sub:`02`
55
56 - Y'\ :sub:`03`
57
58 - .. row 2
59
60 - start + 4:
61
62 - Y'\ :sub:`10`
63
64 - Y'\ :sub:`11`
65
66 - Y'\ :sub:`12`
67
68 - Y'\ :sub:`13`
69
70 - .. row 3
71
72 - start + 8:
73
74 - Y'\ :sub:`20`
75
76 - Y'\ :sub:`21`
77
78 - Y'\ :sub:`22`
79
80 - Y'\ :sub:`23`
81
82 - .. row 4
83
84 - start + 12:
85
86 - Y'\ :sub:`30`
87
88 - Y'\ :sub:`31`
89
90 - Y'\ :sub:`32`
91
92 - Y'\ :sub:`33`
93
94 - .. row 5
95
96 - start + 16:
97
98 - Cr\ :sub:`00`
99
100 - Cr\ :sub:`01`
101
102 - .. row 6
103
104 - start + 18:
105
106 - Cr\ :sub:`10`
107
108 - Cr\ :sub:`11`
109
110 - .. row 7
111
112 - start + 20:
113
114 - Cb\ :sub:`00`
115
116 - Cb\ :sub:`01`
117
118 - .. row 8
119
120 - start + 22:
121
122 - Cb\ :sub:`10`
123
124 - Cb\ :sub:`11`
125
126
127**Color Sample Location..**
128
129
130
131.. flat-table::
132 :header-rows: 0
133 :stub-columns: 0
134
135
136 - .. row 1
137
0579e6e3 138 -
5377d91f
MH
139 - 0
140
0579e6e3 141 -
5377d91f
MH
142 - 1
143
0579e6e3 144 -
5377d91f
MH
145 - 2
146
0579e6e3 147 -
5377d91f
MH
148 - 3
149
150 - .. row 2
151
152 - 0
153
154 - Y
155
0579e6e3 156 -
5377d91f
MH
157 - Y
158
0579e6e3 159 -
5377d91f
MH
160 - Y
161
0579e6e3 162 -
5377d91f
MH
163 - Y
164
165 - .. row 3
166
0579e6e3
MCC
167 -
168 -
5377d91f
MH
169 - C
170
0579e6e3
MCC
171 -
172 -
173 -
5377d91f
MH
174 - C
175
0579e6e3 176 -
5377d91f
MH
177
178 - .. row 4
179
180 - 1
181
182 - Y
183
0579e6e3 184 -
5377d91f
MH
185 - Y
186
0579e6e3 187 -
5377d91f
MH
188 - Y
189
0579e6e3 190 -
5377d91f
MH
191 - Y
192
193 - .. row 5
194
0579e6e3 195 -
5377d91f
MH
196
197 - .. row 6
198
199 - 2
200
201 - Y
202
0579e6e3 203 -
5377d91f
MH
204 - Y
205
0579e6e3 206 -
5377d91f
MH
207 - Y
208
0579e6e3 209 -
5377d91f
MH
210 - Y
211
212 - .. row 7
213
0579e6e3
MCC
214 -
215 -
5377d91f
MH
216 - C
217
0579e6e3
MCC
218 -
219 -
220 -
5377d91f
MH
221 - C
222
0579e6e3 223 -
5377d91f
MH
224
225 - .. row 8
226
227 - 3
228
229 - Y
230
0579e6e3 231 -
5377d91f
MH
232 - Y
233
0579e6e3 234 -
5377d91f
MH
235 - Y
236
0579e6e3 237 -
5377d91f 238 - Y
This page took 0.090668 seconds and 5 git commands to generate.