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