Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[sfrench/cifs-2.6.git] / Documentation / media / uapi / v4l / pixfmt-nv16.rst
1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
7 ..
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10 .. _V4L2-PIX-FMT-NV16:
11 .. _V4L2-PIX-FMT-NV61:
12
13 ******************************************************
14 V4L2_PIX_FMT_NV16 ('NV16'), V4L2_PIX_FMT_NV61 ('NV61')
15 ******************************************************
16
17 V4L2_PIX_FMT_NV61
18 Formats with ½ horizontal chroma resolution, also known as YUV 4:2:2.
19 One luminance and one chrominance plane with alternating chroma samples
20 as opposed to ``V4L2_PIX_FMT_YVU420``
21
22
23 Description
24 ===========
25
26 These are two-plane versions of the YUV 4:2:2 format. The three
27 components are separated into two sub-images or planes. The Y plane is
28 first. The Y plane has one byte per pixel. For ``V4L2_PIX_FMT_NV16``, a
29 combined CbCr plane immediately follows the Y plane in memory. The CbCr
30 plane is the same width and height, in bytes, as the Y plane (and of the
31 image). Each CbCr pair belongs to two pixels. For example,
32 Cb\ :sub:`0`/Cr\ :sub:`0` belongs to Y'\ :sub:`00`, Y'\ :sub:`01`.
33 ``V4L2_PIX_FMT_NV61`` is the same except the Cb and Cr bytes are
34 swapped, the CrCb plane starts with a Cr byte.
35
36 If the Y plane has pad bytes after each row, then the CbCr plane has as
37 many pad bytes after its rows.
38
39 **Byte Order.**
40 Each cell is one byte.
41
42
43 .. flat-table::
44     :header-rows:  0
45     :stub-columns: 0
46
47     * - start + 0:
48       - Y'\ :sub:`00`
49       - Y'\ :sub:`01`
50       - Y'\ :sub:`02`
51       - Y'\ :sub:`03`
52     * - start + 4:
53       - Y'\ :sub:`10`
54       - Y'\ :sub:`11`
55       - Y'\ :sub:`12`
56       - Y'\ :sub:`13`
57     * - start + 8:
58       - Y'\ :sub:`20`
59       - Y'\ :sub:`21`
60       - Y'\ :sub:`22`
61       - Y'\ :sub:`23`
62     * - start + 12:
63       - Y'\ :sub:`30`
64       - Y'\ :sub:`31`
65       - Y'\ :sub:`32`
66       - Y'\ :sub:`33`
67     * - start + 16:
68       - Cb\ :sub:`00`
69       - Cr\ :sub:`00`
70       - Cb\ :sub:`01`
71       - Cr\ :sub:`01`
72     * - start + 20:
73       - Cb\ :sub:`10`
74       - Cr\ :sub:`10`
75       - Cb\ :sub:`11`
76       - Cr\ :sub:`11`
77     * - start + 24:
78       - Cb\ :sub:`20`
79       - Cr\ :sub:`20`
80       - Cb\ :sub:`21`
81       - Cr\ :sub:`21`
82     * - start + 28:
83       - Cb\ :sub:`30`
84       - Cr\ :sub:`30`
85       - Cb\ :sub:`31`
86       - Cr\ :sub:`31`
87
88
89 **Color Sample Location:**
90
91
92
93 .. flat-table::
94     :header-rows:  0
95     :stub-columns: 0
96
97     * -
98       - 0
99       -
100       - 1
101       - 2
102       -
103       - 3
104     * - 0
105       - Y
106       -
107       - Y
108       - Y
109       -
110       - Y
111     * -
112       -
113       - C
114       -
115       -
116       - C
117       -
118     * - 1
119       - Y
120       -
121       - Y
122       - Y
123       -
124       - Y
125     * -
126       -
127       - C
128       -
129       -
130       - C
131       -
132     * -
133     * - 2
134       - Y
135       -
136       - Y
137       - Y
138       -
139       - Y
140     * -
141       -
142       - C
143       -
144       -
145       - C
146       -
147     * - 3
148       - Y
149       -
150       - Y
151       - Y
152       -
153       - Y
154     * -
155       -
156       - C
157       -
158       -
159       - C
160       -