Merge tag 'docs-next' of git://git.lwn.net/linux.git into patchwork
[cascardo/linux.git] / Documentation / media / uapi / v4l / pixfmt-m420.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _V4L2-PIX-FMT-M420:
4
5 **************************
6 V4L2_PIX_FMT_M420 ('M420')
7 **************************
8
9 Format with ½ horizontal and vertical chroma resolution, also known as
10 YUV 4:2:0. Hybrid plane line-interleaved layout.
11
12
13 Description
14 ===========
15
16 M420 is a YUV format with ½ horizontal and vertical chroma subsampling
17 (YUV 4:2:0). Pixels are organized as interleaved luma and chroma planes.
18 Two lines of luma data are followed by one line of chroma data.
19
20 The luma plane has one byte per pixel. The chroma plane contains
21 interleaved CbCr pixels subsampled by ½ in the horizontal and vertical
22 directions. Each CbCr pair belongs to four pixels. For example,
23 Cb\ :sub:`0`/Cr\ :sub:`0` belongs to Y'\ :sub:`00`, Y'\ :sub:`01`,
24 Y'\ :sub:`10`, Y'\ :sub:`11`.
25
26 All line lengths are identical: if the Y lines include pad bytes so do
27 the CbCr lines.
28
29 **Byte Order.**
30 Each cell is one byte.
31
32
33 .. flat-table::
34     :header-rows:  0
35     :stub-columns: 0
36
37
38     -  .. row 1
39
40        -  start + 0:
41
42        -  Y'\ :sub:`00`
43
44        -  Y'\ :sub:`01`
45
46        -  Y'\ :sub:`02`
47
48        -  Y'\ :sub:`03`
49
50     -  .. row 2
51
52        -  start + 4:
53
54        -  Y'\ :sub:`10`
55
56        -  Y'\ :sub:`11`
57
58        -  Y'\ :sub:`12`
59
60        -  Y'\ :sub:`13`
61
62     -  .. row 3
63
64        -  start + 8:
65
66        -  Cb\ :sub:`00`
67
68        -  Cr\ :sub:`00`
69
70        -  Cb\ :sub:`01`
71
72        -  Cr\ :sub:`01`
73
74     -  .. row 4
75
76        -  start + 16:
77
78        -  Y'\ :sub:`20`
79
80        -  Y'\ :sub:`21`
81
82        -  Y'\ :sub:`22`
83
84        -  Y'\ :sub:`23`
85
86     -  .. row 5
87
88        -  start + 20:
89
90        -  Y'\ :sub:`30`
91
92        -  Y'\ :sub:`31`
93
94        -  Y'\ :sub:`32`
95
96        -  Y'\ :sub:`33`
97
98     -  .. row 6
99
100        -  start + 24:
101
102        -  Cb\ :sub:`10`
103
104        -  Cr\ :sub:`10`
105
106        -  Cb\ :sub:`11`
107
108        -  Cr\ :sub:`11`
109
110
111 **Color Sample Location..**
112
113
114
115 .. flat-table::
116     :header-rows:  0
117     :stub-columns: 0
118
119
120     -  .. row 1
121
122        -
123        -  0
124
125        -
126        -  1
127
128        -  2
129
130        -
131        -  3
132
133     -  .. row 2
134
135        -  0
136
137        -  Y
138
139        -
140        -  Y
141
142        -  Y
143
144        -
145        -  Y
146
147     -  .. row 3
148
149        -
150        -
151        -  C
152
153        -
154        -
155        -  C
156
157        -
158
159     -  .. row 4
160
161        -  1
162
163        -  Y
164
165        -
166        -  Y
167
168        -  Y
169
170        -
171        -  Y
172
173     -  .. row 5
174
175        -
176
177     -  .. row 6
178
179        -  2
180
181        -  Y
182
183        -
184        -  Y
185
186        -  Y
187
188        -
189        -  Y
190
191     -  .. row 7
192
193        -
194        -
195        -  C
196
197        -
198        -
199        -  C
200
201        -
202
203     -  .. row 8
204
205        -  3
206
207        -  Y
208
209        -
210        -  Y
211
212        -  Y
213
214        -
215        -  Y