Merge tag 'docs-next' of git://git.lwn.net/linux.git into patchwork
[cascardo/linux.git] / Documentation / media / uapi / v4l / pixfmt-nv24.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _V4L2-PIX-FMT-NV24:
4 .. _V4L2-PIX-FMT-NV42:
5
6 ******************************************************
7 V4L2_PIX_FMT_NV24 ('NV24'), V4L2_PIX_FMT_NV42 ('NV42')
8 ******************************************************
9
10 V4L2_PIX_FMT_NV42
11 Formats with full horizontal and vertical chroma resolutions, also known
12 as YUV 4:4:4. One luminance and one chrominance plane with alternating
13 chroma samples as opposed to ``V4L2_PIX_FMT_YVU420``
14
15
16 Description
17 ===========
18
19 These are two-plane versions of the YUV 4:4:4 format. The three
20 components are separated into two sub-images or planes. The Y plane is
21 first, with each Y sample stored in one byte per pixel. For
22 ``V4L2_PIX_FMT_NV24``, a combined CbCr plane immediately follows the Y
23 plane in memory. The CbCr plane has the same width and height, in
24 pixels, as the Y plane (and the image). Each line contains one CbCr pair
25 per pixel, with each Cb and Cr sample stored in one byte.
26 ``V4L2_PIX_FMT_NV42`` is the same except that the Cb and Cr samples are
27 swapped, the CrCb plane starts with a Cr sample.
28
29 If the Y plane has pad bytes after each row, then the CbCr plane has
30 twice as many pad bytes after its rows.
31
32 **Byte Order.**
33 Each cell is one byte.
34
35
36 .. flat-table::
37     :header-rows:  0
38     :stub-columns: 0
39
40     -  .. row 1
41
42        -  start + 0:
43
44        -  Y'\ :sub:`00`
45
46        -  Y'\ :sub:`01`
47
48        -  Y'\ :sub:`02`
49
50        -  Y'\ :sub:`03`
51
52     -  .. row 2
53
54        -  start + 4:
55
56        -  Y'\ :sub:`10`
57
58        -  Y'\ :sub:`11`
59
60        -  Y'\ :sub:`12`
61
62        -  Y'\ :sub:`13`
63
64     -  .. row 3
65
66        -  start + 8:
67
68        -  Y'\ :sub:`20`
69
70        -  Y'\ :sub:`21`
71
72        -  Y'\ :sub:`22`
73
74        -  Y'\ :sub:`23`
75
76     -  .. row 4
77
78        -  start + 12:
79
80        -  Y'\ :sub:`30`
81
82        -  Y'\ :sub:`31`
83
84        -  Y'\ :sub:`32`
85
86        -  Y'\ :sub:`33`
87
88     -  .. row 5
89
90        -  start + 16:
91
92        -  Cb\ :sub:`00`
93
94        -  Cr\ :sub:`00`
95
96        -  Cb\ :sub:`01`
97
98        -  Cr\ :sub:`01`
99
100        -  Cb\ :sub:`02`
101
102        -  Cr\ :sub:`02`
103
104        -  Cb\ :sub:`03`
105
106        -  Cr\ :sub:`03`
107
108     -  .. row 6
109
110        -  start + 24:
111
112        -  Cb\ :sub:`10`
113
114        -  Cr\ :sub:`10`
115
116        -  Cb\ :sub:`11`
117
118        -  Cr\ :sub:`11`
119
120        -  Cb\ :sub:`12`
121
122        -  Cr\ :sub:`12`
123
124        -  Cb\ :sub:`13`
125
126        -  Cr\ :sub:`13`
127
128     -  .. row 7
129
130        -  start + 32:
131
132        -  Cb\ :sub:`20`
133
134        -  Cr\ :sub:`20`
135
136        -  Cb\ :sub:`21`
137
138        -  Cr\ :sub:`21`
139
140        -  Cb\ :sub:`22`
141
142        -  Cr\ :sub:`22`
143
144        -  Cb\ :sub:`23`
145
146        -  Cr\ :sub:`23`
147
148     -  .. row 8
149
150        -  start + 40:
151
152        -  Cb\ :sub:`30`
153
154        -  Cr\ :sub:`30`
155
156        -  Cb\ :sub:`31`
157
158        -  Cr\ :sub:`31`
159
160        -  Cb\ :sub:`32`
161
162        -  Cr\ :sub:`32`
163
164        -  Cb\ :sub:`33`
165
166        -  Cr\ :sub:`33`