1<?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     Licensed under the Apache License, Version 2.0 (the "License");
6     you may not use this file except in compliance with the License.
7     You may obtain a copy of the License at
8          http://www.apache.org/licenses/LICENSE-2.0
9     Unless required by applicable law or agreed to in writing, software
10     distributed under the License is distributed on an "AS IS" BASIS,
11     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12     See the License for the specific language governing permissions and
13     limitations under the License.
14-->
15<!--
16<!DOCTYPE MediaCodecs [
17<!ELEMENT Include EMPTY>
18<!ATTLIST Include href CDATA #REQUIRED>
19<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
20<!ELEMENT Decoders (MediaCodec|Include)*>
21<!ELEMENT Encoders (MediaCodec|Include)*>
22<!ELEMENT MediaCodec (Type|Quirk|Include)*>
23<!ATTLIST MediaCodec name CDATA #REQUIRED>
24<!ATTLIST MediaCodec type CDATA>
25<!ELEMENT Type EMPTY>
26<!ATTLIST Type name CDATA #REQUIRED>
27<!ELEMENT Quirk EMPTY>
28<!ATTLIST Quirk name CDATA #REQUIRED>
29]>
30There's a simple and a complex syntax to declare the availability of a
31media codec:
32A codec that properly follows the OpenMax spec and therefore doesn't have any
33quirks and that only supports a single content type can be declared like so:
34    <MediaCodec name="OMX.foo.bar" type="something/interesting" />
35If a codec has quirks OR supports multiple content types, the following syntax
36can be used:
37    <MediaCodec name="OMX.foo.bar" >
38        <Type name="something/interesting" />
39        <Type name="something/else" />
40        ...
41        <Quirk name="requires-allocate-on-input-ports" />
42        <Quirk name="requires-allocate-on-output-ports" />
43        <Quirk name="output-buffers-are-unreadable" />
44    </MediaCodec>
45Only the three quirks included above are recognized at this point:
46"requires-allocate-on-input-ports"
47    must be advertised if the component does not properly support specification
48    of input buffers using the OMX_UseBuffer(...) API but instead requires
49    OMX_AllocateBuffer to be used.
50"requires-allocate-on-output-ports"
51    must be advertised if the component does not properly support specification
52    of output buffers using the OMX_UseBuffer(...) API but instead requires
53    OMX_AllocateBuffer to be used.
54"output-buffers-are-unreadable"
55    must be advertised if the emitted output buffers of a decoder component
56    are not readable, i.e. use a custom format even though abusing one of
57    the official OMX colorspace constants.
58    Clients of such decoders will not be able to access the decoded data,
59    naturally making the component much less useful. The only use for
60    a component with this quirk is to render the output to the screen.
61    Audio decoders MUST NOT advertise this quirk.
62    Video decoders that advertise this quirk must be accompanied by a
63    corresponding color space converter for thumbnail extraction,
64    matching surfaceflinger support that can render the custom format to
65    a texture and possibly other code, so just DON'T USE THIS QUIRK.
66-->
67<!--
68 SM6150 Non-Secure decoder capabilities
69 _________________________________________________________
70 | Codec       | W       H       fps     Mbps    MB/s    |
71 |_____________|_________________________________________|
72 | h264        | 4096    2160    24      100      829440 |
73 | hevc        | 4096    2160    24      100      829440 |
74 | vp8         | 3840    2160    30      100      972000 |
75 | vp9         | 4096    2160    24      100      829440 |
76 |_____________|_________________________________________|
77 SM6150 Secure decoder capabilities
78 ______________________________________________________
79 | Codec    | W       H       fps     Mbps    MB/s    |
80 |__________|_________________________________________|
81 | h264     | 3840    2160    30      35       972000 |
82 | vp9      | 3840    2160    30      35       972000 |
83 | hevc     | 3840    2160    30      35       972000 |
84 |__________|_________________________________________|
85 SM6150 Non-Secure encoder capabilities (Secure not supported)
86 ______________________________________________________
87 | Codec    | W       H       fps     Mbps    MB/s    |
88 |__________|_________________________________________|
89 | h264     | 4096    2160    24      100     829440  |
90 | hevc     | 4096    2160    24      100     829440  |
91 | vp8      | 3840    2160    30      100     972000  |
92 |__________|_________________________________________|
93-->
94<MediaCodecs>
95    <Include href="media_codecs_google_audio.xml" />
96    <Include href="media_codecs_google_telephony.xml" />
97    <Settings>
98        <Setting name="max-video-encoder-input-buffers" value="11" />
99    </Settings>
100    <Encoders>
101        <!-- Video Hardware  -->
102        <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
103            <Quirk name="requires-allocate-on-input-ports" />
104            <Quirk name="requires-allocate-on-output-ports" />
105            <Quirk name="requires-loaded-to-idle-after-allocation" />
106            <Limit name="size" min="96x96" max="4096x2160" />
107            <Limit name="alignment" value="2x2" />
108            <Limit name="block-size" value="16x16" />
109            <Limit name="blocks-per-second" min="36" max="979200" />
110            <Limit name="bitrate" range="1-100000000" />
111            <Limit name="frame-rate" range="1-240" />
112            <Limit name="concurrent-instances" max="16" />
113            <Limit name="performance-point-4096x2160" value="24" />
114            <Limit name="performance-point-3840x2160" value="30" />
115            <Limit name="performance-point-1920x1080" value="120" />
116            <Limit name="performance-point-1280x720" value="240" />
117        </MediaCodec>
118        <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" >
119            <Quirk name="requires-allocate-on-input-ports" />
120            <Quirk name="requires-allocate-on-output-ports" />
121            <Quirk name="requires-loaded-to-idle-after-allocation" />
122            <Limit name="size" min="96x96" max="3840x2160" />
123            <Limit name="alignment" value="2x2" />
124            <Limit name="block-size" value="16x16" />
125            <Limit name="blocks-per-second" min="36" max="979200" />
126            <Limit name="bitrate" range="1-120000000" />
127            <Limit name="frame-rate" range="1-240" />
128            <Limit name="concurrent-instances" max="16" />
129            <Limit name="performance-point-3840x2160" value="30" />
130        </MediaCodec>
131        <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
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="96x96" max="4096x2160" />
136            <Limit name="alignment" value="2x2" />
137            <Limit name="block-size" value="16x16" />
138            <Limit name="blocks-per-second" min="36" max="979200" />
139            <Limit name="bitrate" range="1-100000000" />
140            <Limit name="frame-rate" range="1-240" />
141            <Limit name="concurrent-instances" max="16" />
142            <Limit name="quality" range="0-100" default="80" />
143            <Limit name="performance-point-4096x2160" value="24" />
144            <Limit name="performance-point-3840x2160" value="30" />
145            <Limit name="performance-point-1920x1080" value="120" />
146            <Limit name="performance-point-1280x720" value="240" />
147            <Feature name="bitrate-modes" value="VBR,CBR" />
148        </MediaCodec>
149    </Encoders>
150    <Decoders>
151       <!-- Video Hardware  -->
152        <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
153            <Quirk name="requires-allocate-on-input-ports" />
154            <Quirk name="requires-allocate-on-output-ports" />
155            <Limit name="size" min="96x96" max="4096x2160" />
156            <Limit name="alignment" value="2x2" />
157            <Limit name="block-size" value="16x16" />
158            <Limit name="blocks-per-second" min="36" max="979200" />
159            <Limit name="bitrate" range="1-100000000" />
160            <Limit name="frame-rate" range="1-240" />
161            <Feature name="adaptive-playback" />
162            <Limit name="concurrent-instances" max="16" />
163            <Limit name="performance-point-4096x2160" value="24" />
164            <Limit name="performance-point-3840x2160" value="30" />
165            <Limit name="performance-point-1920x1080" value="120" />
166            <Limit name="performance-point-1280x720" value="240" />
167        </MediaCodec>
168        <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
169            <Quirk name="requires-allocate-on-input-ports" />
170            <Quirk name="requires-allocate-on-output-ports" />
171            <Limit name="size" min="96x96" max="3840x2160" />
172            <Limit name="alignment" value="2x2" />
173            <Limit name="block-size" value="16x16" />
174            <Limit name="blocks-per-second" min="36" max="972000" />
175            <Limit name="bitrate" range="1-35000000" />
176            <Limit name="frame-rate" range="1-30" />
177            <Feature name="adaptive-playback" />
178            <Feature name="secure-playback" required="true" />
179            <Limit name="concurrent-instances" max="3" />
180            <Limit name="performance-point-3840x2160" value="30" />
181        </MediaCodec>
182        <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" >
183            <Quirk name="requires-allocate-on-input-ports" />
184            <Quirk name="requires-allocate-on-output-ports" />
185            <Limit name="size" min="96x96" max="3840x2160" />
186            <Limit name="alignment" value="2x2" />
187            <Limit name="block-size" value="16x16" />
188            <Limit name="blocks-per-second" min="36" max="979200" />
189            <Limit name="bitrate" range="1-100000000" />
190            <Limit name="frame-rate" range="1-240" />
191            <Feature name="adaptive-playback" />
192            <Limit name="concurrent-instances" max="16" />
193            <Limit name="performance-point-3840x2160" value="30" />
194            <Limit name="performance-point-1920x1080" value="60" />
195            <Limit name="performance-point-1280x720" value="120" />
196        </MediaCodec>
197        <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
198            <Quirk name="requires-allocate-on-input-ports" />
199            <Quirk name="requires-allocate-on-output-ports" />
200            <Limit name="size" min="96x96" max="4096x2160" />
201            <Limit name="alignment" value="2x2" />
202            <Limit name="block-size" value="16x16" />
203            <Limit name="blocks-per-second" min="36" max="979200" />
204            <Limit name="bitrate" range="1-120000000" />
205            <Limit name="frame-rate" range="1-240" />
206            <Feature name="adaptive-playback" />
207            <Limit name="concurrent-instances" max="6" />
208            <Limit name="performance-point-4096x2160" value="24" />
209            <Limit name="performance-point-3840x2160" value="30" />
210            <Limit name="performance-point-1920x1080" value="120" />
211            <Limit name="performance-point-1280x720" value="240" />
212        </MediaCodec>
213        <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
214            <Quirk name="requires-allocate-on-input-ports" />
215            <Quirk name="requires-allocate-on-output-ports" />
216            <Limit name="size" min="96x96" max="3840x2160" />
217            <Limit name="alignment" value="2x2" />
218            <Limit name="block-size" value="16x16" />
219            <Limit name="blocks-per-second" min="36" max="972000" />
220            <Limit name="bitrate" range="1-35000000" />
221            <Limit name="frame-rate" range="1-30" />
222            <Feature name="adaptive-playback" />
223            <Feature name="secure-playback" required="true" />
224            <Limit name="concurrent-instances" max="3" />
225            <Limit name="performance-point-3840x2160" value="30" />
226        </MediaCodec>
227        <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
228            <Quirk name="requires-allocate-on-input-ports" />
229            <Quirk name="requires-allocate-on-output-ports" />
230            <Limit name="size" min="96x96" max="4096x2160" />
231            <Limit name="alignment" value="2x2" />
232            <Limit name="block-size" value="16x16" />
233            <Limit name="blocks-per-second" min="36" max="979200" />
234            <Limit name="bitrate" range="1-100000000" />
235            <Limit name="frame-rate" range="1-240" />
236            <Feature name="adaptive-playback" />
237            <Limit name="concurrent-instances" max="16" />
238            <Limit name="performance-point-4096x2160" value="24" />
239            <Limit name="performance-point-3840x2160" value="30" />
240            <Limit name="performance-point-1920x1080" value="120" />
241            <Limit name="performance-point-1280x720" value="240" />
242        </MediaCodec>
243        <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
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="36" max="972000" />
250            <Limit name="bitrate" range="1-35000000" />
251            <Limit name="frame-rate" range="1-30" />
252            <Feature name="adaptive-playback" />
253            <Feature name="secure-playback" required="true" />
254            <Limit name="concurrent-instances" max="3" />
255            <Limit name="performance-point-3840x2160" value="30" />
256        </MediaCodec>
257    </Decoders>
258    <Include href="media_codecs_google_video.xml" />
259</MediaCodecs>
260