You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

201 lines
4.8KB

  1. /*
  2. * pixel format descriptor
  3. * Copyright (c) 2009 Michael Niedermayer <michaelni@gmx.at>
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #include "libavutil/pixfmt.h"
  22. #include "pixdesc.h"
  23. const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
  24. [PIX_FMT_YUV422P] = {
  25. .name = "yuv422p",
  26. .nb_channels = 3,
  27. .log2_chroma_w= 1,
  28. .log2_chroma_h= 0,
  29. .comp = {
  30. {0,0,1,0,7},
  31. {1,0,1,0,7},
  32. {2,0,1,0,7},
  33. },
  34. },
  35. [PIX_FMT_YUV420P] = {
  36. .name = "yuv420p",
  37. .nb_channels = 3,
  38. .log2_chroma_w= 1,
  39. .log2_chroma_h= 1,
  40. .comp = {
  41. {0,0,1,0,7},
  42. {1,0,1,0,7},
  43. {2,0,1,0,7},
  44. },
  45. },
  46. [PIX_FMT_YUV410P] = {
  47. .name = "yuv410p",
  48. .nb_channels = 3,
  49. .log2_chroma_w= 2,
  50. .log2_chroma_h= 2,
  51. .comp = {
  52. {0,0,1,0,7},
  53. {1,0,1,0,7},
  54. {2,0,1,0,7},
  55. },
  56. },
  57. [PIX_FMT_NV12] = {
  58. .name = "nv12",
  59. .nb_channels = 3,
  60. .log2_chroma_w= 1,
  61. .log2_chroma_h= 1,
  62. .comp = {
  63. {0,0,1,0,7},
  64. {1,1,1,0,7},
  65. {1,1,2,0,7},
  66. },
  67. },
  68. [PIX_FMT_YUYV422] = {
  69. .name = "yuyv422",
  70. .nb_channels = 3,
  71. .log2_chroma_w= 1,
  72. .log2_chroma_h= 0,
  73. .comp = {
  74. {0,1,1,0,7},
  75. {0,3,2,0,7},
  76. {0,3,4,0,7},
  77. },
  78. },
  79. [PIX_FMT_UYVY422] = {
  80. .name = "uyvy422",
  81. .nb_channels = 3,
  82. .log2_chroma_w= 1,
  83. .log2_chroma_h= 0,
  84. .comp = {
  85. {0,1,2,0,7},
  86. {0,3,1,0,7},
  87. {0,3,3,0,7},
  88. },
  89. },
  90. [PIX_FMT_GRAY16LE] = {
  91. .name = "gray16le",
  92. .nb_channels = 1,
  93. .log2_chroma_w= 0,
  94. .log2_chroma_h= 0,
  95. .comp = {
  96. {0,1,1,0,15},
  97. },
  98. },
  99. [PIX_FMT_GRAY16BE] = {
  100. .name = "gray16be",
  101. .nb_channels = 1,
  102. .log2_chroma_w= 0,
  103. .log2_chroma_h= 0,
  104. .comp = {
  105. {0,1,1,0,15},
  106. },
  107. .flags = PIX_FMT_BE,
  108. },
  109. [PIX_FMT_RGB24] = {
  110. .name = "rgb24",
  111. .nb_channels = 3,
  112. .log2_chroma_w= 0,
  113. .log2_chroma_h= 0,
  114. .comp = {
  115. {0,2,1,0,7},
  116. {0,2,2,0,7},
  117. {0,2,3,0,7},
  118. },
  119. },
  120. [PIX_FMT_RGBA] = {
  121. .name = "rgba",
  122. .nb_channels = 4,
  123. .log2_chroma_w= 0,
  124. .log2_chroma_h= 0,
  125. .comp = {
  126. {0,3,1,0,7},
  127. {0,3,2,0,7},
  128. {0,3,3,0,7},
  129. {0,3,4,0,7},
  130. },
  131. },
  132. [PIX_FMT_RGB48LE] = {
  133. .name = "rgb48le",
  134. .nb_channels = 3,
  135. .log2_chroma_w= 0,
  136. .log2_chroma_h= 0,
  137. .comp = {
  138. {0,5,1,0,15},
  139. {0,5,3,0,15},
  140. {0,5,5,0,15},
  141. },
  142. },
  143. [PIX_FMT_RGB48BE] = {
  144. .name = "rgb48be",
  145. .nb_channels = 3,
  146. .log2_chroma_w= 0,
  147. .log2_chroma_h= 0,
  148. .comp = {
  149. {0,5,1,0,15},
  150. {0,5,3,0,15},
  151. {0,5,5,0,15},
  152. },
  153. .flags = PIX_FMT_BE,
  154. },
  155. [PIX_FMT_RGB565LE] = {
  156. .name = "rgb565le",
  157. .nb_channels = 3,
  158. .log2_chroma_w= 0,
  159. .log2_chroma_h= 0,
  160. .comp = {
  161. {0,1,1,0,4},
  162. {0,1,1,5,5},
  163. {0,1,2,3,4},
  164. },
  165. },
  166. [PIX_FMT_RGB565BE] = {
  167. .name = "rgb565be",
  168. .nb_channels = 3,
  169. .log2_chroma_w= 0,
  170. .log2_chroma_h= 0,
  171. .comp = {
  172. {0,1,1, 0,4},
  173. {0,1,1, 5,5},
  174. {0,1,0, 3,4},
  175. },
  176. .flags = PIX_FMT_BE,
  177. },
  178. [PIX_FMT_MONOBLACK] = {
  179. .name = "monoblack",
  180. .nb_channels = 1,
  181. .log2_chroma_w= 0,
  182. .log2_chroma_h= 0,
  183. .comp = {
  184. {0,0,1,7,0},
  185. },
  186. .flags = PIX_FMT_BITSTREAM,
  187. },
  188. [PIX_FMT_PAL8] = {
  189. .name = "pal8",
  190. .nb_channels = 1,
  191. .log2_chroma_w= 0,
  192. .log2_chroma_h= 0,
  193. .comp = {
  194. {0,0,1,0,7},
  195. },
  196. .flags = PIX_FMT_PAL,
  197. },
  198. };