pixfmt-m420.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <refentry id="V4L2-PIX-FMT-M420">
  2. <refmeta>
  3. <refentrytitle>V4L2_PIX_FMT_M420 ('M420')</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname><constant>V4L2_PIX_FMT_M420</constant></refname>
  8. <refpurpose>Format with &frac12; horizontal and vertical chroma
  9. resolution, also known as YUV 4:2:0. Hybrid plane line-interleaved
  10. layout.</refpurpose>
  11. </refnamediv>
  12. <refsect1>
  13. <title>Description</title>
  14. <para>M420 is a YUV format with &frac12; horizontal and vertical chroma
  15. subsampling (YUV 4:2:0). Pixels are organized as interleaved luma and
  16. chroma planes. Two lines of luma data are followed by one line of chroma
  17. data.</para>
  18. <para>The luma plane has one byte per pixel. The chroma plane contains
  19. interleaved CbCr pixels subsampled by &frac12; in the horizontal and
  20. vertical directions. Each CbCr pair belongs to four pixels. For example,
  21. Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to
  22. Y'<subscript>00</subscript>, Y'<subscript>01</subscript>,
  23. Y'<subscript>10</subscript>, Y'<subscript>11</subscript>.</para>
  24. <para>All line lengths are identical: if the Y lines include pad bytes
  25. so do the CbCr lines.</para>
  26. <example>
  27. <title><constant>V4L2_PIX_FMT_M420</constant> 4 &times; 4
  28. pixel image</title>
  29. <formalpara>
  30. <title>Byte Order.</title>
  31. <para>Each cell is one byte.
  32. <informaltable frame="none">
  33. <tgroup cols="5" align="center">
  34. <colspec align="left" colwidth="2*" />
  35. <tbody valign="top">
  36. <row>
  37. <entry>start&nbsp;+&nbsp;0:</entry>
  38. <entry>Y'<subscript>00</subscript></entry>
  39. <entry>Y'<subscript>01</subscript></entry>
  40. <entry>Y'<subscript>02</subscript></entry>
  41. <entry>Y'<subscript>03</subscript></entry>
  42. </row>
  43. <row>
  44. <entry>start&nbsp;+&nbsp;4:</entry>
  45. <entry>Y'<subscript>10</subscript></entry>
  46. <entry>Y'<subscript>11</subscript></entry>
  47. <entry>Y'<subscript>12</subscript></entry>
  48. <entry>Y'<subscript>13</subscript></entry>
  49. </row>
  50. <row>
  51. <entry>start&nbsp;+&nbsp;8:</entry>
  52. <entry>Cb<subscript>00</subscript></entry>
  53. <entry>Cr<subscript>00</subscript></entry>
  54. <entry>Cb<subscript>01</subscript></entry>
  55. <entry>Cr<subscript>01</subscript></entry>
  56. </row>
  57. <row>
  58. <entry>start&nbsp;+&nbsp;16:</entry>
  59. <entry>Y'<subscript>20</subscript></entry>
  60. <entry>Y'<subscript>21</subscript></entry>
  61. <entry>Y'<subscript>22</subscript></entry>
  62. <entry>Y'<subscript>23</subscript></entry>
  63. </row>
  64. <row>
  65. <entry>start&nbsp;+&nbsp;20:</entry>
  66. <entry>Y'<subscript>30</subscript></entry>
  67. <entry>Y'<subscript>31</subscript></entry>
  68. <entry>Y'<subscript>32</subscript></entry>
  69. <entry>Y'<subscript>33</subscript></entry>
  70. </row>
  71. <row>
  72. <entry>start&nbsp;+&nbsp;24:</entry>
  73. <entry>Cb<subscript>10</subscript></entry>
  74. <entry>Cr<subscript>10</subscript></entry>
  75. <entry>Cb<subscript>11</subscript></entry>
  76. <entry>Cr<subscript>11</subscript></entry>
  77. </row>
  78. </tbody>
  79. </tgroup>
  80. </informaltable>
  81. </para>
  82. </formalpara>
  83. <formalpara>
  84. <title>Color Sample Location.</title>
  85. <para>
  86. <informaltable frame="none">
  87. <tgroup cols="7" align="center">
  88. <tbody valign="top">
  89. <row>
  90. <entry></entry>
  91. <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
  92. <entry>2</entry><entry></entry><entry>3</entry>
  93. </row>
  94. <row>
  95. <entry>0</entry>
  96. <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
  97. <entry>Y</entry><entry></entry><entry>Y</entry>
  98. </row>
  99. <row>
  100. <entry></entry>
  101. <entry></entry><entry>C</entry><entry></entry><entry></entry>
  102. <entry></entry><entry>C</entry><entry></entry>
  103. </row>
  104. <row>
  105. <entry>1</entry>
  106. <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
  107. <entry>Y</entry><entry></entry><entry>Y</entry>
  108. </row>
  109. <row>
  110. <entry></entry>
  111. </row>
  112. <row>
  113. <entry>2</entry>
  114. <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
  115. <entry>Y</entry><entry></entry><entry>Y</entry>
  116. </row>
  117. <row>
  118. <entry></entry>
  119. <entry></entry><entry>C</entry><entry></entry><entry></entry>
  120. <entry></entry><entry>C</entry><entry></entry>
  121. </row>
  122. <row>
  123. <entry>3</entry>
  124. <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
  125. <entry>Y</entry><entry></entry><entry>Y</entry>
  126. </row>
  127. </tbody>
  128. </tgroup>
  129. </informaltable>
  130. </para>
  131. </formalpara>
  132. </example>
  133. </refsect1>
  134. </refentry>