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