pixfmt-nv12mt.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 &frac12; 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. <para>This is the two-plane versions of the YUV 4:2:0 format where data
  20. is grouped into 64x32 macroblocks. The three components are separated into two
  21. sub-images or planes. The Y plane has one byte per pixel and pixels are grouped
  22. into 64x32 macroblocks. The CbCr plane has the same width, in bytes, as the Y
  23. plane (and the image), but is half as tall in pixels. The chroma plane is also
  24. grouped into 64x32 macroblocks.</para>
  25. <para>Width of the buffer has to be aligned to the multiple of 128, and
  26. height alignment is 32. Every four adjacent buffers - two horizontally and two
  27. vertically are grouped together and are located in memory in Z or flipped Z
  28. order. </para>
  29. <para>Layout of macroblocks in memory is presented in the following
  30. figure.</para>
  31. <para><figure id="nv12mt">
  32. <title><constant>V4L2_PIX_FMT_NV12MT</constant> macroblock Z shape
  33. memory layout</title>
  34. <mediaobject>
  35. <imageobject>
  36. <imagedata fileref="nv12mt.gif" format="GIF" />
  37. </imageobject>
  38. </mediaobject>
  39. </figure>
  40. The requirement that width is multiple of 128 is implemented because,
  41. the Z shape cannot be cut in half horizontally. In case the vertical resolution
  42. of macroblocks is odd then the last row of macroblocks is arranged in a linear
  43. order. </para>
  44. <para>In case of chroma the layout is identical. Cb and Cr samples are
  45. interleaved. Height of the buffer is aligned to 32.
  46. </para>
  47. <example>
  48. <title>Memory layout of macroblocks in <constant>V4L2_PIX_FMT_NV12
  49. </constant> format pixel image - extreme case</title>
  50. <para>
  51. <figure id="nv12mt_ex">
  52. <title>Example <constant>V4L2_PIX_FMT_NV12MT</constant> memory
  53. layout of macroblocks</title>
  54. <mediaobject>
  55. <imageobject>
  56. <imagedata fileref="nv12mt_example.gif" format="GIF" />
  57. </imageobject>
  58. </mediaobject>
  59. </figure>
  60. Memory layout of macroblocks of <constant>V4L2_PIX_FMT_NV12MT
  61. </constant> format in most extreme case.
  62. </para>
  63. </example>
  64. </refsect1>
  65. </refentry>