<?xml version="1.0" encoding="utf-8" ?>
<!--
    Copyright (c) 2019-2020 Qualcomm Technologies, Inc.
    All Rights Reserved.
    Confidential and Proprietary - Qualcomm Technologies, Inc.

    Not a Contribution.

    Copyright (C) 2012-2018 The Linux Foundation. All rights reserved.
    Copyright (C) 2012-2013 The Android Open Source Project

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<!--
 7250 Non-Secure decoder capabilities
 _________________________________________________________
 | Codec       | W       H       fps     Mbps    MB/s    |
 |_____________|_________________________________________|
 | h264        | 4096    2160    60      120     2073600 |
 |             | (4096)  (2304)  (30)    (120)           |
 | hevc        | 4096    2160    60      120     2073600 |
 |             | (4096)  (2304)  (30)    (120)           |
 | vp8         | 4096    2160    30      120     1036800 |
 |             | (4096)  (2304)  (24)    (120)           |
 | vp9         | 4096    2160    60      120     2073600 |
 |             | (4096)  (2304)  (30)    (120)           |
 |_____________|_________________________________________|

 7250 Secure decoder capabilities
 ______________________________________________________
 | Codec    | W       H       fps     Mbps    MB/s    |
 |__________|_________________________________________|
 | h264     | 4096    2160    60      40      2073600 |
 |          | (4096)  (2304)  (30)    (40)            |
 | vp9      | 4096    2160    60      40      2073600 |
 |          | (4096)  (2304)  (30)    (40)            |
 | hevc     | 4096    2160    60      40      2073600 |
 |          | (4096)  (2304)  (30)    (40)            |
 |__________|_________________________________________|

 7250 Non-Secure encoder capabilities (Secure not supported)
 ______________________________________________________
 | Codec    | W       H       fps     Mbps    MB/s    |
 |__________|_________________________________________|
 | h264     | 4096    2160    60      120     2073600 |
 |          | (4096)  (2304)  (30)    (120)           |
 | hevc     | 4096    2160    60      120     2073600 |
 |          | (4096)  (2304)  (30)    (120)           |
 | vp8      | 4096    2160    30      120     1036800 |
 |          | (4096)  (2304)  (24)    (120)           |
 |__________|_________________________________________|
-->

