1 .. -*- coding: utf-8; mode: rst -*-
3 .. _V4L2-PIX-FMT-YVU420:
4 .. _V4L2-PIX-FMT-YUV420:
6 **********************************************************
7 V4L2_PIX_FMT_YVU420 ('YV12'), V4L2_PIX_FMT_YUV420 ('YU12')
8 **********************************************************
10 *man V4L2_PIX_FMT_YVU420(2)*
13 Planar formats with ½ horizontal and vertical chroma resolution, also
20 These are planar formats, as opposed to a packed format. The three
21 components are separated into three sub- images or planes. The Y plane
22 is first. The Y plane has one byte per pixel. For
23 ``V4L2_PIX_FMT_YVU420``, the Cr plane immediately follows the Y plane in
24 memory. The Cr plane is half the width and half the height of the Y
25 plane (and of the image). Each Cr belongs to four pixels, a two-by-two
26 square of the image. For example, Cr\ :sub:`0` belongs to Y'\ :sub:`00`,
27 Y'\ :sub:`01`, Y'\ :sub:`10`, and Y'\ :sub:`11`. Following the Cr plane
28 is the Cb plane, just like the Cr plane. ``V4L2_PIX_FMT_YUV420`` is the
29 same except the Cb plane comes first, then the Cr plane.
31 If the Y plane has pad bytes after each row, then the Cr and Cb planes
32 have half as many pad bytes after their rows. In other words, two Cx
33 rows (including padding) is exactly as long as one Y row (including
37 Each cell is one byte.
128 **Color Sample Location..**