pixfmt-packed-yuv.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. .. -*- coding: utf-8; mode: rst -*-
  2. .. _packed-yuv:
  3. ******************
  4. Packed YUV formats
  5. ******************
  6. Description
  7. ===========
  8. Similar to the packed RGB formats these formats store the Y, Cb and Cr
  9. component of each pixel in one 16 or 32 bit word.
  10. .. raw:: latex
  11. \newline\newline\begin{adjustbox}{width=\columnwidth}
  12. .. _packed-yuv-formats:
  13. .. tabularcolumns:: |p{4.5cm}|p{3.3cm}|p{0.7cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{1.7cm}|
  14. .. flat-table:: Packed YUV Image Formats
  15. :header-rows: 2
  16. :stub-columns: 0
  17. * - Identifier
  18. - Code
  19. -
  20. - :cspan:`7` Byte 0 in memory
  21. -
  22. - :cspan:`7` Byte 1
  23. -
  24. - :cspan:`7` Byte 2
  25. -
  26. - :cspan:`7` Byte 3
  27. * -
  28. -
  29. - Bit
  30. - 7
  31. - 6
  32. - 5
  33. - 4
  34. - 3
  35. - 2
  36. - 1
  37. - 0
  38. -
  39. - 7
  40. - 6
  41. - 5
  42. - 4
  43. - 3
  44. - 2
  45. - 1
  46. - 0
  47. -
  48. - 7
  49. - 6
  50. - 5
  51. - 4
  52. - 3
  53. - 2
  54. - 1
  55. - 0
  56. -
  57. - 7
  58. - 6
  59. - 5
  60. - 4
  61. - 3
  62. - 2
  63. - 1
  64. - 0
  65. * .. _V4L2-PIX-FMT-YUV444:
  66. - ``V4L2_PIX_FMT_YUV444``
  67. - 'Y444'
  68. -
  69. - Cb\ :sub:`3`
  70. - Cb\ :sub:`2`
  71. - Cb\ :sub:`1`
  72. - Cb\ :sub:`0`
  73. - Cr\ :sub:`3`
  74. - Cr\ :sub:`2`
  75. - Cr\ :sub:`1`
  76. - Cr\ :sub:`0`
  77. -
  78. - a\ :sub:`3`
  79. - a\ :sub:`2`
  80. - a\ :sub:`1`
  81. - a\ :sub:`0`
  82. - Y'\ :sub:`3`
  83. - Y'\ :sub:`2`
  84. - Y'\ :sub:`1`
  85. - Y'\ :sub:`0`
  86. * .. _V4L2-PIX-FMT-YUV555:
  87. - ``V4L2_PIX_FMT_YUV555``
  88. - 'YUVO'
  89. -
  90. - Cb\ :sub:`2`
  91. - Cb\ :sub:`1`
  92. - Cb\ :sub:`0`
  93. - Cr\ :sub:`4`
  94. - Cr\ :sub:`3`
  95. - Cr\ :sub:`2`
  96. - Cr\ :sub:`1`
  97. - Cr\ :sub:`0`
  98. -
  99. - a
  100. - Y'\ :sub:`4`
  101. - Y'\ :sub:`3`
  102. - Y'\ :sub:`2`
  103. - Y'\ :sub:`1`
  104. - Y'\ :sub:`0`
  105. - Cb\ :sub:`4`
  106. - Cb\ :sub:`3`
  107. * .. _V4L2-PIX-FMT-YUV565:
  108. - ``V4L2_PIX_FMT_YUV565``
  109. - 'YUVP'
  110. -
  111. - Cb\ :sub:`2`
  112. - Cb\ :sub:`1`
  113. - Cb\ :sub:`0`
  114. - Cr\ :sub:`4`
  115. - Cr\ :sub:`3`
  116. - Cr\ :sub:`2`
  117. - Cr\ :sub:`1`
  118. - Cr\ :sub:`0`
  119. -
  120. - Y'\ :sub:`4`
  121. - Y'\ :sub:`3`
  122. - Y'\ :sub:`2`
  123. - Y'\ :sub:`1`
  124. - Y'\ :sub:`0`
  125. - Cb\ :sub:`5`
  126. - Cb\ :sub:`4`
  127. - Cb\ :sub:`3`
  128. * .. _V4L2-PIX-FMT-YUV32:
  129. - ``V4L2_PIX_FMT_YUV32``
  130. - 'YUV4'
  131. -
  132. - a\ :sub:`7`
  133. - a\ :sub:`6`
  134. - a\ :sub:`5`
  135. - a\ :sub:`4`
  136. - a\ :sub:`3`
  137. - a\ :sub:`2`
  138. - a\ :sub:`1`
  139. - a\ :sub:`0`
  140. -
  141. - Y'\ :sub:`7`
  142. - Y'\ :sub:`6`
  143. - Y'\ :sub:`5`
  144. - Y'\ :sub:`4`
  145. - Y'\ :sub:`3`
  146. - Y'\ :sub:`2`
  147. - Y'\ :sub:`1`
  148. - Y'\ :sub:`0`
  149. -
  150. - Cb\ :sub:`7`
  151. - Cb\ :sub:`6`
  152. - Cb\ :sub:`5`
  153. - Cb\ :sub:`4`
  154. - Cb\ :sub:`3`
  155. - Cb\ :sub:`2`
  156. - Cb\ :sub:`1`
  157. - Cb\ :sub:`0`
  158. -
  159. - Cr\ :sub:`7`
  160. - Cr\ :sub:`6`
  161. - Cr\ :sub:`5`
  162. - Cr\ :sub:`4`
  163. - Cr\ :sub:`3`
  164. - Cr\ :sub:`2`
  165. - Cr\ :sub:`1`
  166. - Cr\ :sub:`0`
  167. .. raw:: latex
  168. \end{adjustbox}\newline\newline
  169. .. note::
  170. #) Bit 7 is the most significant bit;
  171. #) The value of a = alpha bits is undefined when reading from the driver,
  172. ignored when writing to the driver, except when alpha blending has
  173. been negotiated for a :ref:`Video Overlay <overlay>` or
  174. :ref:`Video Output Overlay <osd>`.