3 <refentrytitle>V4L2_PIX_FMT_NV12M ('NM12'), V4L2_PIX_FMT_NV21M ('NM21'), V4L2_PIX_FMT_NV12MT_16X16</refentrytitle>
7 <refname id="V4L2-PIX-FMT-NV12M"><constant>V4L2_PIX_FMT_NV12M</constant></refname>
8 <refname id="V4L2-PIX-FMT-NV21M"><constant>V4L2_PIX_FMT_NV21M</constant></refname>
9 <refname id="V4L2-PIX-FMT-NV12MT-16X16"><constant>V4L2_PIX_FMT_NV12MT_16X16</constant></refname>
10 <refpurpose>Variation of <constant>V4L2_PIX_FMT_NV12</constant> and <constant>V4L2_PIX_FMT_NV21</constant> with planes
11 non contiguous in memory. </refpurpose>
14 <title>Description</title>
16 <para>This is a multi-planar, two-plane version of the YUV 4:2:0 format.
17 The three components are separated into two sub-images or planes.
18 <constant>V4L2_PIX_FMT_NV12M</constant> differs from <constant>V4L2_PIX_FMT_NV12
19 </constant> in that the two planes are non-contiguous in memory, i.e. the chroma
20 plane do not necessarily immediately follows the luma plane.
21 The luminance data occupies the first plane. The Y plane has one byte per pixel.
22 In the second plane there is a chrominance data with alternating chroma samples.
23 The CbCr plane is the same width, in bytes, as the Y plane (and of the image),
24 but is half as tall in pixels. Each CbCr pair belongs to four pixels. For example,
25 Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to
26 Y'<subscript>00</subscript>, Y'<subscript>01</subscript>,
27 Y'<subscript>10</subscript>, Y'<subscript>11</subscript>.
28 <constant>V4L2_PIX_FMT_NV12MT_16X16</constant> is the tiled version of
29 <constant>V4L2_PIX_FMT_NV12M</constant> with 16x16 macroblock tiles. Here pixels
30 are arranged in 16x16 2D tiles and tiles are arranged in linear order in memory.
31 <constant>V4L2_PIX_FMT_NV21M</constant> is the same as <constant>V4L2_PIX_FMT_NV12M</constant>
32 except the Cb and Cr bytes are swapped, the CrCb plane starts with a Cr byte.</para>
34 <para><constant>V4L2_PIX_FMT_NV12M</constant> is intended to be
35 used only in drivers and applications that support the multi-planar API,
36 described in <xref linkend="planar-apis"/>. </para>
38 <para>If the Y plane has pad bytes after each row, then the
39 CbCr plane has as many pad bytes after its rows.</para>
42 <title><constant>V4L2_PIX_FMT_NV12M</constant> 4 × 4 pixel image</title>
45 <title>Byte Order.</title>
46 <para>Each cell is one byte.
47 <informaltable frame="none">
48 <tgroup cols="5" align="center">
49 <colspec align="left" colwidth="2*" />
52 <entry>start0 + 0:</entry>
53 <entry>Y'<subscript>00</subscript></entry>
54 <entry>Y'<subscript>01</subscript></entry>
55 <entry>Y'<subscript>02</subscript></entry>
56 <entry>Y'<subscript>03</subscript></entry>
59 <entry>start0 + 4:</entry>
60 <entry>Y'<subscript>10</subscript></entry>
61 <entry>Y'<subscript>11</subscript></entry>
62 <entry>Y'<subscript>12</subscript></entry>
63 <entry>Y'<subscript>13</subscript></entry>
66 <entry>start0 + 8:</entry>
67 <entry>Y'<subscript>20</subscript></entry>
68 <entry>Y'<subscript>21</subscript></entry>
69 <entry>Y'<subscript>22</subscript></entry>
70 <entry>Y'<subscript>23</subscript></entry>
73 <entry>start0 + 12:</entry>
74 <entry>Y'<subscript>30</subscript></entry>
75 <entry>Y'<subscript>31</subscript></entry>
76 <entry>Y'<subscript>32</subscript></entry>
77 <entry>Y'<subscript>33</subscript></entry>
83 <entry>start1 + 0:</entry>
84 <entry>Cb<subscript>00</subscript></entry>
85 <entry>Cr<subscript>00</subscript></entry>
86 <entry>Cb<subscript>01</subscript></entry>
87 <entry>Cr<subscript>01</subscript></entry>
90 <entry>start1 + 4:</entry>
91 <entry>Cb<subscript>10</subscript></entry>
92 <entry>Cr<subscript>10</subscript></entry>
93 <entry>Cb<subscript>11</subscript></entry>
94 <entry>Cr<subscript>11</subscript></entry>
103 <title>Color Sample Location.</title>
105 <informaltable frame="none">
106 <tgroup cols="7" align="center">
110 <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
111 <entry>2</entry><entry></entry><entry>3</entry>
115 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
116 <entry>Y</entry><entry></entry><entry>Y</entry>
120 <entry></entry><entry>C</entry><entry></entry><entry></entry>
121 <entry></entry><entry>C</entry><entry></entry>
125 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
126 <entry>Y</entry><entry></entry><entry>Y</entry>
133 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
134 <entry>Y</entry><entry></entry><entry>Y</entry>
138 <entry></entry><entry>C</entry><entry></entry><entry></entry>
139 <entry></entry><entry>C</entry><entry></entry>
143 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
144 <entry>Y</entry><entry></entry><entry>Y</entry>