• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8" ?>
2<!-- Copyright 2016 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<!--
18<!DOCTYPE MediaCodecs [
19<!ELEMENT Include EMPTY>
20<!ATTLIST Include href CDATA #REQUIRED>
21<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
22<!ELEMENT Decoders (MediaCodec|Include)*>
23<!ELEMENT Encoders (MediaCodec|Include)*>
24<!ELEMENT MediaCodec (Type|Quirk|Include)*>
25<!ATTLIST MediaCodec name CDATA #REQUIRED>
26<!ATTLIST MediaCodec type CDATA>
27<!ELEMENT Type EMPTY>
28<!ATTLIST Type name CDATA #REQUIRED>
29<!ELEMENT Quirk EMPTY>
30<!ATTLIST Quirk name CDATA #REQUIRED>
31]>
32
33There's a simple and a complex syntax to declare the availability of a
34media codec:
35
36A codec that properly follows the OpenMax spec and therefore doesn't have any
37quirks and that only supports a single content type can be declared like so:
38
39    <MediaCodec name="OMX.foo.bar" type="something/interesting" />
40
41If a codec has quirks OR supports multiple content types, the following syntax
42can be used:
43
44    <MediaCodec name="OMX.foo.bar" >
45        <Type name="something/interesting" />
46        <Type name="something/else" />
47        ...
48        <Quirk name="requires-allocate-on-input-ports" />
49        <Quirk name="requires-allocate-on-output-ports" />
50        <Quirk name="output-buffers-are-unreadable" />
51    </MediaCodec>
52
53Only the three quirks included above are recognized at this point:
54
55"requires-allocate-on-input-ports"
56    must be advertised if the component does not properly support specification
57    of input buffers using the OMX_UseBuffer(...) API but instead requires
58    OMX_AllocateBuffer to be used.
59
60"requires-allocate-on-output-ports"
61    must be advertised if the component does not properly support specification
62    of output buffers using the OMX_UseBuffer(...) API but instead requires
63    OMX_AllocateBuffer to be used.
64
65"output-buffers-are-unreadable"
66    must be advertised if the emitted output buffers of a decoder component
67    are not readable, i.e. use a custom format even though abusing one of
68    the official OMX colorspace constants.
69    Clients of such decoders will not be able to access the decoded data,
70    naturally making the component much less useful. The only use for
71    a component with this quirk is to render the output to the screen.
72    Audio decoders MUST NOT advertise this quirk.
73    Video decoders that advertise this quirk must be accompanied by a
74    corresponding color space converter for thumbnail extraction,
75    matching surfaceflinger support that can render the custom format to
76    a texture and possibly other code, so just DON'T USE THIS QUIRK.
77
78
79-->
80
81<!--
82 8996 Decoder capabilities
83 __________________________________________________________________
84 | Codec    | W       H       fps     Mbps    MB/s    | Secure-dec |
85 |__________|_________________________________________|____________|
86 | h264     | 3840    2160    60      100     1958400 |  Y         |
87 |          | (4096)  (2160)  (56)    (100)           |            |
88 | hevc     | 3840    2160    60      100     1958400 |  Y         |
89 |          | (4096)  (2160)  (56)    (100)           |            |
90 | mpeg4    | 1920    1088    60      60      489600  |  N         |
91 | vp8      | 3840    2160    30      20      979200  |  N         |
92 | vp9      | 3840    2160    30      20      979200  |  Y         |
93 | h263     | 864     480     30      2       48600   |  N         |
94 |__________|_________________________________________|____________|
95
96
97 8996 Encoder capabilities
98 ______________________________________________________
99 | Codec    | W       H       fps     Mbps    MB/s    |
100 |__________|_________________________________________|
101 | h264     | 3840    2160    30      100     979200  |
102 | hevc     | 3840    2160    30      100     979200  |
103 | mpeg4    | 1920    1088    60      60      489600  |
104 | vp8      | 3840    2160    30      20      979200  |
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="11" />
114    </Settings>
115    <Encoders>
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="489600" />
124            <Limit name="bitrate" range="1-60000000" />
125            <Limit name="frame-rate" range="1-240" />
126            <Limit name="concurrent-instances" max="16" />
127            <Limit name="performance-point-1920x1080" value="60" />
128            <Limit name="performance-point-1280x720" value="120" />
129            <Feature name="bitrate-modes" value="VBR,CBR" />
130        </MediaCodec>
131        <MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" >
132            <Quirk name="requires-allocate-on-input-ports" />
133            <Quirk name="requires-allocate-on-output-ports" />
134            <Quirk name="requires-loaded-to-idle-after-allocation" />
135            <Limit name="size" min="96x64" max="864x480" />
136            <Limit name="alignment" value="2x2" />
137            <Limit name="block-size" value="16x16" />
138            <Limit name="blocks-per-second" min="1" max="48600" />
139            <Limit name="bitrate" range="1-2000000" />
140            <Limit name="frame-rate" range="1-240" />
141            <Limit name="concurrent-instances" max="16" />
142            <Limit name="performance-point-864x480" value="30" />
143            <Limit name="performance-point-720x576" value="25" />
144            <Limit name="performance-point-720x480" value="30" />
145            <Feature name="bitrate-modes" value="VBR,CBR" />
146        </MediaCodec>
147        <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
148            <Quirk name="requires-allocate-on-input-ports" />
149            <Quirk name="requires-allocate-on-output-ports" />
150            <Quirk name="requires-loaded-to-idle-after-allocation" />
151            <Limit name="size" min="96x64" max="4096x4096" />
152            <Limit name="alignment" value="2x2" />
153            <Limit name="block-size" value="16x16" />
154            <Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
155            <Limit name="blocks-per-second" min="1" max="979200" />
156            <Limit name="bitrate" range="1-100000000" />
157            <Limit name="frame-rate" range="1-240" />
158            <Limit name="concurrent-instances" max="16" />
159            <Limit name="performance-point-3840x2160" value="30" />
160            <Limit name="performance-point-1920x1080" value="120" />
161            <Limit name="performance-point-1280x720" value="240" />
162            <Feature name="bitrate-modes" value="VBR,CBR" />
163            <Feature name="intra-refresh" />
164        </MediaCodec>
165        <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" >
166            <Quirk name="requires-allocate-on-input-ports" />
167            <Quirk name="requires-allocate-on-output-ports" />
168            <Quirk name="requires-loaded-to-idle-after-allocation" />
169            <Limit name="size" min="96x64" max="4096x4096" />
170            <Limit name="alignment" value="2x2" />
171            <Limit name="block-size" value="16x16" />
172            <Limit name="block-count" range="1-32768" /> <!-- max 4096x2048 -->
173            <Limit name="blocks-per-second" min="1" max="979200" />
174            <Limit name="bitrate" range="1-20000000" />
175            <Limit name="frame-rate" range="1-240" />
176            <Limit name="concurrent-instances" max="16" />
177            <Limit name="performance-point-3840x2160" value="30" />
178            <Limit name="performance-point-1920x1080" value="120" />
179            <Limit name="performance-point-1280x720" value="240" />
180            <Feature name="bitrate-modes" value="VBR,CBR" />
181            <Feature name="intra-refresh" />
182        </MediaCodec>
183        <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
184            <Quirk name="requires-allocate-on-input-ports" />
185            <Quirk name="requires-allocate-on-output-ports" />
186            <Quirk name="requires-loaded-to-idle-after-allocation" />
187            <Limit name="size" min="176x64" max="4096x4096" />
188            <Limit name="alignment" value="2x2" />
189            <Limit name="block-size" value="16x16" />
190            <Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
191            <Limit name="blocks-per-second" min="1" max="979200" />
192            <Limit name="bitrate" range="1-100000000" />
193            <Limit name="frame-rate" range="1-240" />
194            <Limit name="concurrent-instances" max="16" />
195            <Limit name="performance-point-3840x2160" value="30" />
196            <Limit name="performance-point-1920x1080" value="120" />
197            <Limit name="performance-point-1280x720" value="240" />
198            <Feature name="bitrate-modes" value="VBR,CBR" />
199            <Feature name="intra-refresh" />
200        </MediaCodec>
201    </Encoders>
202    <Decoders>
203        <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
204            <Quirk name="requires-allocate-on-input-ports" />
205            <Quirk name="requires-allocate-on-output-ports" />
206            <Limit name="size" min="64x64" max="4096x4096" />
207            <Limit name="alignment" value="2x2" />
208            <Limit name="block-size" value="16x16" />
209            <Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
210            <Limit name="blocks-per-second" min="1" max="1958400" />
211            <Limit name="bitrate" range="1-100000000" />
212            <Feature name="adaptive-playback" />
213            <Limit name="concurrent-instances" max="16" />
214            <Limit name="performance-point-4096x2160" value="56" />
215            <Limit name="performance-point-3840x2160" value="60" />
216            <Limit name="performance-point-1920x1080" value="240" />
217        </MediaCodec>
218        <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
219            <Quirk name="requires-allocate-on-input-ports" />
220            <Quirk name="requires-allocate-on-output-ports" />
221            <Limit name="size" min="64x64" max="4096x4096" />
222            <Limit name="alignment" value="2x2" />
223            <Limit name="block-size" value="16x16" />
224            <Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
225            <Limit name="blocks-per-second" min="1" max="1958400" />
226            <Limit name="bitrate" range="1-100000000" />
227            <Feature name="adaptive-playback" />
228            <Feature name="secure-playback" required="true" />
229            <Limit name="concurrent-instances" max="6" />
230            <Limit name="performance-point-4096x2160" value="56" />
231            <Limit name="performance-point-3840x2160" value="60" />
232            <Limit name="performance-point-1920x1080" value="240" />
233        </MediaCodec>
234        <MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" >
235            <Quirk name="requires-allocate-on-input-ports" />
236            <Quirk name="requires-allocate-on-output-ports" />
237            <Limit name="size" min="64x64" max="1920x1088" />
238            <Limit name="alignment" value="2x2" />
239            <Limit name="block-size" value="16x16" />
240            <Limit name="blocks-per-second" min="1" max="489600" />
241            <Limit name="bitrate" range="1-60000000" />
242            <Feature name="adaptive-playback" />
243            <Limit name="concurrent-instances" max="16" />
244            <Limit name="performance-point-1920x1080" value="60" />
245            <Limit name="performance-point-1280x720" value="120" />
246        </MediaCodec>
247        <MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" >
248            <Quirk name="requires-allocate-on-input-ports" />
249            <Quirk name="requires-allocate-on-output-ports" />
250            <Limit name="size" min="64x64" max="864x480" />
251            <Limit name="alignment" value="2x2" />
252            <Limit name="block-size" value="16x16" />
253            <Limit name="blocks-per-second" min="1" max="489600" />
254            <Limit name="bitrate" range="1-2000000" />
255            <Feature name="adaptive-playback" />
256            <Limit name="concurrent-instances" max="16" />
257            <Limit name="performance-point-864x480" value="30" />
258            <Limit name="performance-point-720x576" value="25" />
259            <Limit name="performance-point-720x480" value="30" />
260        </MediaCodec>
261        <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" >
262            <Quirk name="requires-allocate-on-input-ports" />
263            <Quirk name="requires-allocate-on-output-ports" />
264            <Limit name="size" min="64x64" max="4096x4096" />
265            <Limit name="alignment" value="2x2" />
266            <Limit name="block-size" value="16x16" />
267            <Limit name="block-count" range="1-32768" /> <!-- max 4096x2048 -->
268            <Limit name="blocks-per-second" min="1" max="979200" />
269            <Limit name="bitrate" range="1-20000000" />
270            <Feature name="adaptive-playback" />
271            <Limit name="concurrent-instances" max="16" />
272            <Limit name="performance-point-3840x2160" value="30" />
273            <Limit name="performance-point-1920x1080" value="120" />
274            <Limit name="performance-point-1280x720" value="240" />
275        </MediaCodec>
276        <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
277            <Quirk name="requires-allocate-on-input-ports" />
278            <Quirk name="requires-allocate-on-output-ports" />
279            <Limit name="size" min="64x64" max="4096x4096" />
280            <Limit name="alignment" value="2x2" />
281            <Limit name="block-size" value="16x16" />
282            <Limit name="block-count" range="1-32768" /> <!-- max 4096x2048 -->
283            <Limit name="blocks-per-second" min="1" max="979200" />
284            <Limit name="bitrate" range="1-100000000" />
285            <Limit name="frame-rate" range="1-240" />
286            <Feature name="adaptive-playback" />
287            <Limit name="concurrent-instances" max="16" />
288            <Limit name="performance-point-3840x2160" value="30" />
289            <Limit name="performance-point-1920x1080" value="120" />
290            <Limit name="performance-point-1280x720" value="240" />
291        </MediaCodec>
292        <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
293            <Quirk name="requires-allocate-on-input-ports" />
294            <Quirk name="requires-allocate-on-output-ports" />
295            <Limit name="size" min="64x64" max="4096x4096" />
296            <Limit name="alignment" value="2x2" />
297            <Limit name="block-size" value="16x16" />
298            <Limit name="block-count" range="1-32768" /> <!-- max 4096x2048 -->
299            <Limit name="blocks-per-second" min="1" max="979200" />
300            <Limit name="bitrate" range="1-100000000" />
301            <Feature name="adaptive-playback" />
302            <Feature name="secure-playback" required="true" />
303            <Limit name="concurrent-instances" max="6" />
304            <Limit name="performance-point-3840x2160" value="30" />
305            <Limit name="performance-point-1920x1080" value="120" />
306            <Limit name="performance-point-1280x720" value="240" />
307        </MediaCodec>
308        <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
309            <Quirk name="requires-allocate-on-input-ports" />
310            <Quirk name="requires-allocate-on-output-ports" />
311            <Limit name="size" min="64x64" max="4096x4096" />
312            <Limit name="alignment" value="2x2" />
313            <Limit name="block-size" value="16x16" />
314            <Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
315            <Limit name="blocks-per-second" min="1" max="1958400" />
316            <Limit name="bitrate" range="1-100000000" />
317            <Feature name="adaptive-playback" />
318            <Limit name="concurrent-instances" max="16" />
319            <Limit name="performance-point-4096x2160" value="56" />
320            <Limit name="performance-point-3840x2160" value="60" />
321            <Limit name="performance-point-1920x1080" value="240" />
322        </MediaCodec>
323        <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
324            <Quirk name="requires-allocate-on-input-ports" />
325            <Quirk name="requires-allocate-on-output-ports" />
326            <Limit name="size" min="64x64" max="4096x4096" />
327            <Limit name="alignment" value="2x2" />
328            <Limit name="block-size" value="16x16" />
329            <Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
330            <Limit name="blocks-per-second" min="1" max="1958400" />
331            <Limit name="bitrate" range="1-100000000" />
332            <Feature name="adaptive-playback" />
333            <Feature name="secure-playback" required="true" />
334            <Limit name="concurrent-instances" max="6" />
335            <Limit name="performance-point-4096x2160" value="56" />
336            <Limit name="performance-point-3840x2160" value="60" />
337            <Limit name="performance-point-1920x1080" value="240" />
338        </MediaCodec>
339    </Decoders>
340    <Include href="media_codecs_google_video.xml" />
341</MediaCodecs>
342