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