diff options
author | Kamil Debski <k.debski@samsung.com> | 2011-03-11 04:16:22 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 03:54:22 -0400 |
commit | bd08a0cd5f546916a9454ae2c35756ed77957458 (patch) | |
tree | 887ec84169ae57ef697458c3f845adf06937b9e0 /Documentation/DocBook | |
parent | 91707b8b27a785c42949ba55b65f084027962afa (diff) |
[media] v4l: Documentation for the NV12MT format
Added documentation for V4L2_PIX_FMT_NV12MT format. This is a YUV 4:2:0
format with macro block size of 64x32 and specific order of macro blocks
in the memory.
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r-- | Documentation/DocBook/media-entities.tmpl | 1 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/nv12mt.gif | bin | 0 -> 2108 bytes | |||
-rw-r--r-- | Documentation/DocBook/v4l/nv12mt_example.gif | bin | 0 -> 6858 bytes | |||
-rw-r--r-- | Documentation/DocBook/v4l/pixfmt-nv12mt.xml | 74 | ||||
-rw-r--r-- | Documentation/DocBook/v4l/pixfmt.xml | 1 |
5 files changed, 76 insertions, 0 deletions
diff --git a/Documentation/DocBook/media-entities.tmpl b/Documentation/DocBook/media-entities.tmpl index 40158ee3d369..5d259c632cdf 100644 --- a/Documentation/DocBook/media-entities.tmpl +++ b/Documentation/DocBook/media-entities.tmpl | |||
@@ -272,6 +272,7 @@ | |||
272 | <!ENTITY sub-grey SYSTEM "v4l/pixfmt-grey.xml"> | 272 | <!ENTITY sub-grey SYSTEM "v4l/pixfmt-grey.xml"> |
273 | <!ENTITY sub-nv12 SYSTEM "v4l/pixfmt-nv12.xml"> | 273 | <!ENTITY sub-nv12 SYSTEM "v4l/pixfmt-nv12.xml"> |
274 | <!ENTITY sub-nv12m SYSTEM "v4l/pixfmt-nv12m.xml"> | 274 | <!ENTITY sub-nv12m SYSTEM "v4l/pixfmt-nv12m.xml"> |
275 | <!ENTITY sub-nv12mt SYSTEM "v4l/pixfmt-nv12mt.xml"> | ||
275 | <!ENTITY sub-nv16 SYSTEM "v4l/pixfmt-nv16.xml"> | 276 | <!ENTITY sub-nv16 SYSTEM "v4l/pixfmt-nv16.xml"> |
276 | <!ENTITY sub-packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml"> | 277 | <!ENTITY sub-packed-rgb SYSTEM "v4l/pixfmt-packed-rgb.xml"> |
277 | <!ENTITY sub-packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml"> | 278 | <!ENTITY sub-packed-yuv SYSTEM "v4l/pixfmt-packed-yuv.xml"> |
diff --git a/Documentation/DocBook/v4l/nv12mt.gif b/Documentation/DocBook/v4l/nv12mt.gif new file mode 100644 index 000000000000..ef2d4cf8367b --- /dev/null +++ b/Documentation/DocBook/v4l/nv12mt.gif | |||
Binary files differ | |||
diff --git a/Documentation/DocBook/v4l/nv12mt_example.gif b/Documentation/DocBook/v4l/nv12mt_example.gif new file mode 100644 index 000000000000..df81d68108ee --- /dev/null +++ b/Documentation/DocBook/v4l/nv12mt_example.gif | |||
Binary files differ | |||
diff --git a/Documentation/DocBook/v4l/pixfmt-nv12mt.xml b/Documentation/DocBook/v4l/pixfmt-nv12mt.xml new file mode 100644 index 000000000000..5cb5bec8b653 --- /dev/null +++ b/Documentation/DocBook/v4l/pixfmt-nv12mt.xml | |||
@@ -0,0 +1,74 @@ | |||
1 | <refentry> | ||
2 | <refmeta> | ||
3 | <refentrytitle>V4L2_PIX_FMT_NV12MT ('TM12')</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | <refnamediv> | ||
7 | <refname id="V4L2-PIX-FMT-NV12MT"><constant>V4L2_PIX_FMT_NV12MT | ||
8 | </constant></refname> | ||
9 | <refpurpose>Formats with ½ horizontal and vertical | ||
10 | chroma resolution. This format has two planes - one for luminance and one for | ||
11 | chrominance. Chroma samples are interleaved. The difference to | ||
12 | <constant>V4L2_PIX_FMT_NV12</constant> is the memory layout. Pixels are | ||
13 | grouped in macroblocks of 64x32 size. The order of macroblocks in memory is | ||
14 | also not standard. | ||
15 | </refpurpose> | ||
16 | </refnamediv> | ||
17 | <refsect1> | ||
18 | <title>Description</title> | ||
19 | |||
20 | <para>This is the two-plane versions of the YUV 4:2:0 format where data | ||
21 | is grouped into 64x32 macroblocks. The three components are separated into two | ||
22 | sub-images or planes. The Y plane has one byte per pixel and pixels are grouped | ||
23 | into 64x32 macroblocks. The CbCr plane has the same width, in bytes, as the Y | ||
24 | plane (and the image), but is half as tall in pixels. The chroma plane is also | ||
25 | grouped into 64x32 macroblocks.</para> | ||
26 | <para>Width of the buffer has to be aligned to the multiple of 128, and | ||
27 | height alignment is 32. Every four adjactent buffers - two horizontally and two | ||
28 | vertically are grouped together and are located in memory in Z or flipped Z | ||
29 | order. </para> | ||
30 | <para>Layout of macroblocks in memory is presented in the following | ||
31 | figure.</para> | ||
32 | <para><figure id="nv12mt"> | ||
33 | <title><constant>V4L2_PIX_FMT_NV12MT</constant> macroblock Z shape | ||
34 | memory layout</title> | ||
35 | <mediaobject> | ||
36 | <imageobject> | ||
37 | <imagedata fileref="nv12mt.gif" format="GIF" /> | ||
38 | </imageobject> | ||
39 | </mediaobject> | ||
40 | </figure> | ||
41 | The requirement that width is multiple of 128 is implemented because, | ||
42 | the Z shape cannot be cut in half horizontally. In case the vertical resolution | ||
43 | of macroblocks is odd then the last row of macroblocks is arranged in a linear | ||
44 | order. </para> | ||
45 | <para>In case of chroma the layout is identical. Cb and Cr samples are | ||
46 | interleaved. Height of the buffer is aligned to 32. | ||
47 | </para> | ||
48 | <example> | ||
49 | <title>Memory layout of macroblocks in <constant>V4L2_PIX_FMT_NV12 | ||
50 | </constant> format pixel image - extreme case</title> | ||
51 | <para> | ||
52 | <figure id="nv12mt"> | ||
53 | <title>Example <constant>V4L2_PIX_FMT_NV12MT</constant> memory | ||
54 | layout of macroblocks</title> | ||
55 | <mediaobject> | ||
56 | <imageobject> | ||
57 | <imagedata fileref="nv12mt_example.gif" format="GIF" /> | ||
58 | </imageobject> | ||
59 | </mediaobject> | ||
60 | </figure> | ||
61 | Memory layout of macroblocks of <constant>V4L2_PIX_FMT_NV12MT | ||
62 | </constant> format in most extreme case. | ||
63 | </para> | ||
64 | </example> | ||
65 | </refsect1> | ||
66 | </refentry> | ||
67 | |||
68 | <!-- | ||
69 | Local Variables: | ||
70 | mode: sgml | ||
71 | sgml-parent-document: "pixfmt.sgml" | ||
72 | indent-tabs-mode: nil | ||
73 | End: | ||
74 | --> | ||
diff --git a/Documentation/DocBook/v4l/pixfmt.xml b/Documentation/DocBook/v4l/pixfmt.xml index f8436dcb7414..c6fdcbbd1b41 100644 --- a/Documentation/DocBook/v4l/pixfmt.xml +++ b/Documentation/DocBook/v4l/pixfmt.xml | |||
@@ -709,6 +709,7 @@ information.</para> | |||
709 | &sub-yuv411p; | 709 | &sub-yuv411p; |
710 | &sub-nv12; | 710 | &sub-nv12; |
711 | &sub-nv12m; | 711 | &sub-nv12m; |
712 | &sub-nv12mt; | ||
712 | &sub-nv16; | 713 | &sub-nv16; |
713 | </section> | 714 | </section> |
714 | 715 | ||