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 SM6150 Non-Secure decoder capabilities 85 _________________________________________________________ 86 | Codec | W H fps Mbps MB/s | 87 |_____________|_________________________________________| 88 | h264 | 4096 2160 24 100 829440 | 89 | hevc | 4096 2160 24 100 829440 | 90 | mpeg4-sw | 1920 1088 30 40 244800 | 91 | vp8 | 3840 2160 30 100 972000 | 92 | vp9 | 4096 2160 24 100 829440 | 93 | vc1 | 1920 1088 30 20 244800 | 94 | div4/5/6-sw | 1920 1088 30 10 244800 | 95 | h263-sw | 864 480 30 16 48600 | 96 | mpeg2 | 1920 1088 30 40 244800 | 97 |_____________|_________________________________________| 98 99 SM6150 Secure decoder capabilities 100 ______________________________________________________ 101 | Codec | W H fps Mbps MB/s | 102 |__________|_________________________________________| 103 | h264 | 3840 2160 30 35 972000 | 104 | vp9 | 3840 2160 30 35 972000 | 105 | hevc | 3840 2160 30 35 972000 | 106 | mpeg2 | 1920 1088 30 35 244800 | 107 |__________|_________________________________________| 108 109 SM6150 Non-Secure encoder capabilities (Secure not supported) 110 ______________________________________________________ 111 | Codec | W H fps Mbps MB/s | 112 |__________|_________________________________________| 113 | h264 | 4096 2160 24 100 829440 | 114 | hevc | 4096 2160 24 100 829440 | 115 | mpeg4-sw | 1280 720 30 4 108000 | 116 | vp8 | 3840 2160 30 100 972000 | 117 | h263-sw | 864 480 30 2 48600 | 118 |__________|_________________________________________| 119--> 120 121<MediaCodecs> 122 <Include href="media_codecs_google_audio.xml" /> 123 <Include href="media_codecs_google_telephony.xml" /> 124 <Settings> 125 <Setting name="max-video-encoder-input-buffers" value="11" /> 126 </Settings> 127 <Encoders> 128 <!-- Video Hardware --> 129 <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" > 130 <Quirk name="requires-allocate-on-input-ports" /> 131 <Quirk name="requires-allocate-on-output-ports" /> 132 <Quirk name="requires-loaded-to-idle-after-allocation" /> 133 <Limit name="size" min="96x96" max="4096x2160" /> 134 <Limit name="alignment" value="2x2" /> 135 <Limit name="block-size" value="16x16" /> 136 <Limit name="blocks-per-second" min="24" max="979200" /> 137 <Limit name="bitrate" range="1-100000000" /> 138 <Limit name="frame-rate" range="1-240" /> 139 <Limit name="concurrent-instances" max="16" /> 140 </MediaCodec> 141 <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" > 142 <Quirk name="requires-allocate-on-input-ports" /> 143 <Quirk name="requires-allocate-on-output-ports" /> 144 <Quirk name="requires-loaded-to-idle-after-allocation" /> 145 <Limit name="size" min="96x96" max="3840x2160" /> 146 <Limit name="alignment" value="2x2" /> 147 <Limit name="block-size" value="16x16" /> 148 <Limit name="blocks-per-second" min="24" max="979200" /> 149 <Limit name="bitrate" range="1-120000000" /> 150 <Limit name="frame-rate" range="1-240" /> 151 <Limit name="concurrent-instances" max="16" /> 152 </MediaCodec> 153 <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" > 154 <Quirk name="requires-allocate-on-input-ports" /> 155 <Quirk name="requires-allocate-on-output-ports" /> 156 <Quirk name="requires-loaded-to-idle-after-allocation" /> 157 <Limit name="size" min="96x96" max="4096x2160" /> 158 <Limit name="alignment" value="2x2" /> 159 <Limit name="block-size" value="16x16" /> 160 <Limit name="blocks-per-second" min="24" max="979200" /> 161 <Limit name="bitrate" range="1-100000000" /> 162 <Limit name="frame-rate" range="1-240" /> 163 <Limit name="concurrent-instances" max="16" /> 164 </MediaCodec> 165 <!-- Video Software --> 166 <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" > 167 <Quirk name="requires-allocate-on-input-ports" /> 168 <Quirk name="requires-allocate-on-output-ports" /> 169 <Quirk name="requires-loaded-to-idle-after-allocation" /> 170 <Limit name="size" min="32x32" max="864x480" /> 171 <Limit name="alignment" value="4x4" /> 172 <Limit name="block-size" value="16x16" /> 173 <Limit name="blocks-per-second" min="1" max="48600" /> 174 <Limit name="bitrate" range="1-2000000" /> 175 <Limit name="frame-rate" range="1-30" /> 176 <Limit name="concurrent-instances" max="16" /> 177 </MediaCodec> 178 <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" > 179 <Quirk name="requires-allocate-on-input-ports" /> 180 <Quirk name="requires-allocate-on-output-ports" /> 181 <Quirk name="requires-loaded-to-idle-after-allocation" /> 182 <Limit name="size" min="32x32" max="1280x720" /> 183 <Limit name="alignment" value="2x2" /> 184 <Limit name="block-size" value="16x16" /> 185 <Limit name="blocks-per-second" min="1" max="108000" /> 186 <Limit name="bitrate" range="1-4000000" /> 187 <Limit name="frame-rate" range="1-30" /> 188 <Limit name="concurrent-instances" max="16" /> 189 </MediaCodec> 190 </Encoders> 191 <Decoders> 192 <!-- Video Hardware --> 193 <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" > 194 <Quirk name="requires-allocate-on-input-ports" /> 195 <Quirk name="requires-allocate-on-output-ports" /> 196 <Limit name="size" min="96x96" max="4096x2160" /> 197 <Limit name="alignment" value="2x2" /> 198 <Limit name="block-size" value="16x16" /> 199 <Limit name="blocks-per-second" min="24" max="979200" /> 200 <Limit name="bitrate" range="1-100000000" /> 201 <Limit name="frame-rate" range="1-240" /> 202 <Feature name="adaptive-playback" /> 203 <Limit name="concurrent-instances" max="16" /> 204 </MediaCodec> 205 <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" > 206 <Quirk name="requires-allocate-on-input-ports" /> 207 <Quirk name="requires-allocate-on-output-ports" /> 208 <Limit name="size" min="96x96" max="3840x2160" /> 209 <Limit name="alignment" value="2x2" /> 210 <Limit name="block-size" value="16x16" /> 211 <Limit name="blocks-per-second" min="24" max="972000" /> 212 <Limit name="bitrate" range="1-35000000" /> 213 <Limit name="frame-rate" range="1-30" /> 214 <Feature name="adaptive-playback" /> 215 <Feature name="secure-playback" required="true" /> 216 <Limit name="concurrent-instances" max="3" /> 217 </MediaCodec> 218 <MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" > 219 <Quirk name="requires-allocate-on-input-ports" /> 220 <Quirk name="requires-allocate-on-output-ports" /> 221 <Limit name="size" min="96x96" max="1920x1088" /> 222 <Limit name="alignment" value="2x2" /> 223 <Limit name="block-size" value="16x16" /> 224 <Limit name="blocks-per-second" min="24" max="244800" /> 225 <Limit name="bitrate" range="1-40000000" /> 226 <Limit name="frame-rate" range="1-30" /> 227 <Feature name="adaptive-playback" /> 228 <Limit name="concurrent-instances" max="16" /> 229 </MediaCodec> 230 <MediaCodec name="OMX.qcom.video.decoder.mpeg2.secure" type="video/mpeg2" > 231 <Quirk name="requires-allocate-on-input-ports" /> 232 <Quirk name="requires-allocate-on-output-ports" /> 233 <Limit name="size" min="96x96" max="1920x1088" /> 234 <Limit name="alignment" value="2x2" /> 235 <Limit name="block-size" value="16x16" /> 236 <Limit name="blocks-per-second" min="24" max="244800" /> 237 <Limit name="bitrate" range="1-35000000" /> 238 <Limit name="frame-rate" range="1-30" /> 239 <Feature name="adaptive-playback" /> 240 <Feature name="secure-playback" required="true" /> 241 <Limit name="concurrent-instances" max="3" /> 242 </MediaCodec> 243 <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" > 244 <Quirk name="requires-allocate-on-input-ports" /> 245 <Quirk name="requires-allocate-on-output-ports" /> 246 <Limit name="size" min="96x96" max="3840x2160" /> 247 <Limit name="alignment" value="2x2" /> 248 <Limit name="block-size" value="16x16" /> 249 <Limit name="blocks-per-second" min="24" max="979200" /> 250 <Limit name="bitrate" range="1-100000000" /> 251 <Limit name="frame-rate" range="1-240" /> 252 <Feature name="adaptive-playback" /> 253 <Limit name="concurrent-instances" max="16" /> 254 </MediaCodec> 255 <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" > 256 <Quirk name="requires-allocate-on-input-ports" /> 257 <Quirk name="requires-allocate-on-output-ports" /> 258 <Limit name="size" min="96x96" max="4096x2160" /> 259 <Limit name="alignment" value="2x2" /> 260 <Limit name="block-size" value="16x16" /> 261 <Limit name="blocks-per-second" min="24" max="979200" /> 262 <Limit name="bitrate" range="1-120000000" /> 263 <Limit name="frame-rate" range="1-240" /> 264 <Feature name="adaptive-playback" /> 265 <Limit name="concurrent-instances" max="6" /> 266 </MediaCodec> 267 <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" > 268 <Quirk name="requires-allocate-on-input-ports" /> 269 <Quirk name="requires-allocate-on-output-ports" /> 270 <Limit name="size" min="96x96" max="3840x2160" /> 271 <Limit name="alignment" value="2x2" /> 272 <Limit name="block-size" value="16x16" /> 273 <Limit name="blocks-per-second" min="24" max="972000" /> 274 <Limit name="bitrate" range="1-35000000" /> 275 <Limit name="frame-rate" range="1-30" /> 276 <Feature name="adaptive-playback" /> 277 <Feature name="secure-playback" required="true" /> 278 <Limit name="concurrent-instances" max="3" /> 279 </MediaCodec> 280 <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" > 281 <Quirk name="requires-allocate-on-input-ports" /> 282 <Quirk name="requires-allocate-on-output-ports" /> 283 <Limit name="size" min="96x96" max="4096x2160" /> 284 <Limit name="alignment" value="2x2" /> 285 <Limit name="block-size" value="16x16" /> 286 <Limit name="blocks-per-second" min="24" max="979200" /> 287 <Limit name="bitrate" range="1-100000000" /> 288 <Limit name="frame-rate" range="1-240" /> 289 <Feature name="adaptive-playback" /> 290 <Limit name="concurrent-instances" max="16" /> 291 </MediaCodec> 292 <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" > 293 <Quirk name="requires-allocate-on-input-ports" /> 294 <Quirk name="requires-allocate-on-output-ports" /> 295 <Limit name="size" min="96x96" max="3840x2160" /> 296 <Limit name="alignment" value="2x2" /> 297 <Limit name="block-size" value="16x16" /> 298 <Limit name="blocks-per-second" min="24" max="972000" /> 299 <Limit name="bitrate" range="1-35000000" /> 300 <Limit name="frame-rate" range="1-30" /> 301 <Feature name="adaptive-playback" /> 302 <Feature name="secure-playback" required="true" /> 303 <Limit name="concurrent-instances" max="3" /> 304 </MediaCodec> 305 <!-- Video Software --> 306 <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" > 307 <Quirk name="requires-allocate-on-input-ports" /> 308 <Quirk name="requires-allocate-on-output-ports" /> 309 <Limit name="size" min="16x16" max="864x480" /> 310 <Limit name="alignment" value="4x4" /> 311 <Limit name="block-size" value="16x16" /> 312 <Limit name="blocks-per-second" min="1" max="48600" /> 313 <Limit name="bitrate" range="1-16000000" /> 314 <Limit name="frame-rate" range="1-30" /> 315 <Feature name="adaptive-playback" /> 316 <Limit name="concurrent-instances" max="16" /> 317 </MediaCodec> 318 <MediaCodec name="OMX.qti.video.decoder.mpeg4sw"> 319 <Quirk name="requires-allocate-on-input-ports" /> 320 <Quirk name="requires-allocate-on-output-ports" /> 321 <Type name="video/mp4v-es"> 322 <Limit name="size" min="16x16" max="1920x1088" /> 323 <Limit name="alignment" value="2x2" /> 324 <Limit name="block-size" value="16x16" /> 325 <Limit name="blocks-per-second" min="1" max="244800" /> 326 <Limit name="bitrate" range="1-40000000" /> 327 <Limit name="frame-rate" range="1-30" /> 328 <Limit name="concurrent-instances" max="16" /> 329 </Type> 330 <Type name="video/mp4v-esdp"> 331 <Limit name="size" min="16x16" max="1920x1088" /> 332 <Limit name="alignment" value="2x2" /> 333 <Limit name="block-size" value="16x16" /> 334 <Limit name="blocks-per-second" min="1" max="244800" /> 335 <Limit name="bitrate" range="1-40000000" /> 336 <Limit name="frame-rate" range="1-30" /> 337 <Limit name="concurrent-instances" max="16" /> 338 </Type> 339 </MediaCodec> 340 <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" > 341 <Quirk name="requires-allocate-on-input-ports" /> 342 <Quirk name="requires-allocate-on-output-ports" /> 343 <Limit name="size" min="16x16" max="1920x1088" /> 344 <Limit name="alignment" value="2x2" /> 345 <Limit name="block-size" value="16x16" /> 346 <Limit name="blocks-per-second" min="1" max="244800" /> 347 <Limit name="frame-rate" range="1-30" /> 348 <Limit name="bitrate" range="1-10000000" /> 349 <Limit name="concurrent-instances" max="16" /> 350 </MediaCodec> 351 <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" > 352 <Quirk name="requires-allocate-on-input-ports" /> 353 <Quirk name="requires-allocate-on-output-ports" /> 354 <Limit name="size" min="16x16" max="1920x1088" /> 355 <Limit name="alignment" value="2x2" /> 356 <Limit name="block-size" value="16x16" /> 357 <Limit name="blocks-per-second" min="1" max="244800" /> 358 <Limit name="frame-rate" range="1-30" /> 359 <Limit name="bitrate" range="1-10000000" /> 360 <Limit name="concurrent-instances" max="16" /> 361 </MediaCodec> 362 <MediaCodec name="OMX.qti.video.decoder.vc1sw" type="video/x-ms-wmv" > 363 <Quirk name="requires-allocate-on-input-ports" /> 364 <Quirk name="requires-allocate-on-output-ports" /> 365 <Limit name="size" min="64x64" max="1920x1088" /> 366 <Limit name="alignment" value="2x2" /> 367 <Limit name="block-size" value="16x16" /> 368 <Limit name="blocks-per-second" min="1" max="244800" /> 369 <Limit name="bitrate" range="1-20000000" /> 370 <Limit name="frame-rate" range="1-30" /> 371 <Feature name="adaptive-playback" /> 372 <Limit name="concurrent-instances" max="16" /> 373 </MediaCodec> 374 </Decoders> 375 <Include href="media_codecs_google_video.xml" /> 376</MediaCodecs> 377