1 .. -*- coding: utf-8; mode: rst -*-
3 .. _V4L2-PIX-FMT-YUV420M:
4 .. _v4l2-pix-fmt-yvu420m:
6 ************************************************************
7 V4L2_PIX_FMT_YUV420M ('YM12'), V4L2_PIX_FMT_YVU420M ('YM21')
8 ************************************************************
10 *man V4L2_PIX_FMT_YUV420M(2)*
13 Variation of ``V4L2_PIX_FMT_YUV420`` and ``V4L2_PIX_FMT_YVU420`` with
14 planes non contiguous in memory.
20 This is a multi-planar format, as opposed to a packed format. The three
21 components are separated into three sub-images or planes.
23 The Y plane is first. The Y plane has one byte per pixel. For
24 ``V4L2_PIX_FMT_YUV420M`` the Cb data constitutes the second plane which
25 is half the width and half the height of the Y plane (and of the image).
26 Each Cb belongs to four pixels, a two-by-two square of the image. For
27 example, Cb\ :sub:`0` belongs to Y'\ :sub:`00`, Y'\ :sub:`01`,
28 Y'\ :sub:`10`, and Y'\ :sub:`11`. The Cr data, just like the Cb plane,
29 is in the third plane.
31 ``V4L2_PIX_FMT_YVU420M`` is the same except the Cr data is stored in the
32 second plane and the Cb data in the third plane.
34 If the Y plane has pad bytes after each row, then the Cb and Cr planes
35 have half as many pad bytes after their rows. In other words, two Cx
36 rows (including padding) is exactly as long as one Y row (including
39 ``V4L2_PIX_FMT_YUV420M`` and ``V4L2_PIX_FMT_YVU420M`` are intended to be
40 used only in drivers and applications that support the multi-planar API,
41 described in :ref:`planar-apis`.
44 Each cell is one byte.
143 **Color Sample Location..**