• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2012-2020 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 | h263-sw     | 864     480     30      16        48600 |
95 | mpeg2       | 1920    1088    30      40       244800 |
96 |_____________|_________________________________________|
97
98 SM6150 Secure decoder capabilities
99 ______________________________________________________
100 | Codec    | W       H       fps     Mbps    MB/s    |
101 |__________|_________________________________________|
102 | h264     | 3840    2160    30      35       972000 |
103 | vp9      | 3840    2160    30      35       972000 |
104 | hevc     | 3840    2160    30      35       972000 |
105 | mpeg2    | 1920    1088    30      35       244800 |
106 |__________|_________________________________________|
107
108 SM6150 Non-Secure encoder capabilities (Secure not supported)
109 ______________________________________________________
110 | Codec    | W       H       fps     Mbps    MB/s    |
111 |__________|_________________________________________|
112 | h264     | 4096    2160    24      100     829440  |
113 | hevc     | 4096    2160    24      100     829440  |
114 | mpeg4-sw | 1280     720    30      4       108000  |
115 | vp8      | 3840    2160    30      100     972000  |
116 | h263-sw  | 864     480     30      2       48600   |
117 |__________|_________________________________________|
118-->
119
120<MediaCodecs>
121    <Include href="media_codecs_google_audio.xml" />
122    <Include href="media_codecs_vendor_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="36" 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            <Limit name="performance-point-4096x2160" value="24" />
141            <Limit name="performance-point-3840x2160" value="30" />
142            <Limit name="performance-point-1920x1080" value="120" />
143            <Limit name="performance-point-1280x720" value="240" />
144        </MediaCodec>
145        <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" >
146            <Quirk name="requires-allocate-on-input-ports" />
147            <Quirk name="requires-allocate-on-output-ports" />
148            <Quirk name="requires-loaded-to-idle-after-allocation" />
149            <Limit name="size" min="96x96" max="3840x2160" />
150            <Limit name="alignment" value="2x2" />
151            <Limit name="block-size" value="16x16" />
152            <Limit name="blocks-per-second" min="36" max="979200" />
153            <Limit name="bitrate" range="1-120000000" />
154            <Limit name="frame-rate" range="1-240" />
155            <Limit name="concurrent-instances" max="16" />
156            <Limit name="performance-point-3840x2160" value="30" />
157        </MediaCodec>
158        <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
159            <Quirk name="requires-allocate-on-input-ports" />
160            <Quirk name="requires-allocate-on-output-ports" />
161            <Quirk name="requires-loaded-to-idle-after-allocation" />
162            <Limit name="size" min="96x96" max="4096x2160" />
163            <Limit name="alignment" value="2x2" />
164            <Limit name="block-size" value="16x16" />
165            <Limit name="blocks-per-second" min="36" max="979200" />
166            <Limit name="bitrate" range="1-100000000" />
167            <Limit name="frame-rate" range="1-240" />
168            <Limit name="concurrent-instances" max="16" />
169            <Limit name="quality" range="0-100" default="80" />
170            <Limit name="performance-point-4096x2160" value="24" />
171            <Limit name="performance-point-3840x2160" value="30" />
172            <Limit name="performance-point-1920x1080" value="120" />
173            <Limit name="performance-point-1280x720" value="240" />
174            <Feature name="bitrate-modes" value="VBR,CBR" />
175        </MediaCodec>
176        <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" >
177            <Quirk name="requires-allocate-on-input-ports" />
178            <Quirk name="requires-allocate-on-output-ports" />
179            <Quirk name="requires-loaded-to-idle-after-allocation" />
180            <Limit name="size" min="512x512" max="512x512" />
181            <Limit name="frame-rate" range="1-20" />
182            <Limit name="concurrent-instances" max="16" />
183            <Limit name="quality" range="0-100" default="80" />
184            <Limit name="performance-point-4096x2304" value="24" />
185            <Limit name="performance-point-3840x2160" value="30" />
186            <Limit name="performance-point-1920x1080" value="120" />
187            <Limit name="performance-point-1280x720" value="240" />
188            <Feature name="bitrate-modes" value="CQ" />
189        </MediaCodec>
190        <MediaCodec name="OMX.qcom.video.encoder.heic" type="image/vnd.android.heic" >
191            <Quirk name="requires-allocate-on-input-ports" />
192            <Quirk name="requires-allocate-on-output-ports" />
193            <Quirk name="requires-loaded-to-idle-after-allocation" />
194            <Limit name="size" min="512x512" max="8192x8192" />
195            <Limit name="frame-rate" range="1-20" />
196            <Limit name="concurrent-instances" max="6" />
197            <Limit name="quality" range="0-100" default="80" />
198            <Feature name="bitrate-modes" value="CQ" />
199            <Limit name="performance-point-8192x4320" value="3" />
200            <Limit name="performance-point-1920x1080" value="6" />
201        </MediaCodec>
202        <!-- Video Software -->
203        <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
204            <Quirk name="requires-allocate-on-input-ports" />
205            <Quirk name="requires-allocate-on-output-ports" />
206            <Quirk name="requires-loaded-to-idle-after-allocation" />
207            <Limit name="size" min="96x96" max="864x480" />
208            <Limit name="alignment" value="4x4" />
209            <Limit name="block-size" value="16x16" />
210            <Limit name="blocks-per-second" min="36" max="48600" />
211            <Limit name="bitrate" range="1-2000000" />
212            <Limit name="frame-rate" range="1-30" />
213            <Limit name="concurrent-instances" max="16" />
214            <Limit name="performance-point-720x480" value="30" />
215            <Limit name="performance-point-720x576" value="25" />
216        </MediaCodec>
217        <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
218             <Quirk name="requires-allocate-on-input-ports" />
219             <Quirk name="requires-allocate-on-output-ports" />
220             <Quirk name="requires-loaded-to-idle-after-allocation" />
221             <Limit name="size" min="96x96" max="864x480" />
222             <Limit name="alignment" value="2x2" />
223             <Limit name="block-size" value="16x16" />
224             <Limit name="blocks-per-second" min="36" max="48600" />
225             <Limit name="bitrate" range="1-8000000" />
226             <Limit name="frame-rate" range="1-30" />
227             <Limit name="concurrent-instances" max="16" />
228             <Limit name="performance-point-720x480" value="30" />
229             <Limit name="performance-point-720x576" value="25" />
230        </MediaCodec>
231    </Encoders>
232    <Decoders>
233       <!-- Video Hardware  -->
234        <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
235            <Quirk name="requires-allocate-on-input-ports" />
236            <Quirk name="requires-allocate-on-output-ports" />
237            <Limit name="size" min="96x96" max="4096x2160" />
238            <Limit name="alignment" value="2x2" />
239            <Limit name="block-size" value="16x16" />
240            <Limit name="blocks-per-second" min="36" max="979200" />
241            <Limit name="bitrate" range="1-100000000" />
242            <Limit name="frame-rate" range="1-240" />
243            <Feature name="adaptive-playback" />
244            <Limit name="concurrent-instances" max="16" />
245            <Limit name="performance-point-4096x2160" value="24" />
246            <Limit name="performance-point-3840x2160" value="30" />
247            <Limit name="performance-point-1920x1080" value="120" />
248            <Limit name="performance-point-1280x720" value="240" />
249        </MediaCodec>
250        <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
251            <Quirk name="requires-allocate-on-input-ports" />
252            <Quirk name="requires-allocate-on-output-ports" />
253            <Limit name="size" min="96x96" max="3840x2160" />
254            <Limit name="alignment" value="2x2" />
255            <Limit name="block-size" value="16x16" />
256            <Limit name="blocks-per-second" min="36" max="972000" />
257            <Limit name="bitrate" range="1-35000000" />
258            <Limit name="frame-rate" range="1-30" />
259            <Feature name="adaptive-playback" />
260            <Feature name="secure-playback" required="true" />
261            <Limit name="concurrent-instances" max="3" />
262            <Limit name="performance-point-3840x2160" value="30" />
263        </MediaCodec>
264        <MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" >
265            <Quirk name="requires-allocate-on-input-ports" />
266            <Quirk name="requires-allocate-on-output-ports" />
267            <Limit name="size" min="96x96" max="1920x1088" />
268            <Limit name="alignment" value="2x2" />
269            <Limit name="block-size" value="16x16" />
270            <Limit name="blocks-per-second" min="36" max="244800" />
271            <Limit name="bitrate" range="1-40000000" />
272            <Limit name="frame-rate" range="1-30" />
273            <Feature name="adaptive-playback" />
274            <Limit name="concurrent-instances" max="16" />
275            <Limit name="performance-point-1920x1080" value="30" />
276        </MediaCodec>
277        <MediaCodec name="OMX.qcom.video.decoder.mpeg2.secure" type="video/mpeg2" >
278            <Quirk name="requires-allocate-on-input-ports" />
279            <Quirk name="requires-allocate-on-output-ports" />
280            <Limit name="size" min="96x96" max="1920x1088" />
281            <Limit name="alignment" value="2x2" />
282            <Limit name="block-size" value="16x16" />
283            <Limit name="blocks-per-second" min="36" max="244800" />
284            <Limit name="bitrate" range="1-35000000" />
285            <Limit name="frame-rate" range="1-30" />
286            <Feature name="adaptive-playback" />
287            <Feature name="secure-playback" required="true" />
288            <Limit name="concurrent-instances" max="3" />
289            <Limit name="performance-point-1920x1080" value="30" />
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="3840x2160" />
295            <Limit name="alignment" value="2x2" />
296            <Limit name="block-size" value="16x16" />
297            <Limit name="blocks-per-second" min="36" max="979200" />
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            <Limit name="performance-point-3840x2160" value="30" />
303            <Limit name="performance-point-1920x1080" value="60" />
304            <Limit name="performance-point-1280x720" value="120" />
305        </MediaCodec>
306        <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
307            <Quirk name="requires-allocate-on-input-ports" />
308            <Quirk name="requires-allocate-on-output-ports" />
309            <Limit name="size" min="96x96" max="4096x2160" />
310            <Limit name="alignment" value="2x2" />
311            <Limit name="block-size" value="16x16" />
312            <Limit name="blocks-per-second" min="36" max="979200" />
313            <Limit name="bitrate" range="1-120000000" />
314            <Limit name="frame-rate" range="1-240" />
315            <Feature name="adaptive-playback" />
316            <Limit name="concurrent-instances" max="6" />
317            <Limit name="performance-point-4096x2160" value="24" />
318            <Limit name="performance-point-3840x2160" value="30" />
319            <Limit name="performance-point-1920x1080" value="120" />
320            <Limit name="performance-point-1280x720" value="240" />
321        </MediaCodec>
322        <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
323            <Quirk name="requires-allocate-on-input-ports" />
324            <Quirk name="requires-allocate-on-output-ports" />
325            <Limit name="size" min="96x96" max="3840x2160" />
326            <Limit name="alignment" value="2x2" />
327            <Limit name="block-size" value="16x16" />
328            <Limit name="blocks-per-second" min="36" max="972000" />
329            <Limit name="bitrate" range="1-35000000" />
330            <Limit name="frame-rate" range="1-30" />
331            <Feature name="adaptive-playback" />
332            <Feature name="secure-playback" required="true" />
333            <Limit name="concurrent-instances" max="3" />
334            <Limit name="performance-point-3840x2160" value="30" />
335        </MediaCodec>
336        <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
337            <Quirk name="requires-allocate-on-input-ports" />
338            <Quirk name="requires-allocate-on-output-ports" />
339            <Limit name="size" min="96x96" max="4096x2160" />
340            <Limit name="alignment" value="2x2" />
341            <Limit name="block-size" value="16x16" />
342            <Limit name="blocks-per-second" min="36" max="979200" />
343            <Limit name="bitrate" range="1-100000000" />
344            <Limit name="frame-rate" range="1-240" />
345            <Feature name="adaptive-playback" />
346            <Limit name="concurrent-instances" max="16" />
347            <Limit name="performance-point-4096x2160" value="24" />
348            <Limit name="performance-point-3840x2160" value="30" />
349            <Limit name="performance-point-1920x1080" value="120" />
350            <Limit name="performance-point-1280x720" value="240" />
351        </MediaCodec>
352        <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
353            <Quirk name="requires-allocate-on-input-ports" />
354            <Quirk name="requires-allocate-on-output-ports" />
355            <Limit name="size" min="96x96" max="3840x2160" />
356            <Limit name="alignment" value="2x2" />
357            <Limit name="block-size" value="16x16" />
358            <Limit name="blocks-per-second" min="36" max="972000" />
359            <Limit name="bitrate" range="1-35000000" />
360            <Limit name="frame-rate" range="1-30" />
361            <Feature name="adaptive-playback" />
362            <Feature name="secure-playback" required="true" />
363            <Limit name="concurrent-instances" max="3" />
364            <Limit name="performance-point-3840x2160" value="30" />
365        </MediaCodec>
366        <!-- Video Software -->
367        <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
368             <Quirk name="requires-allocate-on-input-ports" />
369             <Quirk name="requires-allocate-on-output-ports" />
370             <Limit name="size" min="96x96" max="864x480" />
371             <Limit name="alignment" value="4x4" />
372             <Limit name="block-size" value="16x16" />
373             <Limit name="blocks-per-second" min="36" max="48600" />
374             <Limit name="bitrate" range="1-16000000" />
375             <Limit name="frame-rate" range="1-30" />
376             <Feature name="adaptive-playback" />
377             <Limit name="concurrent-instances" max="16" />
378             <Limit name="performance-point-720x480" value="30" />
379             <Limit name="performance-point-720x576" value="25" />
380        </MediaCodec>
381        <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
382             <Quirk name="requires-allocate-on-input-ports" />
383             <Quirk name="requires-allocate-on-output-ports" />
384             <Limit name="size" min="96x96" max="1920x1088" />
385             <Limit name="alignment" value="2x2" />
386             <Limit name="block-size" value="16x16" />
387             <Limit name="blocks-per-second" min="36" max="244800" />
388             <Limit name="bitrate" range="1-40000000" />
389             <Limit name="frame-rate" range="1-30" />
390             <Limit name="concurrent-instances" max="16" />
391             <Limit name="performance-point-1920x1080" value="30" />
392        </MediaCodec>
393    </Decoders>
394    <Include href="media_codecs_google_video.xml" />
395</MediaCodecs>
396