5d343d99922f2bf17f5994201bf19e4a7cca0a76
[cascardo/linux.git] / Documentation / media / uapi / v4l / pixfmt-yuv410.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _V4L2-PIX-FMT-YVU410:
4 .. _v4l2-pix-fmt-yuv410:
5
6 **********************************************************
7 V4L2_PIX_FMT_YVU410 ('YVU9'), V4L2_PIX_FMT_YUV410 ('YUV9')
8 **********************************************************
9
10 *man V4L2_PIX_FMT_YVU410(2)*
11
12 V4L2_PIX_FMT_YUV410
13 Planar formats with ¼ horizontal and vertical chroma resolution, also
14 known as YUV 4:1:0
15
16
17 Description
18 ===========
19
20 These are planar formats, as opposed to a packed format. The three
21 components are separated into three sub-images or planes. The Y plane is
22 first. The Y plane has one byte per pixel. For ``V4L2_PIX_FMT_YVU410``,
23 the Cr plane immediately follows the Y plane in memory. The Cr plane is
24 ¼ the width and ¼ the height of the Y plane (and of the image). Each Cr
25 belongs to 16 pixels, a four-by-four square of the image. Following the
26 Cr plane is the Cb plane, just like the Cr plane.
27 ``V4L2_PIX_FMT_YUV410`` is the same, except the Cb plane comes first,
28 then the Cr plane.
29
30 If the Y plane has pad bytes after each row, then the Cr and Cb planes
31 have ¼ as many pad bytes after their rows. In other words, four Cx rows
32 (including padding) are exactly as long as one Y row (including
33 padding).
34
35 **Byte Order.**
36 Each cell is one byte.
37
38
39
40 .. tabularcolumns:: |p{5.8cm}|p{2.9cm}|p{2.9cm}|p{2.9cm}|p{3.0cm}|
41
42 .. flat-table::
43     :header-rows:  0
44     :stub-columns: 0
45     :widths:       2 1 1 1 1
46
47
48     -  .. row 1
49
50        -  start + 0:
51
52        -  Y'\ :sub:`00`
53
54        -  Y'\ :sub:`01`
55
56        -  Y'\ :sub:`02`
57
58        -  Y'\ :sub:`03`
59
60     -  .. row 2
61
62        -  start + 4:
63
64        -  Y'\ :sub:`10`
65
66        -  Y'\ :sub:`11`
67
68        -  Y'\ :sub:`12`
69
70        -  Y'\ :sub:`13`
71
72     -  .. row 3
73
74        -  start + 8:
75
76        -  Y'\ :sub:`20`
77
78        -  Y'\ :sub:`21`
79
80        -  Y'\ :sub:`22`
81
82        -  Y'\ :sub:`23`
83
84     -  .. row 4
85
86        -  start + 12:
87
88        -  Y'\ :sub:`30`
89
90        -  Y'\ :sub:`31`
91
92        -  Y'\ :sub:`32`
93
94        -  Y'\ :sub:`33`
95
96     -  .. row 5
97
98        -  start + 16:
99
100        -  Cr\ :sub:`00`
101
102     -  .. row 6
103
104        -  start + 17:
105
106        -  Cb\ :sub:`00`
107
108
109 **Color Sample Location..**
110
111
112
113 .. flat-table::
114     :header-rows:  0
115     :stub-columns: 0
116
117
118     -  .. row 1
119
120        -
121        -  0
122
123        -
124        -  1
125
126        -
127        -  2
128
129        -
130        -  3
131
132     -  .. row 2
133
134        -  0
135
136        -  Y
137
138        -
139        -  Y
140
141        -
142        -  Y
143
144        -
145        -  Y
146
147     -  .. row 3
148
149        -
150
151     -  .. row 4
152
153        -  1
154
155        -  Y
156
157        -
158        -  Y
159
160        -
161        -  Y
162
163        -
164        -  Y
165
166     -  .. row 5
167
168        -
169        -
170        -
171        -
172        -  C
173
174        -
175        -
176        -
177
178     -  .. row 6
179
180        -  2
181
182        -  Y
183
184        -
185        -  Y
186
187        -
188        -  Y
189
190        -
191        -  Y
192
193     -  .. row 7
194
195        -
196
197     -  .. row 8
198
199        -  3
200
201        -  Y
202
203        -
204        -  Y
205
206        -
207        -  Y
208
209        -
210        -  Y