Vincent Zvikaramba | 94f04ac | 2017-01-02 14:07:31 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8" ?> |
| 2 | <!-- Copyright (C) 2012 The Android Open Source Project |
| 3 | Copyright (C) 2014 The Linux Foundation. All rights reserved. |
| 4 | Not a contribution. |
| 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 | |
| 35 | There's a simple and a complex syntax to declare the availability of a |
| 36 | media codec: |
| 37 | |
| 38 | A codec that properly follows the OpenMax spec and therefore doesn't have any |
| 39 | quirks and that only supports a single content type can be declared like so: |
| 40 | |
| 41 | <MediaCodec name="OMX.foo.bar" type="something/interesting" /> |
| 42 | |
| 43 | If a codec has quirks OR supports multiple content types, the following syntax |
| 44 | can 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 | |
| 55 | Only 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 | Decoder capabilities for 8939 |
| 85 | _________________________________________________________________ |
| 86 | | Codec | W H fps Mbps MB/s | Encode Secure-dec | |
| 87 | |__________|_________________________________________|___________________| |
| 88 | | h264 | 1920 1088 60 50 489600 | Y Y | |
| 89 | | hevc | 1920 1088 60 50 489600 | N Y | |
| 90 | | mpeg4 | 1920 1088 60 40 489600 | Y N | |
| 91 | | vc1 | 1920 1088 30 45 244800 | N Y | |
| 92 | | vp8 | 1920 1088 30 50 244800 | Y N | |
| 93 | | divx3 | 1920 1088 30 20 244800 | N N | |
| 94 | | div4/5/6 | 1920 1088 30 50 244800 | N N | |
| 95 | | h263 | 864 480 30 2 48600 | Y N | |
| 96 | | mpeg2 | 1920 1088 30 80 244800 | N Y | |
| 97 | |__________|_________________________________________|___________________| |
| 98 | |
| 99 | --> |
| 100 | |
| 101 | <!-- |
| 102 | Encoder capabilities for 8939 |
| 103 | ____________________________________________________ |
| 104 | | Codec | W H fps Mbps MB/s | |
| 105 | |__________|_________________________________________| |
| 106 | | h264 | 1920 1088 30 20 244800 | |
| 107 | | mpeg4 | 1920 1088 30 40 244800 | |
| 108 | | h263 | 864 480 30 2 48600 | |
| 109 | | vp8 | 1920 1088 30 20 244800 | |
| 110 | |____________________________________________________| |
| 111 | --> |
| 112 | |
| 113 | <MediaCodecs> |
| 114 | <Encoders> |
| 115 | <!-- Video Hardware --> |
| 116 | <MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" > |
| 117 | <Quirk name="requires-allocate-on-input-ports" /> |
| 118 | <Quirk name="requires-allocate-on-output-ports"/> |
| 119 | <Quirk name="requires-loaded-to-idle-after-allocation"/> |
| 120 | <Limit name="size" min="96x64" max="1920x1088" /> |
| 121 | <Limit name="alignment" value="2x2" /> |
| 122 | <Limit name="block-size" value="16x16" /> |
| 123 | <Limit name="blocks-per-second" min="1" max="244800" /> |
| 124 | <Limit name="bitrate" range="1-20000000" /> |
| 125 | <Quirk name="video-controller-check-enable" /> |
| 126 | </MediaCodec> |
| 127 | <MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" > |
| 128 | <Quirk name="requires-allocate-on-input-ports" /> |
| 129 | <Quirk name="requires-allocate-on-output-ports"/> |
| 130 | <Quirk name="requires-loaded-to-idle-after-allocation"/> |
| 131 | <Limit name="size" min="96x64" max="720x576" /> |
| 132 | <Limit name="alignment" value="2x2" /> |
| 133 | <Limit name="block-size" value="16x16" /> |
| 134 | <Limit name="blocks-per-second" min="1" max="48600" /> |
| 135 | <Limit name="bitrate" range="1-2000000" /> |
| 136 | <Quirk name="video-controller-check-enable" /> |
| 137 | </MediaCodec> |
| 138 | <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" > |
| 139 | <Quirk name="requires-allocate-on-input-ports" /> |
| 140 | <Quirk name="requires-allocate-on-output-ports"/> |
| 141 | <Quirk name="requires-loaded-to-idle-after-allocation"/> |
| 142 | <Limit name="size" min="96x64" max="1920x1088" /> |
| 143 | <Limit name="alignment" value="2x2" /> |
| 144 | <Limit name="block-size" value="16x16" /> |
| 145 | <Limit name="blocks-per-second" min="1" max="244800" /> |
| 146 | <Limit name="bitrate" range="1-20000000" /> |
| 147 | <Quirk name="video-controller-check-enable" /> |
| 148 | </MediaCodec> |
| 149 | <!-- Audio Hardware --> |
| 150 | <MediaCodec name="OMX.qcom.audio.encoder.evrc" type="audio/evrc" > |
| 151 | <Quirk name="requires-allocate-on-input-ports" /> |
| 152 | <Quirk name="requires-allocate-on-output-ports" /> |
| 153 | </MediaCodec> |
| 154 | <MediaCodec name="OMX.qcom.audio.encoder.qcelp13" type="audio/qcelp" > |
| 155 | <Quirk name="requires-allocate-on-input-ports" /> |
| 156 | <Quirk name="requires-allocate-on-output-ports" /> |
| 157 | </MediaCodec> |
| 158 | </Encoders> |
| 159 | <Decoders> |
| 160 | <!-- Audio Software --> |
| 161 | <MediaCodec name="OMX.SEC.amr.dec"> |
| 162 | <Type name="audio/amr-wb" /> |
| 163 | <Type name="audio/3gpp" /> |
| 164 | <Quirk name="needs-flush-before-disable" /> |
| 165 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 166 | </MediaCodec> |
| 167 | <MediaCodec name="OMX.SEC.mp3.dec"> |
| 168 | <Type name="audio/mpeg"/> |
| 169 | <Type name="audio/mpeg-L1"/> |
| 170 | <Type name="audio/mpeg-L2"/> |
| 171 | <Quirk name="needs-flush-before-disable" /> |
| 172 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 173 | </MediaCodec> |
| 174 | <MediaCodec name="OMX.SEC.aac.dec" type="audio/mp4a-latm" > |
| 175 | <Quirk name="needs-flush-before-disable" /> |
| 176 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 177 | </MediaCodec> |
| 178 | <MediaCodec name="OMX.SEC.flac.dec" type="audio/flac" > |
| 179 | <Quirk name="needs-flush-before-disable" /> |
| 180 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 181 | </MediaCodec> |
| 182 | <MediaCodec name="OMX.SEC.wma.dec" type="audio/x-ms-wma" > |
| 183 | <Quirk name="needs-flush-before-disable" /> |
| 184 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 185 | </MediaCodec> |
| 186 | <MediaCodec name="OMX.SEC.adpcm.dec" type="audio/x-ima" > |
| 187 | <Quirk name="needs-flush-before-disable" /> |
| 188 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 189 | </MediaCodec> |
| 190 | <!-- Audio Hardware --> |
| 191 | <MediaCodec name="OMX.qcom.audio.decoder.amrwbplus" type="audio/amr-wb-plus" > |
| 192 | </MediaCodec> |
| 193 | <!-- Audio Software --> |
| 194 | <MediaCodec name="OMX.google.aac.decoder" type="audio/mp4a-latm" /> |
| 195 | <MediaCodec name="OMX.qcom.audio.decoder.Qcelp13" type="audio/qcelp" > |
| 196 | <Quirk name="requires-global-flush" /> |
| 197 | </MediaCodec> |
| 198 | <MediaCodec name="OMX.qcom.audio.decoder.evrc" type="audio/evrc" > |
| 199 | <Quirk name="requires-global-flush" /> |
| 200 | </MediaCodec> |
| 201 | <!-- Video Hardware --> |
| 202 | <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" > |
| 203 | <Quirk name="requires-allocate-on-input-ports" /> |
| 204 | <Quirk name="requires-allocate-on-output-ports" /> |
| 205 | <Quirk name="requires-timestamp-reorder" /> |
| 206 | <Quirk name="video-controller-check-enable" /> |
| 207 | <Limit name="size" min="64x64" max="1920x1088" /> |
| 208 | <Limit name="alignment" value="2x2" /> |
| 209 | <Limit name="block-size" value="16x16" /> |
| 210 | <Limit name="blocks-per-second" min="1" max="489600" /> |
| 211 | <Limit name="bitrate" range="1-50000000" /> |
| 212 | <Feature name="adaptive-playback" /> |
| 213 | </MediaCodec> |
| 214 | <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" > |
| 215 | <Quirk name="requires-allocate-on-input-ports" /> |
| 216 | <Quirk name="requires-allocate-on-output-ports" /> |
| 217 | <Quirk name="requires-timestamp-reorder" /> |
| 218 | <Quirk name="video-controller-check-enable" /> |
| 219 | <Limit name="size" min="64x64" max="1920x1088" /> |
| 220 | <Limit name="alignment" value="2x2" /> |
| 221 | <Limit name="block-size" value="16x16" /> |
| 222 | <Limit name="blocks-per-second" min="1" max="489600" /> |
| 223 | <Limit name="bitrate" range="1-50000000" /> |
| 224 | <Feature name="adaptive-playback" /> |
| 225 | <Feature name="secure-playback" required="true" /> |
| 226 | </MediaCodec> |
| 227 | <MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" > |
| 228 | <Quirk name="requires-allocate-on-input-ports" /> |
| 229 | <Quirk name="requires-allocate-on-output-ports" /> |
| 230 | <Quirk name="requires-timestamp-reorder" /> |
| 231 | <Quirk name="video-controller-check-enable" /> |
| 232 | <Limit name="size" min="64x64" max="1920x1088" /> |
| 233 | <Limit name="alignment" value="2x2" /> |
| 234 | <Limit name="block-size" value="16x16" /> |
| 235 | <Limit name="blocks-per-second" min="1" max="489600" /> |
| 236 | <Limit name="bitrate" range="1-40000000" /> |
| 237 | <Feature name="adaptive-playback" /> |
| 238 | </MediaCodec> |
| 239 | <MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" > |
| 240 | <Quirk name="requires-allocate-on-input-ports" /> |
| 241 | <Quirk name="requires-allocate-on-output-ports" /> |
| 242 | <Quirk name="requires-timestamp-reorder" /> |
| 243 | <Quirk name="video-controller-check-enable" /> |
| 244 | <Limit name="size" min="64x64" max="864x480" /> |
| 245 | <Limit name="alignment" value="2x2" /> |
| 246 | <Limit name="block-size" value="16x16" /> |
| 247 | <Limit name="blocks-per-second" min="1" max="48600" /> |
| 248 | <Limit name="bitrate" range="1-2000000" /> |
| 249 | <Feature name="adaptive-playback" /> |
| 250 | </MediaCodec> |
| 251 | <MediaCodec name="OMX.qcom.video.decoder.vc1"> |
| 252 | <Type name="video/x-ms-wmv"/> |
| 253 | <Type name="video/wvc1"/> |
| 254 | <Quirk name="requires-allocate-on-input-ports" /> |
| 255 | <Quirk name="requires-allocate-on-output-ports" /> |
| 256 | <Quirk name="requires-timestamp-reorder" /> |
| 257 | <Quirk name="video-controller-check-enable" /> |
| 258 | <Limit name="size" min="64x64" max="1920x1088" /> |
| 259 | <Limit name="alignment" value="2x2" /> |
| 260 | <Limit name="block-size" value="16x16" /> |
| 261 | <Limit name="blocks-per-second" min="1" max="244800" /> |
| 262 | <Limit name="bitrate" range="1-45000000" /> |
| 263 | <Feature name="adaptive-playback" /> |
| 264 | </MediaCodec> |
| 265 | <MediaCodec name="OMX.qcom.video.decoder.vc1.secure"> |
| 266 | <Type name="video/x-ms-wmv"/> |
| 267 | <Type name="video/wvc1"/> |
| 268 | <Quirk name="requires-allocate-on-input-ports" /> |
| 269 | <Quirk name="requires-allocate-on-output-ports" /> |
| 270 | <Quirk name="requires-timestamp-reorder" /> |
| 271 | <Quirk name="video-controller-check-enable" /> |
| 272 | <Limit name="size" min="64x64" max="1920x1088" /> |
| 273 | <Limit name="alignment" value="2x2" /> |
| 274 | <Limit name="block-size" value="16x16" /> |
| 275 | <Limit name="blocks-per-second" min="1" max="244800" /> |
| 276 | <Limit name="bitrate" range="1-45 000000" /> |
| 277 | <Feature name="adaptive-playback" /> |
| 278 | <Feature name="secure-playback" required="true" /> |
| 279 | </MediaCodec> |
| 280 | <!-- |
| 281 | <MediaCodec name="OMX.qcom.video.decoder.divx" type="video/divx" > |
| 282 | <Quirk name="requires-allocate-on-input-ports" /> |
| 283 | <Quirk name="requires-allocate-on-output-ports" /> |
| 284 | <Limit name="size" min="64x64" max="1920x1088" /> |
| 285 | <Limit name="alignment" value="2x2" /> |
| 286 | <Limit name="block-size" value="16x16" /> |
| 287 | <Limit name="blocks-per-second" min="1" max="244800" /> |
| 288 | <Limit name="bitrate" range="1-50000000" /> |
| 289 | <Feature name="adaptive-playback" /> |
| 290 | </MediaCodec> |
| 291 | <MediaCodec name="OMX.qcom.video.decoder.divx311" type="video/divx311" > |
| 292 | <Quirk name="requires-allocate-on-input-ports" /> |
| 293 | <Quirk name="requires-allocate-on-output-ports" /> |
| 294 | <Limit name="size" min="64x64" max="1920X1088" /> |
| 295 | <Limit name="alignment" value="2x2" /> |
| 296 | <Limit name="block-size" value="16x16" /> |
| 297 | <Limit name="blocks-per-second" min="1" max="244800" /> |
| 298 | <Limit name="bitrate" range="1-20000000" /> |
| 299 | <Feature name="adaptive-playback" /> |
| 300 | </MediaCodec> |
| 301 | <MediaCodec name="OMX.qcom.video.decoder.divx4" type="video/divx4" > |
| 302 | <Quirk name="requires-allocate-on-input-ports" /> |
| 303 | <Quirk name="requires-allocate-on-output-ports" /> |
| 304 | <Limit name="size" min="64x64" max="1920x1088" /> |
| 305 | <Limit name="alignment" value="2x2" /> |
| 306 | <Limit name="block-size" value="16x16" /> |
| 307 | <Limit name="blocks-per-second" min="1" max="244800" /> |
| 308 | <Limit name="bitrate" range="1-50000000" /> |
| 309 | <Feature name="adaptive-playback" /> |
| 310 | </MediaCodec> |
| 311 | --> |
| 312 | <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" > |
| 313 | <Quirk name="requires-allocate-on-input-ports" /> |
| 314 | <Quirk name="requires-allocate-on-output-ports" /> |
| 315 | <Quirk name="requires-timestamp-reorder" /> |
| 316 | <Quirk name="video-controller-check-enable" /> |
| 317 | <Limit name="size" min="64x64" max="1920x1088" /> |
| 318 | <Limit name="alignment" value="2x2" /> |
| 319 | <Limit name="block-size" value="16x16" /> |
| 320 | <Limit name="blocks-per-second" min="1" max="244800" /> |
| 321 | <Limit name="bitrate" range="1-50000000" /> |
| 322 | <Feature name="adaptive-playback" /> |
| 323 | </MediaCodec> |
| 324 | <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" > |
| 325 | <Quirk name="requires-allocate-on-input-ports" /> |
| 326 | <Quirk name="requires-allocate-on-output-ports" /> |
| 327 | <Limit name="size" min="64x64" max="1920X1080" /> |
| 328 | <Limit name="alignment" value="2x2" /> |
| 329 | <Limit name="block-size" value="16x16" /> |
| 330 | <Limit name="blocks-per-second" min="1" max="489600" /> |
| 331 | <Limit name="bitrate" range="1-50000000" /> |
| 332 | <Feature name="adaptive-playback" /> |
| 333 | </MediaCodec> |
| 334 | <!-- Video Software --> |
| 335 | <MediaCodec name="OMX.SEC.h263.sw.dec" type="video/3gpp" > |
| 336 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 337 | </MediaCodec> |
| 338 | <MediaCodec name="OMX.SEC.avc.sw.dec" type="video/avc" > |
| 339 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 340 | <Limit name="size" min="64x64" max="2048x2048" /> |
| 341 | <Feature name="adaptive-playback" /> |
| 342 | </MediaCodec> |
| 343 | <MediaCodec name="OMX.SEC.mpeg4.sw.dec" type="video/mp4v-es" > |
| 344 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 345 | </MediaCodec> |
| 346 | <MediaCodec name="OMX.SEC.vc1.sw.dec" > |
| 347 | <Type name="video/x-ms-wmv"/> |
| 348 | <Type name="video/wvc1"/> |
| 349 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 350 | </MediaCodec> |
| 351 | <MediaCodec name="OMX.SEC.wmv7.dec" type="video/x-ms-wmv7" > |
| 352 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 353 | </MediaCodec> |
| 354 | <MediaCodec name="OMX.SEC.wmv8.dec" type="video/x-ms-wmv8" > |
| 355 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 356 | </MediaCodec> |
| 357 | <MediaCodec name="OMX.SEC.mp43.dec" type="video/mp43" > |
| 358 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 359 | </MediaCodec> |
| 360 | <MediaCodec name="OMX.SEC.hevc.sw.dec" type="video/hevc" > |
| 361 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 362 | <Limit name="size" min="64x64" max="2048x2048" /> |
| 363 | <Feature name="adaptive-playback" /> |
| 364 | </MediaCodec> |
| 365 | <MediaCodec name="OMX.SEC.h263sr.dec" type="video/sorenson" > |
| 366 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 367 | </MediaCodec> |
| 368 | <MediaCodec name="OMX.SEC.vp8.dec" type="video/x-vnd.on2.vp8" > |
| 369 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
| 370 | <Limit name="size" min="64x64" max="2048x2048" /> |
| 371 | <Feature name="adaptive-playback" /> |
| 372 | </MediaCodec> |
| 373 | </Decoders> |
| 374 | <Include href="media_codecs_google_video.xml" /> |
| 375 | <Include href="media_codecs_google_audio.xml" /> |
| 376 | <Include href="media_codecs_google_telephony.xml" /> |
| 377 | <Encoders> |
| 378 | <MediaCodec name="OMX.SEC.naac.enc" type="audio/mp4a-latm"> |
| 379 | <Limit name="channel-count" max="6" /> |
| 380 | <Limit name="sample-rate" ranges="11025,12000,16000,22050,24000,32000,44100,48000" /> |
| 381 | <Limit name="bitrate" range="8000-960000" /> |
| 382 | </MediaCodec> |
| 383 | </Encoders> |
| 384 | </MediaCodecs> |