]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - Documentation/media/uapi/v4l/pixfmt-nv12.rst
Merge remote-tracking branch 'mkp-scsi/4.8/scsi-fixes' into fixes
[mirror_ubuntu-artful-kernel.git] / Documentation / media / uapi / v4l / pixfmt-nv12.rst
CommitLineData
5377d91f
MH
1.. -*- coding: utf-8; mode: rst -*-
2
3.. _V4L2-PIX-FMT-NV12:
9aff73d2 4.. _V4L2-PIX-FMT-NV21:
5377d91f
MH
5
6******************************************************
7V4L2_PIX_FMT_NV12 ('NV12'), V4L2_PIX_FMT_NV21 ('NV21')
8******************************************************
9
10*man V4L2_PIX_FMT_NV12(2)*
11
12V4L2_PIX_FMT_NV21
13Formats with ½ horizontal and vertical chroma resolution, also known as
14YUV 4:2:0. One luminance and one chrominance plane with alternating
15chroma samples as opposed to ``V4L2_PIX_FMT_YVU420``
16
17
18Description
19===========
20
21These are two-plane versions of the YUV 4:2:0 format. The three
22components are separated into two sub-images or planes. The Y plane is
23first. The Y plane has one byte per pixel. For ``V4L2_PIX_FMT_NV12``, a
24combined CbCr plane immediately follows the Y plane in memory. The CbCr
25plane is the same width, in bytes, as the Y plane (and of the image),
26but is half as tall in pixels. Each CbCr pair belongs to four pixels.
eba9e91c 27For example, Cb\ :sub:`0`/Cr\ :sub:`0` belongs to Y'\ :sub:`00`,
5377d91f
MH
28Y'\ :sub:`01`, Y'\ :sub:`10`, Y'\ :sub:`11`. ``V4L2_PIX_FMT_NV21`` is
29the same except the Cb and Cr bytes are swapped, the CrCb plane starts
30with a Cr byte.
31
32If the Y plane has pad bytes after each row, then the CbCr plane has as
33many pad bytes after its rows.
34
056d2ee6 35**Byte Order.**
5377d91f
MH
36Each cell is one byte.
37
38
39
40.. flat-table::
41 :header-rows: 0
42 :stub-columns: 0
43 :widths: 2 1 1 1 1
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 - Cb\ :sub:`00`
99
100 - Cr\ :sub:`00`
101
102 - Cb\ :sub:`01`
103
104 - Cr\ :sub:`01`
105
106 - .. row 6
107
108 - start + 20:
109
110 - Cb\ :sub:`10`
111
112 - Cr\ :sub:`10`
113
114 - Cb\ :sub:`11`
115
116 - Cr\ :sub:`11`
117
118
119**Color Sample Location..**
120
5377d91f
MH
121.. flat-table::
122 :header-rows: 0
123 :stub-columns: 0
124
125
126 - .. row 1
127
0579e6e3 128 -
5377d91f
MH
129 - 0
130
0579e6e3 131 -
5377d91f
MH
132 - 1
133
5377d91f
MH
134 - 2
135
0579e6e3 136 -
5377d91f
MH
137 - 3
138
139 - .. row 2
140
141 - 0
142
143 - Y
144
0579e6e3 145 -
5377d91f
MH
146 - Y
147
5377d91f
MH
148 - Y
149
0579e6e3 150 -
5377d91f
MH
151 - Y
152
153 - .. row 3
154
0579e6e3
MCC
155 -
156 -
5377d91f
MH
157 - C
158
0579e6e3
MCC
159 -
160 -
5377d91f
MH
161 - C
162
0579e6e3 163 -
5377d91f
MH
164
165 - .. row 4
166
167 - 1
168
169 - Y
0579e6e3 170 -
31ad250f 171
5377d91f
MH
172 - Y
173
5377d91f
MH
174 - Y
175
0579e6e3 176 -
5377d91f
MH
177 - Y
178
179 - .. row 5
180
0579e6e3 181 -
5377d91f
MH
182
183 - .. row 6
184
185 - 2
186
187 - Y
0579e6e3 188 -
31ad250f 189
5377d91f
MH
190 - Y
191
5377d91f
MH
192 - Y
193
0579e6e3 194 -
5377d91f
MH
195 - Y
196
197 - .. row 7
198
0579e6e3
MCC
199 -
200 -
5377d91f
MH
201 - C
202
0579e6e3
MCC
203 -
204 -
5377d91f
MH
205 - C
206
0579e6e3 207 -
5377d91f
MH
208
209 - .. row 8
210
211 - 3
212
213 - Y
214
0579e6e3 215 -
5377d91f
MH
216 - Y
217
5377d91f
MH
218 - Y
219
0579e6e3 220 -
5377d91f 221 - Y