pixfmt-nv16m.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <refentry>
  2. <refmeta>
  3. <refentrytitle>V4L2_PIX_FMT_NV16M ('NM16'), V4L2_PIX_FMT_NV61M ('NM61')</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname id="V4L2-PIX-FMT-NV16M"><constant>V4L2_PIX_FMT_NV16M</constant></refname>
  8. <refname id="V4L2-PIX-FMT-NV61M"><constant>V4L2_PIX_FMT_NV61M</constant></refname>
  9. <refpurpose>Variation of <constant>V4L2_PIX_FMT_NV16</constant> and <constant>V4L2_PIX_FMT_NV61</constant> with planes
  10. non contiguous in memory. </refpurpose>
  11. </refnamediv>
  12. <refsect1>
  13. <title>Description</title>
  14. <para>This is a multi-planar, two-plane version of the YUV 4:2:2 format.
  15. The three components are separated into two sub-images or planes.
  16. <constant>V4L2_PIX_FMT_NV16M</constant> differs from <constant>V4L2_PIX_FMT_NV16
  17. </constant> in that the two planes are non-contiguous in memory, i.e. the chroma
  18. plane does not necessarily immediately follow the luma plane.
  19. The luminance data occupies the first plane. The Y plane has one byte per pixel.
  20. In the second plane there is chrominance data with alternating chroma samples.
  21. The CbCr plane is the same width and height, in bytes, as the Y plane.
  22. Each CbCr pair belongs to two pixels. For example,
  23. Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to
  24. Y'<subscript>00</subscript>, Y'<subscript>01</subscript>.
  25. <constant>V4L2_PIX_FMT_NV61M</constant> is the same as <constant>V4L2_PIX_FMT_NV16M</constant>
  26. except the Cb and Cr bytes are swapped, the CrCb plane starts with a Cr byte.</para>
  27. <para><constant>V4L2_PIX_FMT_NV16M</constant> and
  28. <constant>V4L2_PIX_FMT_NV61M</constant> are intended to be used only in drivers
  29. and applications that support the multi-planar API, described in
  30. <xref linkend="planar-apis"/>. </para>
  31. <example>
  32. <title><constant>V4L2_PIX_FMT_NV16M</constant> 4 &times; 4 pixel image</title>
  33. <formalpara>
  34. <title>Byte Order.</title>
  35. <para>Each cell is one byte.
  36. <informaltable frame="none">
  37. <tgroup cols="5" align="center">
  38. <colspec align="left" colwidth="2*" />
  39. <tbody valign="top">
  40. <row>
  41. <entry>start0&nbsp;+&nbsp;0:</entry>
  42. <entry>Y'<subscript>00</subscript></entry>
  43. <entry>Y'<subscript>01</subscript></entry>
  44. <entry>Y'<subscript>02</subscript></entry>
  45. <entry>Y'<subscript>03</subscript></entry>
  46. </row>
  47. <row>
  48. <entry>start0&nbsp;+&nbsp;4:</entry>
  49. <entry>Y'<subscript>10</subscript></entry>
  50. <entry>Y'<subscript>11</subscript></entry>
  51. <entry>Y'<subscript>12</subscript></entry>
  52. <entry>Y'<subscript>13</subscript></entry>
  53. </row>
  54. <row>
  55. <entry>start0&nbsp;+&nbsp;8:</entry>
  56. <entry>Y'<subscript>20</subscript></entry>
  57. <entry>Y'<subscript>21</subscript></entry>
  58. <entry>Y'<subscript>22</subscript></entry>
  59. <entry>Y'<subscript>23</subscript></entry>
  60. </row>
  61. <row>
  62. <entry>start0&nbsp;+&nbsp;12:</entry>
  63. <entry>Y'<subscript>30</subscript></entry>
  64. <entry>Y'<subscript>31</subscript></entry>
  65. <entry>Y'<subscript>32</subscript></entry>
  66. <entry>Y'<subscript>33</subscript></entry>
  67. </row>
  68. <row>
  69. <entry></entry>
  70. </row>
  71. <row>
  72. <entry>start1&nbsp;+&nbsp;0:</entry>
  73. <entry>Cb<subscript>00</subscript></entry>
  74. <entry>Cr<subscript>00</subscript></entry>
  75. <entry>Cb<subscript>02</subscript></entry>
  76. <entry>Cr<subscript>02</subscript></entry>
  77. </row>
  78. <row>
  79. <entry>start1&nbsp;+&nbsp;4:</entry>
  80. <entry>Cb<subscript>10</subscript></entry>
  81. <entry>Cr<subscript>10</subscript></entry>
  82. <entry>Cb<subscript>12</subscript></entry>
  83. <entry>Cr<subscript>12</subscript></entry>
  84. </row>
  85. <row>
  86. <entry>start1&nbsp;+&nbsp;8:</entry>
  87. <entry>Cb<subscript>20</subscript></entry>
  88. <entry>Cr<subscript>20</subscript></entry>
  89. <entry>Cb<subscript>22</subscript></entry>
  90. <entry>Cr<subscript>22</subscript></entry>
  91. </row>
  92. <row>
  93. <entry>start1&nbsp;+&nbsp;12:</entry>
  94. <entry>Cb<subscript>30</subscript></entry>
  95. <entry>Cr<subscript>30</subscript></entry>
  96. <entry>Cb<subscript>32</subscript></entry>
  97. <entry>Cr<subscript>32</subscript></entry>
  98. </row>
  99. </tbody>
  100. </tgroup>
  101. </informaltable>
  102. </para>
  103. </formalpara>
  104. <formalpara>
  105. <title>Color Sample Location.</title>
  106. <para>
  107. <informaltable frame="none">
  108. <tgroup cols="7" align="center">
  109. <tbody valign="top">
  110. <row>
  111. <entry></entry>
  112. <entry>0</entry><entry></entry><entry>1</entry><entry></entry>
  113. <entry>2</entry><entry></entry><entry>3</entry>
  114. </row>
  115. <row>
  116. <entry>0</entry>
  117. <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
  118. <entry>Y</entry><entry></entry><entry>Y</entry>
  119. </row>
  120. <row>
  121. <entry></entry>
  122. <entry></entry><entry>C</entry><entry></entry><entry></entry>
  123. <entry></entry><entry>C</entry><entry></entry>
  124. </row>
  125. <row>
  126. <entry>1</entry>
  127. <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
  128. <entry>Y</entry><entry></entry><entry>Y</entry>
  129. </row>
  130. <row>
  131. <entry></entry>
  132. <entry></entry><entry>C</entry><entry></entry><entry></entry>
  133. <entry></entry><entry>C</entry><entry></entry>
  134. </row>
  135. <row>
  136. <entry></entry>
  137. </row>
  138. <row>
  139. <entry>2</entry>
  140. <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
  141. <entry>Y</entry><entry></entry><entry>Y</entry>
  142. </row>
  143. <row>
  144. <entry></entry>
  145. <entry></entry><entry>C</entry><entry></entry><entry></entry>
  146. <entry></entry><entry>C</entry><entry></entry>
  147. </row>
  148. <row>
  149. <entry>3</entry>
  150. <entry>Y</entry><entry></entry><entry>Y</entry><entry></entry>
  151. <entry>Y</entry><entry></entry><entry>Y</entry>
  152. </row>
  153. <row>
  154. <entry></entry>
  155. <entry></entry><entry>C</entry><entry></entry><entry></entry>
  156. <entry></entry><entry>C</entry><entry></entry>
  157. </row>
  158. </tbody>
  159. </tgroup>
  160. </informaltable>
  161. </para>
  162. </formalpara>
  163. </example>
  164. </refsect1>
  165. </refentry>