ijksdl_codec_android_mediadef.c 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /*****************************************************************************
  2. * ijksdl_codec_android_mediadef.h
  3. *****************************************************************************
  4. *
  5. * Copyright (c) 2014 Bilibili
  6. * copyright (c) 2014 Zhang Rui <bbcallen@gmail.com>
  7. *
  8. * This file is part of ijkPlayer.
  9. *
  10. * ijkPlayer is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU Lesser General Public
  12. * License as published by the Free Software Foundation; either
  13. * version 2.1 of the License, or (at your option) any later version.
  14. *
  15. * ijkPlayer is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public
  21. * License along with ijkPlayer; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  23. */
  24. #include "ijksdl_codec_android_mediadef.h"
  25. const char *SDL_AMediaCodec_getColorFormatName(int colorFormat)
  26. {
  27. switch (colorFormat) {
  28. case AMEDIACODEC__OMX_COLOR_FormatMonochrome:
  29. return "Format8bitRGB332";
  30. case AMEDIACODEC__OMX_COLOR_Format8bitRGB332:
  31. return "Format8bitRGB332";
  32. case AMEDIACODEC__OMX_COLOR_Format12bitRGB444:
  33. return "Format12bitRGB444";
  34. case AMEDIACODEC__OMX_COLOR_Format16bitARGB4444:
  35. return "Format16bitARGB4444";
  36. case AMEDIACODEC__OMX_COLOR_Format16bitARGB1555:
  37. return "Format16bitARGB1555";
  38. case AMEDIACODEC__OMX_COLOR_Format16bitRGB565:
  39. return "Format16bitRGB565";
  40. case AMEDIACODEC__OMX_COLOR_Format16bitBGR565:
  41. return "Format16bitBGR565";
  42. case AMEDIACODEC__OMX_COLOR_Format18bitRGB666:
  43. return "Format18bitRGB666";
  44. case AMEDIACODEC__OMX_COLOR_Format18bitARGB1665:
  45. return "Format18bitARGB1665";
  46. case AMEDIACODEC__OMX_COLOR_Format19bitARGB1666:
  47. return "Format19bitARGB1666";
  48. case AMEDIACODEC__OMX_COLOR_Format24bitRGB888:
  49. return "Format24bitRGB888";
  50. case AMEDIACODEC__OMX_COLOR_Format24bitBGR888:
  51. return "Format24bitBGR888";
  52. case AMEDIACODEC__OMX_COLOR_Format24bitARGB1887:
  53. return "Format24bitARGB1887";
  54. case AMEDIACODEC__OMX_COLOR_Format25bitARGB1888:
  55. return "Format25bitARGB1888";
  56. case AMEDIACODEC__OMX_COLOR_Format32bitBGRA8888:
  57. return "Format32bitBGRA8888";
  58. case AMEDIACODEC__OMX_COLOR_Format32bitARGB8888:
  59. return "Format32bitARGB8888";
  60. case AMEDIACODEC__OMX_COLOR_FormatYUV411Planar:
  61. return "FormatYUV411Planar";
  62. case AMEDIACODEC__OMX_COLOR_FormatYUV411PackedPlanar:
  63. return "FormatYUV411PackedPlanar";
  64. case AMEDIACODEC__OMX_COLOR_FormatYUV420Planar:
  65. return "FormatYUV420Planar";
  66. case AMEDIACODEC__OMX_COLOR_FormatYUV420PackedPlanar:
  67. return "FormatYUV420PackedPlanar";
  68. case AMEDIACODEC__OMX_COLOR_FormatYUV420SemiPlanar:
  69. return "FormatYUV420SemiPlanar";
  70. case AMEDIACODEC__OMX_COLOR_FormatYUV422Planar:
  71. return "FormatYUV422Planar";
  72. case AMEDIACODEC__OMX_COLOR_FormatYUV422PackedPlanar:
  73. return "FormatYUV422PackedPlanar";
  74. case AMEDIACODEC__OMX_COLOR_FormatYUV422SemiPlanar:
  75. return "FormatYUV422SemiPlanar";
  76. case AMEDIACODEC__OMX_COLOR_FormatYCbYCr:
  77. return "FormatYCbYCr";
  78. case AMEDIACODEC__OMX_COLOR_FormatYCrYCb:
  79. return "FormatYCrYCb";
  80. case AMEDIACODEC__OMX_COLOR_FormatCbYCrY:
  81. return "FormatCbYCrY";
  82. case AMEDIACODEC__OMX_COLOR_FormatCrYCbY:
  83. return "FormatCrYCbY";
  84. case AMEDIACODEC__OMX_COLOR_FormatYUV444Interleaved:
  85. return "FormatYUV444Interleaved";
  86. case AMEDIACODEC__OMX_COLOR_FormatRawBayer8bit:
  87. return "FormatRawBayer8bit";
  88. case AMEDIACODEC__OMX_COLOR_FormatRawBayer10bit:
  89. return "FormatRawBayer10bit";
  90. case AMEDIACODEC__OMX_COLOR_FormatRawBayer8bitcompressed:
  91. return "FormatRawBayer8bitcompressed";
  92. case AMEDIACODEC__OMX_COLOR_FormatL2:
  93. return "FormatL2";
  94. case AMEDIACODEC__OMX_COLOR_FormatL4:
  95. return "FormatL4";
  96. case AMEDIACODEC__OMX_COLOR_FormatL8:
  97. return "FormatL8";
  98. case AMEDIACODEC__OMX_COLOR_FormatL16:
  99. return "FormatL16";
  100. case AMEDIACODEC__OMX_COLOR_FormatL24:
  101. return "FormatL24";
  102. case AMEDIACODEC__OMX_COLOR_FormatL32:
  103. return "FormatL32";
  104. case AMEDIACODEC__OMX_COLOR_FormatYUV420PackedSemiPlanar:
  105. return "FormatYUV420PackedSemiPlanar";
  106. case AMEDIACODEC__OMX_COLOR_FormatYUV422PackedSemiPlanar:
  107. return "FormatYUV422PackedSemiPlanar";
  108. case AMEDIACODEC__OMX_COLOR_Format18BitBGR666:
  109. return "Format18BitBGR666";
  110. case AMEDIACODEC__OMX_COLOR_Format24BitARGB6666:
  111. return "Format24BitARGB6666";
  112. case AMEDIACODEC__OMX_COLOR_Format24BitABGR6666:
  113. return "Format24BitABGR6666";
  114. #if 0
  115. // duplicated
  116. case AMEDIACODEC__OMX_COLOR_TI_FormatYUV420PackedSemiPlanar:
  117. return "TI_FormatYUV420PackedSemiPlanar";
  118. #endif
  119. case AMEDIACODEC__OMX_COLOR_FormatSurface:
  120. return "FormatSurface";
  121. case AMEDIACODEC__OMX_COLOR_FormatYUV420Flexible:
  122. return "FormatYUV420Flexible";
  123. #if 0
  124. // duplicated
  125. case AMEDIACODEC__OMX_COLOR_QCOM_FormatYUV420SemiPlanar:
  126. return "QCOM_FormatYUV420SemiPlanar";
  127. #endif
  128. // from hardware intel
  129. case _AMEDIACODEC__OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar:
  130. return "INTEL_FormatYUV420PackedSemiPlanar";
  131. case _AMEDIACODEC__OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar_Tiled:
  132. return "INTEL_FormatYUV420PackedSemiPlanar_Tiled";
  133. // from hardware qcom
  134. case _AMEDIACODEC__OMX_QCOM_COLOR_FormatYVU420SemiPlanar:
  135. return "QCOM_FormatYVU420SemiPlanar";
  136. case _AMEDIACODEC__OMX_QCOM_COLOR_FormatYVU420PackedSemiPlanar32m4ka:
  137. return "QCOM_FormatYVU420PackedSemiPlanar32m4ka";
  138. case _AMEDIACODEC__OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar16m2ka:
  139. return "QCOM_FormatYUV420PackedSemiPlanar16m2ka";
  140. case _AMEDIACODEC__OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka:
  141. return "QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka";
  142. case _AMEDIACODEC__OMX_QCOM_COLOR_FORMATYUV420PackedSemiPlanar32m:
  143. return "QCOM_FORMATYUV420PackedSemiPlanar32m";
  144. case _AMEDIACODEC__OMX_QCOM_COLOR_FORMATYUV420PackedSemiPlanar32mMultiView:
  145. return "QCOM_FORMATYUV420PackedSemiPlanar32mMultiView";
  146. // from hardware samsung_slsi
  147. case _AMEDIACODEC__OMX_SEC_COLOR_FormatNV12TPhysicalAddress:
  148. return "SEC_FormatNV12TPhysicalAddress";
  149. case _AMEDIACODEC__OMX_SEC_COLOR_FormatNV12LPhysicalAddress:
  150. return "SEC_FormatNV12LPhysicalAddress";
  151. case _AMEDIACODEC__OMX_SEC_COLOR_FormatNV12LVirtualAddress:
  152. return "SEC_FormatNV12LVirtualAddress";
  153. case _AMEDIACODEC__OMX_SEC_COLOR_FormatNV12Tiled:
  154. return "SEC_FormatNV12Tiled";
  155. case _AMEDIACODEC__OMX_SEC_COLOR_FormatNV21LPhysicalAddress:
  156. return "SEC_FormatNV21LPhysicalAddress";
  157. case _AMEDIACODEC__OMX_SEC_COLOR_FormatNV21Linear:
  158. return "SEC_FormatNV21Linear";
  159. // from hardware ti
  160. case _AMEDIACODEC__OMX_TI_COLOR_FormatYUV420PackedSemiPlanar:
  161. return "TI_FormatYUV420PackedSemiPlanar";
  162. default:
  163. return "FormatUnknown";
  164. }
  165. }