1<?xml version="1.0" encoding="utf-8" ?> 2<!-- Copyright (C) 2013 The Android Open Source Project 3 Copyright (C) 2015 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 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 Decoder capabilities for thorium 85 _________________________________________________________________________ 86 | Codec | W H fps Mbps MB/s | Encode Secure-dec | 87 |__________|_________________________________________|___________________| 88 | h264 | 1920 1088 30 20 244800 | Y Y | 89 | hevc | 1920 1088 30 20 244800 | N N | 90 | mpeg4 | 1920 1088 30 6 244800 | Y N | 91 | vp8 | 1920 1088 30 20 244800 | N N | 92 | div4/5/6 | 1920 1088 30 6 244800 | N N | 93 | h263 | 864 480 30 2 48600 | Y N | 94 |__________|_________________________________________|___________________| 95 96--> 97 98<!-- 99 Encoder capabilities for thorium 100 ____________________________________________________ 101 | Codec | W H fps Mbps MB/s | 102 |__________|_________________________________________| 103 | h264 | 1920 1088 30 20 244800 | 104 | mpeg4 | 864 480 30 2 48600 | 105 | h263 | 864 480 30 2 48600 | 106 |____________________________________________________| 107--> 108 109<MediaCodecs> 110 <Include href="media_codecs_google_audio.xml" /> 111 <Include href="media_codecs_google_telephony.xml" /> 112 <Settings> 113 <Setting name="max-video-encoder-input-buffers" value="9" /> 114 </Settings> 115 <Encoders> 116 <!-- Video Hardware --> 117 <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" > 118 <Quirk name="requires-allocate-on-input-ports" /> 119 <Quirk name="requires-allocate-on-output-ports" /> 120 <Quirk name="requires-loaded-to-idle-after-allocation" /> 121 <Limit name="size" min="96x64" max="1920x1088" /> 122 <Limit name="alignment" value="2x2" /> 123 <Limit name="block-size" value="16x16" /> 124 <Limit name="blocks-per-second" min="1" max="244800" /> 125 <Limit name="bitrate" range="1-20000000" /> 126 <Limit name="concurrent-instances" max="8" /> 127 </MediaCodec> 128 <!-- Video Software --> 129 <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" > 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="32x32" max="864x480" /> 134 <Limit name="alignment" value="2x2" /> 135 <Limit name="block-size" value="16x16" /> 136 <Limit name="blocks-per-second" min="1" max="48600" /> 137 <Limit name="bitrate" range="1-2000000" /> 138 <Limit name="concurrent-instances" max="1" /> 139 </MediaCodec> 140 <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" > 141 <Quirk name="requires-allocate-on-input-ports" /> 142 <Quirk name="requires-allocate-on-output-ports" /> 143 <Quirk name="requires-loaded-to-idle-after-allocation" /> 144 <Limit name="size" min="32x32" max="864x480" /> 145 <Limit name="alignment" value="4x4" /> 146 <Limit name="block-size" value="16x16" /> 147 <Limit name="blocks-per-second" min="1" max="48600" /> 148 <Limit name="bitrate" range="1-2000000" /> 149 <Limit name="concurrent-instances" max="1" /> 150 </MediaCodec> 151 </Encoders> 152 <Decoders> 153 <!-- Audio Software --> 154 <MediaCodec name="OMX.qti.audio.decoder.flac" type="audio/flac" /> 155 <!-- Video Hardware --> 156 <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" > 157 <Quirk name="requires-allocate-on-input-ports" /> 158 <Quirk name="requires-allocate-on-output-ports" /> 159 <Quirk name="defers-output-buffer-allocation" /> 160 <Limit name="size" min="64x64" max="1920x1088" /> 161 <Limit name="alignment" value="2x2" /> 162 <Limit name="block-size" value="16x16" /> 163 <Limit name="blocks-per-second" min="1" max="244800" /> 164 <Limit name="bitrate" range="1-20000000" /> 165 <Feature name="adaptive-playback" /> 166 <Limit name="concurrent-instances" max="8" /> 167 </MediaCodec> 168 <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" > 169 <Quirk name="requires-allocate-on-input-ports" /> 170 <Quirk name="requires-allocate-on-output-ports" /> 171 <Quirk name="defers-output-buffer-allocation" /> 172 <Limit name="size" min="64x64" max="1920x1088" /> 173 <Limit name="alignment" value="2x2" /> 174 <Limit name="block-size" value="16x16" /> 175 <Limit name="blocks-per-second" min="1" max="244800" /> 176 <Limit name="bitrate" range="1-20000000" /> 177 <Feature name="adaptive-playback" /> 178 <Limit name="concurrent-instances" max="8" /> 179 </MediaCodec> 180 <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" > 181 <Quirk name="requires-allocate-on-input-ports" /> 182 <Quirk name="requires-allocate-on-output-ports" /> 183 <Quirk name="defers-output-buffer-allocation" /> 184 <Limit name="size" min="64x64" max="1920x1088" /> 185 <Limit name="alignment" value="2x2" /> 186 <Limit name="block-size" value="16x16" /> 187 <Limit name="blocks-per-second" min="1" max="244800" /> 188 <Limit name="bitrate" range="1-20000000" /> 189 <Feature name="adaptive-playback" /> 190 <Limit name="concurrent-instances" max="8" /> 191 </MediaCodec> 192 <MediaCodec name="OMX.qti.video.decoder.divxsw" type="video/divx" > 193 <Quirk name="requires-allocate-on-input-ports" /> 194 <Quirk name="requires-allocate-on-output-ports" /> 195 <Limit name="size" min="16x16" max="1920x1088" /> 196 <Limit name="alignment" value="2x2" /> 197 <Limit name="block-size" value="16x16" /> 198 <Limit name="blocks-per-second" min="1" max="244800" /> 199 <Limit name="bitrate" range="1-6000000" /> 200 <Limit name="concurrent-instances" max="1" /> 201 </MediaCodec> 202 <MediaCodec name="OMX.qti.video.decoder.divx4sw" type="video/divx4" > 203 <Quirk name="requires-allocate-on-input-ports" /> 204 <Quirk name="requires-allocate-on-output-ports" /> 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="1" /> 211 </MediaCodec> 212 <MediaCodec name="OMX.qti.video.decoder.mpeg4sw"> 213 <Type name="video/mp4v-es" /> 214 <Type name="video/mp4v-esdp" /> 215 <Quirk name="requires-allocate-on-input-ports" /> 216 <Quirk name="requires-allocate-on-output-ports" /> 217 <Limit name="size" min="16x16" max="1920x1088" /> 218 <Limit name="alignment" value="2x2" /> 219 <Limit name="block-size" value="16x16" /> 220 <Limit name="blocks-per-second" min="1" max="244800" /> 221 <Limit name="bitrate" range="1-6000000" /> 222 <Limit name="concurrent-instances" max="1" /> 223 </MediaCodec> 224 <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" > 225 <Quirk name="requires-allocate-on-input-ports" /> 226 <Quirk name="requires-allocate-on-output-ports" /> 227 <Limit name="size" min="16x16" max="864x480" /> 228 <Limit name="alignment" value="4x4" /> 229 <Limit name="block-size" value="16x16" /> 230 <Limit name="blocks-per-second" min="1" max="48600" /> 231 <Limit name="bitrate" range="1-2000000" /> 232 <Limit name="concurrent-instances" max="1" /> 233 </MediaCodec> 234 </Decoders> 235 <Include href="media_codecs_google_video.xml" /> 236</MediaCodecs> 237