1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2012-2018 The Linux Foundation. All rights reserved. 3 Not a contribution. 4 Copyright (C) 2012-2013 The Android Open Source Project 5 6 Licensed under the Apache License, Version 2.0 (the "License"); 7 you may not use this file except in compliance with the License. 8 You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, software 13 distributed under the License is distributed on an "AS IS" BASIS, 14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 See the License for the specific language governing permissions and 16 limitations under the License. 17--> 18 19<!-- 20<!DOCTYPE MediaCodecs [ 21<!ELEMENT Include EMPTY> 22<!ATTLIST Include href CDATA #REQUIRED> 23<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*> 24<!ELEMENT Decoders (MediaCodec|Include)*> 25<!ELEMENT Encoders (MediaCodec|Include)*> 26<!ELEMENT MediaCodec (Type|Quirk|Include)*> 27<!ATTLIST MediaCodec name CDATA #REQUIRED> 28<!ATTLIST MediaCodec type CDATA> 29<!ELEMENT Type EMPTY> 30<!ATTLIST Type name CDATA #REQUIRED> 31<!ELEMENT Quirk EMPTY> 32<!ATTLIST Quirk name CDATA #REQUIRED> 33]> 34 35There's a simple and a complex syntax to declare the availability of a 36media codec: 37 38A codec that properly follows the OpenMax spec and therefore doesn't have any 39quirks and that only supports a single content type can be declared like so: 40 41 <MediaCodec name="OMX.foo.bar" type="something/interesting" /> 42 43If a codec has quirks OR supports multiple content types, the following syntax 44can be used: 45 46 <MediaCodec name="OMX.foo.bar" > 47 <Type name="something/interesting" /> 48 <Type name="something/else" /> 49 ... 50 <Quirk name="requires-allocate-on-input-ports" /> 51 <Quirk name="requires-allocate-on-output-ports" /> 52 <Quirk name="output-buffers-are-unreadable" /> 53 </MediaCodec> 54 55Only the three quirks included above are recognized at this point: 56 57"requires-allocate-on-input-ports" 58 must be advertised if the component does not properly support specification 59 of input buffers using the OMX_UseBuffer(...) API but instead requires 60 OMX_AllocateBuffer to be used. 61 62"requires-allocate-on-output-ports" 63 must be advertised if the component does not properly support specification 64 of output buffers using the OMX_UseBuffer(...) API but instead requires 65 OMX_AllocateBuffer to be used. 66 67"output-buffers-are-unreadable" 68 must be advertised if the emitted output buffers of a decoder component 69 are not readable, i.e. use a custom format even though abusing one of 70 the official OMX colorspace constants. 71 Clients of such decoders will not be able to access the decoded data, 72 naturally making the component much less useful. The only use for 73 a component with this quirk is to render the output to the screen. 74 Audio decoders MUST NOT advertise this quirk. 75 Video decoders that advertise this quirk must be accompanied by a 76 corresponding color space converter for thumbnail extraction, 77 matching surfaceflinger support that can render the custom format to 78 a texture and possibly other code, so just DON'T USE THIS QUIRK. 79 80 81--> 82 83<!-- 84 Non-Secure decoder capabilities 85 (MB is defined as 16x16) 86 _____________________________________________________________________ 87 | Codec | W H fps Mbps MB/s Max MB/s| 88 |_____________|_____________________________________________________| 89 | h264 | 1920 1088 480 220 3916800 3916800 | 90 | | 3820 2160 120 220 3888000 | 91 | | 4096 2160 96 220 3317760 | 92 | | 4096 2304 60 220 2211840 | 93 | | 7680 4320 30 220 3888000 | 94 | | 8192 4320 24 220 3317760 | 95 | hevc | 1920 1088 480 220 3916800 3916800 | 96 | | 3820 2160 120 220 3888000 | 97 | | 4096 2160 96 220 3317760 | 98 | | 4096 2304 60 220 2211840 | 99 | | 7680 4320 30 220 3888000 | 100 | | 8192 4320 24 220 3317760 | 101 | mpeg4-sw | 1920 1088 30 40 244800 244800 | 102 | vp8 | 1280 720 240 100 864000 1036800 | 103 | | 1920 1088 120 100 979200 | 104 | | 3840 2160 30 100 972000 | 105 | | 4096 2160 30 100 1036800 | 106 | | 4096 2304 24 100 884736 | 107 | vp9 | 1920 1088 480 220 3916800 3916800 | 108 | | 3820 2160 120 220 3888000 | 109 | | 4096 2160 96 220 3317760 | 110 | | 4096 2304 60 220 2211840 | 111 | | 7680 4320 30 220 3888000 | 112 | | 8192 4320 24 220 3317760 | 113 | vc1 | 1920 1088 30 20 244800 244800 | 114 | div4/5/6-sw | 1920 1088 30 10 244800 244800 | 115 | h263-sw | 864 480 30 16 48600 48600 | 116 | mpeg2 | 1920 1088 30 40 244800 244800 | 117 |_____________|_____________________________________________________| 118 119 Secure decoder capabilities 120 (MB is defined as 16x16) 121 __________________________________________________________________ 122 | Codec | W H fps Mbps MB/s Max MB/s| 123 |__________|_____________________________________________________| 124 | h264 | 1280 720 60 40 216000 2073600 | 125 | | 1920 1088 60 40 489600 | 126 | | 3840 2160 60 40 1944000 | 127 | | 4096 2160 60 40 2073600 | 128 | | 4096 2304 30 40 1105920 | 129 | hevc | 1280 720 60 40 216000 2073600 | 130 | | 1920 1088 60 40 489600 | 131 | | 3840 2160 60 40 1944000 | 132 | | 4096 2160 60 40 2073600 | 133 | | 4096 2304 30 40 1105920 | 134 | vp9 | 1280 720 60 40 216000 2073600 | 135 | | 1920 1088 60 40 489600 | 136 | | 3840 2160 60 40 1944000 | 137 | | 4096 2160 60 40 2073600 | 138 | | 4096 2304 30 40 1105920 | 139 | mpeg2 | 1920 1088 30 40 244800 244800 | 140 |__________|_____________________________________________________| 141 142 Non-Secure encoder capabilities (Secure not supported) 143 (MB is defined as 16x16) 144 __________________________________________________________________ 145 | Codec | W H fps Mbps MB/s Max MB/s| 146 |__________|_____________________________________________________| 147 | h264 | 1280 720 480 160 1728000 1958400 | 148 | | 1920 1088 240 160 1958400 | 149 | | 3840 2160 60 160 1944000 | 150 | | 4096 2160 48 160 1658880 | 151 | | 4096 2304 30 160 1105920 | 152 | hevc | 1280 720 480 160 1728000 1958400 | 153 | | 1920 1088 240 160 1958400 | 154 | | 3840 2160 60 160 1944000 | 155 | | 4096 2160 48 160 1658880 | 156 | | 4096 2304 30 160 1105920 | 157 | mpeg4-sw | 1280 720 30 4 108000 108000 | 158 | vp8 | 1280 720 240 40 864000 1036800 | 159 | | 1920 1088 120 40 979200 | 160 | | 3840 2160 30 40 972000 | 161 | | 4096 2160 30 40 1036800 | 162 | | 4096 2304 24 40 884736 | 163 | h263-sw | 864 480 30 2 48600 48600 | 164 |__________|_____________________________________________________| 165--> 166 167<MediaCodecs> 168 <Include href="media_codecs_google_audio.xml" /> 169 <Include href="media_codecs_google_telephony.xml" /> 170 <Settings> 171 <Setting name="max-video-encoder-input-buffers" value="11" /> 172 </Settings> 173 <Encoders> 174 <!-- Video Hardware --> 175 <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" > 176 <Quirk name="requires-allocate-on-input-ports" /> 177 <Quirk name="requires-allocate-on-output-ports" /> 178 <Quirk name="requires-loaded-to-idle-after-allocation" /> 179 <Limit name="size" min="96x96" max="4096x2304" /> 180 <Limit name="alignment" value="2x2" /> 181 <Limit name="block-size" value="16x16" /> 182 <Limit name="blocks-per-second" min="36" max="1958400" /> 183 <Limit name="bitrate" range="1-160000000" /> 184 <Limit name="frame-rate" range="1-480" /> 185 <Limit name="concurrent-instances" max="16" /> 186 </MediaCodec> 187 <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" > 188 <Quirk name="requires-allocate-on-input-ports" /> 189 <Quirk name="requires-allocate-on-output-ports" /> 190 <Quirk name="requires-loaded-to-idle-after-allocation" /> 191 <Limit name="size" min="96x96" max="4096x2304" /> 192 <Limit name="alignment" value="2x2" /> 193 <Limit name="block-size" value="16x16" /> 194 <Limit name="blocks-per-second" min="36" max="1036800" /> 195 <Limit name="bitrate" range="1-40000000" /> 196 <Limit name="frame-rate" range="1-240" /> 197 <Limit name="concurrent-instances" max="16" /> 198 </MediaCodec> 199 <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" > 200 <Quirk name="requires-allocate-on-input-ports" /> 201 <Quirk name="requires-allocate-on-output-ports" /> 202 <Quirk name="requires-loaded-to-idle-after-allocation" /> 203 <Limit name="size" min="96x96" max="4096x2304" /> 204 <Limit name="alignment" value="2x2" /> 205 <Limit name="block-size" value="16x16" /> 206 <Limit name="blocks-per-second" min="36" max="1958400" /> 207 <Limit name="bitrate" range="1-160000000" /> 208 <Limit name="frame-rate" range="1-480" /> 209 <Limit name="concurrent-instances" max="16" /> 210 <Limit name="quality" range="0-100" default="80" /> 211 <Feature name="bitrate-modes" value="VBR,CBR,CQ" /> 212 </MediaCodec> 213 <!-- Video Software --> 214 <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" > 215 <Quirk name="requires-allocate-on-input-ports" /> 216 <Quirk name="requires-allocate-on-output-ports" /> 217 <Quirk name="requires-loaded-to-idle-after-allocation" /> 218 <Limit name="size" min="96x96" max="864x480" /> 219 <Limit name="alignment" value="4x4" /> 220 <Limit name="block-size" value="16x16" /> 221 <Limit name="blocks-per-second" min="36" max="48600" /> 222 <Limit name="bitrate" range="1-2000000" /> 223 <Limit name="frame-rate" range="1-30" /> 224 <Limit name="concurrent-instances" max="16" /> 225 </MediaCodec> 226 <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" > 227 <Quirk name="requires-allocate-on-input-ports" /> 228 <Quirk name="requires-allocate-on-output-ports" /> 229 <Quirk name="requires-loaded-to-idle-after-allocation" /> 230 <Limit name="size" min="96x96" max="1280x720" /> 231 <Limit name="alignment" value="2x2" /> 232 <Limit name="block-size" value="16x16" /> 233 <Limit name="blocks-per-second" min="36" max="108000" /> 234 <Limit name="bitrate" range="1-4000000" /> 235 <Limit name="frame-rate" range="1-30" /> 236 <Limit name="concurrent-instances" max="16" /> 237 </MediaCodec> 238 </Encoders> 239 <Decoders> 240 <!-- Video Hardware --> 241 <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" > 242 <Quirk name="requires-allocate-on-input-ports" /> 243 <Quirk name="requires-allocate-on-output-ports" /> 244 <Limit name="size" min="96x96" max="8192x4320" /> 245 <Limit name="alignment" value="2x2" /> 246 <Limit name="block-size" value="16x16" /> 247 <Limit name="blocks-per-second" min="36" max="3916800" /> 248 <Limit name="bitrate" range="1-220000000" /> 249 <Limit name="frame-rate" range="1-480" /> 250 <Feature name="adaptive-playback" /> 251 <Limit name="concurrent-instances" max="16" /> 252 </MediaCodec> 253 <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" > 254 <Quirk name="requires-allocate-on-input-ports" /> 255 <Quirk name="requires-allocate-on-output-ports" /> 256 <Limit name="size" min="96x96" max="4096x2304" /> 257 <Limit name="alignment" value="2x2" /> 258 <Limit name="block-size" value="16x16" /> 259 <Limit name="blocks-per-second" min="36" max="2073600" /> 260 <Limit name="bitrate" range="1-40000000" /> 261 <Limit name="frame-rate" range="1-60" /> 262 <Feature name="adaptive-playback" /> 263 <Feature name="secure-playback" required="true" /> 264 <Limit name="concurrent-instances" max="3" /> 265 </MediaCodec> 266 <MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" > 267 <Quirk name="requires-allocate-on-input-ports" /> 268 <Quirk name="requires-allocate-on-output-ports" /> 269 <Limit name="size" min="96x96" max="1920x1088" /> 270 <Limit name="alignment" value="2x2" /> 271 <Limit name="block-size" value="16x16" /> 272 <Limit name="blocks-per-second" min="36" max="244800" /> 273 <Limit name="bitrate" range="1-40000000" /> 274 <Limit name="frame-rate" range="1-30" /> 275 <Feature name="adaptive-playback" /> 276 <Limit name="concurrent-instances" max="16" /> 277 </MediaCodec> 278 <MediaCodec name="OMX.qcom.video.decoder.mpeg2.secure" type="video/mpeg2" > 279 <Quirk name="requires-allocate-on-input-ports" /> 280 <Quirk name="requires-allocate-on-output-ports" /> 281 <Limit name="size" min="96x96" max="1920x1088" /> 282 <Limit name="alignment" value="2x2" /> 283 <Limit name="block-size" value="16x16" /> 284 <Limit name="blocks-per-second" min="36" max="244800" /> 285 <Limit name="bitrate" range="1-40000000" /> 286 <Limit name="frame-rate" range="1-30" /> 287 <Feature name="adaptive-playback" /> 288 <Feature name="secure-playback" required="true" /> 289 <Limit name="concurrent-instances" max="3" /> 290 </MediaCodec> 291 <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" > 292 <Quirk name="requires-allocate-on-input-ports" /> 293 <Quirk name="requires-allocate-on-output-ports" /> 294 <Limit name="size" min="96x96" max="4096x2304" /> 295 <Limit name="alignment" value="2x2" /> 296 <Limit name="block-size" value="16x16" /> 297 <Limit name="blocks-per-second" min="36" max="1036800" /> 298 <Limit name="bitrate" range="1-100000000" /> 299 <Limit name="frame-rate" range="1-240" /> 300 <Feature name="adaptive-playback" /> 301 <Limit name="concurrent-instances" max="16" /> 302 </MediaCodec> 303 <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" > 304 <Quirk name="requires-allocate-on-input-ports" /> 305 <Quirk name="requires-allocate-on-output-ports" /> 306 <Limit name="size" min="96x96" max="8192x4320" /> 307 <Limit name="alignment" value="2x2" /> 308 <Limit name="block-size" value="16x16" /> 309 <Limit name="blocks-per-second" min="36" max="3916800" /> 310 <Limit name="bitrate" range="1-220000000" /> 311 <Limit name="frame-rate" range="1-480" /> 312 <Feature name="adaptive-playback" /> 313 <Limit name="concurrent-instances" max="6" /> 314 </MediaCodec> 315 <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" > 316 <Quirk name="requires-allocate-on-input-ports" /> 317 <Quirk name="requires-allocate-on-output-ports" /> 318 <Limit name="size" min="96x96" max="4096x2304" /> 319 <Limit name="alignment" value="2x2" /> 320 <Limit name="block-size" value="16x16" /> 321 <Limit name="blocks-per-second" min="36" max="2073600" /> 322 <Limit name="bitrate" range="1-40000000" /> 323 <Limit name="frame-rate" range="1-60" /> 324 <Feature name="adaptive-playback" /> 325 <Feature name="secure-playback" required="true" /> 326 <Limit name="concurrent-instances" max="3" /> 327 </MediaCodec> 328 <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" > 329 <Quirk name="requires-allocate-on-input-ports" /> 330 <Quirk name="requires-allocate-on-output-ports" /> 331 <Limit name="size" min="96x96" max="8192x4320" /> 332 <Limit name="alignment" value="2x2" /> 333 <Limit name="block-size" value="16x16" /> 334 <Limit name="blocks-per-second" min="36" max="3916800" /> 335 <Limit name="bitrate" range="1-220000000" /> 336 <Limit name="frame-rate" range="1-480" /> 337 <Feature name="adaptive-playback" /> 338 <Limit name="concurrent-instances" max="16" /> 339 </MediaCodec> 340 <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" > 341 <Quirk name="requires-allocate-on-input-ports" /> 342 <Quirk name="requires-allocate-on-output-ports" /> 343 <Limit name="size" min="96x96" max="4096x2304" /> 344 <Limit name="alignment" value="2x2" /> 345 <Limit name="block-size" value="16x16" /> 346 <Limit name="blocks-per-second" min="36" max="2073600" /> 347 <Limit name="bitrate" range="1-40000000" /> 348 <Limit name="frame-rate" range="1-60" /> 349 <Feature name="adaptive-playback" /> 350 <Feature name="secure-playback" required="true" /> 351 <Limit name="concurrent-instances" max="3" /> 352 </MediaCodec> 353 <!-- Video Software --> 354 <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" > 355 <Quirk name="requires-allocate-on-input-ports" /> 356 <Quirk name="requires-allocate-on-output-ports" /> 357 <Limit name="size" min="96x96" max="864x480" /> 358 <Limit name="alignment" value="4x4" /> 359 <Limit name="block-size" value="16x16" /> 360 <Limit name="blocks-per-second" min="36" max="48600" /> 361 <Limit name="bitrate" range="1-16000000" /> 362 <Limit name="frame-rate" range="1-30" /> 363 <Feature name="adaptive-playback" /> 364 <Limit name="concurrent-instances" max="16" /> 365 </MediaCodec> 366 <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es"> 367 <Quirk name="requires-allocate-on-input-ports" /> 368 <Quirk name="requires-allocate-on-output-ports" /> 369 <Limit name="size" min="96x96" max="1920x1088" /> 370 <Limit name="alignment" value="2x2" /> 371 <Limit name="block-size" value="16x16" /> 372 <Limit name="blocks-per-second" min="36" max="244800" /> 373 <Limit name="bitrate" range="1-40000000" /> 374 <Limit name="frame-rate" range="1-30" /> 375 <Limit name="concurrent-instances" max="16" /> 376 </MediaCodec> 377 <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" > 378 <Quirk name="requires-allocate-on-input-ports" /> 379 <Quirk name="requires-allocate-on-output-ports" /> 380 <Limit name="size" min="96x96" max="1920x1088" /> 381 <Limit name="alignment" value="2x2" /> 382 <Limit name="block-size" value="16x16" /> 383 <Limit name="blocks-per-second" min="36" max="244800" /> 384 <Limit name="frame-rate" range="1-30" /> 385 <Limit name="bitrate" range="1-10000000" /> 386 <Limit name="concurrent-instances" max="16" /> 387 </MediaCodec> 388 <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" > 389 <Quirk name="requires-allocate-on-input-ports" /> 390 <Quirk name="requires-allocate-on-output-ports" /> 391 <Limit name="size" min="96x96" max="1920x1088" /> 392 <Limit name="alignment" value="2x2" /> 393 <Limit name="block-size" value="16x16" /> 394 <Limit name="blocks-per-second" min="36" max="244800" /> 395 <Limit name="frame-rate" range="1-30" /> 396 <Limit name="bitrate" range="1-10000000" /> 397 <Limit name="concurrent-instances" max="16" /> 398 </MediaCodec> 399 <MediaCodec name="OMX.qti.video.decoder.vc1sw" type="video/x-ms-wmv" > 400 <Quirk name="requires-allocate-on-input-ports" /> 401 <Quirk name="requires-allocate-on-output-ports" /> 402 <Limit name="size" min="96x96" max="1920x1088" /> 403 <Limit name="alignment" value="2x2" /> 404 <Limit name="block-size" value="16x16" /> 405 <Limit name="blocks-per-second" min="36" max="244800" /> 406 <Limit name="bitrate" range="1-20000000" /> 407 <Limit name="frame-rate" range="1-30" /> 408 <Feature name="adaptive-playback" /> 409 <Limit name="concurrent-instances" max="16" /> 410 </MediaCodec> 411 </Decoders> 412 <Include href="media_codecs_google_video.xml" /> 413</MediaCodecs> 414