Merge remote-tracking branches 'regulator/fix/email' and 'regulator/fix/qcom-smd...
[deliverable/linux.git] / Documentation / media / uapi / v4l / pixfmt-nv12mt.rst
CommitLineData
5377d91f
MH
1.. -*- coding: utf-8; mode: rst -*-
2
3.. _V4L2-PIX-FMT-NV12MT:
4
5****************************
6V4L2_PIX_FMT_NV12MT ('TM12')
7****************************
8
9*man V4L2_PIX_FMT_NV12MT(2)*
10
11Formats with ½ horizontal and vertical chroma resolution. This format
12has two planes - one for luminance and one for chrominance. Chroma
13samples are interleaved. The difference to ``V4L2_PIX_FMT_NV12`` is the
14memory layout. Pixels are grouped in macroblocks of 64x32 size. The
15order of macroblocks in memory is also not standard.
16
17
18Description
19===========
20
21This is the two-plane versions of the YUV 4:2:0 format where data is
22grouped into 64x32 macroblocks. The three components are separated into
23two sub-images or planes. The Y plane has one byte per pixel and pixels
24are grouped into 64x32 macroblocks. The CbCr plane has the same width,
25in bytes, as the Y plane (and the image), but is half as tall in pixels.
26The chroma plane is also grouped into 64x32 macroblocks.
27
28Width of the buffer has to be aligned to the multiple of 128, and height
29alignment is 32. Every four adjacent buffers - two horizontally and two
30vertically are grouped together and are located in memory in Z or
31flipped Z order.
32
33Layout of macroblocks in memory is presented in the following figure.
34
35
36.. _nv12mt:
37
38.. figure:: pixfmt-nv12mt_files/nv12mt.*
39 :alt: nv12mt.gif
40 :align: center
41
42 V4L2_PIX_FMT_NV12MT macroblock Z shape memory layout
43
44The requirement that width is multiple of 128 is implemented because,
45the Z shape cannot be cut in half horizontally. In case the vertical
46resolution of macroblocks is odd then the last row of macroblocks is
47arranged in a linear order.
48
49In case of chroma the layout is identical. Cb and Cr samples are
50interleaved. Height of the buffer is aligned to 32.
51
52
53.. _nv12mt_ex:
54
55.. figure:: pixfmt-nv12mt_files/nv12mt_example.*
56 :alt: nv12mt_example.gif
57 :align: center
58
59 Example V4L2_PIX_FMT_NV12MT memory layout of macroblocks
60
61Memory layout of macroblocks of ``V4L2_PIX_FMT_NV12MT`` format in most
62extreme case.
This page took 0.049053 seconds and 5 git commands to generate.