<Included>
    <Decoders>
        <!-- C2 decoders -->
        <MediaCodec name="c2.qti.avc.decoder" type="video/avc">
            <Alias name="OMX.qcom.video.decoder.avc" />
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" range="64-1958400" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-4096x2160" value="24" />
            <Limit name="performance-point-3840x2160" value="30" />
            <Limit name="performance-point-1920x1080" value="120" />
            <Limit name="performance-point-1280x720" value="240" />
            <Feature name="adaptive-playback" />
            <Feature name="can-swap-width-height" value="1" />
        </MediaCodec>
        <MediaCodec name="c2.qti.avc.decoder.low_latency" type="video/avc">
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" range="64-1958400" />
            <Limit name="bitrate" range="1-60000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="performance-point-4096x2160" value="24" />
            <Limit name="performance-point-3840x2160" value="30" />
            <Limit name="performance-point-1920x1080" value="120" />
            <Limit name="performance-point-1280x720" value="240" />
            <Feature name="adaptive-playback" />
            <Feature name="low-latency" />
            <Feature name="can-swap-width-height" value="1" />
            <Limit name="concurrent-instances" max="16" />
        </MediaCodec>
        <MediaCodec name="c2.qti.avc.decoder.secure" type="video/avc" >
            <Alias name="OMX.qcom.video.decoder.avc.secure" />
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="1958400" />
            <Limit name="bitrate" range="1-40000000" />
            <Limit name="frame-rate" range="1-240" />
            <Limit name="performance-point-4096x2160" value="24" />
            <Limit name="performance-point-3840x2160" value="30" />
            <Limit name="performance-point-1920x1080" value="60" />
            <Feature name="adaptive-playback" />
            <Feature name="secure-playback" required="true" />
            <Feature name="can-swap-width-height" value="1" />
            <Limit name="concurrent-instances" max="4" />
        </MediaCodec>
        <MediaCodec name="c2.qti.hevc.decoder" type="video/hevc" >
            <Alias name="OMX.qcom.video.decoder.hevc" />
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="64" max="1958400" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="performance-point-4096x2160" value="24" />
            <Limit name="performance-point-3840x2160" value="30" />
            <Limit name="performance-point-1920x1080" value="120" />
            <Limit name="performance-point-1280x720" value="240" />
            <Feature name="adaptive-playback" />
            <Feature name="can-swap-width-height" value="1" />
            <Limit name="concurrent-instances" max="16" />
        </MediaCodec>
        <MediaCodec name="c2.qti.hevc.decoder.low_latency" type="video/hevc" >
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="64" max="1958400" />
            <Limit name="bitrate" range="1-60000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="performance-point-4096x2160" value="24" />
            <Limit name="performance-point-3840x2160" value="30" />
            <Limit name="performance-point-1920x1080" value="120" />
            <Limit name="performance-point-1280x720" value="240" />
            <Feature name="adaptive-playback" />
            <Feature name="low-latency" />
            <Feature name="can-swap-width-height" value="1" />
            <Limit name="concurrent-instances" max="16" />
        </MediaCodec>
        <MediaCodec name="c2.qti.hevc.decoder.secure" type="video/hevc" >
            <Alias name="OMX.qcom.video.decoder.hevc.secure" />
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="24" max="2073600" />
            <Limit name="bitrate" range="1-40000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="performance-point-4096x2160" value="24" />
            <Limit name="performance-point-3840x2160" value="30" />
            <Limit name="performance-point-1920x1080" value="60" />
            <Feature name="adaptive-playback" />
            <Feature name="secure-playback" required="true" />
            <Feature name="can-swap-width-height" value="1" />
            <Limit name="concurrent-instances" max="4" />
        </MediaCodec>
        <MediaCodec name="c2.qti.vp8.decoder" type="video/x-vnd.on2.vp8" >
            <Alias name="OMX.qcom.video.decoder.vp8" />
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="64" max="1036800" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-240" />
            <Limit name="performance-point-4096x2160" value="24" />
            <Limit name="performance-point-3840x2160" value="30" />
            <Limit name="performance-point-1920x1080" value="60" />
            <Limit name="performance-point-1280x720" value="120" />
            <Feature name="adaptive-playback" />
            <Feature name="can-swap-width-height" value="1" />
            <Limit name="concurrent-instances" max="16" />
        </MediaCodec>
        <MediaCodec name="c2.qti.vp9.decoder" type="video/x-vnd.on2.vp9" >
            <Alias name="OMX.qcom.video.decoder.vp9" />
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="64" max="1958400" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="performance-point-4096x2304" value="24" />
            <Limit name="performance-point-3840x2160" value="30" />
            <Limit name="performance-point-1920x1080" value="120" />
            <Limit name="performance-point-1280x720" value="240" />
            <Feature name="adaptive-playback" />
            <Feature name="can-swap-width-height" value="1" />
            <Limit name="concurrent-instances" max="6" />
        </MediaCodec>
        <MediaCodec name="c2.qti.vp9.decoder.secure" type="video/x-vnd.on2.vp9" >
            <Limit name="size" min="96x96" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="24" max="2073600" />
            <Limit name="bitrate" range="1-40000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="performance-point-4096x2304" value="24" />
            <Limit name="performance-point-3840x2160" value="30" />
            <Limit name="performance-point-1920x1080" value="60" />
            <Feature name="adaptive-playback" />
            <Feature name="secure-playback" required="true" />
            <Feature name="can-swap-width-height" value="1" />
            <Limit name="concurrent-instances" max="4" />
        </MediaCodec>
    </Decoders>

    <Encoders>
        <!-- C2 encoders -->
        <MediaCodec name="c2.qti.avc.encoder" type="video/avc">
            <Alias name="OMX.qcom.video.encoder.avc" />
            <Limit name="size" min="128x128" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="64" max="1958400" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-4096x2160" value="24" />
            <Limit name="performance-point-3840x2160" value="30" />
            <Limit name="performance-point-1920x1080" value="120" />
            <Limit name="performance-point-1280x720" value="240" />
            <Feature name="bitrate-modes" value="VBR,CBR" />
            <!-- Video Quality control -->
                    <!-- QP supported using vendor extensions -->
            <Feature name="qp-bounds" />
            <Feature name="can-swap-width-height" value="1" />
            <Mapping kind="vq" name="video-qp-b-max" value="vendor.qti-ext-enc-qp-range.qp-b-max" />
            <Mapping kind="vq" name="video-qp-b-min" value="vendor.qti-ext-enc-qp-range.qp-b-min" />
            <Mapping kind="vq" name="video-qp-i-max" value="vendor.qti-ext-enc-qp-range.qp-i-max" />
            <Mapping kind="vq" name="video-qp-i-min" value="vendor.qti-ext-enc-qp-range.qp-i-min" />
            <Mapping kind="vq" name="video-qp-p-max" value="vendor.qti-ext-enc-qp-range.qp-p-max" />
            <Mapping kind="vq" name="video-qp-p-min" value="vendor.qti-ext-enc-qp-range.qp-p-min" />
        </MediaCodec>
        <MediaCodec name="c2.qti.hevc.encoder" type="video/hevc">
            <Alias name="OMX.qcom.video.encoder.hevc" />
            <Limit name="size" min="128x128" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="64" max="1958400" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="quality" range="0-100" default="80" />
            <Limit name="performance-point-4096x2160" value="24" />
            <Limit name="performance-point-3840x2160" value="30" />
            <Limit name="performance-point-1920x1080" value="120" />
            <Limit name="performance-point-1280x720" value="240" />
            <Feature name="bitrate-modes" value="VBR,CBR,CQ" />
            <Feature name="can-swap-width-height" value="1" />
        </MediaCodec>
        <MediaCodec name="c2.qti.hevc.encoder.cq" type="video/hevc">
            <Limit name="size" min="512x512" max="512x512" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="24" max="2073600" />
            <Limit name="bitrate" range="1-160000000" />
            <Limit name="frame-rate" range="1-20" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="quality" range="0-100" default="80" />
            <Limit name="performance-point-512x512" value="480" />
            <Feature name="bitrate-modes" value="CQ" />
        </MediaCodec>
        <MediaCodec name="c2.qti.heic.encoder" type="image/vnd.android.heic">
            <Limit name="size" min="512x512" max="4096x2160" />
            <Limit name="block-count" range="1024-138240" /> <!--max-spatial: 8192x4320 -->
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="24" max="2073600" />
            <Limit name="frame-rate" range="1-20" />
            <Limit name="concurrent-instances" max="6" />
            <Limit name="quality" range="0-100" default="80" />
            <Limit name="performance-point-4096x2160" value="12" />
            <Limit name="performance-point-1920x1080" value="40" />
            <Limit name="performance-point-1920x1080" value="30" />
            <Limit name="performance-point-1280x720" value="80" />
            <Limit name="performance-point-1280x720" value="60" />
            <Limit name="performance-point-720x480" value="240" />
            <Feature name="bitrate-modes" value="CQ" />
            <Feature name="can-swap-width-height" value="1" />
        </MediaCodec>
        <MediaCodec name="c2.qti.vp8.encoder" type="video/x-vnd.on2.vp8">
            <Alias name="OMX.qcom.video.encoder.vp8" />
            <Limit name="size" min="128x128" max="4096x2176" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="64" max="1958400" />
            <Limit name="bitrate" range="1-100000000" />
            <Limit name="frame-rate" range="1-480" />
            <Limit name="concurrent-instances" max="16" />
            <Limit name="performance-point-4096x2160" value="24" />
            <Limit name="performance-point-3840x2160" value="30" />
            <Limit name="performance-point-1920x1080" value="60" />
            <Limit name="performance-point-1280x720" value="120" />
            <Feature name="bitrate-modes" value="VBR,CBR" />
            <Feature name="can-swap-width-height" value="1" />
        </MediaCodec>
    </Encoders>
</Included>
