3 <refentrytitle>V4L2_PIX_FMT_NV12 ('NV12'), V4L2_PIX_FMT_NV21 ('NV21')</refentrytitle>
7 <refname id="V4L2-PIX-FMT-NV12"><constant>V4L2_PIX_FMT_NV12</constant></refname>
8 <refname id="V4L2-PIX-FMT-NV21"><constant>V4L2_PIX_FMT_NV21</constant></refname>
9 <refpurpose>Formats with ½ horizontal and vertical
10 chroma resolution, also known as YUV 4:2:0. One luminance and one
11 chrominance plane with alternating chroma samples as opposed to
12 <constant>V4L2_PIX_FMT_YVU420</constant></refpurpose>
15 <title>Description</title>
17 <para>These are two-plane versions of the YUV 4:2:0 format.
18 The three components are separated into two sub-images or planes. The
19 Y plane is first. The Y plane has one byte per pixel. For
20 <constant>V4L2_PIX_FMT_NV12</constant>, a combined CbCr plane
21 immediately follows the Y plane in memory. The CbCr plane is the same
22 width, in bytes, as the Y plane (and of the image), but is half as
23 tall in pixels. Each CbCr pair belongs to four pixels. For example,
24 Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to
25 Y'<subscript>00</subscript>, Y'<subscript>01</subscript>,
26 Y'<subscript>10</subscript>, Y'<subscript>11</subscript>.
27 <constant>V4L2_PIX_FMT_NV21</constant> is the same except the Cb and
28 Cr bytes are swapped, the CrCb plane starts with a Cr byte.</para>
30 <para>If the Y plane has pad bytes after each row, then the
31 CbCr plane has as many pad bytes after its rows.</para>
34 <title><constant>V4L2_PIX_FMT_NV12</constant> 4 × 4
38 <title>Byte Order.</title>
39 <para>Each cell is one byte.
40 <informaltable frame="none">
41 <tgroup cols="5" align="center">
42 <colspec align="left" colwidth="2*" />
45 <entry>start + 0:</entry>
46 <entry>Y'<subscript>00</subscript></entry>
47 <entry>Y'<subscript>01</subscript></entry>
48 <entry>Y'<subscript>02</subscript></entry>
49 <entry>Y'<subscript>03</subscript></entry>
52 <entry>start + 4:</entry>
53 <entry>Y'<subscript>10</subscript></entry>
54 <entry>Y'<subscript>11</subscript></entry>
55 <entry>Y'<subscript>12</subscript></entry>
56 <entry>Y'<subscript>13</subscript></entry>
59 <entry>start + 8:</entry>
60 <entry>Y'<subscript>20</subscript></entry>
61 <entry>Y'<subscript>21</subscript></entry>
62 <entry>Y'<subscript>22</subscript></entry>
63 <entry>Y'<subscript>23</subscript></entry>
66 <entry>start + 12:</entry>
67 <entry>Y'<subscript>30</subscript></entry>
68 <entry>Y'<subscript>31</subscript></entry>
69 <entry>Y'<subscript>32</subscript></entry>
70 <entry>Y'<subscript>33</subscript></entry>
73 <entry>start + 16:</entry>
74 <entry>Cb<subscript>00</subscript></entry>
75 <entry>Cr<subscript>00</subscript></entry>
76 <entry>Cb<subscript>01</subscript></entry>
77 <entry>Cr<subscript>01</subscript></entry>
80 <entry>start + 20:</entry>
81 <entry>Cb<subscript>10</subscript></entry>
82 <entry>Cr<subscript>10</subscript></entry>
83 <entry>Cb<subscript>11</subscript></entry>
84 <entry>Cr<subscript>11</subscript></entry>
93 <title>Color Sample Location.</title>
95 <informaltable frame="none">
96 <tgroup cols="7" align="center">
100 <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
101 <entry>2</entry><entry></entry><entry>3</entry>
105 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
106 <entry>Y</entry><entry></entry><entry>Y</entry>
110 <entry></entry><entry>C</entry><entry></entry><entry></entry>
111 <entry></entry><entry>C</entry><entry></entry>
115 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
116 <entry>Y</entry><entry></entry><entry>Y</entry>
123 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
124 <entry>Y</entry><entry></entry><entry>Y</entry>
128 <entry></entry><entry>C</entry><entry></entry><entry></entry>
129 <entry></entry><entry>C</entry><entry></entry>
133 <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
134 <entry>Y</entry><entry></entry><entry>Y</entry>
148 sgml-parent-document: "pixfmt.sgml"
149 indent-tabs-mode: nil