Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[cascardo/linux.git] / Documentation / media / uapi / v4l / pixfmt-nv16m.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _V4L2-PIX-FMT-NV16M:
4 .. _v4l2-pix-fmt-nv61m:
5
6 ********************************************************
7 V4L2_PIX_FMT_NV16M ('NM16'), V4L2_PIX_FMT_NV61M ('NM61')
8 ********************************************************
9
10 V4L2_PIX_FMT_NV61M
11 Variation of ``V4L2_PIX_FMT_NV16`` and ``V4L2_PIX_FMT_NV61`` with planes
12 non contiguous in memory.
13
14
15 Description
16 ===========
17
18 This is a multi-planar, two-plane version of the YUV 4:2:2 format. The
19 three components are separated into two sub-images or planes.
20 ``V4L2_PIX_FMT_NV16M`` differs from ``V4L2_PIX_FMT_NV16`` in that the
21 two planes are non-contiguous in memory, i.e. the chroma plane does not
22 necessarily immediately follow the luma plane. The luminance data
23 occupies the first plane. The Y plane has one byte per pixel. In the
24 second plane there is chrominance data with alternating chroma samples.
25 The CbCr plane is the same width and height, in bytes, as the Y plane.
26 Each CbCr pair belongs to two pixels. For example,
27 Cb\ :sub:`0`/Cr\ :sub:`0` belongs to Y'\ :sub:`00`, Y'\ :sub:`01`.
28 ``V4L2_PIX_FMT_NV61M`` is the same as ``V4L2_PIX_FMT_NV16M`` except the
29 Cb and Cr bytes are swapped, the CrCb plane starts with a Cr byte.
30
31 ``V4L2_PIX_FMT_NV16M`` and ``V4L2_PIX_FMT_NV61M`` are intended to be
32 used only in drivers and applications that support the multi-planar API,
33 described in :ref:`planar-apis`.
34
35 **Byte Order.**
36 Each cell is one byte.
37
38
39 .. flat-table::
40     :header-rows:  0
41     :stub-columns: 0
42
43     * - start0 + 0:
44       - Y'\ :sub:`00`
45       - Y'\ :sub:`01`
46       - Y'\ :sub:`02`
47       - Y'\ :sub:`03`
48     * - start0 + 4:
49       - Y'\ :sub:`10`
50       - Y'\ :sub:`11`
51       - Y'\ :sub:`12`
52       - Y'\ :sub:`13`
53     * - start0 + 8:
54       - Y'\ :sub:`20`
55       - Y'\ :sub:`21`
56       - Y'\ :sub:`22`
57       - Y'\ :sub:`23`
58     * - start0 + 12:
59       - Y'\ :sub:`30`
60       - Y'\ :sub:`31`
61       - Y'\ :sub:`32`
62       - Y'\ :sub:`33`
63     * -
64     * - start1 + 0:
65       - Cb\ :sub:`00`
66       - Cr\ :sub:`00`
67       - Cb\ :sub:`02`
68       - Cr\ :sub:`02`
69     * - start1 + 4:
70       - Cb\ :sub:`10`
71       - Cr\ :sub:`10`
72       - Cb\ :sub:`12`
73       - Cr\ :sub:`12`
74     * - start1 + 8:
75       - Cb\ :sub:`20`
76       - Cr\ :sub:`20`
77       - Cb\ :sub:`22`
78       - Cr\ :sub:`22`
79     * - start1 + 12:
80       - Cb\ :sub:`30`
81       - Cr\ :sub:`30`
82       - Cb\ :sub:`32`
83       - Cr\ :sub:`32`
84
85
86 **Color Sample Location..**
87
88
89
90 .. flat-table::
91     :header-rows:  0
92     :stub-columns: 0
93
94     * -
95       - 0
96       -
97       - 1
98       - 2
99       -
100       - 3
101     * - 0
102       - Y
103       -
104       - Y
105       - Y
106       -
107       - Y
108     * -
109       -
110       - C
111       -
112       -
113       - C
114       -
115     * - 1
116       - Y
117       -
118       - Y
119       - Y
120       -
121       - Y
122     * -
123       -
124       - C
125       -
126       -
127       - C
128       -
129     * -
130     * - 2
131       - Y
132       -
133       - Y
134       - Y
135       -
136       - Y
137     * -
138       -
139       - C
140       -
141       -
142       - C
143       -
144     * - 3
145       - Y
146       -
147       - Y
148       - Y
149       -
150       - Y
151     * -
152       -
153       - C
154       -
155       -
156       - C
157       -