media_codecs.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!-- Copyright (C) 2016-2018 The Linux Foundation. All rights reserved.
  3. Not a contribution.
  4. Copyright (C) 2013 The Android Open Source Project
  5. Licensed under the Apache License, Version 2.0 (the "License");
  6. you may not use this file except in compliance with the License.
  7. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <!--
  16. <!DOCTYPE MediaCodecs [
  17. <!ELEMENT Include EMPTY>
  18. <!ATTLIST Include href CDATA #REQUIRED>
  19. <!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
  20. <!ELEMENT Decoders (MediaCodec|Include)*>
  21. <!ELEMENT Encoders (MediaCodec|Include)*>
  22. <!ELEMENT MediaCodec (Type|Quirk|Include)*>
  23. <!ATTLIST MediaCodec name CDATA #REQUIRED>
  24. <!ATTLIST MediaCodec type CDATA>
  25. <!ELEMENT Type EMPTY>
  26. <!ATTLIST Type name CDATA #REQUIRED>
  27. <!ELEMENT Quirk EMPTY>
  28. <!ATTLIST Quirk name CDATA #REQUIRED>
  29. ]>
  30. There's a simple and a complex syntax to declare the availability of a
  31. media codec:
  32. A codec that properly follows the OpenMax spec and therefore doesn't have any
  33. quirks and that only supports a single content type can be declared like so:
  34. <MediaCodec name="OMX.foo.bar" type="something/interesting" />
  35. If a codec has quirks OR supports multiple content types, the following syntax
  36. can be used:
  37. <MediaCodec name="OMX.foo.bar" >
  38. <Type name="something/interesting" />
  39. <Type name="something/else" />
  40. ...
  41. <Quirk name="requires-allocate-on-input-ports" />
  42. <Quirk name="requires-allocate-on-output-ports" />
  43. <Quirk name="output-buffers-are-unreadable" />
  44. </MediaCodec>
  45. Only the three quirks included above are recognized at this point:
  46. "requires-allocate-on-input-ports"
  47. must be advertised if the component does not properly support specification
  48. of input buffers using the OMX_UseBuffer(...) API but instead requires
  49. OMX_AllocateBuffer to be used.
  50. "requires-allocate-on-output-ports"
  51. must be advertised if the component does not properly support specification
  52. of output buffers using the OMX_UseBuffer(...) API but instead requires
  53. OMX_AllocateBuffer to be used.
  54. "output-buffers-are-unreadable"
  55. must be advertised if the emitted output buffers of a decoder component
  56. are not readable, i.e. use a custom format even though abusing one of
  57. the official OMX colorspace constants.
  58. Clients of such decoders will not be able to access the decoded data,
  59. naturally making the component much less useful. The only use for
  60. a component with this quirk is to render the output to the screen.
  61. Audio decoders MUST NOT advertise this quirk.
  62. Video decoders that advertise this quirk must be accompanied by a
  63. corresponding color space converter for thumbnail extraction,
  64. matching surfaceflinger support that can render the custom format to
  65. a texture and possibly other code, so just DON'T USE THIS QUIRK.
  66. -->
  67. <!--
  68. Decoder capabilities for thorium
  69. _________________________________________________________________________
  70. | Codec | W H fps Mbps MB/s | Encode Secure-dec |
  71. |__________|_________________________________________|___________________|
  72. | h264 | 1920 1088 30 20 244800 | Y N |
  73. | hevc | 1920 1088 30 20 244800 | N N |
  74. | mpeg4 | 1920 1088 30 6 244800 | Y N |
  75. | vp8 | 1920 1088 30 20 244800 | N N |
  76. | div4/5/6 | 1920 1088 30 6 244800 | N N |
  77. | h263 | 864 480 30 2 48600 | Y N |
  78. |__________|_________________________________________|___________________|
  79. -->
  80. <!--
  81. Encoder capabilities for thorium
  82. ____________________________________________________
  83. | Codec | W H fps Mbps MB/s |
  84. |__________|_________________________________________|
  85. | h264 | 1920 1088 30 20 244800 |
  86. | mpeg4 | 864 480 30 2 48600 |
  87. | h263 | 864 480 30 2 48600 |
  88. |____________________________________________________|
  89. -->
  90. <MediaCodecs>
  91. <Include href="media_codecs_google_audio.xml" />
  92. <Include href="media_codecs_google_telephony.xml" />
  93. <Settings>
  94. <Setting name="max-video-encoder-input-buffers" value="9" />
  95. </Settings>
  96. <Encoders>
  97. <!-- Video Hardware -->
  98. <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
  99. <Quirk name="requires-allocate-on-input-ports" />
  100. <Quirk name="requires-allocate-on-output-ports" />
  101. <Quirk name="requires-loaded-to-idle-after-allocation" />
  102. <Limit name="size" min="96x96" max="1920x1088" />
  103. <Limit name="alignment" value="2x2" />
  104. <Limit name="block-size" value="16x16" />
  105. <Limit name="blocks-per-second" min="1" max="244800" />
  106. <Limit name="bitrate" range="1-20000000" />
  107. <Limit name="concurrent-instances" max="8" />
  108. <Feature name="can-swap-width-height" />
  109. </MediaCodec>
  110. <!-- Video Software -->
  111. <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
  112. <Quirk name="requires-allocate-on-input-ports" />
  113. <Quirk name="requires-allocate-on-output-ports" />
  114. <Quirk name="requires-loaded-to-idle-after-allocation" />
  115. <Limit name="size" min="32x32" max="864x480" />
  116. <Limit name="alignment" value="2x2" />
  117. <Limit name="block-size" value="16x16" />
  118. <Limit name="blocks-per-second" min="1" max="48600" />
  119. <Limit name="bitrate" range="1-2000000" />
  120. <Limit name="concurrent-instances" max="16" />
  121. </MediaCodec>
  122. <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
  123. <Quirk name="requires-allocate-on-input-ports" />
  124. <Quirk name="requires-allocate-on-output-ports" />
  125. <Quirk name="requires-loaded-to-idle-after-allocation" />
  126. <Limit name="size" min="32x32" max="864x480" />
  127. <Limit name="alignment" value="4x4" />
  128. <Limit name="block-size" value="16x16" />
  129. <Limit name="blocks-per-second" min="1" max="48600" />
  130. <Limit name="bitrate" range="1-2000000" />
  131. <Limit name="concurrent-instances" max="16" />
  132. </MediaCodec>
  133. </Encoders>
  134. <Decoders>
  135. <!-- Video Hardware -->
  136. <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
  137. <Quirk name="requires-allocate-on-input-ports" />
  138. <Quirk name="requires-allocate-on-output-ports" />
  139. <Quirk name="defers-output-buffer-allocation" />
  140. <Limit name="size" min="64x64" max="1920x1088" />
  141. <Limit name="alignment" value="2x2" />
  142. <Limit name="block-size" value="16x16" />
  143. <Limit name="blocks-per-second" min="1" max="244800" />
  144. <Limit name="bitrate" range="1-20000000" />
  145. <Feature name="adaptive-playback" />
  146. <Limit name="concurrent-instances" max="8" />
  147. <Feature name="can-swap-width-height" />
  148. </MediaCodec>
  149. <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" >
  150. <Quirk name="requires-allocate-on-input-ports" />
  151. <Quirk name="requires-allocate-on-output-ports" />
  152. <Quirk name="defers-output-buffer-allocation" />
  153. <Limit name="size" min="64x64" max="1920x1088" />
  154. <Limit name="alignment" value="2x2" />
  155. <Limit name="block-size" value="16x16" />
  156. <Limit name="blocks-per-second" min="1" max="244800" />
  157. <Limit name="bitrate" range="1-20000000" />
  158. <Feature name="adaptive-playback" />
  159. <Limit name="concurrent-instances" max="8" />
  160. </MediaCodec>
  161. <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
  162. <Quirk name="requires-allocate-on-input-ports" />
  163. <Quirk name="requires-allocate-on-output-ports" />
  164. <Quirk name="defers-output-buffer-allocation" />
  165. <Limit name="size" min="64x64" max="1920x1088" />
  166. <Limit name="alignment" value="2x2" />
  167. <Limit name="block-size" value="16x16" />
  168. <Limit name="blocks-per-second" min="1" max="244800" />
  169. <Limit name="bitrate" range="1-20000000" />
  170. <Feature name="adaptive-playback" />
  171. <Limit name="concurrent-instances" max="8" />
  172. </MediaCodec>
  173. <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" >
  174. <Quirk name="requires-allocate-on-input-ports" />
  175. <Quirk name="requires-allocate-on-output-ports" />
  176. <Limit name="size" min="16x16" max="1920x1088" />
  177. <Limit name="alignment" value="2x2" />
  178. <Limit name="block-size" value="16x16" />
  179. <Limit name="blocks-per-second" min="1" max="244800" />
  180. <Limit name="bitrate" range="1-6000000" />
  181. <Limit name="concurrent-instances" max="16" />
  182. </MediaCodec>
  183. <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" >
  184. <Quirk name="requires-allocate-on-input-ports" />
  185. <Quirk name="requires-allocate-on-output-ports" />
  186. <Limit name="size" min="16x16" max="1920x1088" />
  187. <Limit name="alignment" value="2x2" />
  188. <Limit name="block-size" value="16x16" />
  189. <Limit name="blocks-per-second" min="1" max="244800" />
  190. <Limit name="bitrate" range="1-6000000" />
  191. <Limit name="concurrent-instances" max="16" />
  192. </MediaCodec>
  193. <MediaCodec name="OMX.qti.video.decoder.mpeg4sw">
  194. <Quirk name="requires-allocate-on-input-ports" />
  195. <Quirk name="requires-allocate-on-output-ports" />
  196. <Type name="video/mp4v-es">
  197. <Limit name="size" min="16x16" max="1920x1088" />
  198. <Limit name="alignment" value="2x2" />
  199. <Limit name="block-size" value="16x16" />
  200. <Limit name="blocks-per-second" min="1" max="244800" />
  201. <Limit name="bitrate" range="1-6000000" />
  202. <Limit name="concurrent-instances" max="16" />
  203. </Type>
  204. <Type name="video/mp4v-esdp">
  205. <Limit name="size" min="16x16" max="1920x1088" />
  206. <Limit name="alignment" value="2x2" />
  207. <Limit name="block-size" value="16x16" />
  208. <Limit name="blocks-per-second" min="1" max="244800" />
  209. <Limit name="bitrate" range="1-6000000" />
  210. <Limit name="concurrent-instances" max="16" />
  211. </Type>
  212. </MediaCodec>
  213. <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
  214. <Quirk name="requires-allocate-on-input-ports" />
  215. <Quirk name="requires-allocate-on-output-ports" />
  216. <Limit name="size" min="16x16" max="864x480" />
  217. <Limit name="alignment" value="4x4" />
  218. <Limit name="block-size" value="16x16" />
  219. <Limit name="blocks-per-second" min="1" max="48600" />
  220. <Limit name="bitrate" range="1-2000000" />
  221. <Limit name="concurrent-instances" max="16" />
  222. </MediaCodec>
  223. </Decoders>
  224. <Include href="media_codecs_google_video_le.xml" />
  225. </MediaCodecs>