Snap for 8564071 from 06ba30253a3ff6812fbfecb4185ea35616852a1a to mainline-sdkext-release
Change-Id: I7a22edb71ca501d9367ec780c4d990f902a26ab9
diff --git a/Android.mk b/Android.mk
index a326b2d..da8656f 100644
--- a/Android.mk
+++ b/Android.mk
@@ -8,15 +8,16 @@
endif #TARGET_USES_QMAA
#Compile these for all targets under QCOM_BOARD_PLATFORMS list.
-ifeq ($(call is-board-platform-in-list, $(QCOM_BOARD_PLATFORMS)),true)
+ifneq (,$(call is-board-platform-in-list2, $(QCOM_BOARD_PLATFORMS)))
include $(QCOM_MEDIA_ROOT)/libstagefrighthw/Android.mk
include $(QCOM_MEDIA_ROOT)/mm-core/Android.mk
endif
-ifeq ($(call is-board-platform-in-list, $(MSM_VIDC_TARGET_LIST)),true)
+ifneq (,$(call is-board-platform-in-list2, $(MSM_VIDC_TARGET_LIST)))
ifeq ($(VIDC_STUB_HAL),false)
include $(QCOM_MEDIA_ROOT)/libplatformconfig/Android.mk
include $(QCOM_MEDIA_ROOT)/mm-video-v4l2/Android.mk
include $(QCOM_MEDIA_ROOT)/libc2dcolorconvert/Android.mk
+include $(QCOM_MEDIA_ROOT)/media-prop/Android.mk
endif #VIDC_STUB_HAL
endif
diff --git a/METADATA b/METADATA
new file mode 100644
index 0000000..d97975c
--- /dev/null
+++ b/METADATA
@@ -0,0 +1,3 @@
+third_party {
+ license_type: NOTICE
+}
diff --git a/conf_files/bengal/bengal.mk b/conf_files/bengal/bengal.mk
index 583366b..7df7706 100644
--- a/conf_files/bengal/bengal.mk
+++ b/conf_files/bengal/bengal.mk
@@ -4,13 +4,29 @@
PRODUCT_COPY_FILES += \
$(CONFIG_PATH)/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
$(CONFIG_PATH)/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
- $(CONFIG_PATH)/media_codecs_vendor.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor.xml \
$(CONFIG_PATH)/media_codecs_vendor_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_audio.xml \
- $(CONFIG_PATH)/media_codecs_vendor_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v1.xml \
$(CONFIG_PATH)/media_codecs_performance_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_v1.xml \
+ $(CONFIG_PATH)/media_codecs_performance_scuba_v0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_v2.xml \
+ $(CONFIG_PATH)/media_codecs_performance_khaje.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_v3.xml \
$(CONFIG_PATH)/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml \
+ $(CONFIG_PATH)/media_profiles_scuba.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_scuba.xml \
+ $(CONFIG_PATH)/media_profiles_khaje.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_khaje.xml \
$(CONFIG_PATH)/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
- $(CONFIG_PATH)/system_properties.xml:$(TARGET_COPY_OUT_VENDOR)/etc/system_properties.xml
+ $(CONFIG_PATH)/system_properties.xml:$(TARGET_COPY_OUT_VENDOR)/etc/system_properties.xml \
+ device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml
+
+ifneq ($(strip $(TARGET_BOARD_SUFFIX)),)
+ PRODUCT_COPY_FILES += \
+ $(CONFIG_PATH)/media_codecs_vendor_32.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor.xml \
+ $(CONFIG_PATH)/media_codecs_vendor_v1_32.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v1.xml \
+ $(CONFIG_PATH)/media_codecs_vendor_scuba_v0_32.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v2.xml
+else
+ PRODUCT_COPY_FILES += \
+ $(CONFIG_PATH)/media_codecs_vendor.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor.xml \
+ $(CONFIG_PATH)/media_codecs_vendor_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v1.xml \
+ $(CONFIG_PATH)/media_codecs_vendor_scuba_v0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v2.xml \
+ $(CONFIG_PATH)/media_codecs_vendor_khaje.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v3.xml
+endif
# Vendor property overrides
@@ -20,8 +36,6 @@
PRODUCT_ODM_PROPERTIES += debug.stagefright.ccodec=4
PRODUCT_ODM_PROPERTIES += debug.stagefright.omx_default_rank=1000
else
- $(warning "Enabling codec2.0 SW only for non-generic odm build variant")
- #Rank OMX SW codecs lower than OMX HW codecs
- PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank.sw-audio=1
+ $(warning "Enabling codec2.0 non-audio SW only for non-generic odm build variant")
PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank=0
endif
diff --git a/conf_files/bengal/media_codecs.xml b/conf_files/bengal/media_codecs.xml
index d489fc4..c082743 100644
--- a/conf_files/bengal/media_codecs.xml
+++ b/conf_files/bengal/media_codecs.xml
@@ -86,9 +86,9 @@
_______________________________________________________
| Codec | W H fps Mbps MB/s |
|_____________|_________________________________________|
- | h264 | 1920 1088 60 60 489600 |
- | hevc | 1920 1080 60 60 489600 |
- | vp9 | 1920 1088 60 60 489600 |
+ | h264 | 1920 1088 30 60 244800 |
+ | hevc | 1920 1080 30 60 244800 |
+ | vp9 | 1920 1088 30 60 244800 |
| mpeg4-sw | 1920 1088 30 40 244800 |
| h263-sw | 864 480 30 16 48600 |
|_____________|_________________________________________|
@@ -99,9 +99,9 @@
_____________________________________________________
| Codec | W H fps Mbps MB/s |
|__________|_________________________________________|
- | h264 | 1920 1088 60 35 489600 |
- | vp9 | 1920 1088 60 35 489600 |
- | hevc | 1920 1088 60 35 489600 |
+ | h264 | 1920 1088 30 35 244800 |
+ | vp9 | 1920 1088 30 35 244800 |
+ | hevc | 1920 1088 30 35 244800 |
|__________|_________________________________________|
@@ -133,10 +133,13 @@
<Limit name="size" min="128x128" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="489600" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
<Limit name="bitrate" range="1-60000000" />
<Limit name="frame-rate" range="1-120" />
<Limit name="concurrent-instances" max="16" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -145,12 +148,27 @@
<Limit name="size" min="128x128" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="489600" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
<Limit name="bitrate" range="1-60000000" />
<Limit name="frame-rate" range="1-120" />
<Limit name="concurrent-instances" max="16" />
<Limit name="quality" range="0-100" default="80" />
<Feature name="bitrate-modes" value="VBR,CBR" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="512x512" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-512x512" value="2025" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.heic" type="image/vnd.android.heic" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -162,6 +180,8 @@
<Limit name="concurrent-instances" max="6" />
<Limit name="quality" range="0-100" default="80" />
<Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-8192x4320" value="3" />
+ <Limit name="performance-point-1920x1080" value="6" />
</MediaCodec>
<!-- Video Software -->
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
@@ -174,7 +194,9 @@
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-2000000" />
<Limit name="frame-rate" range="1-30" />
- <Limit name="concurrent-instances" max="16" />
+ <Limit name="concurrent-instances" max="3" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-720x480" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -186,7 +208,9 @@
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-8000000" />
<Limit name="frame-rate" range="1-30" />
- <Limit name="concurrent-instances" max="16" />
+ <Limit name="concurrent-instances" max="3" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-720x480" value="30" />
</MediaCodec>
</Encoders>
<Decoders>
@@ -197,11 +221,15 @@
<Limit name="size" min="128x128" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="489600" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
<Limit name="bitrate" range="1-60000000" />
<Limit name="frame-rate" range="1-120" />
<Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -209,12 +237,14 @@
<Limit name="size" min="128x128" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="489600" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
<Limit name="bitrate" range="1-35000000" />
<Limit name="frame-rate" range="1-60" />
<Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
<Feature name="secure-playback" required="true" />
<Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -222,11 +252,15 @@
<Limit name="size" min="128x128" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="489600" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
<Limit name="bitrate" range="1-60000000" />
<Limit name="frame-rate" range="1-120" />
<Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="6" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -234,12 +268,14 @@
<Limit name="size" min="128x128" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="489600" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
<Limit name="bitrate" range="1-35000000" />
<Limit name="frame-rate" range="1-60" />
<Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
<Feature name="secure-playback" required="true" />
<Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -247,11 +283,15 @@
<Limit name="size" min="128x128" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="489600" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
<Limit name="bitrate" range="1-60000000" />
<Limit name="frame-rate" range="1-120" />
<Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -259,12 +299,14 @@
<Limit name="size" min="128x128" max="1920x1088" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="489600" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
<Limit name="bitrate" range="1-35000000" />
<Limit name="frame-rate" range="1-60" />
<Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
<Feature name="secure-playback" required="true" />
<Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
<!-- Video Software -->
<MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
@@ -277,7 +319,9 @@
<Limit name="bitrate" range="1-16000000" />
<Limit name="frame-rate" range="1-30" />
<Feature name="adaptive-playback" />
- <Limit name="concurrent-instances" max="16" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-720x480" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
<Quirk name="requires-allocate-on-input-ports" />
@@ -288,7 +332,9 @@
<Limit name="blocks-per-second" min="36" max="244800" />
<Limit name="bitrate" range="1-40000000" />
<Limit name="frame-rate" range="1-30" />
- <Limit name="concurrent-instances" max="16" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
</Decoders>
<Include href="media_codecs_google_video.xml" />
diff --git a/conf_files/bengal/media_codecs_performance.xml b/conf_files/bengal/media_codecs_performance.xml
index ff1ed77..3a03e15 100644
--- a/conf_files/bengal/media_codecs_performance.xml
+++ b/conf_files/bengal/media_codecs_performance.xml
@@ -34,6 +34,9 @@
<Limit name="measured-frame-rate-1920x1080" range="55-65" />
<Limit name="measured-frame-rate-3840x2160" range="20-27" />
</MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="226-226" />
+ </MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" update="true">
<Limit name="measured-frame-rate-176x144" range="60-90" />
<Limit name="measured-frame-rate-352x288" range="55-85" />
@@ -56,6 +59,31 @@
<MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="250-320" />
</MediaCodec>
+ <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="124-176" />
+ <Limit name="measured-frame-rate-720x480" range="53-76" />
+ <Limit name="measured-frame-rate-1280x720" range="35-50" />
+ <Limit name="measured-frame-rate-1920x1080" range="19-28" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="17-24" />
+ <Limit name="measured-frame-rate-720x480" range="7-10" />
+ <Limit name="measured-frame-rate-1280x720" range="3-6" />
+ <Limit name="measured-frame-rate-1920x1080" range="2-3" />
+ <Limit name="measured-frame-rate-3840x2160" range="1-2" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="130-175" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="119-168" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="85-119" />
+ <Limit name="measured-frame-rate-640x360" range="41-65" />
+ <Limit name="measured-frame-rate-1280x720" range="21-30" />
+ <Limit name="measured-frame-rate-1920x1080" range="10-15" />
+ </MediaCodec>
</Encoders>
<Decoders>
<MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
@@ -72,11 +100,11 @@
<Limit name="measured-frame-rate-3840x2160" range="65-75" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" update="true">
- <Limit name="measured-frame-rate-176x144" range="356-356" />
+ <Limit name="measured-frame-rate-176x144" range="864-1258" />
<Limit name="measured-frame-rate-352x288" range="292-292" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es" update="true">
- <Limit name="measured-frame-rate-176x144" range="270-295" />
+ <Limit name="measured-frame-rate-176x144" range="418-551" />
<Limit name="measured-frame-rate-480x360" range="245-265" />
<Limit name="measured-frame-rate-1280x720" range="80-200" />
</MediaCodec>
@@ -116,5 +144,36 @@
<Limit name="measured-frame-rate-1280x720" range="60-85" />
<Limit name="measured-frame-rate-1920x1080" range="33-55" />
</MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="63-165" />
+ <Limit name="measured-frame-rate-720x480" range="42-59" />
+ <Limit name="measured-frame-rate-1280x720" range="17-24" />
+ <Limit name="measured-frame-rate-1920x1080" range="8-12" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="67-232" />
+ <Limit name="measured-frame-rate-640x360" range="57-89" />
+ <Limit name="measured-frame-rate-720x480" range="69-99" />
+ <Limit name="measured-frame-rate-1280x720" range="35-51" />
+ <Limit name="measured-frame-rate-1920x1080" range="20-29" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="1374-1403" />
+ <Limit name="measured-frame-rate-352x288" range="310-415" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="406-543" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="160-480" />
+ <Limit name="measured-frame-rate-640x360" range="133-184" />
+ <Limit name="measured-frame-rate-1920x1080" range="15-22" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x180" range="182-360" />
+ <Limit name="measured-frame-rate-640x360" range="85-200" />
+ <Limit name="measured-frame-rate-1280x720" range="35-49" />
+ <Limit name="measured-frame-rate-1920x1080" range="23-33" />
+ </MediaCodec>
</Decoders>
</MediaCodecs>
diff --git a/conf_files/bengal/media_codecs_performance_khaje.xml b/conf_files/bengal/media_codecs_performance_khaje.xml
new file mode 100644
index 0000000..72ea25f
--- /dev/null
+++ b/conf_files/bengal/media_codecs_performance_khaje.xml
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+Copyright (c) 2015-2017, 2019-2021 The Linux Foundation. All rights reserved.
+
+Not a Contribution.
+
+Copyright 2015 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.
+u 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.
+-->
+
+<MediaCodecs>
+ <Encoders>
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="238-238" />
+ <Limit name="measured-frame-rate-720x480" range="123-123" />
+ <Limit name="measured-frame-rate-1280x720" range="50-50" />
+ <Limit name="measured-frame-rate-1920x1080" range="55-65" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="226-226" />
+ <Limit name="measured-frame-rate-720x480" range="121-121" />
+ <Limit name="measured-frame-rate-1280x720" range="49-49" />
+ <Limit name="measured-frame-rate-1920x1080" range="55-65" />
+ <Limit name="measured-frame-rate-3840x2160" range="20-27" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="226-226" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="60-90" />
+ <Limit name="measured-frame-rate-352x288" range="55-85" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="125-135" />
+ <Limit name="measured-frame-rate-352x288" range="55-85" />
+ <Limit name="measured-frame-rate-640x480" range="47-52" />
+ <Limit name="measured-frame-rate-1280x720" range="30-50" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="215-215" />
+ <Limit name="measured-frame-rate-720x480" range="100-100" />
+ <Limit name="measured-frame-rate-1280x720" range="56-56" />
+ <Limit name="measured-frame-rate-1920x1080" range="30-30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="200-200" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="250-320" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="124-176" />
+ <Limit name="measured-frame-rate-720x480" range="53-76" />
+ <Limit name="measured-frame-rate-1280x720" range="35-50" />
+ <Limit name="measured-frame-rate-1920x1080" range="19-28" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="17-24" />
+ <Limit name="measured-frame-rate-720x480" range="7-10" />
+ <Limit name="measured-frame-rate-1280x720" range="3-6" />
+ <Limit name="measured-frame-rate-1920x1080" range="2-3" />
+ <Limit name="measured-frame-rate-3840x2160" range="1-2" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="130-175" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="119-168" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="85-119" />
+ <Limit name="measured-frame-rate-640x360" range="41-65" />
+ <Limit name="measured-frame-rate-1280x720" range="21-30" />
+ <Limit name="measured-frame-rate-1920x1080" range="10-15" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="480-510" />
+ <Limit name="measured-frame-rate-720x480" range="460-490" />
+ <Limit name="measured-frame-rate-1280x720" range="350-400" />
+ <Limit name="measured-frame-rate-1920x1088" range="180-190" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="510-530" />
+ <Limit name="measured-frame-rate-720x480" range="465-620" />
+ <Limit name="measured-frame-rate-1280x720" range="200-390" />
+ <Limit name="measured-frame-rate-1920x1080" range="210-230" />
+ <Limit name="measured-frame-rate-3840x2160" range="65-75" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="830-1280" />
+ <Limit name="measured-frame-rate-352x288" range="292-292" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="418-551" />
+ <Limit name="measured-frame-rate-480x360" range="245-265" />
+ <Limit name="measured-frame-rate-1280x720" range="80-200" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x240" range="377-377" />
+ <Limit name="measured-frame-rate-640x360" range="323-323" />
+ <Limit name="measured-frame-rate-1280x720" range="262-262" />
+ <Limit name="measured-frame-rate-1920x1080" range="220-220" />
+ <Limit name="measured-frame-rate-3840x2160" range="51-51" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="270-310" />
+ <Limit name="measured-frame-rate-720x480" range="68-68" />
+ <Limit name="measured-frame-rate-1280x720" range="32-32" />
+ <Limit name="measured-frame-rate-1920x1080" range="6-10" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="104-279" />
+ <Limit name="measured-frame-rate-352x288" range="200-200" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="520-650" />
+ <Limit name="measured-frame-rate-640x360" range="145-190" />
+ <Limit name="measured-frame-rate-720x480" range="235-245" />
+ <Limit name="measured-frame-rate-1280x720" range="88-100" />
+ <Limit name="measured-frame-rate-1920x1080" range="48-52" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.mpeg4.decoder" update="true">
+ <Type name="video/mp4v-es">
+ <Limit name="measured-frame-rate-176x144" range="430-450" />
+ </Type>
+ </MediaCodec>
+ <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x180" range="640-720" />
+ <Limit name="measured-frame-rate-320x240" range="200-230" />
+ <Limit name="measured-frame-rate-640x360" range="81-90" />
+ <Limit name="measured-frame-rate-1280x720" range="60-85" />
+ <Limit name="measured-frame-rate-1920x1080" range="33-55" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="63-165" />
+ <Limit name="measured-frame-rate-720x480" range="42-59" />
+ <Limit name="measured-frame-rate-1280x720" range="17-24" />
+ <Limit name="measured-frame-rate-1920x1080" range="8-12" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="67-232" />
+ <Limit name="measured-frame-rate-640x360" range="57-89" />
+ <Limit name="measured-frame-rate-720x480" range="69-99" />
+ <Limit name="measured-frame-rate-1280x720" range="35-51" />
+ <Limit name="measured-frame-rate-1920x1080" range="20-29" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="1374-1403" />
+ <Limit name="measured-frame-rate-352x288" range="310-415" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="406-543" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="950-965" />
+ <Limit name="measured-frame-rate-640x360" range="133-184" />
+ <Limit name="measured-frame-rate-1920x1080" range="15-22" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x180" range="182-360" />
+ <Limit name="measured-frame-rate-640x360" range="85-200" />
+ <Limit name="measured-frame-rate-1280x720" range="35-49" />
+ <Limit name="measured-frame-rate-1920x1080" range="23-33" />
+ </MediaCodec>
+ </Decoders>
+</MediaCodecs>
diff --git a/conf_files/bengal/media_codecs_performance_scuba_v0.xml b/conf_files/bengal/media_codecs_performance_scuba_v0.xml
new file mode 100644
index 0000000..11d309f
--- /dev/null
+++ b/conf_files/bengal/media_codecs_performance_scuba_v0.xml
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+Copyright (c) 2015-2017, 2019-2020 The Linux Foundation. All rights reserved.
+
+Not a Contribution.
+
+Copyright 2015 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.
+u 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.
+
+Changes from Qualcomm Innovation Center are provided under the following license:
+
+Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted (subject to the limitations in the
+disclaimer below) provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-->
+
+<MediaCodecs>
+ <Encoders>
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="238-238" />
+ <Limit name="measured-frame-rate-720x480" range="123-123" />
+ <Limit name="measured-frame-rate-1280x720" range="50-50" />
+ <Limit name="measured-frame-rate-1920x1080" range="55-65" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="226-226" />
+ <Limit name="measured-frame-rate-720x480" range="121-121" />
+ <Limit name="measured-frame-rate-1280x720" range="49-49" />
+ <Limit name="measured-frame-rate-1920x1080" range="55-65" />
+ <Limit name="measured-frame-rate-3840x2160" range="20-27" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="226-226" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="150-240" />
+ <Limit name="measured-frame-rate-352x288" range="80-160" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="120-290" />
+ <Limit name="measured-frame-rate-352x288" range="55-85" />
+ <Limit name="measured-frame-rate-640x480" range="47-52" />
+ <Limit name="measured-frame-rate-1280x720" range="30-50" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="215-215" />
+ <Limit name="measured-frame-rate-720x480" range="100-100" />
+ <Limit name="measured-frame-rate-1280x720" range="56-56" />
+ <Limit name="measured-frame-rate-1920x1080" range="30-30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="200-200" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="250-320" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="124-176" />
+ <Limit name="measured-frame-rate-720x480" range="53-76" />
+ <Limit name="measured-frame-rate-1280x720" range="35-50" />
+ <Limit name="measured-frame-rate-1920x1080" range="19-28" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="17-24" />
+ <Limit name="measured-frame-rate-720x480" range="8-11" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="320-345" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="300-340" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="85-119" />
+ <Limit name="measured-frame-rate-640x360" range="41-65" />
+ <Limit name="measured-frame-rate-1280x720" range="21-30" />
+ <Limit name="measured-frame-rate-1920x1080" range="10-15" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="440-990" />
+ <Limit name="measured-frame-rate-720x480" range="460-490" />
+ <Limit name="measured-frame-rate-1280x720" range="350-400" />
+ <Limit name="measured-frame-rate-1920x1088" range="180-190" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="510-530" />
+ <Limit name="measured-frame-rate-720x480" range="465-620" />
+ <Limit name="measured-frame-rate-1280x720" range="200-390" />
+ <Limit name="measured-frame-rate-1920x1080" range="210-230" />
+ <Limit name="measured-frame-rate-3840x2160" range="65-75" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="356-356" />
+ <Limit name="measured-frame-rate-352x288" range="292-292" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="270-295" />
+ <Limit name="measured-frame-rate-480x360" range="245-265" />
+ <Limit name="measured-frame-rate-1280x720" range="80-200" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x180" range="820-850"/>
+ <Limit name="measured-frame-rate-320x240" range="377-377" />
+ <Limit name="measured-frame-rate-640x360" range="323-323" />
+ <Limit name="measured-frame-rate-1280x720" range="262-262" />
+ <Limit name="measured-frame-rate-1920x1080" range="65-72" />
+ <Limit name="measured-frame-rate-3840x2160" range="51-51" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="270-310" />
+ <Limit name="measured-frame-rate-720x480" range="68-68" />
+ <Limit name="measured-frame-rate-1280x720" range="32-32" />
+ <Limit name="measured-frame-rate-1920x1080" range="6-10" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="104-279" />
+ <Limit name="measured-frame-rate-352x288" range="200-200" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="520-650" />
+ <Limit name="measured-frame-rate-640x360" range="145-190" />
+ <Limit name="measured-frame-rate-720x480" range="235-245" />
+ <Limit name="measured-frame-rate-1280x720" range="88-100" />
+ <Limit name="measured-frame-rate-1920x1080" range="48-52" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.mpeg4.decoder" update="true">
+ <Type name="video/mp4v-es">
+ <Limit name="measured-frame-rate-176x144" range="430-450" />
+ </Type>
+ </MediaCodec>
+ <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x180" range="640-720" />
+ <Limit name="measured-frame-rate-320x240" range="200-230" />
+ <Limit name="measured-frame-rate-640x360" range="81-90" />
+ <Limit name="measured-frame-rate-1280x720" range="60-85" />
+ <Limit name="measured-frame-rate-1920x1080" range="33-55" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="63-165" />
+ <Limit name="measured-frame-rate-720x480" range="42-59" />
+ <Limit name="measured-frame-rate-1280x720" range="17-24" />
+ <Limit name="measured-frame-rate-1920x1080" range="8-12" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="67-232" />
+ <Limit name="measured-frame-rate-640x360" range="57-89" />
+ <Limit name="measured-frame-rate-720x480" range="69-99" />
+ <Limit name="measured-frame-rate-1280x720" range="35-51" />
+ <Limit name="measured-frame-rate-1920x1080" range="20-29" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="376-524" />
+ <Limit name="measured-frame-rate-352x288" range="310-415" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="406-543" />
+ <Limit name="measured-frame-rate-480x360" range="195-262" />
+ <Limit name="measured-frame-rate-1280x720" range="59-84" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="160-480" />
+ <Limit name="measured-frame-rate-640x360" range="133-184" />
+ <Limit name="measured-frame-rate-1920x1080" range="15-22" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x180" range="182-360" />
+ <Limit name="measured-frame-rate-640x360" range="85-200" />
+ <Limit name="measured-frame-rate-1280x720" range="35-49" />
+ <Limit name="measured-frame-rate-1920x1080" range="23-33" />
+ </MediaCodec>
+ </Decoders>
+</MediaCodecs>
diff --git a/conf_files/bengal/media_codecs_performance_v1.xml b/conf_files/bengal/media_codecs_performance_v1.xml
index ff1ed77..bb025c0 100644
--- a/conf_files/bengal/media_codecs_performance_v1.xml
+++ b/conf_files/bengal/media_codecs_performance_v1.xml
@@ -34,6 +34,9 @@
<Limit name="measured-frame-rate-1920x1080" range="55-65" />
<Limit name="measured-frame-rate-3840x2160" range="20-27" />
</MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="226-226" />
+ </MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" update="true">
<Limit name="measured-frame-rate-176x144" range="60-90" />
<Limit name="measured-frame-rate-352x288" range="55-85" />
@@ -56,6 +59,31 @@
<MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="250-320" />
</MediaCodec>
+ <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="124-176" />
+ <Limit name="measured-frame-rate-720x480" range="53-76" />
+ <Limit name="measured-frame-rate-1280x720" range="35-50" />
+ <Limit name="measured-frame-rate-1920x1080" range="19-28" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="17-24" />
+ <Limit name="measured-frame-rate-720x480" range="7-10" />
+ <Limit name="measured-frame-rate-1280x720" range="3-6" />
+ <Limit name="measured-frame-rate-1920x1080" range="2-3" />
+ <Limit name="measured-frame-rate-3840x2160" range="1-2" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="130-175" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="119-168" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="85-119" />
+ <Limit name="measured-frame-rate-640x360" range="41-65" />
+ <Limit name="measured-frame-rate-1280x720" range="21-30" />
+ <Limit name="measured-frame-rate-1920x1080" range="10-15" />
+ </MediaCodec>
</Encoders>
<Decoders>
<MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
@@ -76,7 +104,7 @@
<Limit name="measured-frame-rate-352x288" range="292-292" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es" update="true">
- <Limit name="measured-frame-rate-176x144" range="270-295" />
+ <Limit name="measured-frame-rate-176x144" range="418-551" />
<Limit name="measured-frame-rate-480x360" range="245-265" />
<Limit name="measured-frame-rate-1280x720" range="80-200" />
</MediaCodec>
@@ -116,5 +144,36 @@
<Limit name="measured-frame-rate-1280x720" range="60-85" />
<Limit name="measured-frame-rate-1920x1080" range="33-55" />
</MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="63-165" />
+ <Limit name="measured-frame-rate-720x480" range="42-59" />
+ <Limit name="measured-frame-rate-1280x720" range="17-24" />
+ <Limit name="measured-frame-rate-1920x1080" range="8-12" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="67-232" />
+ <Limit name="measured-frame-rate-640x360" range="57-89" />
+ <Limit name="measured-frame-rate-720x480" range="69-99" />
+ <Limit name="measured-frame-rate-1280x720" range="35-51" />
+ <Limit name="measured-frame-rate-1920x1080" range="20-29" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="376-524" />
+ <Limit name="measured-frame-rate-352x288" range="310-415" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="406-543" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="160-480" />
+ <Limit name="measured-frame-rate-640x360" range="133-184" />
+ <Limit name="measured-frame-rate-1920x1080" range="15-22" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x180" range="182-360" />
+ <Limit name="measured-frame-rate-640x360" range="85-200" />
+ <Limit name="measured-frame-rate-1280x720" range="35-49" />
+ <Limit name="measured-frame-rate-1920x1080" range="23-33" />
+ </MediaCodec>
</Decoders>
</MediaCodecs>
diff --git a/conf_files/bengal/media_codecs_vendor.xml b/conf_files/bengal/media_codecs_vendor.xml
index 4188022..53dafcc 100644
--- a/conf_files/bengal/media_codecs_vendor.xml
+++ b/conf_files/bengal/media_codecs_vendor.xml
@@ -138,6 +138,8 @@
<Limit name="bitrate" range="1-60000000" />
<Limit name="frame-rate" range="1-120" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -152,13 +154,15 @@
<Limit name="concurrent-instances" max="16" />
<Limit name="quality" range="0-100" default="80" />
<Feature name="bitrate-modes" value="VBR,CBR" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="requires-loaded-to-idle-after-allocation" />
- <Limit name="size" min="512x512" max="512x512" />
+ <Limit name="size" min="128x128" max="512x512" />
<Limit name="frame-rate" range="1-20" />
<Limit name="concurrent-instances" max="16" />
<Limit name="quality" range="0-100" default="80" />
@@ -175,6 +179,8 @@
<Limit name="concurrent-instances" max="6" />
<Limit name="quality" range="0-100" default="80" />
<Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-8192x4320" value="3" />
+ <Limit name="performance-point-1920x1080" value="6" />
</MediaCodec>
<!-- Video Software -->
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
@@ -187,7 +193,8 @@
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-2000000" />
<Limit name="frame-rate" range="1-30" />
- <Limit name="concurrent-instances" max="16" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-720x480" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -199,7 +206,8 @@
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-8000000" />
<Limit name="frame-rate" range="1-30" />
- <Limit name="concurrent-instances" max="16" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-720x480" value="30" />
</MediaCodec>
</Encoders>
<Decoders>
@@ -215,6 +223,8 @@
<Limit name="frame-rate" range="1-120" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -228,6 +238,7 @@
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -240,6 +251,8 @@
<Limit name="frame-rate" range="1-120" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="6" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -253,6 +266,7 @@
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -265,6 +279,8 @@
<Limit name="frame-rate" range="1-120" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -278,6 +294,7 @@
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
<!-- Video Software -->
<MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
@@ -290,7 +307,8 @@
<Limit name="bitrate" range="1-16000000" />
<Limit name="frame-rate" range="1-30" />
<Feature name="adaptive-playback" />
- <Limit name="concurrent-instances" max="16" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-720x480" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
<Quirk name="requires-allocate-on-input-ports" />
@@ -301,8 +319,28 @@
<Limit name="blocks-per-second" min="36" max="244800" />
<Limit name="bitrate" range="1-40000000" />
<Limit name="frame-rate" range="1-30" />
- <Limit name="concurrent-instances" max="16" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <!-- profiles and levels: ProfileMain : MainTierLevel51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="8x8" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-2000000" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <!-- profiles and levels: ProfileHigh : Level51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-20000000" />
+ <Feature name="adaptive-playback" />
+ </MediaCodec>
</Decoders>
- <Include href="media_codecs_google_video.xml" />
+ <Include href="media_codecs_google_video_le.xml" />
</MediaCodecs>
diff --git a/conf_files/bengal/media_codecs_vendor_32.xml b/conf_files/bengal/media_codecs_vendor_32.xml
new file mode 100644
index 0000000..8b08088
--- /dev/null
+++ b/conf_files/bengal/media_codecs_vendor_32.xml
@@ -0,0 +1,292 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
+ Not a contribution.
+ 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.
+-->
+
+<!--
+<!DOCTYPE MediaCodecs [
+<!ELEMENT Include EMPTY>
+<!ATTLIST Include href CDATA #REQUIRED>
+<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
+<!ELEMENT Decoders (MediaCodec|Include)*>
+<!ELEMENT Encoders (MediaCodec|Include)*>
+<!ELEMENT MediaCodec (Type|Quirk|Include)*>
+<!ATTLIST MediaCodec name CDATA #REQUIRED>
+<!ATTLIST MediaCodec type CDATA>
+<!ELEMENT Type EMPTY>
+<!ATTLIST Type name CDATA #REQUIRED>
+<!ELEMENT Quirk EMPTY>
+<!ATTLIST Quirk name CDATA #REQUIRED>
+]>
+
+There's a simple and a complex syntax to declare the availability of a
+media codec:
+
+A codec that properly follows the OpenMax spec and therefore doesn't have any
+quirks and that only supports a single content type can be declared like so:
+
+ <MediaCodec name="OMX.foo.bar" type="something/interesting" />
+
+If a codec has quirks OR supports multiple content types, the following syntax
+can be used:
+
+ <MediaCodec name="OMX.foo.bar" >
+ <Type name="something/interesting" />
+ <Type name="something/else" />
+ ...
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="output-buffers-are-unreadable" />
+ </MediaCodec>
+
+Only the three quirks included above are recognized at this point:
+
+"requires-allocate-on-input-ports"
+ must be advertised if the component does not properly support specification
+ of input buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"requires-allocate-on-output-ports"
+ must be advertised if the component does not properly support specification
+ of output buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"output-buffers-are-unreadable"
+ must be advertised if the emitted output buffers of a decoder component
+ are not readable, i.e. use a custom format even though abusing one of
+ the official OMX colorspace constants.
+ Clients of such decoders will not be able to access the decoded data,
+ naturally making the component much less useful. The only use for
+ a component with this quirk is to render the output to the screen.
+ Audio decoders MUST NOT advertise this quirk.
+ Video decoders that advertise this quirk must be accompanied by a
+ corresponding color space converter for thumbnail extraction,
+ matching surfaceflinger support that can render the custom format to
+ a texture and possibly other code, so just DON'T USE THIS QUIRK.
+
+
+-->
+<!--
+ Non-Secure decoder capabilities
+ (MB is defined as 16x16)
+
+ _______________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |_____________|_________________________________________|
+ | h264 | 1920 1088 60 60 489600 |
+ | hevc | 1920 1080 60 60 489600 |
+ | vp9 | 1920 1088 60 60 489600 |
+ | mpeg4-sw | 1920 1088 30 40 244800 |
+ | h263-sw | 864 480 30 16 48600 |
+ |_____________|_________________________________________|
+
+ Non-Secure encoder capabilities (Secure not supported)
+ (MB is defined as 16x16)
+
+ ______________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|_________________________________________|
+ | h264 | 1920 1088 60 60 489600 |
+ | hevc | 1920 1088 60 60 489600 |
+ | mpeg4-sw | 864 480 30 8 48600 |
+ | h263-sw | 864 480 30 2 48600 |
+ |__________|_________________________________________|
+-->
+
+<MediaCodecs>
+ <Include href="media_codecs_google_audio.xml" />
+ <Include href="media_codecs_vendor_audio.xml" />
+ <Include href="media_codecs_google_telephony.xml" />
+ <Settings>
+ <Setting name="max-video-encoder-input-buffers" value="11" />
+ </Settings>
+ <Encoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="VBR,CBR" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="512x512" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-512x512" value="2025" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.heic" type="image/vnd.android.heic" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="512x512" max="8192x8192" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-8192x4320" value="3" />
+ <Limit name="performance-point-1920x1080" value="6" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-2000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-8000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-16000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <!-- profiles and levels: ProfileMain : MainTierLevel51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="8x8" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-2000000" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <!-- profiles and levels: ProfileHigh : Level51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-20000000" />
+ <Feature name="adaptive-playback" />
+ </MediaCodec>
+ </Decoders>
+ <Include href="media_codecs_google_video_le.xml" />
+</MediaCodecs>
diff --git a/conf_files/bengal/media_codecs_vendor_audio.xml b/conf_files/bengal/media_codecs_vendor_audio.xml
index e6273e9..2749bc6 100644
--- a/conf_files/bengal/media_codecs_vendor_audio.xml
+++ b/conf_files/bengal/media_codecs_vendor_audio.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright (C) 2015-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2015-2020 The Linux Foundation. All rights reserved.
Not a contribution.
Copyright (C) 2012 The Android Open Source Project
@@ -19,11 +19,5 @@
<Decoders>
<MediaCodec name="OMX.google.opus.decoder" type="audio/opus" update="true" rank="100"/>
<!-- SimpleOMXComponet based software decoder-->
- <MediaCodec name="OMX.qti.audio.decoder.flac" type="audio/flac" rank="0">
- <Limit name="concurrent-instances" max="10" />
- </MediaCodec>
- <MediaCodec name="OMX.qti.audio.decoder.mpegh" type="audio/mhas" rank="0">
- <Limit name="concurrent-instances" max="1" />
- </MediaCodec>
</Decoders>
</Included>
diff --git a/conf_files/bengal/media_codecs_vendor_khaje.xml b/conf_files/bengal/media_codecs_vendor_khaje.xml
new file mode 100644
index 0000000..237c78e
--- /dev/null
+++ b/conf_files/bengal/media_codecs_vendor_khaje.xml
@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2021 The Linux Foundation. All rights reserved.
+ Not a contribution.
+ 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.
+-->
+
+<!--
+<!DOCTYPE MediaCodecs [
+<!ELEMENT Include EMPTY>
+<!ATTLIST Include href CDATA #REQUIRED>
+<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
+<!ELEMENT Decoders (MediaCodec|Include)*>
+<!ELEMENT Encoders (MediaCodec|Include)*>
+<!ELEMENT MediaCodec (Type|Quirk|Include)*>
+<!ATTLIST MediaCodec name CDATA #REQUIRED>
+<!ATTLIST MediaCodec type CDATA>
+<!ELEMENT Type EMPTY>
+<!ATTLIST Type name CDATA #REQUIRED>
+<!ELEMENT Quirk EMPTY>
+<!ATTLIST Quirk name CDATA #REQUIRED>
+]>
+
+There's a simple and a complex syntax to declare the availability of a
+media codec:
+
+A codec that properly follows the OpenMax spec and therefore doesn't have any
+quirks and that only supports a single content type can be declared like so:
+
+ <MediaCodec name="OMX.foo.bar" type="something/interesting" />
+
+If a codec has quirks OR supports multiple content types, the following syntax
+can be used:
+
+ <MediaCodec name="OMX.foo.bar" >
+ <Type name="something/interesting" />
+ <Type name="something/else" />
+ ...
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="output-buffers-are-unreadable" />
+ </MediaCodec>
+
+Only the three quirks included above are recognized at this point:
+
+"requires-allocate-on-input-ports"
+ must be advertised if the component does not properly support specification
+ of input buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"requires-allocate-on-output-ports"
+ must be advertised if the component does not properly support specification
+ of output buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"output-buffers-are-unreadable"
+ must be advertised if the emitted output buffers of a decoder component
+ are not readable, i.e. use a custom format even though abusing one of
+ the official OMX colorspace constants.
+ Clients of such decoders will not be able to access the decoded data,
+ naturally making the component much less useful. The only use for
+ a component with this quirk is to render the output to the screen.
+ Audio decoders MUST NOT advertise this quirk.
+ Video decoders that advertise this quirk must be accompanied by a
+ corresponding color space converter for thumbnail extraction,
+ matching surfaceflinger support that can render the custom format to
+ a texture and possibly other code, so just DON'T USE THIS QUIRK.
+
+
+-->
+<!--
+ Non-Secure decoder capabilities
+ (MB is defined as 16x16)
+
+ _______________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |_____________|_________________________________________|
+ | h264 | 1920 1088 60 60 489600 |
+ | hevc | 1920 1080 60 60 489600 |
+ | vp9 | 1920 1088 60 60 489600 |
+ | mpeg4-sw | 1920 1088 30 40 244800 |
+ | h263-sw | 864 480 30 16 48600 |
+ |_____________|_________________________________________|
+
+ Secure decoder capabilities
+ (MB is defined as 16x16)
+
+ _____________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|_________________________________________|
+ | h264 | 1920 1088 60 35 489600 |
+ | vp9 | 1920 1088 60 35 489600 |
+ | hevc | 1920 1088 60 35 489600 |
+ |__________|_________________________________________|
+
+
+ Non-Secure encoder capabilities (Secure not supported)
+ (MB is defined as 16x16)
+
+ ______________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|_________________________________________|
+ | h264 | 1920 1088 60 60 489600 |
+ | hevc | 1920 1088 60 60 489600 |
+ | mpeg4-sw | 864 480 30 8 48600 |
+ | h263-sw | 864 480 30 2 48600 |
+ |__________|_________________________________________|
+-->
+
+<MediaCodecs>
+ <Include href="media_codecs_google_audio.xml" />
+ <Include href="media_codecs_vendor_audio.xml" />
+ <Include href="media_codecs_google_telephony.xml" />
+ <Settings>
+ <Setting name="max-video-encoder-input-buffers" value="11" />
+ </Settings>
+ <Encoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Limit name="concurrent-instances" max="16" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="VBR,CBR" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="512x512" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-512x512" value="2025" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.heic" type="image/vnd.android.heic" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="512x512" max="8192x8192" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-8192x4320" value="3" />
+ <Limit name="performance-point-1920x1080" value="6" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-2000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="3" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-8000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="3" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-35000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-35000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ <Limit name="performance-point-1280x720" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="489600" />
+ <Limit name="bitrate" range="1-35000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-16000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <!-- profiles and levels: ProfileMain : MainTierLevel51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="8x8" />
+ <Limit name="block-count" range="1-14400" />
+ <Limit name="blocks-per-second" range="1-432000" />
+ <Limit name="bitrate" range="1-2000000" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <!-- profiles and levels: ProfileHigh : Level51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-20000000" />
+ <Feature name="adaptive-playback" />
+ </MediaCodec>
+ </Decoders>
+ <Include href="media_codecs_google_video_le.xml" />
+</MediaCodecs>
diff --git a/conf_files/bengal/media_codecs_vendor_scuba_v0.xml b/conf_files/bengal/media_codecs_vendor_scuba_v0.xml
new file mode 100644
index 0000000..2346071
--- /dev/null
+++ b/conf_files/bengal/media_codecs_vendor_scuba_v0.xml
@@ -0,0 +1,351 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
+ Not a contribution.
+ 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.
+-->
+
+<!--
+<!DOCTYPE MediaCodecs [
+<!ELEMENT Include EMPTY>
+<!ATTLIST Include href CDATA #REQUIRED>
+<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
+<!ELEMENT Decoders (MediaCodec|Include)*>
+<!ELEMENT Encoders (MediaCodec|Include)*>
+<!ELEMENT MediaCodec (Type|Quirk|Include)*>
+<!ATTLIST MediaCodec name CDATA #REQUIRED>
+<!ATTLIST MediaCodec type CDATA>
+<!ELEMENT Type EMPTY>
+<!ATTLIST Type name CDATA #REQUIRED>
+<!ELEMENT Quirk EMPTY>
+<!ATTLIST Quirk name CDATA #REQUIRED>
+]>
+
+There's a simple and a complex syntax to declare the availability of a
+media codec:
+
+A codec that properly follows the OpenMax spec and therefore doesn't have any
+quirks and that only supports a single content type can be declared like so:
+
+ <MediaCodec name="OMX.foo.bar" type="something/interesting" />
+
+If a codec has quirks OR supports multiple content types, the following syntax
+can be used:
+
+ <MediaCodec name="OMX.foo.bar" >
+ <Type name="something/interesting" />
+ <Type name="something/else" />
+ ...
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="output-buffers-are-unreadable" />
+ </MediaCodec>
+
+Only the three quirks included above are recognized at this point:
+
+"requires-allocate-on-input-ports"
+ must be advertised if the component does not properly support specification
+ of input buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"requires-allocate-on-output-ports"
+ must be advertised if the component does not properly support specification
+ of output buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"output-buffers-are-unreadable"
+ must be advertised if the emitted output buffers of a decoder component
+ are not readable, i.e. use a custom format even though abusing one of
+ the official OMX colorspace constants.
+ Clients of such decoders will not be able to access the decoded data,
+ naturally making the component much less useful. The only use for
+ a component with this quirk is to render the output to the screen.
+ Audio decoders MUST NOT advertise this quirk.
+ Video decoders that advertise this quirk must be accompanied by a
+ corresponding color space converter for thumbnail extraction,
+ matching surfaceflinger support that can render the custom format to
+ a texture and possibly other code, so just DON'T USE THIS QUIRK.
+
+
+-->
+<!--
+ Non-Secure decoder capabilities
+ (MB is defined as 16x16)
+
+ _______________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |_____________|_________________________________________|
+ | h264 | 1920 1088 30 60 244800 |
+ | hevc | 1920 1080 30 60 244800 |
+ | vp9 | 1920 1088 30 60 244800 |
+ | mpeg4-sw | 1920 1088 30 40 244800 |
+ | h263-sw | 864 480 30 16 48600 |
+ |_____________|_________________________________________|
+
+ Secure decoder capabilities
+ (MB is defined as 16x16)
+
+ _____________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|_________________________________________|
+ | h264 | 1920 1088 30 35 244800 |
+ | vp9 | 1920 1088 30 35 244800 |
+ | hevc | 1920 1088 30 35 244800 |
+ |__________|_________________________________________|
+
+
+ Non-Secure encoder capabilities (Secure not supported)
+ (MB is defined as 16x16)
+
+ ______________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|_________________________________________|
+ | h264 | 1920 1088 30 60 244800 |
+ | hevc | 1920 1088 30 60 244800 |
+ | mpeg4-sw | 864 480 30 8 48600 |
+ | h263-sw | 864 480 30 2 48600 |
+ |__________|_________________________________________|
+-->
+
+<MediaCodecs>
+ <Include href="media_codecs_google_audio.xml" />
+ <Include href="media_codecs_vendor_audio.xml" />
+ <Include href="media_codecs_google_telephony.xml" />
+ <Settings>
+ <Setting name="max-video-encoder-input-buffers" value="11" />
+ </Settings>
+ <Encoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="VBR,CBR" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="512x512" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-512x512" value="2025" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.heic" type="image/vnd.android.heic" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="512x512" max="8192x8192" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-8192x4320" value="3" />
+ <Limit name="performance-point-1920x1080" value="6" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-2000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-8000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-35000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-35000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-35000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-16000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <!-- profiles and levels: ProfileMain : MainTierLevel51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="8x8" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-2000000" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <!-- profiles and levels: ProfileHigh : Level51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-20000000" />
+ <Feature name="adaptive-playback" />
+ </MediaCodec>
+ </Decoders>
+ <Include href="media_codecs_google_video_le.xml" />
+</MediaCodecs>
diff --git a/conf_files/bengal/media_codecs_vendor_scuba_v0_32.xml b/conf_files/bengal/media_codecs_vendor_scuba_v0_32.xml
new file mode 100644
index 0000000..b5b97c0
--- /dev/null
+++ b/conf_files/bengal/media_codecs_vendor_scuba_v0_32.xml
@@ -0,0 +1,297 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
+ Not a contribution.
+ 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.
+-->
+
+<!--
+<!DOCTYPE MediaCodecs [
+<!ELEMENT Include EMPTY>
+<!ATTLIST Include href CDATA #REQUIRED>
+<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
+<!ELEMENT Decoders (MediaCodec|Include)*>
+<!ELEMENT Encoders (MediaCodec|Include)*>
+<!ELEMENT MediaCodec (Type|Quirk|Include)*>
+<!ATTLIST MediaCodec name CDATA #REQUIRED>
+<!ATTLIST MediaCodec type CDATA>
+<!ELEMENT Type EMPTY>
+<!ATTLIST Type name CDATA #REQUIRED>
+<!ELEMENT Quirk EMPTY>
+<!ATTLIST Quirk name CDATA #REQUIRED>
+]>
+
+There's a simple and a complex syntax to declare the availability of a
+media codec:
+
+A codec that properly follows the OpenMax spec and therefore doesn't have any
+quirks and that only supports a single content type can be declared like so:
+
+ <MediaCodec name="OMX.foo.bar" type="something/interesting" />
+
+If a codec has quirks OR supports multiple content types, the following syntax
+can be used:
+
+ <MediaCodec name="OMX.foo.bar" >
+ <Type name="something/interesting" />
+ <Type name="something/else" />
+ ...
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="output-buffers-are-unreadable" />
+ </MediaCodec>
+
+Only the three quirks included above are recognized at this point:
+
+"requires-allocate-on-input-ports"
+ must be advertised if the component does not properly support specification
+ of input buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"requires-allocate-on-output-ports"
+ must be advertised if the component does not properly support specification
+ of output buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"output-buffers-are-unreadable"
+ must be advertised if the emitted output buffers of a decoder component
+ are not readable, i.e. use a custom format even though abusing one of
+ the official OMX colorspace constants.
+ Clients of such decoders will not be able to access the decoded data,
+ naturally making the component much less useful. The only use for
+ a component with this quirk is to render the output to the screen.
+ Audio decoders MUST NOT advertise this quirk.
+ Video decoders that advertise this quirk must be accompanied by a
+ corresponding color space converter for thumbnail extraction,
+ matching surfaceflinger support that can render the custom format to
+ a texture and possibly other code, so just DON'T USE THIS QUIRK.
+
+
+-->
+<!--
+ Non-Secure decoder capabilities
+ (MB is defined as 16x16)
+
+ _______________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |_____________|_________________________________________|
+ | h264 | 1920 1088 30 60 244800 |
+ | hevc | 1920 1080 30 60 244800 |
+ | vp9 | 1920 1088 30 60 244800 |
+ | mpeg4-sw | 1920 1088 30 40 244800 |
+ | h263-sw | 864 480 30 16 48600 |
+ |_____________|_________________________________________|
+
+ Non-Secure encoder capabilities (Secure not supported)
+ (MB is defined as 16x16)
+
+ ______________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|_________________________________________|
+ | h264 | 1920 1088 30 60 244800 |
+ | hevc | 1920 1088 30 60 244800 |
+ | mpeg4-sw | 864 480 30 8 48600 |
+ | h263-sw | 864 480 30 2 48600 |
+ |__________|_________________________________________|
+-->
+
+<MediaCodecs>
+ <Include href="media_codecs_google_audio.xml" />
+ <Include href="media_codecs_vendor_audio.xml" />
+ <Include href="media_codecs_google_telephony.xml" />
+ <Settings>
+ <Setting name="max-video-encoder-input-buffers" value="11" />
+ </Settings>
+ <Encoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="VBR,CBR" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="512x512" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-512x512" value="2025" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.heic" type="image/vnd.android.heic" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="512x512" max="8192x8192" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-8192x4320" value="3" />
+ <Limit name="performance-point-1920x1080" value="6" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-2000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-8000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-16000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <!-- profiles and levels: ProfileMain : MainTierLevel51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="8x8" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-2000000" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <!-- profiles and levels: ProfileHigh : Level51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-20000000" />
+ <Feature name="adaptive-playback" />
+ </MediaCodec>
+ </Decoders>
+ <Include href="media_codecs_google_video_le.xml" />
+</MediaCodecs>
diff --git a/conf_files/bengal/media_codecs_vendor_v1.xml b/conf_files/bengal/media_codecs_vendor_v1.xml
index 759f1de..2346071 100644
--- a/conf_files/bengal/media_codecs_vendor_v1.xml
+++ b/conf_files/bengal/media_codecs_vendor_v1.xml
@@ -138,6 +138,9 @@
<Limit name="bitrate" range="1-60000000" />
<Limit name="frame-rate" range="1-120" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -152,13 +155,16 @@
<Limit name="concurrent-instances" max="16" />
<Limit name="quality" range="0-100" default="80" />
<Feature name="bitrate-modes" value="VBR,CBR" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="requires-loaded-to-idle-after-allocation" />
- <Limit name="size" min="512x512" max="512x512" />
+ <Limit name="size" min="128x128" max="512x512" />
<Limit name="frame-rate" range="1-20" />
<Limit name="concurrent-instances" max="16" />
<Limit name="quality" range="0-100" default="80" />
@@ -175,6 +181,8 @@
<Limit name="concurrent-instances" max="6" />
<Limit name="quality" range="0-100" default="80" />
<Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-8192x4320" value="3" />
+ <Limit name="performance-point-1920x1080" value="6" />
</MediaCodec>
<!-- Video Software -->
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
@@ -187,7 +195,8 @@
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-2000000" />
<Limit name="frame-rate" range="1-30" />
- <Limit name="concurrent-instances" max="16" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-720x480" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -199,7 +208,8 @@
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-8000000" />
<Limit name="frame-rate" range="1-30" />
- <Limit name="concurrent-instances" max="16" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-720x480" value="30" />
</MediaCodec>
</Encoders>
<Decoders>
@@ -215,6 +225,9 @@
<Limit name="frame-rate" range="1-120" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -228,6 +241,7 @@
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -240,6 +254,9 @@
<Limit name="frame-rate" range="1-120" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="6" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -253,6 +270,7 @@
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -265,6 +283,9 @@
<Limit name="frame-rate" range="1-120" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -278,6 +299,7 @@
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
<!-- Video Software -->
<MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
@@ -290,7 +312,8 @@
<Limit name="bitrate" range="1-16000000" />
<Limit name="frame-rate" range="1-30" />
<Feature name="adaptive-playback" />
- <Limit name="concurrent-instances" max="16" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-720x480" value="30" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
<Quirk name="requires-allocate-on-input-ports" />
@@ -301,8 +324,28 @@
<Limit name="blocks-per-second" min="36" max="244800" />
<Limit name="bitrate" range="1-40000000" />
<Limit name="frame-rate" range="1-30" />
- <Limit name="concurrent-instances" max="16" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <!-- profiles and levels: ProfileMain : MainTierLevel51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="8x8" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-2000000" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <!-- profiles and levels: ProfileHigh : Level51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-20000000" />
+ <Feature name="adaptive-playback" />
+ </MediaCodec>
</Decoders>
- <Include href="media_codecs_google_video.xml" />
+ <Include href="media_codecs_google_video_le.xml" />
</MediaCodecs>
diff --git a/conf_files/bengal/media_codecs_vendor_v1_32.xml b/conf_files/bengal/media_codecs_vendor_v1_32.xml
new file mode 100644
index 0000000..b5b97c0
--- /dev/null
+++ b/conf_files/bengal/media_codecs_vendor_v1_32.xml
@@ -0,0 +1,297 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
+ Not a contribution.
+ 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.
+-->
+
+<!--
+<!DOCTYPE MediaCodecs [
+<!ELEMENT Include EMPTY>
+<!ATTLIST Include href CDATA #REQUIRED>
+<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
+<!ELEMENT Decoders (MediaCodec|Include)*>
+<!ELEMENT Encoders (MediaCodec|Include)*>
+<!ELEMENT MediaCodec (Type|Quirk|Include)*>
+<!ATTLIST MediaCodec name CDATA #REQUIRED>
+<!ATTLIST MediaCodec type CDATA>
+<!ELEMENT Type EMPTY>
+<!ATTLIST Type name CDATA #REQUIRED>
+<!ELEMENT Quirk EMPTY>
+<!ATTLIST Quirk name CDATA #REQUIRED>
+]>
+
+There's a simple and a complex syntax to declare the availability of a
+media codec:
+
+A codec that properly follows the OpenMax spec and therefore doesn't have any
+quirks and that only supports a single content type can be declared like so:
+
+ <MediaCodec name="OMX.foo.bar" type="something/interesting" />
+
+If a codec has quirks OR supports multiple content types, the following syntax
+can be used:
+
+ <MediaCodec name="OMX.foo.bar" >
+ <Type name="something/interesting" />
+ <Type name="something/else" />
+ ...
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="output-buffers-are-unreadable" />
+ </MediaCodec>
+
+Only the three quirks included above are recognized at this point:
+
+"requires-allocate-on-input-ports"
+ must be advertised if the component does not properly support specification
+ of input buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"requires-allocate-on-output-ports"
+ must be advertised if the component does not properly support specification
+ of output buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"output-buffers-are-unreadable"
+ must be advertised if the emitted output buffers of a decoder component
+ are not readable, i.e. use a custom format even though abusing one of
+ the official OMX colorspace constants.
+ Clients of such decoders will not be able to access the decoded data,
+ naturally making the component much less useful. The only use for
+ a component with this quirk is to render the output to the screen.
+ Audio decoders MUST NOT advertise this quirk.
+ Video decoders that advertise this quirk must be accompanied by a
+ corresponding color space converter for thumbnail extraction,
+ matching surfaceflinger support that can render the custom format to
+ a texture and possibly other code, so just DON'T USE THIS QUIRK.
+
+
+-->
+<!--
+ Non-Secure decoder capabilities
+ (MB is defined as 16x16)
+
+ _______________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |_____________|_________________________________________|
+ | h264 | 1920 1088 30 60 244800 |
+ | hevc | 1920 1080 30 60 244800 |
+ | vp9 | 1920 1088 30 60 244800 |
+ | mpeg4-sw | 1920 1088 30 40 244800 |
+ | h263-sw | 864 480 30 16 48600 |
+ |_____________|_________________________________________|
+
+ Non-Secure encoder capabilities (Secure not supported)
+ (MB is defined as 16x16)
+
+ ______________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|_________________________________________|
+ | h264 | 1920 1088 30 60 244800 |
+ | hevc | 1920 1088 30 60 244800 |
+ | mpeg4-sw | 864 480 30 8 48600 |
+ | h263-sw | 864 480 30 2 48600 |
+ |__________|_________________________________________|
+-->
+
+<MediaCodecs>
+ <Include href="media_codecs_google_audio.xml" />
+ <Include href="media_codecs_vendor_audio.xml" />
+ <Include href="media_codecs_google_telephony.xml" />
+ <Settings>
+ <Setting name="max-video-encoder-input-buffers" value="11" />
+ </Settings>
+ <Encoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="VBR,CBR" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="512x512" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-512x512" value="2025" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.heic" type="image/vnd.android.heic" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="512x512" max="8192x8192" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-8192x4320" value="3" />
+ <Limit name="performance-point-1920x1080" value="6" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-2000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-8000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-60000000" />
+ <Limit name="frame-rate" range="1-120" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ <Limit name="performance-point-1280x720" value="60" />
+ <Limit name="performance-point-720x480" value="120" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-16000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <!-- profiles and levels: ProfileMain : MainTierLevel51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="8x8" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-2000000" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <!-- profiles and levels: ProfileHigh : Level51 -->
+ <Limit name="size" min="2x2" max="1280x720" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="block-count" range="1-3600" />
+ <Limit name="blocks-per-second" range="1-108000" />
+ <Limit name="bitrate" range="1-20000000" />
+ <Feature name="adaptive-playback" />
+ </MediaCodec>
+ </Decoders>
+ <Include href="media_codecs_google_video_le.xml" />
+</MediaCodecs>
diff --git a/conf_files/bengal/media_profiles.xml b/conf_files/bengal/media_profiles.xml
index 735e5dc..9623b91 100644
--- a/conf_files/bengal/media_profiles.xml
+++ b/conf_files/bengal/media_profiles.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
Not a contribution.
Copyright (C) 2010 The Android Open Source Project
@@ -27,7 +27,7 @@
<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
-<!ATTLIST EncoderProfile cameraId (0|1|2|3|4) #REQUIRED>
+<!ATTLIST EncoderProfile cameraId (0|1|2|3|4|5|6) #REQUIRED>
<!ELEMENT Video EMPTY>
<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
<!ATTLIST Video bitRate CDATA #REQUIRED>
@@ -363,7 +363,7 @@
<EncoderProfile quality="high" fileFormat="mp4" duration="30">
<Video codec="h264"
- bitRate="42000000"
+ bitRate="20000000"
width="1920"
height="1080"
frameRate="30" />
@@ -482,7 +482,7 @@
<EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
<Video codec="h264"
- bitRate="42000000"
+ bitRate="20000000"
width="1920"
height="1080"
frameRate="30" />
@@ -1188,6 +1188,19 @@
channels="2" />
</EncoderProfile>
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
<EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="192000"
@@ -1327,6 +1340,528 @@
channels="2" />
</EncoderProfile>
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <!-- Camera ID 5 -->
+ <CamcorderProfiles cameraId="5">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <!-- Camera ID 6 -->
+ <CamcorderProfiles cameraId="6">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
diff --git a/conf_files/bengal/media_profiles_khaje.xml b/conf_files/bengal/media_profiles_khaje.xml
new file mode 100644
index 0000000..9c78a88
--- /dev/null
+++ b/conf_files/bengal/media_profiles_khaje.xml
@@ -0,0 +1,2240 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2021 The Linux Foundation. All rights reserved.
+ Not a contribution.
+ Copyright (C) 2010 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.
+-->
+<!DOCTYPE MediaSettings [
+<!ELEMENT MediaSettings (CamcorderProfiles,
+ EncoderOutputFileFormat+,
+ VideoEncoderCap+,
+ AudioEncoderCap+,
+ VideoDecoderCap,
+ AudioDecoderCap)>
+<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
+<!ELEMENT EncoderProfile (Video, Audio)>
+<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
+<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
+<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
+<!ATTLIST EncoderProfile cameraId (0|1|2|3|4|5|6|7) #REQUIRED>
+<!ELEMENT Video EMPTY>
+<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
+<!ATTLIST Video bitRate CDATA #REQUIRED>
+<!ATTLIST Video width CDATA #REQUIRED>
+<!ATTLIST Video height CDATA #REQUIRED>
+<!ATTLIST Video frameRate CDATA #REQUIRED>
+<!ELEMENT Audio EMPTY>
+<!ATTLIST Audio codec (amrnb|amrwb|aac|lpcm) #REQUIRED>
+<!ATTLIST Audio bitRate CDATA #REQUIRED>
+<!ATTLIST Audio sampleRate CDATA #REQUIRED>
+<!ATTLIST Audio channels (1|2|6) #REQUIRED>
+<!ELEMENT ImageEncoding EMPTY>
+<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
+<!ELEMENT ImageDecoding EMPTY>
+<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
+<!ELEMENT Camera EMPTY>
+<!ELEMENT EncoderOutputFileFormat EMPTY>
+<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
+<!ELEMENT VideoEncoderCap EMPTY>
+<!ATTLIST VideoEncoderCap name (hevc|h264|h263|m4v|wmv) #REQUIRED>
+<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
+<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxHFRFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxHFRFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxHFRMode CDATA #REQUIRED>
+<!ELEMENT AudioEncoderCap EMPTY>
+<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma|lpcm) #REQUIRED>
+<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
+<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap minChannels (1|2|6) #REQUIRED>
+<!ATTLIST AudioEncoderCap maxChannels (1|2|6) #REQUIRED>
+<!ELEMENT VideoDecoderCap EMPTY>
+<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
+<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
+<!ELEMENT AudioDecoderCap EMPTY>
+<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
+<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
+<!ELEMENT VideoEditorCap EMPTY>
+<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED>
+<!ELEMENT ExportVideoProfile EMPTY>
+<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED>
+<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED>
+<!ATTLIST ExportVideoProfile level CDATA #REQUIRED>
+]>
+<!--
+ This file is used to declare the multimedia profiles and capabilities
+ on an android-powered device.
+-->
+<MediaSettings>
+ <!-- Each camcorder profile defines a set of predefined configuration parameters -->
+ <!-- Back Camera -->
+ <CamcorderProfiles cameraId="0">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+ <!-- Front Camera -->
+ <CamcorderProfiles cameraId="1">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <!-- TIMELAPSE profiles for front camera -->
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="1200000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="5000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="8000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <!-- Camera ID 2 -->
+ <CamcorderProfiles cameraId="2">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <!-- Camera ID 3 -->
+ <CamcorderProfiles cameraId="3">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <!-- Camera ID 4 -->
+ <CamcorderProfiles cameraId="4">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <!-- Camera ID 5 -->
+ <CamcorderProfiles cameraId="5">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <!-- Camera ID 6 -->
+ <CamcorderProfiles cameraId="6">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <!-- Camera ID 7 -->
+ <CamcorderProfiles cameraId="7">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <EncoderOutputFileFormat name="3gp" />
+ <EncoderOutputFileFormat name="mp4" />
+
+ <!--
+ If a codec is not enabled, it is invisible to the applications
+ In other words, the applications won't be able to use the codec
+ or query the capabilities of the codec at all if it is disabled
+ -->
+ <VideoEncoderCap name="h264" enabled="true"
+ minBitRate="64000" maxBitRate="60000000"
+ minFrameWidth="176" maxFrameWidth="1920"
+ minFrameHeight="144" maxFrameHeight="1080"
+ minFrameRate="15" maxFrameRate="30"
+ maxHFRFrameWidth="1920" maxHFRFrameHeight="1080"
+ maxHFRMode="120" />
+
+ <VideoEncoderCap name="h263" enabled="true"
+ minBitRate="64000" maxBitRate="2000000"
+ minFrameWidth="176" maxFrameWidth="800"
+ minFrameHeight="144" maxFrameHeight="480"
+ minFrameRate="15" maxFrameRate="30"
+ maxHFRFrameWidth="0" maxHFRFrameHeight="0"
+ maxHFRMode="0" />
+
+ <VideoEncoderCap name="m4v" enabled="true"
+ minBitRate="64000" maxBitRate="8000000"
+ minFrameWidth="176" maxFrameWidth="800"
+ minFrameHeight="144" maxFrameHeight="480"
+ minFrameRate="15" maxFrameRate="30"
+ maxHFRFrameWidth="0" maxHFRFrameHeight="0"
+ maxHFRMode="0" />
+
+ <VideoEncoderCap name="hevc" enabled="true"
+ minBitRate="64000" maxBitRate="60000000"
+ minFrameWidth="176" maxFrameWidth="1920"
+ minFrameHeight="144" maxFrameHeight="1080"
+ minFrameRate="15" maxFrameRate="30"
+ maxHFRFrameWidth="0" maxHFRFrameHeight="0"
+ maxHFRMode="0" />
+
+ <AudioEncoderCap name="aac" enabled="true"
+ minBitRate="8000" maxBitRate="96000"
+ minSampleRate="8000" maxSampleRate="48000"
+ minChannels="1" maxChannels="6" />
+
+ <AudioEncoderCap name="heaac" enabled="true"
+ minBitRate="8000" maxBitRate="64000"
+ minSampleRate="16000" maxSampleRate="48000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="aaceld" enabled="true"
+ minBitRate="16000" maxBitRate="192000"
+ minSampleRate="16000" maxSampleRate="48000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="amrwb" enabled="true"
+ minBitRate="6600" maxBitRate="23850"
+ minSampleRate="16000" maxSampleRate="16000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="amrnb" enabled="true"
+ minBitRate="5525" maxBitRate="12200"
+ minSampleRate="8000" maxSampleRate="8000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="lpcm" enabled="true"
+ minBitRate="768000" maxBitRate="4608000"
+ minSampleRate="8000" maxSampleRate="48000"
+ minChannels="1" maxChannels="6" />
+
+ <!--
+ FIXME:
+ We do not check decoder capabilities at present
+ At present, we only check whether windows media is visible
+ for TEST applications. For other applications, we do
+ not perform any checks at all.
+ -->
+ <VideoDecoderCap name="wmv" enabled="true"/>
+ <AudioDecoderCap name="wma" enabled="true"/>
+
+ <!--
+ The VideoEditor Capability configuration:
+ - maxInputFrameWidth: maximum video width of imported video clip.
+ - maxInputFrameHeight: maximum video height of imported video clip.
+ - maxOutputFrameWidth: maximum video width of exported video clip.
+ - maxOutputFrameHeight: maximum video height of exported video clip.
+ - maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder,
+ used to limit the amount of memory for prefetched YUV frames.
+ For this platform, it allows maximum 30MB(3MB per 1080p frame x 10
+ frames) memory.
+ -->
+ <VideoEditorCap maxInputFrameWidth="1920"
+ maxInputFrameHeight="1088" maxOutputFrameWidth="1920"
+ maxOutputFrameHeight="1088" maxPrefetchYUVFrames="10"/>
+ <!--
+ The VideoEditor Export codec profile and level values
+ correspond to the values in OMX_Video.h.
+ E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
+ and level 4096 means OMX_VIDEO_AVCLevel41.
+ Please note that the values are in decimal.
+ These values are for video encoder.
+ -->
+ <!--
+ Codec = h.264, Baseline profile, level 4.0
+ -->
+ <ExportVideoProfile name="h264" profile= "1" level="2048"/>
+ <!--
+ Codec = h.263, Baseline profile, level 70
+ -->
+ <ExportVideoProfile name="h263" profile= "1" level="128"/>
+ <!--
+ Codec = mpeg4, Simple profile, level 5
+ -->
+ <ExportVideoProfile name="m4v" profile= "1" level="128"/>
+</MediaSettings>
diff --git a/conf_files/bengal/media_profiles_scuba.xml b/conf_files/bengal/media_profiles_scuba.xml
new file mode 100644
index 0000000..25e9f09
--- /dev/null
+++ b/conf_files/bengal/media_profiles_scuba.xml
@@ -0,0 +1,1197 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
+ Not a contribution.
+ Copyright (C) 2010 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.
+-->
+<!DOCTYPE MediaSettings [
+<!ELEMENT MediaSettings (CamcorderProfiles,
+ EncoderOutputFileFormat+,
+ VideoEncoderCap+,
+ AudioEncoderCap+,
+ VideoDecoderCap,
+ AudioDecoderCap)>
+<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
+<!ELEMENT EncoderProfile (Video, Audio)>
+<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
+<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
+<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
+<!ATTLIST EncoderProfile cameraId (0|1|2|3) #REQUIRED>
+<!ELEMENT Video EMPTY>
+<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
+<!ATTLIST Video bitRate CDATA #REQUIRED>
+<!ATTLIST Video width CDATA #REQUIRED>
+<!ATTLIST Video height CDATA #REQUIRED>
+<!ATTLIST Video frameRate CDATA #REQUIRED>
+<!ELEMENT Audio EMPTY>
+<!ATTLIST Audio codec (amrnb|amrwb|aac|lpcm) #REQUIRED>
+<!ATTLIST Audio bitRate CDATA #REQUIRED>
+<!ATTLIST Audio sampleRate CDATA #REQUIRED>
+<!ATTLIST Audio channels (1|2|6) #REQUIRED>
+<!ELEMENT ImageEncoding EMPTY>
+<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
+<!ELEMENT ImageDecoding EMPTY>
+<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
+<!ELEMENT Camera EMPTY>
+<!ELEMENT EncoderOutputFileFormat EMPTY>
+<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
+<!ELEMENT VideoEncoderCap EMPTY>
+<!ATTLIST VideoEncoderCap name (hevc|h264|h263|m4v|wmv) #REQUIRED>
+<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
+<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxHFRFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxHFRFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxHFRMode CDATA #REQUIRED>
+<!ELEMENT AudioEncoderCap EMPTY>
+<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma|lpcm) #REQUIRED>
+<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
+<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap minChannels (1|2|6) #REQUIRED>
+<!ATTLIST AudioEncoderCap maxChannels (1|2|6) #REQUIRED>
+<!ELEMENT VideoDecoderCap EMPTY>
+<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
+<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
+<!ELEMENT AudioDecoderCap EMPTY>
+<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
+<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
+<!ELEMENT VideoEditorCap EMPTY>
+<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED>
+<!ELEMENT ExportVideoProfile EMPTY>
+<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED>
+<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED>
+<!ATTLIST ExportVideoProfile level CDATA #REQUIRED>
+]>
+<!--
+ This file is used to declare the multimedia profiles and capabilities
+ on an android-powered device.
+-->
+<MediaSettings>
+ <!-- Each camcorder profile defines a set of predefined configuration parameters -->
+ <!-- Back Camera -->
+ <CamcorderProfiles cameraId="0">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+ <!-- Front Camera -->
+ <CamcorderProfiles cameraId="1">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <!-- TIMELAPSE profiles for front camera -->
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="1200000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="5000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="8000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="96000"
+ sampleRate="48000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <!-- Camera ID 2 -->
+ <CamcorderProfiles cameraId="2">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="20000000"
+ width="1920"
+ height="1080"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <!-- Camera ID 3 -->
+ <CamcorderProfiles cameraId="3">
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="high" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="720"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="vga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="720000"
+ width="352"
+ height="288"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+
+ <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="512000"
+ width="320"
+ height="240"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="2000000"
+ width="640"
+ height="480"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
+ <Video codec="h264"
+ bitRate="14000000"
+ width="1280"
+ height="720"
+ frameRate="30" />
+
+ <!-- audio setting is ignored -->
+ <Audio codec="aac"
+ bitRate="156000"
+ sampleRate="48000"
+ channels="2" />
+ </EncoderProfile>
+
+ <ImageEncoding quality="95" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ </CamcorderProfiles>
+
+ <EncoderOutputFileFormat name="3gp" />
+ <EncoderOutputFileFormat name="mp4" />
+
+ <!--
+ If a codec is not enabled, it is invisible to the applications
+ In other words, the applications won't be able to use the codec
+ or query the capabilities of the codec at all if it is disabled
+ -->
+ <VideoEncoderCap name="h264" enabled="true"
+ minBitRate="64000" maxBitRate="60000000"
+ minFrameWidth="176" maxFrameWidth="1920"
+ minFrameHeight="144" maxFrameHeight="1080"
+ minFrameRate="15" maxFrameRate="30"
+ maxHFRFrameWidth="1920" maxHFRFrameHeight="1080"
+ maxHFRMode="120" />
+
+ <VideoEncoderCap name="h263" enabled="true"
+ minBitRate="64000" maxBitRate="2000000"
+ minFrameWidth="176" maxFrameWidth="800"
+ minFrameHeight="144" maxFrameHeight="480"
+ minFrameRate="15" maxFrameRate="30"
+ maxHFRFrameWidth="0" maxHFRFrameHeight="0"
+ maxHFRMode="0" />
+
+ <VideoEncoderCap name="m4v" enabled="true"
+ minBitRate="64000" maxBitRate="8000000"
+ minFrameWidth="176" maxFrameWidth="800"
+ minFrameHeight="144" maxFrameHeight="480"
+ minFrameRate="15" maxFrameRate="30"
+ maxHFRFrameWidth="0" maxHFRFrameHeight="0"
+ maxHFRMode="0" />
+
+ <VideoEncoderCap name="hevc" enabled="true"
+ minBitRate="64000" maxBitRate="60000000"
+ minFrameWidth="176" maxFrameWidth="1920"
+ minFrameHeight="144" maxFrameHeight="1080"
+ minFrameRate="15" maxFrameRate="30"
+ maxHFRFrameWidth="0" maxHFRFrameHeight="0"
+ maxHFRMode="0" />
+
+ <AudioEncoderCap name="aac" enabled="true"
+ minBitRate="8000" maxBitRate="96000"
+ minSampleRate="8000" maxSampleRate="48000"
+ minChannels="1" maxChannels="6" />
+
+ <AudioEncoderCap name="heaac" enabled="true"
+ minBitRate="8000" maxBitRate="64000"
+ minSampleRate="16000" maxSampleRate="48000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="aaceld" enabled="true"
+ minBitRate="16000" maxBitRate="192000"
+ minSampleRate="16000" maxSampleRate="48000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="amrwb" enabled="true"
+ minBitRate="6600" maxBitRate="23850"
+ minSampleRate="16000" maxSampleRate="16000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="amrnb" enabled="true"
+ minBitRate="5525" maxBitRate="12200"
+ minSampleRate="8000" maxSampleRate="8000"
+ minChannels="1" maxChannels="1" />
+
+ <AudioEncoderCap name="lpcm" enabled="true"
+ minBitRate="768000" maxBitRate="4608000"
+ minSampleRate="8000" maxSampleRate="48000"
+ minChannels="1" maxChannels="6" />
+
+ <!--
+ FIXME:
+ We do not check decoder capabilities at present
+ At present, we only check whether windows media is visible
+ for TEST applications. For other applications, we do
+ not perform any checks at all.
+ -->
+ <VideoDecoderCap name="wmv" enabled="true"/>
+ <AudioDecoderCap name="wma" enabled="true"/>
+
+ <!--
+ The VideoEditor Capability configuration:
+ - maxInputFrameWidth: maximum video width of imported video clip.
+ - maxInputFrameHeight: maximum video height of imported video clip.
+ - maxOutputFrameWidth: maximum video width of exported video clip.
+ - maxOutputFrameHeight: maximum video height of exported video clip.
+ - maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder,
+ used to limit the amount of memory for prefetched YUV frames.
+ For this platform, it allows maximum 30MB(3MB per 1080p frame x 10
+ frames) memory.
+ -->
+ <VideoEditorCap maxInputFrameWidth="1920"
+ maxInputFrameHeight="1088" maxOutputFrameWidth="1920"
+ maxOutputFrameHeight="1088" maxPrefetchYUVFrames="10"/>
+ <!--
+ The VideoEditor Export codec profile and level values
+ correspond to the values in OMX_Video.h.
+ E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
+ and level 4096 means OMX_VIDEO_AVCLevel41.
+ Please note that the values are in decimal.
+ These values are for video encoder.
+ -->
+ <!--
+ Codec = h.264, Baseline profile, level 4.0
+ -->
+ <ExportVideoProfile name="h264" profile= "1" level="2048"/>
+ <!--
+ Codec = h.263, Baseline profile, level 70
+ -->
+ <ExportVideoProfile name="h263" profile= "1" level="128"/>
+ <!--
+ Codec = mpeg4, Simple profile, level 5
+ -->
+ <ExportVideoProfile name="m4v" profile= "1" level="128"/>
+</MediaSettings>
diff --git a/conf_files/bengal/system_properties.xml b/conf_files/bengal/system_properties.xml
index d4d02f0..3048f90 100644
--- a/conf_files/bengal/system_properties.xml
+++ b/conf_files/bengal/system_properties.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
-Copyright (c) 2017,2019 The Linux Foundation. All rights reserved.
+Copyright (c) 2017,2019-2020 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,7 +34,10 @@
<property name="vidc_enc_log_in" value="0"/>
<property name="vidc_enc_log_out" value="0"/>
<property name="vidc_enc_csc_custom_matrix" value="0"/>
- <property name="vidc_c2d_rotation" value="1"/>
+ <property name="vidc_no_vpss" value="1"/>
<!-- Bitmask for arb mode: 1: AVC, 2: HEVC, 4: MPEG2 -->
<property name="vidc_dec_arb_mode_override" value="7"/>
+ <!-- Bitmask for hdr disable mode: 1: dec, 2: enc -->
+ <property name="vidc_disable_hdr" value="3"/>
+ <property name="vidc_enc_quality_boost_enable" value="1"/>
</configs>
diff --git a/conf_files/kona/kona.mk b/conf_files/kona/kona.mk
index b2fd6da..a0a50aa 100644
--- a/conf_files/kona/kona.mk
+++ b/conf_files/kona/kona.mk
@@ -3,10 +3,13 @@
PRODUCT_COPY_FILES += \
$(CONFIG_PATH)/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
- $(CONFIG_PATH)/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
- $(CONFIG_PATH)/media_codecs_vendor.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor.xml \
+ $(CONFIG_PATH)/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_kona_vendor.xml \
+ $(CONFIG_PATH)/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_kona.xml \
+ $(CONFIG_PATH)/media_codecs_vendor.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_kona_vendor.xml \
+ $(CONFIG_PATH)/media_codecs_vendor.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_kona.xml \
$(CONFIG_PATH)/media_codecs_vendor_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_audio.xml \
$(CONFIG_PATH)/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml \
+ $(CONFIG_PATH)/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_kona.xml \
$(CONFIG_PATH)/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
$(CONFIG_PATH)/system_properties.xml:$(TARGET_COPY_OUT_VENDOR)/etc/system_properties.xml
@@ -27,10 +30,8 @@
PRODUCT_COPY_FILES += \
device/qcom/common/media/media_profiles.xml:TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml
else
- $(warning "Enabling codec2.0 SW only for non-generic odm build variant")
- #Rank OMX SW codecs lower than OMX HW codecs
- PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank.sw-audio=1
- PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank=0
+ $(warning "Enabling codec2.0 non-audio SW only for non-generic odm build variant")
+PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank=0
PRODUCT_COPY_FILES += \
$(CONFIG_PATH)/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml
endif
diff --git a/conf_files/kona/media_codecs.xml b/conf_files/kona/media_codecs.xml
index fa3cb5c..d725d07 100644
--- a/conf_files/kona/media_codecs.xml
+++ b/conf_files/kona/media_codecs.xml
@@ -297,6 +297,7 @@
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-8000000" />
<Limit name="frame-rate" range="1-30" />
+ <Attribute name="software-codec" />
<Limit name="concurrent-instances" max="3" />
<Limit name="performance-point-720x576" value="25" />
<Limit name="performance-point-720x480" value="30" />
diff --git a/conf_files/kona/media_codecs_performance.xml b/conf_files/kona/media_codecs_performance.xml
index e7fc6f4..ff66263 100644
--- a/conf_files/kona/media_codecs_performance.xml
+++ b/conf_files/kona/media_codecs_performance.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
-Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
Not a Contribution.
@@ -24,7 +24,7 @@
<MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
<Limit name="measured-frame-rate-320x240" range="310-450" />
<Limit name="measured-frame-rate-720x480" range="277-287" />
- <Limit name="measured-frame-rate-1280x720" range="200-204" />
+ <Limit name="measured-frame-rate-1280x720" range="88-90" />
<Limit name="measured-frame-rate-1920x1080" range="116-118" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true">
@@ -40,15 +40,16 @@
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" update="true">
<Limit name="measured-frame-rate-176x144" range="303-303" />
<Limit name="measured-frame-rate-352x288" range="259-259" />
+ <Limit name="measured-frame-rate-704x576" range="87-155" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="299-299" />
- <Limit name="measured-frame-rate-352x288" range="245-245" />
+ <Limit name="measured-frame-rate-352x288" range="120-170" />
<Limit name="measured-frame-rate-640x480" range="148-148" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" update="true">
<Limit name="measured-frame-rate-320x180" range="355-520" />
- <Limit name="measured-frame-rate-640x360" range="165-165" />
+ <Limit name="measured-frame-rate-640x360" range="236-302" />
<Limit name="measured-frame-rate-1280x720" range="123-125" />
<Limit name="measured-frame-rate-1920x1080" range="16-40" />
</MediaCodec>
@@ -95,6 +96,7 @@
</MediaCodec>
<MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true">
<Limit name="measured-frame-rate-320x240" range="22-35" />
+ <Limit name="measured-frame-rate-720x480" range="6-22" />
</MediaCodec>
</Encoders>
<Decoders>
@@ -112,13 +114,13 @@
<Limit name="measured-frame-rate-3840x2160" range="148-149" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" update="true">
- <Limit name="measured-frame-rate-176x144" range="530-650" />
+ <Limit name="measured-frame-rate-176x144" range="782-1581" />
<Limit name="measured-frame-rate-352x288" range="380-920" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es" update="true">
- <Limit name="measured-frame-rate-176x144" range="381-767" />
+ <Limit name="measured-frame-rate-176x144" range="775-2064" />
<Limit name="measured-frame-rate-480x360" range="695-915" />
- <Limit name="measured-frame-rate-1280x720" range="240-292" />
+ <Limit name="measured-frame-rate-1280x720" range="369-529" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" update="true">
<Limit name="measured-frame-rate-320x240" range="1111-1357" />
@@ -128,7 +130,7 @@
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" update="true">
<Limit name="measured-frame-rate-320x240" range="806-1245" />
- <Limit name="measured-frame-rate-640x360" range="499-695" />
+ <Limit name="measured-frame-rate-640x360" range="832-1285" />
<Limit name="measured-frame-rate-1280x720" range="485-600" />
<Limit name="measured-frame-rate-1920x1080" range="435-495" />
<Limit name="measured-frame-rate-3840x2160" range="83-98" />
@@ -170,34 +172,34 @@
<Limit name="measured-frame-rate-1920x1080" range="19-23" />
</MediaCodec>
<MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
- <Limit name="measured-frame-rate-320x240" range="196-269" />
- <Limit name="measured-frame-rate-720x480" range="56-77" />
- <Limit name="measured-frame-rate-1280x720" range="21-33" />
+ <Limit name="measured-frame-rate-320x240" range="350-469" />
+ <Limit name="measured-frame-rate-720x480" range="326-436" />
+ <Limit name="measured-frame-rate-1280x720" range="21-155" />
<Limit name="measured-frame-rate-1920x1080" range="12-17" />
</MediaCodec>
<MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
<Limit name="measured-frame-rate-352x288" range="355-960" />
- <Limit name="measured-frame-rate-640x360" range="120-164" />
- <Limit name="measured-frame-rate-720x480" range="111-152" />
- <Limit name="measured-frame-rate-1280x720" range="61-83" />
- <Limit name="measured-frame-rate-1920x1080" range="36-49" />
+ <Limit name="measured-frame-rate-640x360" range="308-526" />
+ <Limit name="measured-frame-rate-720x480" range="370-455" />
+ <Limit name="measured-frame-rate-1280x720" range="105-210" />
+ <Limit name="measured-frame-rate-1920x1080" range="92-143" />
</MediaCodec>
<MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="550-1200" />
</MediaCodec>
<MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
- <Limit name="measured-frame-rate-176x144" range="950-1450" />
- <Limit name="measured-frame-rate-352x288" range="324-769" />
+ <Limit name="measured-frame-rate-176x144" range="2190-2264" />
+ <Limit name="measured-frame-rate-352x288" range="653-1526" />
</MediaCodec>
<MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
- <Limit name="measured-frame-rate-320x180" range="415-575" />
+ <Limit name="measured-frame-rate-320x180" range="573-1136" />
<Limit name="measured-frame-rate-640x360" range="200-450" />
- <Limit name="measured-frame-rate-1280x720" range="44-60" />
- <Limit name="measured-frame-rate-1920x1080" range="28-38" />
+ <Limit name="measured-frame-rate-1280x720" range="72-85" />
+ <Limit name="measured-frame-rate-1920x1080" range="19-31" />
</MediaCodec>
<MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
- <Limit name="measured-frame-rate-320x180" range="460-626" />
- <Limit name="measured-frame-rate-640x360" range="222-302" />
+ <Limit name="measured-frame-rate-320x180" range="601-1177" />
+ <Limit name="measured-frame-rate-640x360" range="460-560" />
<Limit name="measured-frame-rate-1280x720" range="107-145" />
<Limit name="measured-frame-rate-1920x1080" range="31-43" />
</MediaCodec>
diff --git a/conf_files/kona/media_codecs_vendor.xml b/conf_files/kona/media_codecs_vendor.xml
index 850b4d9..c22c2ef 100644
--- a/conf_files/kona/media_codecs_vendor.xml
+++ b/conf_files/kona/media_codecs_vendor.xml
@@ -298,6 +298,7 @@
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-8000000" />
<Limit name="frame-rate" range="1-30" />
+ <Attribute name="software-codec" />
<Limit name="concurrent-instances" max="3" />
<Limit name="performance-point-720x576" value="25" />
<Limit name="performance-point-720x480" value="30" />
diff --git a/conf_files/kona/media_codecs_vendor_audio.xml b/conf_files/kona/media_codecs_vendor_audio.xml
index 0cd3294..2749bc6 100644
--- a/conf_files/kona/media_codecs_vendor_audio.xml
+++ b/conf_files/kona/media_codecs_vendor_audio.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright (C) 2015-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2015-2020 The Linux Foundation. All rights reserved.
Not a contribution.
Copyright (C) 2012 The Android Open Source Project
@@ -19,8 +19,5 @@
<Decoders>
<MediaCodec name="OMX.google.opus.decoder" type="audio/opus" update="true" rank="100"/>
<!-- SimpleOMXComponet based software decoder-->
- <MediaCodec name="OMX.qti.audio.decoder.flac" type="audio/flac" rank="0">
- <Limit name="concurrent-instances" max="10" />
- </MediaCodec>
</Decoders>
</Included>
diff --git a/conf_files/kona/media_profiles.xml b/conf_files/kona/media_profiles.xml
index 3c3e04a..5cb7b95 100644
--- a/conf_files/kona/media_profiles.xml
+++ b/conf_files/kona/media_profiles.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2012-2019, 2021 The Linux Foundation. All rights reserved.
Not a contribution.
Copyright (C) 2010 The Android Open Source Project
@@ -186,32 +186,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="29400000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="57500000"
@@ -404,34 +378,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="29400000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="57500000"
@@ -626,32 +572,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="29400000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="57500000"
@@ -844,34 +764,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="29400000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="57500000"
@@ -1066,32 +958,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="29400000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="57500000"
@@ -1284,34 +1150,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="29400000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="57500000"
@@ -1506,32 +1344,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="29400000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="57500000"
@@ -1724,34 +1536,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="29400000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="57500000"
diff --git a/conf_files/kona/system_properties.xml b/conf_files/kona/system_properties.xml
index efde013..c94cb2e 100644
--- a/conf_files/kona/system_properties.xml
+++ b/conf_files/kona/system_properties.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
-Copyright (c) 2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -39,8 +39,11 @@
<!-- Buffer size : internal : 200 MB (200 X 1), output : 200 MB (12.5 X 16) -->
<property name="vidc_dec_sec_prefetch_size_internal" value="209715200"/>
<property name="vidc_dec_sec_prefetch_size_output" value="13434880"/>
- <property name="vidc_enc_bitrate_savings_enable" value="1"/>
+ <!-- Enable CAC control: 0x0: disabled, 0x1:enabled for 8 bit, 0x2:enabled for 10 bit, 0x3:enabled for 8 and 10 bits both -->
+ <property name="vidc_enc_bitrate_savings_enable" value="3"/>
<property name="vidc_enc_auto_blur_disable" value="0"/>
<!-- Bitmask 0: RGB565 1: YUV420P 8-bit, 2: YUV420P 10-bit, 3: YUV420p 8&10 bit -->
<property name="vidc_dec_thumbnail_yuv_output" value="0"/>
+ <property name="vidc_enc_quality_boost_enable" value="1"/>
+ <property name="vidc_dec_output_rate" value="120"/>
</configs>
diff --git a/conf_files/lito/lito.mk b/conf_files/lito/lito.mk
index 7ffe0f6..9b8cffe 100644
--- a/conf_files/lito/lito.mk
+++ b/conf_files/lito/lito.mk
@@ -6,9 +6,12 @@
$(CONFIG_PATH)/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
$(CONFIG_PATH)/media_codecs_vendor.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor.xml \
$(CONFIG_PATH)/media_codecs_vendor_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_audio.xml \
- $(CONFIG_PATH)/media_codecs_vendor_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v1.xml \
- $(CONFIG_PATH)/media_codecs_performance_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_v1.xml \
- $(CONFIG_PATH)/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml \
+ $(CONFIG_PATH)/media_codecs_vendor_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v1.xml \
+ $(CONFIG_PATH)/media_codecs_performance_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_v1.xml \
+ $(CONFIG_PATH)/media_codecs_performance_lagoon_v0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_v2.xml \
+ $(CONFIG_PATH)/media_codecs_vendor_lagoon_v0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v2.xml \
+ $(CONFIG_PATH)/media_codecs_performance_lagoon_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_v3.xml \
+ $(CONFIG_PATH)/media_codecs_vendor_lagoon_v1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v3.xml \
$(CONFIG_PATH)/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
$(CONFIG_PATH)/system_properties.xml:$(TARGET_COPY_OUT_VENDOR)/etc/system_properties.xml
@@ -27,15 +30,15 @@
PRODUCT_ODM_PROPERTIES += debug.stagefright.ccodec=4
PRODUCT_ODM_PROPERTIES += debug.stagefright.omx_default_rank=1000
PRODUCT_COPY_FILES += \
- device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml
+ device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml \
+ device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml
else
- $(warning "Enabling codec2.0 SW only for non-generic odm build variant")
- #Rank OMX SW codecs lower than OMX HW codecs
- PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank.sw-audio=1
+ $(warning "Enabling codec2.0 non-audio SW only for non-generic odm build variant")
PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank=0
PRODUCT_PROPERTY_OVERRIDES += media.settings.xml=/vendor/etc/media_profiles_vendor.xml
PRODUCT_COPY_FILES += \
- $(CONFIG_PATH)/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml
+ device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml \
+ $(CONFIG_PATH)/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml
endif
# Produce packages addition
diff --git a/conf_files/lito/media_codecs.xml b/conf_files/lito/media_codecs.xml
index 67111bc..4072750 100644
--- a/conf_files/lito/media_codecs.xml
+++ b/conf_files/lito/media_codecs.xml
@@ -86,16 +86,13 @@
_____________________________________________________
| Codec | W H fps Mbps MB/s |
|_____________|_______________________________________|
- | h264 | 3840 2176 60 100 1958400 |
- | | 4096 2176 48 100 |
- | hevc | 3840 2176 60 100 1958400 |
- | | 4096 2176 48 100 |
- | mpeg4-sw | 1920 1088 30 40 244800 |
- | vp8 | 3840 2176 30 100 979200 |
+ | h264 | 3840 2176 30 100 979200 |
| | 4096 2176 24 100 |
- | vp9 | 3840 2176 60 100 1958400 |
- | | 4096 2176 48 100 |
- | vc1 | 1920 1088 30 20 244800 |
+ | hevc | 3840 2176 30 100 979200 |
+ | | 4096 2176 24 100 |
+ | mpeg4-sw | 1920 1088 30 40 244800 |
+ | vp9 | 3840 2176 30 100 979200 |
+ | | 4096 2176 24 100 |
| h263-sw | 864 480 30 16 48600 |
| mpeg2 | 1920 1088 30 40 244800 |
|_____________|_______________________________________|
@@ -106,12 +103,12 @@
_________________________________________________
| Codec | W H fps Mbps MB/s |
|__________|_____________________________________|
- | h264 | 3840 2176 60 40 1958400 |
- | | 4096 2176 48 40 |
- | vp9 | 3840 2176 60 40 1958400 |
- | | 4096 2176 48 40 |
- | hevc | 3840 2176 60 40 1958400 |
- | | 4096 2176 48 40 |
+ | h264 | 3840 2176 30 40 979200 |
+ | | 4096 2176 24 40 |
+ | vp9 | 3840 2176 30 40 979200 |
+ | | 4096 2176 24 40 |
+ | hevc | 3840 2176 30 40 979200 |
+ | | 4096 2176 24 40 |
| mpeg2 | 1920 1088 30 40 244800 |
|__________|_____________________________________|
@@ -122,13 +119,11 @@
_________________________________________________
| Codec | W H fps Mbps MB/s |
|__________|_____________________________________|
- | h264 | 3840 2176 60 100 1958400 |
- | | 4096 2176 48 100 |
- | hevc | 3840 2176 60 100 1958400 |
- | | 4096 2176 48 100 |
- | mpeg4-sw | 864 480 30 8 48600 |
- | vp8 | 3840 2176 30 100 979200 |
+ | h264 | 3840 2176 30 100 979200 |
| | 4096 2176 24 100 |
+ | hevc | 3840 2176 30 100 979200 |
+ | | 4096 2176 24 100 |
+ | mpeg4-sw | 864 480 30 8 48600 |
| h263-sw | 864 480 30 2 48600 |
|__________|_____________________________________|
-->
@@ -145,64 +140,61 @@
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="requires-loaded-to-idle-after-allocation" />
- <Limit name="size" min="96x96" max="4096x2176" />
+ <Limit name="size" min="128x128" max="4096x2176" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="1958400" />
- <Limit name="bitrate" range="1-100000000" />
- <Limit name="frame-rate" range="1-480" />
- <Limit name="performance-point-4096x2304" value="30" />
- <Limit name="performance-point-3840x2160" value="60" />
- <Limit name="performance-point-1920x1080" value="240" />
- <Limit name="performance-point-1280x720" value="480" />
- <Limit name="concurrent-instances" max="16" />
- </MediaCodec>
- <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" >
- <Quirk name="requires-allocate-on-input-ports" />
- <Quirk name="requires-allocate-on-output-ports" />
- <Quirk name="requires-loaded-to-idle-after-allocation" />
- <Limit name="size" min="96x96" max="4096x2176" />
- <Limit name="alignment" value="2x2" />
- <Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="979200" />
+ <Limit name="blocks-per-second" min="64" max="979200" />
<Limit name="bitrate" range="1-100000000" />
<Limit name="frame-rate" range="1-240" />
- <Limit name="concurrent-instances" max="16" />
<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" />
+ <Limit name="concurrent-instances" max="16" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="requires-loaded-to-idle-after-allocation" />
- <Limit name="size" min="96x96" max="4096x2176" />
+ <Limit name="size" min="128x128" max="4096x2176" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="1958400" />
+ <Limit name="blocks-per-second" min="64" max="979200" />
<Limit name="bitrate" range="1-100000000" />
- <Limit name="frame-rate" range="1-480" />
+ <Limit name="frame-rate" range="1-240" />
<Limit name="concurrent-instances" max="16" />
<Limit name="quality" range="0-100" default="80" />
<Feature name="bitrate-modes" value="VBR,CBR" />
- <Limit name="performance-point-4096x2304" value="30" />
- <Limit name="performance-point-3840x2160" value="60" />
- <Limit name="performance-point-1920x1080" value="240" />
- <Limit name="performance-point-1280x720" value="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" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="requires-loaded-to-idle-after-allocation" />
- <Limit name="size" min="512x512" max="512x512" />
+ <Limit name="size" min="128x128" max="512x512" />
<Limit name="frame-rate" range="1-20" />
<Limit name="concurrent-instances" max="16" />
<Limit name="quality" range="0-100" default="80" />
<Feature name="bitrate-modes" value="CQ" />
<Limit name="performance-point-512x512" value="2025" />
</MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.heic" type="image/vnd.android.heic" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="512x512" max="8192x8192" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-8192x4320" value="3" />
+ <Limit name="performance-point-1920x1080" value="6" />
+ </MediaCodec>
<!-- Video Software -->
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -227,6 +219,7 @@
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-8000000" />
<Limit name="frame-rate" range="1-30" />
+ <Attribute name="software-codec" />
<Limit name="concurrent-instances" max="3" />
<Limit name="performance-point-720x480" value="30" />
</MediaCodec>
@@ -236,68 +229,10 @@
<MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="96x96" max="4096x2176" />
+ <Limit name="size" min="128x128" max="4096x2176" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="1958400" />
- <Limit name="bitrate" range="1-100000000" />
- <Limit name="frame-rate" range="1-480" />
- <Feature name="adaptive-playback" />
- <Limit name="concurrent-instances" max="16" />
- <Limit name="performance-point-4096x2304" value="30" />
- <Limit name="performance-point-3840x2160" value="60" />
- <Limit name="performance-point-1920x1080" value="240" />
- <Limit name="performance-point-1280x720" value="480" />
- </MediaCodec>
- <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
- <Quirk name="requires-allocate-on-input-ports" />
- <Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="96x96" max="4096x2176" />
- <Limit name="alignment" value="2x2" />
- <Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="1958400" />
- <Limit name="bitrate" range="1-40000000" />
- <Limit name="frame-rate" range="1-60" />
- <Feature name="adaptive-playback" />
- <Feature name="secure-playback" required="true" />
- <Limit name="concurrent-instances" max="3" />
- <Limit name="performance-point-4096x2304" value="30" />
- <Limit name="performance-point-3840x2160" value="60" />
- </MediaCodec>
- <MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" >
- <Quirk name="requires-allocate-on-input-ports" />
- <Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="96x96" max="1920x1088" />
- <Limit name="alignment" value="2x2" />
- <Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="244800" />
- <Limit name="bitrate" range="1-40000000" />
- <Limit name="frame-rate" range="1-30" />
- <Feature name="adaptive-playback" />
- <Limit name="concurrent-instances" max="16" />
- <Limit name="performance-point-1920x1080" value="30" />
- </MediaCodec>
- <MediaCodec name="OMX.qcom.video.decoder.mpeg2.secure" type="video/mpeg2" >
- <Quirk name="requires-allocate-on-input-ports" />
- <Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="96x96" max="1920x1088" />
- <Limit name="alignment" value="2x2" />
- <Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="244800" />
- <Limit name="bitrate" range="1-40000000" />
- <Limit name="frame-rate" range="1-30" />
- <Feature name="adaptive-playback" />
- <Feature name="secure-playback" required="true" />
- <Limit name="concurrent-instances" max="3" />
- <Limit name="performance-point-1920x1080" value="30" />
- </MediaCodec>
- <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" >
- <Quirk name="requires-allocate-on-input-ports" />
- <Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="96x96" max="4096x2176" />
- <Limit name="alignment" value="2x2" />
- <Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="979200" />
+ <Limit name="blocks-per-second" min="64" max="979200" />
<Limit name="bitrate" range="1-100000000" />
<Limit name="frame-rate" range="1-240" />
<Feature name="adaptive-playback" />
@@ -307,67 +242,112 @@
<Limit name="performance-point-1920x1080" value="120" />
<Limit name="performance-point-1280x720" value="240" />
</MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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="979200" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-4096x2304" value="24" />
+ <Limit name="performance-point-3840x2160" value="30" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.mpeg2.secure" type="video/mpeg2" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="96x96" max="4096x2176" />
+ <Limit name="size" min="128x128" max="4096x2176" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="1958400" />
+ <Limit name="blocks-per-second" min="64" max="979200" />
<Limit name="bitrate" range="1-100000000" />
- <Limit name="frame-rate" range="1-480" />
+ <Limit name="frame-rate" range="1-240" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="6" />
- <Limit name="performance-point-4096x2304" value="30" />
- <Limit name="performance-point-3840x2160" value="60" />
- <Limit name="performance-point-1920x1080" value="240" />
- <Limit name="performance-point-1280x720" value="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" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="96x96" max="4096x2176" />
+ <Limit name="size" min="128x128" max="4096x2176" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="1958400" />
+ <Limit name="blocks-per-second" min="64" max="979200" />
<Limit name="bitrate" range="1-40000000" />
<Limit name="frame-rate" range="1-60" />
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Limit name="concurrent-instances" max="3" />
- <Limit name="performance-point-4096x2304" value="30" />
- <Limit name="performance-point-3840x2160" value="60" />
+ <Limit name="performance-point-4096x2304" value="24" />
+ <Limit name="performance-point-3840x2160" value="30" />
+ <Limit name="performance-point-1920x1080" value="60" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="96x96" max="4096x2176" />
+ <Limit name="size" min="128x128" max="4096x2176" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="1958400" />
+ <Limit name="blocks-per-second" min="64" max="979200" />
<Limit name="bitrate" range="1-100000000" />
- <Limit name="frame-rate" range="1-480" />
+ <Limit name="frame-rate" range="1-240" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="16" />
- <Limit name="performance-point-4096x2304" value="30" />
- <Limit name="performance-point-3840x2160" value="60" />
- <Limit name="performance-point-1920x1080" value="240" />
- <Limit name="performance-point-1280x720" value="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" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
- <Limit name="size" min="96x96" max="4096x2176" />
+ <Limit name="size" min="128x128" max="4096x2176" />
<Limit name="alignment" value="2x2" />
<Limit name="block-size" value="16x16" />
- <Limit name="blocks-per-second" min="36" max="1958400" />
+ <Limit name="blocks-per-second" min="64" max="979200" />
<Limit name="bitrate" range="1-40000000" />
<Limit name="frame-rate" range="1-60" />
<Feature name="adaptive-playback" />
<Feature name="secure-playback" required="true" />
<Limit name="concurrent-instances" max="3" />
- <Limit name="performance-point-4096x2304" value="30" />
- <Limit name="performance-point-3840x2160" value="60" />
+ <Limit name="performance-point-4096x2304" value="24" />
+ <Limit name="performance-point-3840x2160" value="30" />
+ <Limit name="performance-point-1920x1080" value="60" />
</MediaCodec>
<!-- Video Software -->
<MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
@@ -395,6 +375,7 @@
<Limit name="concurrent-instances" max="4" />
<Limit name="performance-point-1920x1080" value="30" />
</MediaCodec>
+ <MediaCodec name="OMX.google.opus.decoder" type="audio/opus" update="true" rank="100"/>
</Decoders>
<Include href="media_codecs_google_video.xml" />
</MediaCodecs>
diff --git a/conf_files/lito/media_codecs_performance.xml b/conf_files/lito/media_codecs_performance.xml
index 7281b95..e4e44d4 100644
--- a/conf_files/lito/media_codecs_performance.xml
+++ b/conf_files/lito/media_codecs_performance.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
-Copyright (c) 2015-2017, 2019 The Linux Foundation. All rights reserved.
+Copyright (c) 2015-2017, 2019-2020 The Linux Foundation. All rights reserved.
Not a Contribution.
@@ -22,18 +22,21 @@
<MediaCodecs>
<Encoders>
<MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
- <Limit name="measured-frame-rate-320x240" range="238-238" />
- <Limit name="measured-frame-rate-720x480" range="123-123" />
+ <Limit name="measured-frame-rate-320x240" range="337-452" />
+ <Limit name="measured-frame-rate-720x480" range="182-312" />
<Limit name="measured-frame-rate-1280x720" range="66-94" />
<Limit name="measured-frame-rate-1920x1080" range="55-65" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true">
- <Limit name="measured-frame-rate-320x240" range="226-226" />
- <Limit name="measured-frame-rate-720x480" range="121-121" />
+ <Limit name="measured-frame-rate-320x240" range="332-443" />
+ <Limit name="measured-frame-rate-720x480" range="194-317" />
<Limit name="measured-frame-rate-1280x720" range="65-94" />
<Limit name="measured-frame-rate-1920x1080" range="55-65" />
<Limit name="measured-frame-rate-3840x2160" range="20-27" />
</MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="340-400" />
+ </MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" update="true">
<Limit name="measured-frame-rate-176x144" range="60-90" />
<Limit name="measured-frame-rate-352x288" range="55-85" />
@@ -41,11 +44,11 @@
<MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="125-135" />
<Limit name="measured-frame-rate-352x288" range="55-85" />
- <Limit name="measured-frame-rate-640x480" range="47-52" />
+ <Limit name="measured-frame-rate-640x480" range="70-106" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" update="true">
<Limit name="measured-frame-rate-320x180" range="339-486" />
- <Limit name="measured-frame-rate-640x360" range="165-165" />
+ <Limit name="measured-frame-rate-640x360" range="203-291" />
<Limit name="measured-frame-rate-1280x720" range="46-116" />
<Limit name="measured-frame-rate-1920x1080" range="16-40" />
</MediaCodec>
@@ -104,8 +107,8 @@
<Limit name="measured-frame-rate-3840x2160" range="65-75" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" update="true">
- <Limit name="measured-frame-rate-176x144" range="356-356" />
- <Limit name="measured-frame-rate-352x288" range="292-292" />
+ <Limit name="measured-frame-rate-176x144" range="358-837" />
+ <Limit name="measured-frame-rate-352x288" range="321-456" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="374-542" />
@@ -170,7 +173,7 @@
<MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
<Limit name="measured-frame-rate-352x288" range="128-178" />
<Limit name="measured-frame-rate-640x360" range="84-96" />
- <Limit name="measured-frame-rate-720x480" range="66-94" />
+ <Limit name="measured-frame-rate-720x480" range="165-205" />
<Limit name="measured-frame-rate-1280x720" range="47-74" />
<Limit name="measured-frame-rate-1920x1080" range="29-43" />
</MediaCodec>
@@ -184,11 +187,12 @@
<MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
<Limit name="measured-frame-rate-320x180" range="310-690" />
<Limit name="measured-frame-rate-640x360" range="233-321" />
+ <Limit name="measured-frame-rate-1280x720" range="64-91" />
<Limit name="measured-frame-rate-1920x1080" range="22-33" />
</MediaCodec>
<MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
<Limit name="measured-frame-rate-320x180" range="234-450" />
- <Limit name="measured-frame-rate-640x360" range="65-91" />
+ <Limit name="measured-frame-rate-640x360" range="203-330" />
<Limit name="measured-frame-rate-1280x720" range="34-49" />
<Limit name="measured-frame-rate-1920x1080" range="20-31" />
</MediaCodec>
diff --git a/conf_files/lito/media_codecs_performance_lagoon_v0.xml b/conf_files/lito/media_codecs_performance_lagoon_v0.xml
new file mode 100644
index 0000000..043dc01
--- /dev/null
+++ b/conf_files/lito/media_codecs_performance_lagoon_v0.xml
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
+
+Not a Contribution.
+
+Copyright 2015 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.
+u 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.
+-->
+
+<MediaCodecs>
+ <Encoders>
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="350-490" />
+ <Limit name="measured-frame-rate-720x480" range="123-123" />
+ <Limit name="measured-frame-rate-1280x720" range="66-94" />
+ <Limit name="measured-frame-rate-1920x1080" range="55-65" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="240-590" />
+ <Limit name="measured-frame-rate-720x480" range="121-121" />
+ <Limit name="measured-frame-rate-1280x720" range="65-94" />
+ <Limit name="measured-frame-rate-1920x1080" range="55-65" />
+ <Limit name="measured-frame-rate-3840x2160" range="20-27" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="326-550" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="60-90" />
+ <Limit name="measured-frame-rate-352x288" range="55-85" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="125-135" />
+ <Limit name="measured-frame-rate-352x288" range="55-85" />
+ <Limit name="measured-frame-rate-640x480" range="75-130" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="215-215" />
+ <Limit name="measured-frame-rate-720x480" range="100-100" />
+ <Limit name="measured-frame-rate-1280x720" range="56-56" />
+ <Limit name="measured-frame-rate-1920x1080" range="30-30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="200-200" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="250-320" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="70-75" />
+ <Limit name="measured-frame-rate-640x360" range="32-32" />
+ <Limit name="measured-frame-rate-1280x720" range="17-24" />
+ <Limit name="measured-frame-rate-1920x1080" range="8-12" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="167-248" />
+ <Limit name="measured-frame-rate-720x480" range="62-90" />
+ <Limit name="measured-frame-rate-1280x720" range="48-56" />
+ <Limit name="measured-frame-rate-1920x1080" range="24-34" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="20-28" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="317-410" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="315-379" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="104-156" />
+ <Limit name="measured-frame-rate-640x360" range="76-105" />
+ <Limit name="measured-frame-rate-1280x720" range="26-32" />
+ <Limit name="measured-frame-rate-1920x1080" range="19-26" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="480-510" />
+ <Limit name="measured-frame-rate-720x480" range="460-490" />
+ <Limit name="measured-frame-rate-1280x720" range="350-400" />
+ <Limit name="measured-frame-rate-1920x1080" range="43-60" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="510-530" />
+ <Limit name="measured-frame-rate-720x480" range="465-620" />
+ <Limit name="measured-frame-rate-1280x720" range="200-390" />
+ <Limit name="measured-frame-rate-1920x1080" range="48-67" />
+ <Limit name="measured-frame-rate-3840x2160" range="65-75" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="356-356" />
+ <Limit name="measured-frame-rate-352x288" range="308-606" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="374-542" />
+ <Limit name="measured-frame-rate-480x360" range="245-265" />
+ <Limit name="measured-frame-rate-1280x720" range="80-200" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x240" range="377-377" />
+ <Limit name="measured-frame-rate-640x360" range="486-751" />
+ <Limit name="measured-frame-rate-1280x720" range="262-262" />
+ <Limit name="measured-frame-rate-1920x1080" range="55-76" />
+ <Limit name="measured-frame-rate-3840x2160" range="51-51" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="270-310" />
+ <Limit name="measured-frame-rate-720x480" range="68-68" />
+ <Limit name="measured-frame-rate-1280x720" range="32-32" />
+ <Limit name="measured-frame-rate-1920x1080" range="6-10" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="104-279" />
+ <Limit name="measured-frame-rate-352x288" range="200-200" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="520-650" />
+ <Limit name="measured-frame-rate-640x360" range="145-190" />
+ <Limit name="measured-frame-rate-720x480" range="235-245" />
+ <Limit name="measured-frame-rate-1280x720" range="88-100" />
+ <Limit name="measured-frame-rate-1920x1080" range="48-52" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.mpeg4.decoder" update="true">
+ <Type name="video/mp4v-es">
+ <Limit name="measured-frame-rate-176x144" range="430-450" />
+ </Type>
+ </MediaCodec>
+ <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="800-850" />
+ <Limit name="measured-frame-rate-320x240" range="330-381" />
+ <Limit name="measured-frame-rate-640x360" range="385-425" />
+ <Limit name="measured-frame-rate-1280x720" range="22-38" />
+ <Limit name="measured-frame-rate-1920x1080" range="32-37" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x180" range="640-720" />
+ <Limit name="measured-frame-rate-320x240" range="200-230" />
+ <Limit name="measured-frame-rate-640x360" range="81-90" />
+ <Limit name="measured-frame-rate-1280x720" range="60-85" />
+ <Limit name="measured-frame-rate-1920x1080" range="33-55" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="164-414" />
+ <Limit name="measured-frame-rate-720x480" range="40-60" />
+ <Limit name="measured-frame-rate-1280x720" range="17-24" />
+ <Limit name="measured-frame-rate-1920x1080" range="10-13" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="183-411" />
+ <Limit name="measured-frame-rate-640x360" range="84-96" />
+ <Limit name="measured-frame-rate-720x480" range="66-94" />
+ <Limit name="measured-frame-rate-1280x720" range="47-74" />
+ <Limit name="measured-frame-rate-1920x1080" range="29-43" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="450-850" />
+ <Limit name="measured-frame-rate-352x288" range="650-780" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="500-1103" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="310-690" />
+ <Limit name="measured-frame-rate-640x360" range="233-321" />
+ <Limit name="measured-frame-rate-1280x720" range="65-110" />
+ <Limit name="measured-frame-rate-1920x1080" range="22-33" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x180" range="234-450" />
+ <Limit name="measured-frame-rate-640x360" range="155-452" />
+ <Limit name="measured-frame-rate-1280x720" range="79-124" />
+ <Limit name="measured-frame-rate-1920x1080" range="20-31" />
+ </MediaCodec>
+ </Decoders>
+</MediaCodecs>
diff --git a/conf_files/lito/media_codecs_performance_lagoon_v1.xml b/conf_files/lito/media_codecs_performance_lagoon_v1.xml
new file mode 100644
index 0000000..da92aea
--- /dev/null
+++ b/conf_files/lito/media_codecs_performance_lagoon_v1.xml
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
+
+Not a Contribution.
+
+Copyright 2015 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.
+u 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.
+-->
+
+<MediaCodecs>
+ <Encoders>
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="350-490" />
+ <Limit name="measured-frame-rate-720x480" range="123-123" />
+ <Limit name="measured-frame-rate-1280x720" range="66-94" />
+ <Limit name="measured-frame-rate-1920x1080" range="55-65" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="240-590" />
+ <Limit name="measured-frame-rate-720x480" range="121-121" />
+ <Limit name="measured-frame-rate-1280x720" range="65-94" />
+ <Limit name="measured-frame-rate-1920x1080" range="55-65" />
+ <Limit name="measured-frame-rate-3840x2160" range="20-27" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="360-550" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="60-90" />
+ <Limit name="measured-frame-rate-352x288" range="55-85" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="125-135" />
+ <Limit name="measured-frame-rate-352x288" range="55-85" />
+ <Limit name="measured-frame-rate-640x480" range="75-130" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="215-215" />
+ <Limit name="measured-frame-rate-720x480" range="100-100" />
+ <Limit name="measured-frame-rate-1280x720" range="56-56" />
+ <Limit name="measured-frame-rate-1920x1080" range="30-30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="200-200" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="250-320" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="70-75" />
+ <Limit name="measured-frame-rate-640x360" range="32-32" />
+ <Limit name="measured-frame-rate-1280x720" range="17-24" />
+ <Limit name="measured-frame-rate-1920x1080" range="8-12" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="167-248" />
+ <Limit name="measured-frame-rate-720x480" range="62-90" />
+ <Limit name="measured-frame-rate-1280x720" range="48-56" />
+ <Limit name="measured-frame-rate-1920x1080" range="24-34" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="20-28" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="317-410" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="315-379" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="104-156" />
+ <Limit name="measured-frame-rate-640x360" range="76-105" />
+ <Limit name="measured-frame-rate-1280x720" range="26-32" />
+ <Limit name="measured-frame-rate-1920x1080" range="19-26" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="480-510" />
+ <Limit name="measured-frame-rate-720x480" range="460-490" />
+ <Limit name="measured-frame-rate-1280x720" range="350-400" />
+ <Limit name="measured-frame-rate-1920x1080" range="43-60" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="510-530" />
+ <Limit name="measured-frame-rate-720x480" range="465-620" />
+ <Limit name="measured-frame-rate-1280x720" range="200-390" />
+ <Limit name="measured-frame-rate-1920x1080" range="48-67" />
+ <Limit name="measured-frame-rate-3840x2160" range="65-75" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="356-356" />
+ <Limit name="measured-frame-rate-352x288" range="308-606" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="374-542" />
+ <Limit name="measured-frame-rate-480x360" range="245-265" />
+ <Limit name="measured-frame-rate-1280x720" range="80-200" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x240" range="377-377" />
+ <Limit name="measured-frame-rate-640x360" range="486-751" />
+ <Limit name="measured-frame-rate-1280x720" range="262-262" />
+ <Limit name="measured-frame-rate-1920x1080" range="55-76" />
+ <Limit name="measured-frame-rate-3840x2160" range="51-51" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="270-310" />
+ <Limit name="measured-frame-rate-720x480" range="68-68" />
+ <Limit name="measured-frame-rate-1280x720" range="32-32" />
+ <Limit name="measured-frame-rate-1920x1080" range="6-10" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="104-279" />
+ <Limit name="measured-frame-rate-352x288" range="200-200" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="520-650" />
+ <Limit name="measured-frame-rate-640x360" range="145-190" />
+ <Limit name="measured-frame-rate-720x480" range="235-245" />
+ <Limit name="measured-frame-rate-1280x720" range="88-100" />
+ <Limit name="measured-frame-rate-1920x1080" range="48-52" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.mpeg4.decoder" update="true">
+ <Type name="video/mp4v-es">
+ <Limit name="measured-frame-rate-176x144" range="430-450" />
+ </Type>
+ </MediaCodec>
+ <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="800-850" />
+ <Limit name="measured-frame-rate-320x240" range="330-381" />
+ <Limit name="measured-frame-rate-640x360" range="385-425" />
+ <Limit name="measured-frame-rate-1280x720" range="22-38" />
+ <Limit name="measured-frame-rate-1920x1080" range="32-37" />
+ </MediaCodec>
+ <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x180" range="640-720" />
+ <Limit name="measured-frame-rate-320x240" range="200-230" />
+ <Limit name="measured-frame-rate-640x360" range="81-90" />
+ <Limit name="measured-frame-rate-1280x720" range="60-85" />
+ <Limit name="measured-frame-rate-1920x1080" range="33-55" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="164-414" />
+ <Limit name="measured-frame-rate-720x480" range="40-60" />
+ <Limit name="measured-frame-rate-1280x720" range="17-24" />
+ <Limit name="measured-frame-rate-1920x1080" range="10-13" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-352x288" range="183-411" />
+ <Limit name="measured-frame-rate-640x360" range="84-96" />
+ <Limit name="measured-frame-rate-720x480" range="66-94" />
+ <Limit name="measured-frame-rate-1280x720" range="47-74" />
+ <Limit name="measured-frame-rate-1920x1080" range="29-43" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
+ <Limit name="measured-frame-rate-176x144" range="450-850" />
+ <Limit name="measured-frame-rate-352x288" range="650-780" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
+ <Limit name="measured-frame-rate-176x144" range="500-1103" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+ <Limit name="measured-frame-rate-320x180" range="310-690" />
+ <Limit name="measured-frame-rate-640x360" range="233-321" />
+ <Limit name="measured-frame-rate-1280x720" range="65-110" />
+ <Limit name="measured-frame-rate-1920x1080" range="22-33" />
+ </MediaCodec>
+ <MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+ <Limit name="measured-frame-rate-320x180" range="234-450" />
+ <Limit name="measured-frame-rate-640x360" range="155-452" />
+ <Limit name="measured-frame-rate-1280x720" range="79-124" />
+ <Limit name="measured-frame-rate-1920x1080" range="20-31" />
+ </MediaCodec>
+ </Decoders>
+</MediaCodecs>
diff --git a/conf_files/lito/media_codecs_performance_v1.xml b/conf_files/lito/media_codecs_performance_v1.xml
index cadc1e7..d02b672 100644
--- a/conf_files/lito/media_codecs_performance_v1.xml
+++ b/conf_files/lito/media_codecs_performance_v1.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
-Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
Not a Contribution.
@@ -22,18 +22,21 @@
<MediaCodecs>
<Encoders>
<MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
- <Limit name="measured-frame-rate-320x240" range="238-238" />
- <Limit name="measured-frame-rate-720x480" range="123-123" />
+ <Limit name="measured-frame-rate-320x240" range="337-452" />
+ <Limit name="measured-frame-rate-720x480" range="182-312" />
<Limit name="measured-frame-rate-1280x720" range="50-50" />
<Limit name="measured-frame-rate-1920x1080" range="16-40" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true">
- <Limit name="measured-frame-rate-320x240" range="226-226" />
- <Limit name="measured-frame-rate-720x480" range="121-121" />
+ <Limit name="measured-frame-rate-320x240" range="332-443" />
+ <Limit name="measured-frame-rate-720x480" range="194-317" />
<Limit name="measured-frame-rate-1280x720" range="49-49" />
<Limit name="measured-frame-rate-1920x1080" range="55-65" />
<Limit name="measured-frame-rate-3840x2160" range="18-25" />
</MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" update="true">
+ <Limit name="measured-frame-rate-320x240" range="340-400" />
+ </MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" update="true">
<Limit name="measured-frame-rate-176x144" range="66-80" />
<Limit name="measured-frame-rate-352x288" range="40-85" />
@@ -41,11 +44,11 @@
<MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" update="true">
<Limit name="measured-frame-rate-176x144" range="125-135" />
<Limit name="measured-frame-rate-352x288" range="68-85" />
- <Limit name="measured-frame-rate-640x480" range="47-52" />
+ <Limit name="measured-frame-rate-640x480" range="70-106" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" update="true">
<Limit name="measured-frame-rate-320x180" range="266-266" />
- <Limit name="measured-frame-rate-640x360" range="165-165" />
+ <Limit name="measured-frame-rate-640x360" range="203-291" />
<Limit name="measured-frame-rate-1280x720" range="49-49" />
<Limit name="measured-frame-rate-1920x1080" range="16-40" />
</MediaCodec>
@@ -184,6 +187,7 @@
<MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
<Limit name="measured-frame-rate-320x180" range="510-810" />
<Limit name="measured-frame-rate-640x360" range="197-336" />
+ <Limit name="measured-frame-rate-1280x720" range="64-91" />
<Limit name="measured-frame-rate-1920x1080" range="21-31" />
</MediaCodec>
<MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
diff --git a/conf_files/lito/media_codecs_vendor.xml b/conf_files/lito/media_codecs_vendor.xml
index f9a5cc3..20ec969 100644
--- a/conf_files/lito/media_codecs_vendor.xml
+++ b/conf_files/lito/media_codecs_vendor.xml
@@ -95,7 +95,6 @@
| | 4096 2176 24 100 |
| vp9 | 3840 2176 60 100 1958400 |
| | 4096 2176 48 100 |
- | vc1 | 1920 1088 30 20 244800 |
| h263-sw | 864 480 30 16 48600 |
| mpeg2 | 1920 1088 30 40 244800 |
|_____________|_______________________________________|
@@ -197,7 +196,7 @@
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="requires-loaded-to-idle-after-allocation" />
- <Limit name="size" min="512x512" max="512x512" />
+ <Limit name="size" min="128x128" max="512x512" />
<Limit name="frame-rate" range="1-20" />
<Limit name="concurrent-instances" max="16" />
<Limit name="quality" range="0-100" default="80" />
@@ -241,6 +240,7 @@
<Limit name="blocks-per-second" min="36" max="48600" />
<Limit name="bitrate" range="1-8000000" />
<Limit name="frame-rate" range="1-30" />
+ <Attribute name="software-codec" />
<Limit name="concurrent-instances" max="3" />
<Limit name="performance-point-720x480" value="30" />
</MediaCodec>
diff --git a/conf_files/lito/media_codecs_vendor_audio.xml b/conf_files/lito/media_codecs_vendor_audio.xml
index 0cd3294..2749bc6 100644
--- a/conf_files/lito/media_codecs_vendor_audio.xml
+++ b/conf_files/lito/media_codecs_vendor_audio.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
-<!-- Copyright (C) 2015-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2015-2020 The Linux Foundation. All rights reserved.
Not a contribution.
Copyright (C) 2012 The Android Open Source Project
@@ -19,8 +19,5 @@
<Decoders>
<MediaCodec name="OMX.google.opus.decoder" type="audio/opus" update="true" rank="100"/>
<!-- SimpleOMXComponet based software decoder-->
- <MediaCodec name="OMX.qti.audio.decoder.flac" type="audio/flac" rank="0">
- <Limit name="concurrent-instances" max="10" />
- </MediaCodec>
</Decoders>
</Included>
diff --git a/conf_files/lito/media_codecs_vendor_lagoon_v0.xml b/conf_files/lito/media_codecs_vendor_lagoon_v0.xml
new file mode 100644
index 0000000..d8309ff
--- /dev/null
+++ b/conf_files/lito/media_codecs_vendor_lagoon_v0.xml
@@ -0,0 +1,383 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
+ Not a contribution.
+ 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.
+-->
+
+<!--
+<!DOCTYPE MediaCodecs [
+<!ELEMENT Include EMPTY>
+<!ATTLIST Include href CDATA #REQUIRED>
+<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
+<!ELEMENT Decoders (MediaCodec|Include)*>
+<!ELEMENT Encoders (MediaCodec|Include)*>
+<!ELEMENT MediaCodec (Type|Quirk|Include)*>
+<!ATTLIST MediaCodec name CDATA #REQUIRED>
+<!ATTLIST MediaCodec type CDATA>
+<!ELEMENT Type EMPTY>
+<!ATTLIST Type name CDATA #REQUIRED>
+<!ELEMENT Quirk EMPTY>
+<!ATTLIST Quirk name CDATA #REQUIRED>
+]>
+
+There's a simple and a complex syntax to declare the availability of a
+media codec:
+
+A codec that properly follows the OpenMax spec and therefore doesn't have any
+quirks and that only supports a single content type can be declared like so:
+
+ <MediaCodec name="OMX.foo.bar" type="something/interesting" />
+
+If a codec has quirks OR supports multiple content types, the following syntax
+can be used:
+
+ <MediaCodec name="OMX.foo.bar" >
+ <Type name="something/interesting" />
+ <Type name="something/else" />
+ ...
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="output-buffers-are-unreadable" />
+ </MediaCodec>
+
+Only the three quirks included above are recognized at this point:
+
+"requires-allocate-on-input-ports"
+ must be advertised if the component does not properly support specification
+ of input buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"requires-allocate-on-output-ports"
+ must be advertised if the component does not properly support specification
+ of output buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"output-buffers-are-unreadable"
+ must be advertised if the emitted output buffers of a decoder component
+ are not readable, i.e. use a custom format even though abusing one of
+ the official OMX colorspace constants.
+ Clients of such decoders will not be able to access the decoded data,
+ naturally making the component much less useful. The only use for
+ a component with this quirk is to render the output to the screen.
+ Audio decoders MUST NOT advertise this quirk.
+ Video decoders that advertise this quirk must be accompanied by a
+ corresponding color space converter for thumbnail extraction,
+ matching surfaceflinger support that can render the custom format to
+ a texture and possibly other code, so just DON'T USE THIS QUIRK.
+
+
+-->
+<!--
+ Non-Secure decoder capabilities
+ (MB is defined as 16x16)
+
+ _____________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |_____________|_______________________________________|
+ | h264 | 3840 2176 60 100 1958400 |
+ | hevc | 3840 2176 60 100 1958400 |
+ | mpeg4-sw | 1920 1088 30 40 244800 |
+ | vp9 | 3840 2176 60 100 1958400 |
+ | h263-sw | 864 480 30 16 48600 |
+ | mpeg2 | 1920 1088 30 40 244800 |
+ |_____________|_______________________________________|
+
+ Secure decoder capabilities
+ (MB is defined as 16x16)
+
+ _________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|_____________________________________|
+ | h264 | 3840 2176 60 40 1958400 |
+ | vp9 | 3840 2176 60 40 1958400 |
+ | hevc | 3840 2176 60 40 1958400 |
+ | mpeg2 | 1920 1088 30 40 244800 |
+ |__________|_____________________________________|
+
+
+ Non-Secure encoder capabilities (Secure not supported)
+ (MB is defined as 16x16)
+
+ _________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|_____________________________________|
+ | h264 | 3840 2176 30 100 979200 |
+ | hevc | 3840 2176 30 100 979200 |
+ | mpeg4-sw | 864 480 30 8 48600 |
+ | h263-sw | 864 480 30 2 48600 |
+ |__________|_____________________________________|
+-->
+
+<MediaCodecs>
+ <Include href="media_codecs_google_audio.xml" />
+ <Include href="media_codecs_vendor_audio.xml" />
+ <Include href="media_codecs_google_telephony.xml" />
+ <Settings>
+ <Setting name="max-video-encoder-input-buffers" value="11" />
+ </Settings>
+ <Encoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <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="979200"/>
+ <Limit name="bitrate" range="1-100000000" />
+ <Limit name="frame-rate" range="1-240" />
+ <Limit name="concurrent-instances" max="16" />
+ <Feature name="can-swap-width-height" required="true" />
+ <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" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <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="979200" />
+ <Limit name="bitrate" range="1-100000000" />
+ <Limit name="frame-rate" range="1-240" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="VBR,CBR" />
+ <Feature name="can-swap-width-height" required="true" />
+ <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" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="512x512" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-512x512" value="2025" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.heic" type="image/vnd.android.heic" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="512x512" max="8192x8192" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-8192x4320" value="3" />
+ <Limit name="performance-point-1920x1080" value="6" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-2000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="3" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-8000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Attribute name="software-codec" />
+ <Limit name="concurrent-instances" max="3" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-4096x2160" value="48" />
+ <Limit name="performance-point-3840x2160" value="60" />
+ <Limit name="performance-point-1920x1080" value="240" />
+ <Limit name="performance-point-1280x720" value="480" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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-40000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-4096x2160" value="48" />
+ <Limit name="performance-point-3840x2160" value="60" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.mpeg2.secure" type="video/mpeg2" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="performance-point-4096x2160" value="48" />
+ <Limit name="performance-point-3840x2160" value="60" />
+ <Limit name="performance-point-1920x1080" value="240" />
+ <Limit name="performance-point-1280x720" value="480" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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-40000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-4096x2160" value="48" />
+ <Limit name="performance-point-3840x2160" value="60" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-4096x2160" value="48" />
+ <Limit name="performance-point-3840x2160" value="60" />
+ <Limit name="performance-point-1920x1080" value="240" />
+ <Limit name="performance-point-1280x720" value="480" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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-40000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-4096x2160" value="48" />
+ <Limit name="performance-point-3840x2160" value="60" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-16000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="4" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ </Decoders>
+ <Include href="media_codecs_google_video.xml" />
+</MediaCodecs>
diff --git a/conf_files/lito/media_codecs_vendor_lagoon_v1.xml b/conf_files/lito/media_codecs_vendor_lagoon_v1.xml
new file mode 100644
index 0000000..552b799
--- /dev/null
+++ b/conf_files/lito/media_codecs_vendor_lagoon_v1.xml
@@ -0,0 +1,386 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2020 The Linux Foundation. All rights reserved.
+ Not a contribution.
+ 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.
+-->
+
+<!--
+<!DOCTYPE MediaCodecs [
+<!ELEMENT Include EMPTY>
+<!ATTLIST Include href CDATA #REQUIRED>
+<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
+<!ELEMENT Decoders (MediaCodec|Include)*>
+<!ELEMENT Encoders (MediaCodec|Include)*>
+<!ELEMENT MediaCodec (Type|Quirk|Include)*>
+<!ATTLIST MediaCodec name CDATA #REQUIRED>
+<!ATTLIST MediaCodec type CDATA>
+<!ELEMENT Type EMPTY>
+<!ATTLIST Type name CDATA #REQUIRED>
+<!ELEMENT Quirk EMPTY>
+<!ATTLIST Quirk name CDATA #REQUIRED>
+]>
+
+There's a simple and a complex syntax to declare the availability of a
+media codec:
+
+A codec that properly follows the OpenMax spec and therefore doesn't have any
+quirks and that only supports a single content type can be declared like so:
+
+ <MediaCodec name="OMX.foo.bar" type="something/interesting" />
+
+If a codec has quirks OR supports multiple content types, the following syntax
+can be used:
+
+ <MediaCodec name="OMX.foo.bar" >
+ <Type name="something/interesting" />
+ <Type name="something/else" />
+ ...
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="output-buffers-are-unreadable" />
+ </MediaCodec>
+
+Only the three quirks included above are recognized at this point:
+
+"requires-allocate-on-input-ports"
+ must be advertised if the component does not properly support specification
+ of input buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"requires-allocate-on-output-ports"
+ must be advertised if the component does not properly support specification
+ of output buffers using the OMX_UseBuffer(...) API but instead requires
+ OMX_AllocateBuffer to be used.
+
+"output-buffers-are-unreadable"
+ must be advertised if the emitted output buffers of a decoder component
+ are not readable, i.e. use a custom format even though abusing one of
+ the official OMX colorspace constants.
+ Clients of such decoders will not be able to access the decoded data,
+ naturally making the component much less useful. The only use for
+ a component with this quirk is to render the output to the screen.
+ Audio decoders MUST NOT advertise this quirk.
+ Video decoders that advertise this quirk must be accompanied by a
+ corresponding color space converter for thumbnail extraction,
+ matching surfaceflinger support that can render the custom format to
+ a texture and possibly other code, so just DON'T USE THIS QUIRK.
+
+
+-->
+<!--
+ Non-Secure decoder capabilities
+ (MB is defined as 16x16)
+
+ ____________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |_____________|______________________________________|
+ | h264 | 3840 2176 30 100 979200 |
+ | hevc | 3840 2176 30 100 979200 |
+ | mpeg4-sw | 1920 1088 30 40 244800 |
+ | vp9 | 3840 2176 30 100 979200 |
+ | h263-sw | 864 480 30 16 48600 |
+ | mpeg2 | 1920 1088 30 40 244800 |
+ |_____________|______________________________________|
+
+ Secure decoder capabilities
+ (MB is defined as 16x16)
+
+ ________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|____________________________________|
+ | h264 | 3840 2176 30 40 979200 |
+ | vp9 | 3840 2176 30 40 979200 |
+ | hevc | 3840 2176 30 40 979200 |
+ | mpeg2 | 1920 1088 30 40 244800 |
+ |__________|____________________________________|
+
+
+ Non-Secure encoder capabilities (Secure not supported)
+ (MB is defined as 16x16)
+
+ ________________________________________________
+ | Codec | W H fps Mbps MB/s |
+ |__________|____________________________________|
+ | h264 | 3840 2176 30 100 979200 |
+ | hevc | 3840 2176 30 100 979200 |
+ | mpeg4-sw | 864 480 30 8 48600 |
+ | h263-sw | 864 480 30 2 48600 |
+ |__________|____________________________________|
+-->
+
+<MediaCodecs>
+ <Include href="media_codecs_google_audio.xml" />
+ <Include href="media_codecs_vendor_audio.xml" />
+ <Include href="media_codecs_google_telephony.xml" />
+ <Settings>
+ <Setting name="max-video-encoder-input-buffers" value="11" />
+ </Settings>
+ <Encoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <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="979200"/>
+ <Limit name="bitrate" range="1-100000000" />
+ <Limit name="frame-rate" range="1-240" />
+ <Limit name="concurrent-instances" max="16" />
+ <Feature name="can-swap-width-height" required="true" />
+ <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" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <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="979200" />
+ <Limit name="bitrate" range="1-100000000" />
+ <Limit name="frame-rate" range="1-240" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="VBR,CBR" />
+ <Feature name="can-swap-width-height" required="true" />
+ <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" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.hevc.cq" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="128x128" max="512x512" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-512x512" value="2025" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.heic" type="image/vnd.android.heic" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="512x512" max="8192x8192" />
+ <Limit name="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="6" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Feature name="bitrate-modes" value="CQ" />
+ <Limit name="performance-point-8192x4320" value="3" />
+ <Limit name="performance-point-1920x1080" value="6" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-2000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="3" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Quirk name="requires-loaded-to-idle-after-allocation" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-8000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Attribute name="software-codec" />
+ <Limit name="concurrent-instances" max="3" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ </Encoders>
+ <Decoders>
+ <!-- Video Hardware -->
+ <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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="979200" />
+ <Limit name="bitrate" range="1-100000000" />
+ <Limit name="frame-rate" range="1-240" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <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" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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="979200" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-4096x2160" value="24" />
+ <Limit name="performance-point-3840x2160" value="30" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.mpeg2.secure" type="video/mpeg2" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="128x128" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="64" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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="979200" />
+ <Limit name="bitrate" range="1-100000000" />
+ <Limit name="frame-rate" range="1-240" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="6" />
+ <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" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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="979200" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-4096x2160" value="24" />
+ <Limit name="performance-point-3840x2160" value="30" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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="979200" />
+ <Limit name="bitrate" range="1-100000000" />
+ <Limit name="frame-rate" range="1-240" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <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" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <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="979200" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-60" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Feature name="secure-playback" required="true" />
+ <Limit name="concurrent-instances" max="3" />
+ <Limit name="performance-point-4096x2160" value="24" />
+ <Limit name="performance-point-3840x2160" value="30" />
+ <Limit name="performance-point-1920x1080" value="60" />
+ </MediaCodec>
+ <!-- Video Software -->
+ <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" >
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="864x480" />
+ <Limit name="alignment" value="4x4" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="48600" />
+ <Limit name="bitrate" range="1-16000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Feature name="adaptive-playback" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="concurrent-instances" max="4" />
+ <Limit name="performance-point-720x480" value="30" />
+ </MediaCodec>
+ <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
+ <Quirk name="requires-allocate-on-input-ports" />
+ <Quirk name="requires-allocate-on-output-ports" />
+ <Limit name="size" min="96x96" max="1920x1088" />
+ <Limit name="alignment" value="2x2" />
+ <Limit name="block-size" value="16x16" />
+ <Limit name="blocks-per-second" min="36" max="244800" />
+ <Limit name="bitrate" range="1-40000000" />
+ <Limit name="frame-rate" range="1-30" />
+ <Limit name="concurrent-instances" max="4" />
+ <Feature name="can-swap-width-height" required="true" />
+ <Limit name="performance-point-1920x1080" value="30" />
+ </MediaCodec>
+ </Decoders>
+ <Include href="media_codecs_google_video.xml" />
+</MediaCodecs>
diff --git a/conf_files/lito/media_codecs_vendor_v1.xml b/conf_files/lito/media_codecs_vendor_v1.xml
index ba73584..3a84d8d 100644
--- a/conf_files/lito/media_codecs_vendor_v1.xml
+++ b/conf_files/lito/media_codecs_vendor_v1.xml
@@ -94,7 +94,6 @@
| vp8 | 1920 1088 60 100 489600 |
| vp9 | 3840 2176 30 100 979200 |
| | 4096 2176 24 100 |
- | vc1 | 1920 1088 30 20 244800 |
| h263-sw | 864 480 30 16 48600 |
| mpeg2 | 1920 1088 30 40 244800 |
|_____________|______________________________________|
@@ -192,7 +191,7 @@
<Quirk name="requires-allocate-on-input-ports" />
<Quirk name="requires-allocate-on-output-ports" />
<Quirk name="requires-loaded-to-idle-after-allocation" />
- <Limit name="size" min="512x512" max="512x512" />
+ <Limit name="size" min="128x128" max="512x512" />
<Limit name="frame-rate" range="1-20" />
<Limit name="concurrent-instances" max="16" />
<Limit name="quality" range="0-100" default="80" />
diff --git a/conf_files/lito/media_profiles.xml b/conf_files/lito/media_profiles.xml
index 56a2286..371305a 100644
--- a/conf_files/lito/media_profiles.xml
+++ b/conf_files/lito/media_profiles.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012-2019 The Linux Foundation. All rights reserved.
+<!-- Copyright (C) 2012-2019, 2021 The Linux Foundation. All rights reserved.
Not a contribution.
Copyright (C) 2010 The Android Open Source Project
@@ -186,32 +186,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -391,34 +365,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -545,28 +491,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -741,28 +665,6 @@
sampleRate="48000"
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -887,32 +789,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
<Video codec="h264"
bitRate="192000"
@@ -1066,34 +942,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
@@ -1195,32 +1043,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -1400,34 +1222,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -1555,32 +1349,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -1760,34 +1528,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -1915,32 +1655,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="qhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
@@ -2120,34 +1834,6 @@
channels="2" />
</EncoderProfile>
- <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="42000000"
- width="2560"
- height="1440"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
- <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30">
- <Video codec="h264"
- bitRate="20000000"
- width="2048"
- height="1080"
- frameRate="30" />
-
- <!-- audio setting is ignored -->
- <Audio codec="aac"
- bitRate="156000"
- sampleRate="48000"
- channels="2" />
- </EncoderProfile>
-
<EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="42000000"
diff --git a/conf_files/lito/system_properties.xml b/conf_files/lito/system_properties.xml
index 5b9def2..b8f0db0 100644
--- a/conf_files/lito/system_properties.xml
+++ b/conf_files/lito/system_properties.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
-Copyright (c) 2017,2019 The Linux Foundation. All rights reserved.
+Copyright (c) 2017,2019-2020 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -41,4 +41,5 @@
<property name="vidc_dec_thumbnail_yuv_output" value="0"/>
<!-- Bitmask for arb mode: 1: AVC, 2: HEVC, 4: MPEG2 -->
<property name="vidc_dec_arb_mode_override" value="7"/>
+ <property name="vidc_enc_quality_boost_enable" value="1"/>
</configs>
diff --git a/libc2dcolorconvert/Android.mk b/libc2dcolorconvert/Android.mk
index 694d751..960a8db 100644
--- a/libc2dcolorconvert/Android.mk
+++ b/libc2dcolorconvert/Android.mk
@@ -32,6 +32,9 @@
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libc2dcolorconvert
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
LOCAL_VENDOR_MODULE := true
diff --git a/libc2dcolorconvert/C2DColorConverter.cpp b/libc2dcolorconvert/C2DColorConverter.cpp
index 286c109..fc38d51 100644
--- a/libc2dcolorconvert/C2DColorConverter.cpp
+++ b/libc2dcolorconvert/C2DColorConverter.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012 - 2019, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012 - 2020, The Linux Foundation. All rights reserved.
*
* redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -335,6 +335,7 @@
case YCbCr420P:
case YCrCb420P:
case NV12_2K:
+ case NV12_512:
case NV12_128m:
case NV12_UBWC:
case TP10_UBWC:
@@ -540,6 +541,7 @@
return (C2D_COLOR_FORMAT_420_NV12 | C2D_FORMAT_MACROTILED);
case YCbCr420SP:
case NV12_2K:
+ case NV12_512:
case NV12_128m:
return C2D_COLOR_FORMAT_420_NV12;
case YCbCr420P:
@@ -575,8 +577,12 @@
return ALIGN(width, ALIGN16);
case NV12_2K:
return ALIGN(width, ALIGN16);
- case NV12_128m:
+ case NV12_512:
return ALIGN(width, ALIGN512);
+ case NV12_128m: {
+ int32_t stride_alignment = VENUS_Y_STRIDE(COLOR_FMT_NV12, 1);
+ return ALIGN(width, stride_alignment);
+ }
case YCbCr420P:
return ALIGN(width, ALIGN16);
case YCrCb420P:
@@ -611,8 +617,13 @@
size_t lumaSize = ALIGN(alignedw * height, ALIGN2K);
return lumaSize;
}
- case NV12_128m:
+ case NV12_512:
return ALIGN(width, ALIGN512) * ALIGN(height, ALIGN512);
+ case NV12_128m: {
+ int32_t stride_alignment = VENUS_Y_STRIDE(COLOR_FMT_NV12, 1);
+ int32_t scanline_alignment = VENUS_Y_SCANLINES(COLOR_FMT_NV12, 1);
+ return ALIGN(width, stride_alignment) * ALIGN(height, scanline_alignment);
+ }
case NV12_UBWC:
return ALIGN( VENUS_Y_STRIDE(COLOR_FMT_NV12_UBWC, width) *
VENUS_Y_SCANLINES(COLOR_FMT_NV12_UBWC, height), ALIGN4K) +
@@ -695,10 +706,15 @@
__FUNCTION__, width, height, size);
}
break;
- case NV12_128m:
+ case NV12_512:
alignedw = ALIGN(width, ALIGN512);
alignedh = ALIGN(height, ALIGN512);
- size = ALIGN(alignedw * alignedh + (alignedw * ALIGN((height+1)/2, ALIGN256)), ALIGN4K);
+ size = ALIGN(alignedw * alignedh + (alignedw * ALIGN(height/2, ALIGN256)), ALIGN4K);
+ break;
+ case NV12_128m:
+ alignedw = VENUS_Y_STRIDE(COLOR_FMT_NV12, width);
+ alignedh = VENUS_Y_SCANLINES(COLOR_FMT_NV12, height);
+ size = ALIGN(alignedw * alignedh + (alignedw * ALIGN((height+1)/2, VENUS_Y_SCANLINES(COLOR_FMT_NV12, 1)/2)), ALIGN4K);
break;
case NV12_UBWC:
size = VENUS_BUFFER_SIZE(COLOR_FMT_NV12_UBWC, width, height);
@@ -819,8 +835,10 @@
switch (format) {
case NV12_2K:
return ALIGN2K;
- case NV12_128m:
+ case NV12_512:
return ALIGN512;
+ case NV12_128m:
+ return 1;
case NV12_UBWC:
case TP10_UBWC:
case P010:
@@ -840,6 +858,7 @@
case YCbCr420SP: //OR NV12
case YCbCr420P:
case NV12_2K:
+ case NV12_512:
case NV12_128m:
case NV12_UBWC:
case TP10_UBWC:
@@ -871,6 +890,7 @@
case YCrCb420P:
case YCbCr420Tile:
case NV12_2K:
+ case NV12_512:
case NV12_128m:
case NV12_UBWC:
case TP10_UBWC:
diff --git a/libc2dcolorconvert/C2DColorConverter.h b/libc2dcolorconvert/C2DColorConverter.h
index caf2370..7154676 100644
--- a/libc2dcolorconvert/C2DColorConverter.h
+++ b/libc2dcolorconvert/C2DColorConverter.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012 - 2013, 2015, 2018 The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012 - 2013, 2015, 2018, 2020 The Linux Foundation. All rights reserved.
*
* redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -109,6 +109,7 @@
RGBA8888,
RGBA8888_UBWC,
NV12_2K,
+ NV12_512,
NV12_128m,
NV12_UBWC,
TP10_UBWC,
diff --git a/libplatformconfig/Android.mk b/libplatformconfig/Android.mk
index bde1add..5a49a75 100644
--- a/libplatformconfig/Android.mk
+++ b/libplatformconfig/Android.mk
@@ -2,7 +2,6 @@
LOCAL_DIR_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_COPY_HEADERS_TO := libplatformconfig
libplatformconfig-def := \
-g0 -O3 -fpic \
@@ -15,7 +14,6 @@
COMMON_CFLAGS := -O3
-include $(BUILD_COPY_HEADERS)
LOCAL_CFLAGS := $(COMMON_CFLAGS) $(libplatformconfig-def)
@@ -54,6 +52,9 @@
####################
LOCAL_MODULE := libplatformconfig
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
LOCAL_VENDOR_MODULE := true
include $(BUILD_SHARED_LIBRARY)
diff --git a/libplatformconfig/PlatformConfig.h b/libplatformconfig/PlatformConfig.h
index 1c32987..be23673 100644
--- a/libplatformconfig/PlatformConfig.h
+++ b/libplatformconfig/PlatformConfig.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -74,7 +74,10 @@
vidc_enc_bitrate_savings_enable,
vidc_enc_auto_blur_disable,
vidc_dec_thumbnail_yuv_output,
- vidc_c2d_rotation,
+ vidc_no_vpss,
+ vidc_disable_hdr,
+ vidc_enc_quality_boost_enable,
+ vidc_dec_output_rate,
} Config_t;
struct configStr {
@@ -98,7 +101,10 @@
{vidc_enc_bitrate_savings_enable, "vidc_enc_bitrate_savings_enable"},
{vidc_enc_auto_blur_disable, "vidc_enc_auto_blur_disable"},
{vidc_dec_thumbnail_yuv_output, "vidc_dec_thumbnail_yuv_output"},
- {vidc_c2d_rotation, "vidc_c2d_rotation"},
+ {vidc_no_vpss, "vidc_no_vpss"},
+ {vidc_disable_hdr, "vidc_disable_hdr"},
+ {vidc_enc_quality_boost_enable, "vidc_enc_quality_boost_enable"},
+ {vidc_dec_output_rate, "vidc_dec_output_rate"},
};
class Config {
diff --git a/libstagefrighthw/Android.mk b/libstagefrighthw/Android.mk
index 5c19539..029e52b 100644
--- a/libstagefrighthw/Android.mk
+++ b/libstagefrighthw/Android.mk
@@ -59,8 +59,10 @@
libdl \
LOCAL_MODULE := libstagefrighthw
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
LOCAL_VENDOR_MODULE := true
include $(BUILD_SHARED_LIBRARY)
-
diff --git a/media-prop/Android.mk b/media-prop/Android.mk
new file mode 100644
index 0000000..cba490d
--- /dev/null
+++ b/media-prop/Android.mk
@@ -0,0 +1,13 @@
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qti.media.sh
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := init.qti.media.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+LOCAL_INIT_RC := init.qti.media.rc
+include $(BUILD_PREBUILT)
diff --git a/media-prop/init.qti.media.rc b/media-prop/init.qti.media.rc
new file mode 100644
index 0000000..ce80d3d
--- /dev/null
+++ b/media-prop/init.qti.media.rc
@@ -0,0 +1,44 @@
+#==============================================================================
+# init.qti.media.rc
+#
+# Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#===============================================================================
+service qti-media /vendor/bin/init.qti.media.sh
+ class main
+ user media
+ group media
+ disabled
+ oneshot
+ seclabel u:r:vendor_qti_media:s0
+
+on early-init
+ setprop vendor.media.system.build_codename ${ro.build.version.release_or_codename}
+ start qti-media
+
+on post-fs-data
+ setprop vendor.sys.media.target.version ${vendor.media.target.version}
diff --git a/media-prop/init.qti.media.sh b/media-prop/init.qti.media.sh
new file mode 100644
index 0000000..8ca2e44
--- /dev/null
+++ b/media-prop/init.qti.media.sh
@@ -0,0 +1,69 @@
+#! /vendor/bin/sh
+#==============================================================================
+# init.qti.media.sh
+#
+# Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#===============================================================================
+
+build_codename=`getprop vendor.media.system.build_codename`
+
+if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
+else
+ soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
+fi
+
+target=`getprop ro.board.platform`
+case "$target" in
+ "bengal")
+ case "$soc_hwid" in
+ 441|471|473|474)
+ setprop vendor.media.target.version 2
+ sku_ver=`cat /sys/devices/platform/soc/5a00000.qcom,vidc1/sku_version` 2> /dev/null
+ if [ $sku_ver -eq 1 ]; then
+ setprop vendor.media.target.version 3
+ fi
+ ;;
+ 518)
+ setprop vendor.media.target.version 3
+ if [ $build_codename -le "12" ]; then
+ setprop vendor.netflix.bsp_rev "Q6115-31409-1"
+ fi
+ ;;
+ *)
+ sku_ver=`cat /sys/devices/platform/soc/5a00000.qcom,vidc/sku_version` 2> /dev/null
+ if [ $sku_ver -eq 1 ]; then
+ setprop vendor.media.target.version 1
+ fi
+ if [ $build_codename -le "12" ]; then
+ setprop vendor.netflix.bsp_rev "Q6115-31409-1"
+ fi
+ ;;
+ esac
+ ;;
+esac
diff --git a/mm-core/Android.mk b/mm-core/Android.mk
index 55e0aaa..c8b3ae2 100644
--- a/mm-core/Android.mk
+++ b/mm-core/Android.mk
@@ -16,15 +16,20 @@
# Figure out the targets
#===============================================================================
-ifeq ($(filter $(TARGET_BOARD_PLATFORM), kona lito),$(TARGET_BOARD_PLATFORM))
-OMXCORE_CFLAGS += -D_KONA_
+MPEGH_TARGET_LIST := kona lito bengal
+ifneq (,$(call is-board-platform-in-list2, $(MPEGH_TARGET_LIST)))
+OMXCORE_CFLAGS += -DAUDIO_MPEGH_ENABLED
+endif
+
+ifeq ($(filter $(TARGET_BOARD_PLATFORM), bengal),$(TARGET_BOARD_PLATFORM))
+OMXCORE_CFLAGS += -D_BENGAL_
else ifeq ($(filter $(TARGET_BOARD_PLATFORM), $(MSMSTEPPE)),$(TARGET_BOARD_PLATFORM))
OMXCORE_CFLAGS += -D_STEPPE_
else
OMXCORE_CFLAGS += -D_DEFAULT_
endif
-ifeq ($(call is-platform-sdk-version-at-least,27),true) # O-MR1
+ifdef IS_AT_LEAST_OPM1 # O-MR1
OMXCORE_CFLAGS += -D_ANDROID_O_MR1_DIVX_CHANGES
endif
@@ -84,10 +89,13 @@
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE := libOmxCore
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD SPDX-license-identifier-MIT
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
LOCAL_MODULE_TAGS := optional
LOCAL_VENDOR_MODULE := true
LOCAL_SHARED_LIBRARIES := liblog libdl libcutils
-ifeq ($(call is-board-platform-in-list, $(MSM_VIDC_TARGET_LIST)),true)
+ifneq (,$(call is-board-platform-in-list2, $(MSM_VIDC_TARGET_LIST)))
ifeq ($(VIDC_STUB_HAL),false)
LOCAL_SHARED_LIBRARIES += libplatformconfig
endif
@@ -121,10 +129,13 @@
LOCAL_PRELINK_MODULE := false
LOCAL_MODULE := libmm-omxcore
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD SPDX-license-identifier-MIT
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
LOCAL_MODULE_TAGS := optional
LOCAL_VENDOR_MODULE := true
LOCAL_SHARED_LIBRARIES := liblog libdl libcutils
-ifeq ($(call is-board-platform-in-list, $(MSM_VIDC_TARGET_LIST)),true)
+ifneq (,$(call is-board-platform-in-list2, $(MSM_VIDC_TARGET_LIST)))
ifeq ($(VIDC_STUB_HAL),false)
LOCAL_SHARED_LIBRARIES += libplatformconfig
endif
@@ -152,6 +163,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE := libomxcore_headers
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD SPDX-license-identifier-MIT
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/inc
LOCAL_VENDOR_MODULE := true
diff --git a/mm-core/inc/OMX_IndexExt.h b/mm-core/inc/OMX_IndexExt.h
index 60e515c..837c9f1 100644
--- a/mm-core/inc/OMX_IndexExt.h
+++ b/mm-core/inc/OMX_IndexExt.h
@@ -98,6 +98,7 @@
OMX_IndexConfigOperatingRate, /**< reference: OMX_PARAM_U32TYPE in Q16 format for video and in Hz for audio */
OMX_IndexParamConsumerUsageBits, /**< reference: OMX_PARAM_U32TYPE */
OMX_IndexConfigLatency, /**< reference: OMX_PARAM_U32TYPE */
+ OMX_IndexConfigLowLatency, /**< reference: OMX_CONFIG_BOOLEANTYPE */
OMX_IndexExtOtherEndUnused,
/* Time configurations */
diff --git a/mm-core/inc/OMX_QCOMExtns.h b/mm-core/inc/OMX_QCOMExtns.h
index 4298213..f2b7c03 100644
--- a/mm-core/inc/OMX_QCOMExtns.h
+++ b/mm-core/inc/OMX_QCOMExtns.h
@@ -696,6 +696,9 @@
/*"OMX.google.android.index.describeHDR10PlusInfo"*/
OMX_QTIIndexConfigDescribeHDR10PlusInfo = 0x7F100008,
+
+ /* Configure Bitrate Savings (CAC) */
+ OMX_QTIIndexConfigContentAdaptiveCoding = 0x7F100009,
};
/**
diff --git a/mm-core/src/common/qc_omx_core.c b/mm-core/src/common/qc_omx_core.c
index cdce12d..7dd1153 100644
--- a/mm-core/src/common/qc_omx_core.c
+++ b/mm-core/src/common/qc_omx_core.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2009, 2015, 2018-2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2009, 2015, 2018-2019, 2021,The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -44,6 +44,7 @@
#include <string.h>
#include <stdio.h>
#include <pthread.h>
+#include <stdlib.h>
#include "qc_omx_core.h"
#include "omx_core_cmp.h"
@@ -58,6 +59,9 @@
static pthread_mutex_t lock_core = PTHREAD_MUTEX_INITIALIZER;
static int number_of_adec_nt_session;
+extern omx_core_cb_type component[];
+unsigned int num_components = 0;
+
#define MAX_AUDIO_NT_SESSION 2
/* ======================================================================
@@ -122,8 +126,27 @@
OMX_API OMX_ERRORTYPE OMX_APIENTRY
OMX_Init()
{
+ char platform_name[PROP_VALUE_MAX] = {0};
+ char version[PROP_VALUE_MAX] = {0};
+ property_get("ro.board.platform", platform_name, "0");
+
DEBUG_PRINT("OMXCORE API - OMX_Init \n");
- /* Nothing to do here ; shared objects shall be loaded at the get handle method */
+ // Use below method to generate list of components actually supported
+ // on any given platform. Core list is considered as superset and does
+ // not determine the actual supported codecs on a particular target.
+ num_components = 0;
+ for (int i = 0; i < SIZE_OF_CORE; i++) {
+ if (!strncmp(platform_name, "lito", 4)) {
+ if (!strcmp("OMX.qcom.video.decoder.vp8", core[i].name) || !strcmp("OMX.qcom.video.encoder.vp8", core[i].name)) {
+ //Bitra (SM6350) both does not support VP8 encoder and decoder hence don't add them in list
+ if (property_get("vendor.media.target.version", version, "0") && ((atoi(version) == 2) || (atoi(version) == 3)))
+ continue;
+ }
+ }
+
+ memcpy(&component[num_components++],
+ &core[i], sizeof(omx_core_cb_type));
+ }
return OMX_ErrorNone;
}
@@ -145,11 +168,12 @@
int rc = -1,i=0;
DEBUG_PRINT("before get_cmp_index **********%d\n", rc);
- for(i=0; i< (int)SIZE_OF_CORE; i++)
+ for (i = 0; i < num_components; i++)
{
- DEBUG_PRINT("get_cmp_index: cmp_name = %s , core[i].name = %s ,count = %d \n",cmp_name,core[i].name,i);
+ DEBUG_PRINT("get_cmp_index: cmp_name = %s , core[i].name = %s ,count = %d \n",
+ cmp_name, component[i].name, i);
- if(!strcmp(cmp_name, core[i].name))
+ if (!strcmp(cmp_name, component[i].name))
{
rc = i;
break;
@@ -179,13 +203,13 @@
if(NULL == inst)
return;
- for(i=0; i< SIZE_OF_CORE; i++)
+ for (i = 0; i < num_components; i++)
{
for(j=0; j< OMX_COMP_MAX_INST; j++)
{
- if(inst == core[i].inst[j])
+ if (inst == component[i].inst[j])
{
- core[i].inst[j] = NULL;
+ component[i].inst[j] = NULL;
return;
}
}
@@ -215,11 +239,11 @@
return rc;
pthread_mutex_lock(&lock_core);
- for(i=0; i< SIZE_OF_CORE; i++)
+ for (i = 0; i < num_components; i++)
{
for(j=0; j< OMX_COMP_MAX_INST; j++)
{
- if(inst == core[i].inst[j])
+ if (inst == component[i].inst[j])
{
rc = i;
goto finish;
@@ -248,13 +272,13 @@
{
unsigned i=0,j=0;
int rc = -1;
- for(i=0; i< SIZE_OF_CORE; i++)
+ for (i = 0; i < num_components; i++)
{
- if(!strcmp(cmp_name, core[i].name))
+ if (!strcmp(cmp_name, component[i].name))
{
for(j=0; j< OMX_COMP_MAX_INST; j++)
{
- if(NULL == core[i].inst[j])
+ if (NULL == component[i].inst[j])
{
rc = j;
DEBUG_PRINT("free handle slot exists %d\n", rc);
@@ -288,7 +312,7 @@
for(i=0; i< OMX_COMP_MAX_INST; i++)
{
- if(core[index].inst[i])
+ if (component[index].inst[i])
{
rc = 0;
DEBUG_PRINT("Library Used \n");
@@ -316,16 +340,16 @@
unsigned i =0,j=0;
DEBUG_PRINT("get_cmp_handle \n");
- for(i=0; i< SIZE_OF_CORE; i++)
+ for (i = 0; i < num_components; i++)
{
- if(!strcmp(cmp_name, core[i].name))
+ if (!strcmp(cmp_name, component[i].name))
{
for(j=0; j< OMX_COMP_MAX_INST; j++)
{
- if(core[i].inst[j])
+ if (component[i].inst[j])
{
DEBUG_PRINT("get_cmp_handle match\n");
- return core[i].inst[j];
+ return component[i].inst[j];
}
}
}
@@ -434,8 +458,8 @@
// Load VPP omx component for decoder if vpp property is enabled
const char *hwDecLib = "libOmxVdec.so";
const char *swDecLib = "libOmxSwVdec.so";
- if (!strncmp(core[cmp_index].so_lib_name, hwDecLib, strlen(hwDecLib)) ||
- !strncmp(core[cmp_index].so_lib_name, swDecLib, strlen(swDecLib))) {
+ if (!strncmp(component[cmp_index].so_lib_name, hwDecLib, strlen(hwDecLib)) ||
+ !strncmp(component[cmp_index].so_lib_name, swDecLib, strlen(swDecLib))) {
bool isVppEnabled = false;
bool isCSEnabled = false;
#ifndef VIDC_STUB_HAL
@@ -464,19 +488,19 @@
}
// dynamically load the so
- core[cmp_index].fn_ptr =
- omx_core_load_cmp_library(core[cmp_index].so_lib_name,
- &core[cmp_index].so_lib_handle);
+ component[cmp_index].fn_ptr =
+ omx_core_load_cmp_library(component[cmp_index].so_lib_name,
+ &component[cmp_index].so_lib_handle);
- if(core[cmp_index].fn_ptr)
+ if(component[cmp_index].fn_ptr)
{
//Do not allow more than MAX limit for DSP audio decoders
- if((!strcmp(core[cmp_index].so_lib_name,"libOmxWmaDec.so") ||
- !strcmp(core[cmp_index].so_lib_name,"libOmxAacDec.so") ||
- !strcmp(core[cmp_index].so_lib_name,"libOmxG711Dec.so") ||
- !strcmp(core[cmp_index].so_lib_name,"libOmxAlacDec.so") ||
- !strcmp(core[cmp_index].so_lib_name,"libOmxApeDec.so")) &&
+ if((!strcmp(component[cmp_index].so_lib_name,"libOmxWmaDec.so") ||
+ !strcmp(component[cmp_index].so_lib_name,"libOmxAacDec.so") ||
+ !strcmp(component[cmp_index].so_lib_name,"libOmxG711Dec.so") ||
+ !strcmp(component[cmp_index].so_lib_name,"libOmxAlacDec.so") ||
+ !strcmp(component[cmp_index].so_lib_name,"libOmxApeDec.so")) &&
(number_of_adec_nt_session+1 > MAX_AUDIO_NT_SESSION)) {
DEBUG_PRINT_ERROR("Rejecting new session..Reached max limit for DSP audio decoder session");
pthread_mutex_unlock(&lock_core);
@@ -484,7 +508,7 @@
}
// Construct the component requested
// Function returns the opaque handle
- void* pThis = (*(core[cmp_index].fn_ptr))();
+ void* pThis = (*(component[cmp_index].fn_ptr))();
if(pThis)
{
void *hComp = NULL;
@@ -510,7 +534,7 @@
if(hnd_index >= 0)
{
- core[cmp_index].inst[hnd_index]= *handle = (OMX_HANDLETYPE) hComp;
+ component[cmp_index].inst[hnd_index]= *handle = (OMX_HANDLETYPE) hComp;
}
else
{
@@ -519,11 +543,11 @@
return OMX_ErrorInsufficientResources;
}
DEBUG_PRINT("Component %p Successfully created\n",*handle);
- if(!strcmp(core[cmp_index].so_lib_name,"libOmxWmaDec.so") ||
- !strcmp(core[cmp_index].so_lib_name,"libOmxAacDec.so") ||
- !strcmp(core[cmp_index].so_lib_name,"libOmxG711Dec.so") ||
- !strcmp(core[cmp_index].so_lib_name,"libOmxAlacDec.so") ||
- !strcmp(core[cmp_index].so_lib_name,"libOmxApeDec.so")) {
+ if(!strcmp(component[cmp_index].so_lib_name,"libOmxWmaDec.so") ||
+ !strcmp(component[cmp_index].so_lib_name,"libOmxAacDec.so") ||
+ !strcmp(component[cmp_index].so_lib_name,"libOmxG711Dec.so") ||
+ !strcmp(component[cmp_index].so_lib_name,"libOmxAlacDec.so") ||
+ !strcmp(component[cmp_index].so_lib_name,"libOmxApeDec.so")) {
number_of_adec_nt_session++;
DEBUG_PRINT("OMX_GetHandle: number_of_adec_nt_session : %d\n",
@@ -586,24 +610,24 @@
pthread_mutex_lock(&lock_core);
clear_cmp_handle(hComp);
/* Unload component library */
- if( (i < (int)SIZE_OF_CORE) && core[i].so_lib_handle)
+ if( (i < (int)num_components) && component[i].so_lib_handle)
{
if(check_lib_unload(i))
{
DEBUG_PRINT_ERROR(" Unloading the dynamic library for %s\n",
- core[i].name);
- err = dlclose(core[i].so_lib_handle);
+ component[i].name);
+ err = dlclose(component[i].so_lib_handle);
if(err)
{
DEBUG_PRINT_ERROR("Error %d in dlclose of lib %s\n",
- err,core[i].name);
+ err,component[i].name);
}
- core[i].so_lib_handle = NULL;
+ component[i].so_lib_handle = NULL;
}
- if(!strcmp(core[i].so_lib_name,"libOmxWmaDec.so") ||
- !strcmp(core[i].so_lib_name,"libOmxAacDec.so") ||
- !strcmp(core[i].so_lib_name,"libOmxAlacDec.so") ||
- !strcmp(core[i].so_lib_name,"libOmxApeDec.so")) {
+ if(!strcmp(component[i].so_lib_name,"libOmxWmaDec.so") ||
+ !strcmp(component[i].so_lib_name,"libOmxAacDec.so") ||
+ !strcmp(component[i].so_lib_name,"libOmxAlacDec.so") ||
+ !strcmp(component[i].so_lib_name,"libOmxApeDec.so")) {
if(number_of_adec_nt_session>0)
number_of_adec_nt_session--;
DEBUG_PRINT_ERROR("OMX_FreeHandle: reduced number_of_adec_nt_session %d\n",
@@ -693,12 +717,14 @@
DEBUG_PRINT("OMXCORE API - OMX_ComponentNameEnum %p %d %d\n", componentName
,(unsigned)nameLen
,(unsigned)index);
- if((index < SIZE_OF_CORE) && strncmp(core[index].name, "OMX.QCOM.CUST.COMP.START",strlen("OMX.QCOM.CUST.COMP.START")))
+ if (index < num_components &&
+ strncmp(component[index].name, "OMX.QCOM.CUST.COMP.START",
+ strlen("OMX.QCOM.CUST.COMP.START")))
{
#ifdef _ANDROID_
- strlcpy(componentName, core[index].name,nameLen);
+ strlcpy(componentName, component[index].name, nameLen);
#else
- strncpy(componentName, core[index].name,nameLen);
+ strlcpy(componentName, component[index].name,nameLen);
#endif
}
else
@@ -735,25 +761,25 @@
/*If CompNames is NULL then return*/
if (compNames == NULL)
{
- if (numComps == NULL)
- {
- eRet = OMX_ErrorBadParameter;
- }
- else
- {
- *numComps = 0;
- for (i=0; i<SIZE_OF_CORE;i++)
+ if (numComps == NULL)
{
- for(j=0; j<OMX_CORE_MAX_CMP_ROLES && core[i].roles[j] ; j++)
+ eRet = OMX_ErrorBadParameter;
+ }
+ else
+ {
+ *numComps = 0;
+ for (i = 0; i < num_components; i++)
{
- if(!strcmp(role,core[i].roles[j]))
+ for (j = 0; j < OMX_CORE_MAX_CMP_ROLES && component[i].roles[j]; j++)
{
- (*numComps)++;
- }
- }
+ if (!strcmp(role,component[i].roles[j]))
+ {
+ (*numComps)++;
}
+ }
}
- return eRet;
+ }
+ return eRet;
}
if(numComps)
@@ -767,17 +793,17 @@
*numComps = 0;
- for (i=0; i<SIZE_OF_CORE;i++)
+ for (i = 0; i < num_components;i++)
{
- for(j=0; j<OMX_CORE_MAX_CMP_ROLES && core[i].roles[j] ; j++)
+ for (j = 0; j < OMX_CORE_MAX_CMP_ROLES && component[i].roles[j]; j++)
{
- if(!strcmp(role,core[i].roles[j]))
- {
- #ifdef _ANDROID_
- strlcpy((char *)compNames[*numComps],core[i].name, OMX_MAX_STRINGNAME_SIZE);
- #else
- strncpy((char *)compNames[*numComps],core[i].name, OMX_MAX_STRINGNAME_SIZE);
- #endif
+ if (!strcmp(role,component[i].roles[j]))
+ {
+ #ifdef _ANDROID_
+ strlcpy((char *)compNames[*numComps],component[i].name, OMX_MAX_STRINGNAME_SIZE);
+ #else
+ strlcpy((char *)compNames[*numComps],component[i].name, OMX_MAX_STRINGNAME_SIZE);
+ #endif
(*numComps)++;
break;
}
@@ -821,27 +847,26 @@
if (roles == NULL)
{
- if (numRoles == NULL)
+ if (numRoles == NULL)
+ {
+ eRet = OMX_ErrorBadParameter;
+ }
+ else
+ {
+ *numRoles = 0;
+ for (i = 0; i < num_components; i++)
{
- eRet = OMX_ErrorBadParameter;
+ if (!strcmp(compName,component[i].name))
+ {
+ for (j = 0; j < OMX_CORE_MAX_CMP_ROLES && component[i].roles[j]; j++)
+ {
+ (*numRoles)++;
+ }
+ break;
+ }
}
- else
- {
- *numRoles = 0;
- for(i=0; i< SIZE_OF_CORE; i++)
- {
- if(!strcmp(compName,core[i].name))
- {
- for(j=0; (j<OMX_CORE_MAX_CMP_ROLES) && core[i].roles[j];j++)
- {
- (*numRoles)++;
- }
- break;
- }
- }
-
- }
- return eRet;
+ }
+ return eRet;
}
if(numRoles)
@@ -853,18 +878,18 @@
numofroles = *numRoles;
*numRoles = 0;
- for(i=0; i< SIZE_OF_CORE; i++)
+ for (i = 0; i < num_components; i++)
{
- if(!strcmp(compName,core[i].name))
+ if (!strcmp(compName, component[i].name))
{
- for(j=0; (j<OMX_CORE_MAX_CMP_ROLES) && core[i].roles[j];j++)
+ for(j=0; (j<OMX_CORE_MAX_CMP_ROLES) && component[i].roles[j];j++)
{
if(roles && roles[*numRoles])
{
#ifdef _ANDROID_
- strlcpy((char *)roles[*numRoles],core[i].roles[j],OMX_MAX_STRINGNAME_SIZE);
+ strlcpy((char *)roles[*numRoles],component[i].roles[j],OMX_MAX_STRINGNAME_SIZE);
#else
- strncpy((char *)roles[*numRoles],core[i].roles[j],OMX_MAX_STRINGNAME_SIZE);
+ strlcpy((char *)roles[*numRoles],component[i].roles[j],OMX_MAX_STRINGNAME_SIZE);
#endif
}
(*numRoles)++;
diff --git a/mm-core/src/registry_table.c b/mm-core/src/registry_table.c
index ec1c202..f7c4475 100644
--- a/mm-core/src/registry_table.c
+++ b/mm-core/src/registry_table.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
+Copyright (c) 2018-2020, 2021 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -43,15 +43,13 @@
OMX_REGISTRY_ENTRY("OMX.qcom.video.decoder.avc", "libOmxVdec.so", "video_decoder.avc"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.decoder.avc.dsmode", "libOmxVideoDSMode.so", "video_decoder.avc"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.decoder.hevc", "libOmxVdec.so", "video_decoder.hevc"),
- OMX_REGISTRY_ENTRY("OMX.qcom.video.decoder.vp8", "libOmxVdec.so", "video_decoder.vp8"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.decoder.vp9", "libOmxVdec.so", "video_decoder.vp9"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.encoder.avc", "libOmxVenc.so", "video_encoder.avc"),
- OMX_REGISTRY_ENTRY("OMX.qcom.video.encoder.vp8", "libOmxVenc.so", "video_encoder.vp8"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.encoder.hevc", "libOmxVenc.so", "video_encoder.hevc"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.encoder.hevc.cq", "libOmxVenc.so", "video_encoder.hevc"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.encoder.heic", "libOmxVenc.so", "image_encoder.heic"),
};
const unsigned int SIZE_OF_CORE = sizeof(core) / sizeof(omx_core_cb_type);
-
+omx_core_cb_type component[SIZE_OF_CORE];
diff --git a/mm-core/src/registry_table_android.c b/mm-core/src/registry_table_android.c
index ff22f00..be6d203 100644
--- a/mm-core/src/registry_table_android.c
+++ b/mm-core/src/registry_table_android.c
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
+Copyright (c) 2018-2020, 2021 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -44,15 +44,14 @@
OMX_REGISTRY_ENTRY("OMX.qcom.video.decoder.avc.secure", "libOmxVdec.so", "video_decoder.avc"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.decoder.hevc", "libOmxVdec.so", "video_decoder.hevc"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.decoder.hevc.secure", "libOmxVdec.so", "video_decoder.hevc"),
- OMX_REGISTRY_ENTRY("OMX.qcom.video.decoder.vp8", "libOmxVdec.so", "video_decoder.vp8"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.decoder.vp9", "libOmxVdec.so", "video_decoder.vp9"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.decoder.vp9.secure", "libOmxVdec.so", "video_decoder.vp9"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.encoder.avc", "libOmxVenc.so", "video_encoder.avc"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.encoder.avc.secure", "libOmxVenc.so", "video_encoder.avc"),
- OMX_REGISTRY_ENTRY("OMX.qcom.video.encoder.vp8", "libOmxVenc.so", "video_encoder.vp8"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.encoder.hevc", "libOmxVenc.so", "video_encoder.hevc"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.encoder.hevc.cq", "libOmxVenc.so", "video_encoder.hevc"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.encoder.hevc.secure", "libOmxVenc.so", "video_encoder.hevc"),
OMX_REGISTRY_ENTRY("OMX.qcom.video.encoder.heic", "libOmxVenc.so", "image_encoder.heic"),
};
const unsigned int SIZE_OF_CORE = sizeof(core) / sizeof(omx_core_cb_type);
+omx_core_cb_type component[SIZE_OF_CORE];
diff --git a/mm-video-v4l2/vidc/common/Android.mk b/mm-video-v4l2/vidc/common/Android.mk
index 13f2436..dee890a 100644
--- a/mm-video-v4l2/vidc/common/Android.mk
+++ b/mm-video-v4l2/vidc/common/Android.mk
@@ -16,6 +16,10 @@
libmm-vidc-def += -Werror
libmm-vidc-def += -D_ANDROID_ICS_
+ifeq ($(TARGET_USES_ION),true)
+libmm-vidc-def += -DUSE_ION
+endif
+
# ---------------------------------------------------------------------------------
# Make the Shared library (libOmxVidcCommon)
# ---------------------------------------------------------------------------------
@@ -29,9 +33,13 @@
libmm-vidc-inc += $(TOP)/frameworks/native/headers/media_plugin
libmm-vidc-inc += $(TARGET_OUT_HEADERS)/qcom/display
libmm-vidc-inc += $(TOP)/system/memory/libion/include
+libmm-vidc-inc += $(TOP)/system/memory/libion/kernel-headers
LOCAL_MODULE := libOmxVidcCommon
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_MODULE_TAGS := optional
LOCAL_VENDOR_MODULE := true
LOCAL_CFLAGS := $(libmm-vidc-def)
diff --git a/mm-video-v4l2/vidc/common/inc/vidc_common.h b/mm-video-v4l2/vidc/common/inc/vidc_common.h
index 2cabbf9..8035328 100644
--- a/mm-video-v4l2/vidc/common/inc/vidc_common.h
+++ b/mm-video-v4l2/vidc/common/inc/vidc_common.h
@@ -33,6 +33,7 @@
#include <unordered_map>
#include "OMX_QCOMExtns.h"
+#include <linux/dma-buf.h>
#ifdef _ANDROID_
#include <gralloc_priv.h>
#endif
@@ -101,4 +102,56 @@
void get_gralloc_format_as_string(char * buf, int buf_len, int format);
void get_v4l2_color_format_as_string(char * buf, int buf_len, unsigned long v4l2Pixformat);
+void do_sync_ioctl(int fd, struct dma_buf_sync* sync);
+
+static inline void sync_start_write(int fd) {
+ struct dma_buf_sync sync = {0};
+ sync.flags = DMA_BUF_SYNC_START | DMA_BUF_SYNC_WRITE;
+ do_sync_ioctl(fd, &sync);
+}
+
+static inline void sync_end_write(int fd) {
+ struct dma_buf_sync sync = {0};
+ sync.flags = DMA_BUF_SYNC_END | DMA_BUF_SYNC_WRITE;
+ do_sync_ioctl(fd, &sync);
+}
+
+static inline void sync_start_read(int fd) {
+ struct dma_buf_sync sync = {0};
+ sync.flags = DMA_BUF_SYNC_START | DMA_BUF_SYNC_READ;
+ do_sync_ioctl(fd, &sync);
+}
+
+static inline void sync_end_read(int fd) {
+ struct dma_buf_sync sync = {0};
+ sync.flags = DMA_BUF_SYNC_END | DMA_BUF_SYNC_READ;
+ do_sync_ioctl(fd, &sync);
+}
+
+static inline void sync_start_rw(int fd) {
+ struct dma_buf_sync sync = {0};
+ sync.flags = DMA_BUF_SYNC_START | DMA_BUF_SYNC_RW;
+ do_sync_ioctl(fd, &sync);
+}
+
+static inline void sync_end_rw(int fd) {
+ struct dma_buf_sync sync = {0};
+ sync.flags = DMA_BUF_SYNC_END | DMA_BUF_SYNC_RW;
+ do_sync_ioctl(fd, &sync);
+}
+
+static inline void cache_clean(int fd) {
+ sync_start_write(fd);
+ sync_end_write(fd);
+}
+
+static inline void cache_invalidate(int fd) {
+ sync_start_write(fd);
+ sync_end_read(fd);
+}
+
+static inline void cache_clean_invalidate(int fd) {
+ sync_start_rw(fd);
+ sync_end_rw(fd);
+}
#endif // __VIDC_COMMON_H__
diff --git a/mm-video-v4l2/vidc/common/inc/vidc_debug.h b/mm-video-v4l2/vidc/common/inc/vidc_debug.h
index ca24a57..f32d6a5 100755
--- a/mm-video-v4l2/vidc/common/inc/vidc_debug.h
+++ b/mm-video-v4l2/vidc/common/inc/vidc_debug.h
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2013 - 2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2013 - 2020, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -141,13 +141,47 @@
} \
} \
-void print_omx_buffer(const char *str, OMX_BUFFERHEADERTYPE *pHeader);
-void print_v4l2_buffer(const char *str, struct v4l2_buffer *v4l2);
void print_debug_color_aspects(ColorAspects *a, const char *prefix);
void print_debug_hdr_color_info(HDRStaticInfo *hdr_info, const char *prefix);
void print_debug_hdr_color_info_mdata(ColorMetaData* color_mdata);
void print_debug_hdr10plus_metadata(ColorMetaData& color_mdata);
+static inline void print_omx_buffer(const char *str, OMX_BUFFERHEADERTYPE *pHeader)
+{
+ if (!pHeader)
+ return;
+
+ DEBUG_PRINT_HIGH("%s: Header %p buffer %p alloclen %d offset %d filledlen %d timestamp %lld flags %#x",
+ str, pHeader, pHeader->pBuffer, pHeader->nAllocLen,
+ pHeader->nOffset, pHeader->nFilledLen,
+ pHeader->nTimeStamp, pHeader->nFlags);
+}
+
+static inline void print_v4l2_buffer(const char *str, struct v4l2_buffer *v4l2)
+{
+ if (!v4l2)
+ return;
+
+ if (v4l2->length == 1)
+ DEBUG_PRINT_HIGH(
+ "%s: %s: idx %2d userptr %#lx fd %d off %d size %d filled %d flags %#x\n",
+ str, v4l2->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE ?
+ "OUTPUT" : "CAPTURE", v4l2->index,
+ v4l2->m.planes[0].m.userptr, v4l2->m.planes[0].reserved[MSM_VIDC_BUFFER_FD],
+ v4l2->m.planes[0].reserved[MSM_VIDC_DATA_OFFSET], v4l2->m.planes[0].length,
+ v4l2->m.planes[0].bytesused, v4l2->flags);
+ else
+ DEBUG_PRINT_HIGH(
+ "%s: %s: idx %2d userptr %#lx fd %d off %d size %d filled %d flags %#x, extradata: fd %d off %d size %d filled %d\n",
+ str, v4l2->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE ?
+ "OUTPUT" : "CAPTURE", v4l2->index,
+ v4l2->m.planes[0].m.userptr, v4l2->m.planes[0].reserved[MSM_VIDC_BUFFER_FD],
+ v4l2->m.planes[0].reserved[MSM_VIDC_DATA_OFFSET], v4l2->m.planes[0].length,
+ v4l2->m.planes[0].bytesused, v4l2->flags, v4l2->m.planes[1].reserved[MSM_VIDC_BUFFER_FD],
+ v4l2->m.planes[1].reserved[MSM_VIDC_DATA_OFFSET], v4l2->m.planes[1].length,
+ v4l2->m.planes[1].bytesused);
+}
+
class auto_lock {
public:
auto_lock(pthread_mutex_t &lock)
@@ -167,8 +201,11 @@
pthread_cond_t condition;
public:
Signal() {
+ pthread_condattr_t attr;
signalled = false;
- pthread_cond_init(&condition, NULL);
+ pthread_condattr_init(&attr);
+ pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
+ pthread_cond_init(&condition, &attr);
pthread_mutex_init(&mutex, NULL);
}
@@ -193,7 +230,7 @@
pthread_mutex_unlock(&mutex);
return 0;
}
- clock_gettime(CLOCK_REALTIME, &ts);
+ clock_gettime(CLOCK_MONOTONIC, &ts);
ts.tv_sec += timeout_nsec / 1000000000;
ts.tv_nsec += timeout_nsec % 1000000000;
if (ts.tv_nsec >= 1000000000) {
diff --git a/mm-video-v4l2/vidc/common/src/vidc_common.cpp b/mm-video-v4l2/vidc/common/src/vidc_common.cpp
index 0953f6b..dbec85d 100644
--- a/mm-video-v4l2/vidc/common/src/vidc_common.cpp
+++ b/mm-video-v4l2/vidc/common/src/vidc_common.cpp
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
+Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -357,6 +357,9 @@
case V4L2_PIX_FMT_NV12:
snprintf(buf, buf_len, "V4L2_PIX_FMT_NV12");
break;
+ case V4L2_PIX_FMT_NV12_512:
+ snprintf(buf, buf_len, "V4L2_PIX_FMT_NV12_512");
+ break;
case V4L2_PIX_FMT_NV12_UBWC:
snprintf(buf, buf_len, "V4L2_PIX_FMT_NV12_UBWC");
break;
@@ -410,3 +413,15 @@
filledLen(filledLen),
timeStamp(timeStamp) {
}
+
+void do_sync_ioctl(int fd, struct dma_buf_sync* sync) {
+#ifdef USE_ION
+ int rc = ioctl(fd, DMA_BUF_IOCTL_SYNC, sync);
+ if (rc < 0) {
+ DEBUG_PRINT_ERROR("Failed DMA_BUF_IOCTL_SYNC");
+ return;
+ }
+#else
+ (void)fd, (void)sync;
+#endif
+}
diff --git a/mm-video-v4l2/vidc/common/src/vidc_debug.cpp b/mm-video-v4l2/vidc/common/src/vidc_debug.cpp
index 8a3c164..a1ada40 100644
--- a/mm-video-v4l2/vidc/common/src/vidc_debug.cpp
+++ b/mm-video-v4l2/vidc/common/src/vidc_debug.cpp
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2010-2018, The Linux Foundation. All rights reserved.
+Copyright (c) 2010-2018,2020, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -29,42 +29,6 @@
#include "vidc_debug.h"
-void print_omx_buffer(const char *str, OMX_BUFFERHEADERTYPE *pHeader)
-{
- if (!pHeader)
- return;
-
- DEBUG_PRINT_HIGH("%s: Header %p buffer %p alloclen %d offset %d filledlen %d timestamp %lld flags %#x",
- str, pHeader, pHeader->pBuffer, pHeader->nAllocLen,
- pHeader->nOffset, pHeader->nFilledLen,
- pHeader->nTimeStamp, pHeader->nFlags);
-}
-
-void print_v4l2_buffer(const char *str, struct v4l2_buffer *v4l2)
-{
- if (!v4l2)
- return;
-
- if (v4l2->length == 1)
- DEBUG_PRINT_HIGH(
- "%s: %s: idx %2d userptr %#lx fd %d off %d size %d filled %d flags %#x\n",
- str, v4l2->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE ?
- "OUTPUT" : "CAPTURE", v4l2->index,
- v4l2->m.planes[0].m.userptr, v4l2->m.planes[0].reserved[MSM_VIDC_BUFFER_FD],
- v4l2->m.planes[0].reserved[MSM_VIDC_DATA_OFFSET], v4l2->m.planes[0].length,
- v4l2->m.planes[0].bytesused, v4l2->flags);
- else
- DEBUG_PRINT_HIGH(
- "%s: %s: idx %2d userptr %#lx fd %d off %d size %d filled %d flags %#x, extradata: fd %d off %d size %d filled %d\n",
- str, v4l2->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE ?
- "OUTPUT" : "CAPTURE", v4l2->index,
- v4l2->m.planes[0].m.userptr, v4l2->m.planes[0].reserved[MSM_VIDC_BUFFER_FD],
- v4l2->m.planes[0].reserved[MSM_VIDC_DATA_OFFSET], v4l2->m.planes[0].length,
- v4l2->m.planes[0].bytesused, v4l2->m.planes[1].reserved[MSM_VIDC_BUFFER_FD],
- v4l2->flags, v4l2->m.planes[1].reserved[MSM_VIDC_DATA_OFFSET],
- v4l2->m.planes[1].length, v4l2->m.planes[1].bytesused);
-}
-
void print_debug_color_aspects(ColorAspects *a, const char *prefix)
{
DEBUG_PRINT_HIGH("%s : Color aspects : Primaries = %d(%s) Range = %d(%s) Tx = %d(%s) Matrix = %d(%s)",
diff --git a/mm-video-v4l2/vidc/vdec/Android.mk b/mm-video-v4l2/vidc/vdec/Android.mk
index 6a9e208..8aec4e8 100644
--- a/mm-video-v4l2/vidc/vdec/Android.mk
+++ b/mm-video-v4l2/vidc/vdec/Android.mk
@@ -27,7 +27,7 @@
# KONA_TODO_UPDATE: Disable SW codec for Kona for now
TARGETS_THAT_DONT_NEED_SW_VDEC := msm8226 msm8916 msm8992 msm8996 sdm660 msm8998 msm8909
-ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_HAVE_VENUS_HEVC)),true)
+ifneq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_HAVE_VENUS_HEVC)))
libmm-vdec-def += -DVENUS_HEVC
endif
@@ -49,11 +49,11 @@
libmm-vdec-def += -DANDROID_JELLYBEAN_MR1=1
endif
-ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true)
+ifneq (,$(call is-board-platform-in-list2, $(MASTER_SIDE_CP_TARGET_LIST)))
libmm-vdec-def += -DMASTER_SIDE_CP
endif
-ifeq ($(call is-platform-sdk-version-at-least,27),true) # O-MR1
+ifdef IS_AT_LEAST_OPM1 # O-MR1
libmm-vdec-def += -D_ANDROID_O_MR1_DIVX_CHANGES
endif
@@ -82,12 +82,12 @@
# Common Dependencies
libmm-vdec-add-dep := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
-ifeq ($(call is-platform-sdk-version-at-least, 19),true)
+ifeq (T,T) # TODO: Obsolete, please remove
# This feature is enabled for Android KK+
libmm-vdec-def += -DADAPTIVE_PLAYBACK_SUPPORTED
endif
-ifeq ($(call is-platform-sdk-version-at-least, 22),true)
+ifeq (T,T) # TODO: Obsolete, please remove
# This feature is enabled for Android LMR1
libmm-vdec-def += -DFLEXYUV_SUPPORTED
endif
@@ -101,6 +101,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE := libOmxVdec
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_MODULE_TAGS := optional
LOCAL_VENDOR_MODULE := true
LOCAL_CFLAGS := $(libmm-vdec-def) -Werror
@@ -145,9 +148,12 @@
include $(CLEAR_VARS)
ifneq "$(wildcard $(QCPATH) )" ""
-ifneq ($(call is-board-platform-in-list, $(TARGETS_THAT_DONT_NEED_SW_VDEC)),true)
+ifeq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_DONT_NEED_SW_VDEC)))
LOCAL_MODULE := libOmxSwVdec
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_MODULE_TAGS := optional
LOCAL_VENDOR_MODULE := true
LOCAL_CFLAGS := $(libmm-vdec-def)
@@ -171,6 +177,7 @@
LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep)
LOCAL_PRELINK_MODULE := false
+LOCAL_STATIC_LIBRARIES := libOmxVidcCommon
LOCAL_SHARED_LIBRARIES := liblog libcutils libc2dcolorconvert libion
LOCAL_SHARED_LIBRARIES += libswvdec
diff --git a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
index 539ce60..dab7b75 100644
--- a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
+++ b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
@@ -885,7 +885,6 @@
#ifdef USE_ION
bool alloc_map_ion_memory(OMX_U32 buffer_size, vdec_ion *ion_info, int flag);
void free_ion_memory(struct vdec_ion *buf_ion_info);
- void do_cache_operations(int fd);
#endif
#ifdef USE_GBM
@@ -1002,6 +1001,7 @@
ts_arr_list m_timestamp_list;
#endif
+ char m_platform_name[PROPERTY_VALUE_MAX] = {0};
bool input_flush_progress;
bool output_flush_progress;
bool input_use_buffer;
@@ -1061,8 +1061,6 @@
OMX_U32 m_disp_hor_size;
OMX_U32 m_disp_vert_size;
OMX_S64 prev_ts;
- OMX_S64 prev_ts_actual;
- bool rst_prev_ts;
OMX_U32 frm_int;
OMX_U32 m_fps_received;
@@ -1091,6 +1089,7 @@
};
meta_buffer meta_buff;
OMX_PARAM_PORTDEFINITIONTYPE m_port_def;
+ omx_time_stamp_reorder time_stamp_dts;
desc_buffer_hdr *m_desc_buffer_ptr;
bool secure_mode;
bool allocate_native_handle;
@@ -1202,11 +1201,14 @@
int log_output_buffers(OMX_BUFFERHEADERTYPE *);
int log_cc_output_buffers(OMX_BUFFERHEADERTYPE *);
void send_codec_config();
- OMX_TICKS m_last_rendered_TS;
+ OMX_TICKS m_prev_timestampUs;
+ bool m_prev_frame_rendered;
int32_t m_dec_hfr_fps;
int32_t m_dec_secure_prefetch_size_internal;
int32_t m_dec_secure_prefetch_size_output;
int32_t m_arb_mode_override;
+ int32_t m_disable_hdr;
+ int32_t m_dec_output_rate;
volatile int32_t m_queued_codec_config_count;
OMX_U32 current_perf_level;
int32_t m_thumbnail_yuv_output;
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp b/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp
index 8af50ad..6ce7eb6 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp
@@ -1,7 +1,7 @@
/**
* @copyright
*
- * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -50,6 +50,7 @@
#include "omx_swvdec.h"
#include "swvdec_api.h"
+#include "vidc_common.h"
static unsigned int split_buffer_mpeg4(unsigned int *offset_array,
OMX_BUFFERHEADERTYPE *p_buffer_hdr);
@@ -191,30 +192,6 @@
m_swvdec_codec = SWVDEC_CODEC_H263;
m_omx_video_codingtype = OMX_VIDEO_CodingH263;
}
- else if (((!strncmp(cmp_name,
- "OMX.qti.video.decoder.vc1sw",
- OMX_MAX_STRINGNAME_SIZE)))||
- ((!strncmp(cmp_name,
- "OMX.qti.video.decoder.wmvsw",
- OMX_MAX_STRINGNAME_SIZE))))
- {
- char property_value[PROPERTY_VALUE_MAX] = {0};
- if(property_get("vendor.media.sm6150.version",property_value,0) &&
- (atoi(property_value) == 1))
- {
- OMX_SWVDEC_LOG_ERROR("VC1 decoder not supported on this target");
- retval = OMX_ErrorInvalidComponentName;
- goto component_init_exit;
- }
-
- OMX_SWVDEC_LOG_LOW("video_decoder.vc1");
-
- strlcpy(m_cmp_name, cmp_name, OMX_MAX_STRINGNAME_SIZE);
- strlcpy(m_role_name, "video_decoder.vc1", OMX_MAX_STRINGNAME_SIZE);
-
- m_swvdec_codec = SWVDEC_CODEC_VC1;
- m_omx_video_codingtype = OMX_VIDEO_CodingWMV;
- }
else
{
OMX_SWVDEC_LOG_ERROR("'%s': invalid component name", cmp_name);
@@ -1176,11 +1153,6 @@
(p_meta_data->bStoreMetaData ?
"enable" :
"disable"));
- if(m_swvdec_codec == SWVDEC_CODEC_VC1)
- {
- OMX_SWVDEC_LOG_HIGH("meta buffer mode is not supprted for vc1");
- return OMX_ErrorUnsupportedSetting;
- }
if (p_meta_data->nPortIndex == OMX_CORE_PORT_INDEX_OP)
{
if (p_meta_data->bStoreMetaData && m_meta_buffer_mode_disabled)
@@ -3183,8 +3155,8 @@
/**
* alignment factors:
*
- * - stride: 512
- * - scanlines: 512
+ * - stride: 512 or 128
+ * - scanlines: 512 or 32
*/
stride = VENUS_Y_STRIDE(COLOR_FMT_NV12, p_img->mWidth);
scanlines = VENUS_Y_SCANLINES(COLOR_FMT_NV12, p_img->mHeight);
@@ -3530,7 +3502,9 @@
if (m_sync_frame_decoding_mode)
{
- p_buffer_req->mincount = 1;
+ /* Content for which low delay is 0 for ex: XVID clips
+ minimum two buffers are required to generate thumbnail */
+ p_buffer_req->mincount = 2;
}
m_port_op.def.nBufferSize = p_buffer_req->size;
@@ -3571,7 +3545,6 @@
OMX_U32 size)
{
OMX_ERRORTYPE retval = OMX_ErrorNone;
- SWVDEC_STATUS retval_swvdec = SWVDEC_STATUS_SUCCESS;
unsigned int ii;
@@ -3660,20 +3633,6 @@
m_buffer_array_ip[ii].buffer_populated = true;
- if(m_swvdec_codec == SWVDEC_CODEC_VC1)
- {
- OMX_SWVDEC_LOG_LOW("map ip buffer");
-
- if((retval_swvdec = swvdec_register_buffer(m_swvdec_handle,
- &m_buffer_array_ip[ii].buffer_swvdec))
- != SWVDEC_STATUS_SUCCESS)
- {
- OMX_SWVDEC_LOG_ERROR("swvdec_map failed for ip buffer %d: %p",ii,bufferaddr);
- retval = retval_swvdec2omx(retval_swvdec);;
- goto buffer_allocate_ip_exit;
- }
- }
-
OMX_SWVDEC_LOG_HIGH("ip buffer %d: %p, fd = %d %d bytes",
ii,
bufferaddr,
@@ -3720,7 +3679,6 @@
OMX_U32 size)
{
OMX_ERRORTYPE retval = OMX_ErrorNone;
- SWVDEC_STATUS retval_swvdec = SWVDEC_STATUS_SUCCESS;
unsigned int ii;
if (size != m_port_op.def.nBufferSize)
@@ -3809,17 +3767,6 @@
m_buffer_array_op[ii].buffer_swvdec.fd = pmem_fd ;
- if(m_swvdec_codec == SWVDEC_CODEC_VC1)
- {
- OMX_SWVDEC_LOG_LOW("map op buffer");
-
- if((retval_swvdec = swvdec_map(m_swvdec_handle,&m_buffer_array_op[ii].buffer_swvdec)) != SWVDEC_STATUS_SUCCESS)
- {
- OMX_SWVDEC_LOG_ERROR("swvdec_map failed for op buffer %d: %p",ii,bufferaddr);
- retval = retval_swvdec2omx(retval_swvdec);;
- goto buffer_allocate_op_exit;
- }
- }
OMX_SWVDEC_LOG_HIGH("op buffer %d: %p, fd = %d %d bytes",
ii,
bufferaddr,
@@ -3995,7 +3942,6 @@
OMX_U8 *p_buffer)
{
OMX_ERRORTYPE retval = OMX_ErrorNone;
- SWVDEC_STATUS retval_swvdec;
unsigned int ii;
(void) size;
@@ -4106,17 +4052,7 @@
p_buffer_swvdec->p_client_data = (void *) ((unsigned long) ii);
p_buffer_swvdec->fd = p_buffer_payload->pmem_fd ;
- if(m_swvdec_codec == SWVDEC_CODEC_VC1)
- {
- OMX_SWVDEC_LOG_LOW("map op buffer");
- if((retval_swvdec = swvdec_map(m_swvdec_handle,p_buffer_swvdec)) != SWVDEC_STATUS_SUCCESS)
- {
- OMX_SWVDEC_LOG_ERROR("swvdec_map failed for op buffer %d: %p",ii,p_buffer_mapped);
- retval = retval_swvdec2omx(retval_swvdec);;
- goto buffer_use_op_exit;
- }
- }
m_buffer_array_op[ii].buffer_populated = true;
(*pp_buffer_hdr)->pBuffer = (m_android_native_buffers ?
@@ -4165,7 +4101,6 @@
OMX_BUFFERHEADERTYPE *p_buffer_hdr)
{
OMX_ERRORTYPE retval = OMX_ErrorNone;
- SWVDEC_STATUS retval_swvdec = SWVDEC_STATUS_SUCCESS;
unsigned int ii;
@@ -4199,22 +4134,6 @@
{
if (m_buffer_array_ip[ii].buffer_payload.pmem_fd > 0)
{
-
- if(m_swvdec_codec == SWVDEC_CODEC_VC1)
- {
- SWVDEC_BUFFER *p_buffer_swvdec;
- p_buffer_swvdec = &m_buffer_array_ip[ii].buffer_swvdec;
- OMX_SWVDEC_LOG_LOW("unmap ip buffer");
-
- if((retval_swvdec = swvdec_unregister_buffer(m_swvdec_handle,p_buffer_swvdec))
- != SWVDEC_STATUS_SUCCESS)
- {
- OMX_SWVDEC_LOG_ERROR("swvdec_unmap failed for ip buffer %d: %p",
- ii,p_buffer_swvdec->p_buffer);
- retval = retval_swvdec2omx(retval_swvdec);;
- }
- }
-
m_buffer_array_ip[ii].buffer_populated = false;
m_port_ip.populated = OMX_FALSE;
@@ -4272,7 +4191,6 @@
OMX_BUFFERHEADERTYPE *p_buffer_hdr)
{
OMX_ERRORTYPE retval = OMX_ErrorNone;
- SWVDEC_STATUS retval_swvdec = SWVDEC_STATUS_SUCCESS;
unsigned int ii;
if (p_buffer_hdr == NULL)
@@ -4308,20 +4226,7 @@
// do nothing; munmap() & FD reset done in FBD or RR
}
else if (m_android_native_buffers)
- {
-
- if(m_swvdec_codec == SWVDEC_CODEC_VC1)
- {
- SWVDEC_BUFFER *p_buffer_swvdec;
- p_buffer_swvdec = &m_buffer_array_op[ii].buffer_swvdec;
- OMX_SWVDEC_LOG_LOW("unmap op buffer");
-
- if((retval_swvdec = swvdec_unmap(m_swvdec_handle,p_buffer_swvdec)) != SWVDEC_STATUS_SUCCESS)
- {
- OMX_SWVDEC_LOG_ERROR("swvdec_unmap failed for op buffer %d: %p",ii,p_buffer_swvdec->p_buffer);
- retval = retval_swvdec2omx(retval_swvdec);;
- }
- }
+ {
ion_unmap(m_buffer_array_op[ii].buffer_payload.pmem_fd ,
m_buffer_array_op[ii].buffer_payload.bufferaddr,
m_buffer_array_op[ii].buffer_payload.mmaped_size);
@@ -4330,18 +4235,6 @@
}
else
{
- if(m_swvdec_codec == SWVDEC_CODEC_VC1)
- {
- SWVDEC_BUFFER *p_buffer_swvdec;
- p_buffer_swvdec = &m_buffer_array_op[ii].buffer_swvdec;
- OMX_SWVDEC_LOG_LOW("unmap op buffer");
-
- if((retval_swvdec = swvdec_unmap(m_swvdec_handle,p_buffer_swvdec)) != SWVDEC_STATUS_SUCCESS)
- {
- OMX_SWVDEC_LOG_ERROR("swvdec_unmap failed for op buffer %d: %p",ii,p_buffer_swvdec->p_buffer);
- retval = retval_swvdec2omx(retval_swvdec);;
- }
- }
ion_unmap(m_buffer_array_op[ii].buffer_payload.pmem_fd,
m_buffer_array_op[ii].buffer_payload.bufferaddr,
m_buffer_array_op[ii].buffer_payload.mmaped_size);
@@ -4794,33 +4687,10 @@
void omx_swvdec::ion_flush_op(unsigned int index)
{
if (index < m_port_op.def.nBufferCountActual)
- {
-#ifdef USE_ION
- struct dma_buf_sync dma_buf_sync_data[2];
- dma_buf_sync_data[0].flags = DMA_BUF_SYNC_START | DMA_BUF_SYNC_WRITE;
- dma_buf_sync_data[1].flags = DMA_BUF_SYNC_END | DMA_BUF_SYNC_WRITE;
-
- for (unsigned int i=0; i<2; i++)
- {
- int ret = ioctl(m_buffer_array_op[index].buffer_swvdec.fd,
- DMA_BUF_IOCTL_SYNC, &dma_buf_sync_data[i]);
- if (ret < 0)
- {
- OMX_SWVDEC_LOG_ERROR("Cache %s failed for fd %d : %s\n",
- (i==0) ? "START" : "END",
- m_buffer_array_op[index].buffer_swvdec.fd,
- strerror(errno));
- goto ion_flush_op_exit;
- }
- }
-#endif
- }
+ cache_clean_invalidate(m_buffer_array_op[index].buffer_swvdec.fd);
else
- {
OMX_SWVDEC_LOG_ERROR("buffer index '%d' invalid", index);
- }
-ion_flush_op_exit:
return;
}
@@ -4840,9 +4710,17 @@
{
unsigned long index = (unsigned long) p_buffer_ip->p_client_data;
- m_buffer_array_ip[index].buffer_header.nFilledLen =
- p_buffer_ip->filled_length;
-
+ if (m_arbitrary_bytes_mode)
+ {
+ if (!m_buffer_array_ip[index].split_count)
+ {
+ m_buffer_array_ip[index].buffer_header.nFilledLen =
+ p_buffer_ip->filled_length;
+ }
+ }
+ else
+ m_buffer_array_ip[index].buffer_header.nFilledLen =
+ p_buffer_ip->filled_length;
async_post_event(OMX_SWVDEC_EVENT_EBD,
(unsigned long) &m_buffer_array_ip[index].buffer_header,
index);
@@ -6521,7 +6399,7 @@
/**
* @brief Map the memory and run the ioctl SYNC operations
- *.on ION fd with DMA_BUF_IOCTL_SYNC
+ *.on ION fd
*.@param[in] fd: ION header.
* @param[in] len:Lenth of the memory.
* @retval mapped memory pointer
@@ -6530,16 +6408,8 @@
{
unsigned char *bufaddr = (unsigned char*)mmap(NULL, len, PROT_READ|PROT_WRITE,
MAP_SHARED, fd, 0);
- if (bufaddr != MAP_FAILED) {
-#ifdef USE_ION
- struct dma_buf_sync buf_sync;
- buf_sync.flags = DMA_BUF_SYNC_START | DMA_BUF_SYNC_RW;
- int rc = ioctl(fd, DMA_BUF_IOCTL_SYNC, &buf_sync);
- if (rc) {
- OMX_SWVDEC_LOG_ERROR("Failed DMA_BUF_IOCTL_SYNC");
- }
-#endif
- }
+ if (bufaddr != MAP_FAILED)
+ cache_clean_invalidate(fd);
return bufaddr;
}
@@ -6552,14 +6422,7 @@
*/
OMX_ERRORTYPE omx_swvdec::ion_unmap(int fd, void *bufaddr, int len)
{
-#ifdef USE_ION
- struct dma_buf_sync buf_sync;
- buf_sync.flags = DMA_BUF_SYNC_END | DMA_BUF_SYNC_RW;
- int rc = ioctl(fd, DMA_BUF_IOCTL_SYNC, &buf_sync);
- if (rc) {
- OMX_SWVDEC_LOG_ERROR("Failed DMA_BUF_IOCTL_SYNC");
- }
-#endif
+ cache_clean_invalidate(fd);
if (-1 == munmap(bufaddr, len)) {
OMX_SWVDEC_LOG_ERROR("munmap failed.");
return OMX_ErrorInsufficientResources;
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_extensions.hpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_extensions.hpp
index 51c2f96..3d22a8a 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_extensions.hpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_extensions.hpp
@@ -45,6 +45,9 @@
ADD_EXTENSION("qti-ext-dec-output-frame-rate", OMX_QTIIndexParamVideoDecoderOutputFrameRate, OMX_DirOutput)
ADD_PARAM_END("value", OMX_AndroidVendorValueInt32)
+
+ ADD_EXTENSION("qti-ext-dec-thumbnail-mode", OMX_QcomIndexParamVideoSyncFrameDecodingMode, OMX_DirOutput)
+ ADD_PARAM_END("value", OMX_AndroidVendorValueInt32)
}
@@ -103,6 +106,11 @@
setStatus &= vExt.setParamInt32(ext, "value", m_dec_hfr_fps);
break;
}
+ case OMX_QcomIndexParamVideoSyncFrameDecodingMode:
+ {
+ setStatus &= vExt.setParamInt32(ext, "value", drv_ctx.idr_only_decoding);
+ break;
+ }
default:
{
return OMX_ErrorNotImplemented;
@@ -227,6 +235,21 @@
}
break;
}
+ case OMX_QcomIndexParamVideoSyncFrameDecodingMode:
+ {
+ OMX_U32 thumbnail_mode = 0;
+ valueSet |= vExt.readParamInt32(ext, "value", (OMX_S32 *)&thumbnail_mode);
+ DEBUG_PRINT_HIGH("VENDOR-EXT: set_config: OMX_QcomIndexParamVideoSyncFrameDecodingMode : %d",
+ thumbnail_mode);
+ if (!valueSet || !thumbnail_mode)
+ break;
+ err = set_parameter(
+ NULL, (OMX_INDEXTYPE)OMX_QcomIndexParamVideoSyncFrameDecodingMode, &thumbnail_mode);
+ if (err != OMX_ErrorNone) {
+ DEBUG_PRINT_ERROR("set_param: OMX_QcomIndexParamVideoSyncFrameDecodingMode failed !");
+ }
+ break;
+ }
case OMX_QTIIndexParamCapabilitiesVTDriverVersion:
{
break;
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
index 1b972c2..d600e98 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2010 - 2020, The Linux Foundation. All rights reserved.
+Copyright (c) 2010 - 2021, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -137,6 +137,7 @@
as 0. This disables sending metadata via gralloc handle.
*/
#define HDR10_SETMETADATA_ENABLE 0
+#define DEC_HDR_DISABLE_FLAG 0x1
#define THUMBNAIL_YUV420P_8BIT 0x01
#define THUMBNAIL_YUV420P_10BIT 0x02
@@ -568,8 +569,6 @@
m_disp_hor_size(0),
m_disp_vert_size(0),
prev_ts(LLONG_MAX),
- prev_ts_actual(LLONG_MAX),
- rst_prev_ts(true),
frm_int(0),
m_fps_received(0),
in_reconfig(false),
@@ -585,7 +584,8 @@
allocate_native_handle(false),
client_set_fps(false),
stereo_output_mode(HAL_NO_3D),
- m_last_rendered_TS(-1),
+ m_prev_timestampUs(0),
+ m_prev_frame_rendered(false),
m_dec_hfr_fps(0),
m_dec_secure_prefetch_size_internal(0),
m_dec_secure_prefetch_size_output(0),
@@ -645,6 +645,12 @@
Platform::Config::getInt32(Platform::vidc_dec_thumbnail_yuv_output,
(int32_t *)&m_thumbnail_yuv_output, 0);
+ Platform::Config::getInt32(Platform::vidc_disable_hdr,
+ (int32_t *)&m_disable_hdr, 0);
+
+ Platform::Config::getInt32(Platform::vidc_dec_output_rate,
+ (int32_t *)&m_dec_output_rate, 60);
+
property_value[0] = '\0';
property_get("vendor.vidc.dec.log.in", property_value, "0");
m_debug.in_buffer_log |= atoi(property_value);
@@ -1045,11 +1051,21 @@
break;
case OMX_COMPONENT_GENERATE_EBD:
-
if (p2 != VDEC_S_SUCCESS && p2 != VDEC_S_INPUT_BITSTREAM_ERR) {
DEBUG_PRINT_ERROR("OMX_COMPONENT_GENERATE_EBD failure");
pThis->omx_report_error ();
} else {
+ if (p2 == VDEC_S_INPUT_BITSTREAM_ERR && p1) {
+ OMX_BUFFERHEADERTYPE* buffer =
+ ((OMX_BUFFERHEADERTYPE *)(intptr_t)p1);
+ if (!buffer->pMarkData && !buffer->hMarkTargetComponent) {
+ pThis->time_stamp_dts.remove_time_stamp(
+ buffer->nTimeStamp,
+ (pThis->drv_ctx.interlace != VDEC_InterlaceFrameProgressive)
+ ?true:false);
+ }
+ }
+
if ( pThis->empty_buffer_done(&pThis->m_cmp,
(OMX_BUFFERHEADERTYPE *)(intptr_t)p1) != OMX_ErrorNone) {
DEBUG_PRINT_ERROR("empty_buffer_done failure");
@@ -1058,41 +1074,34 @@
}
break;
case OMX_COMPONENT_GENERATE_FBD:
- if (p2 != VDEC_S_SUCCESS) {
- DEBUG_PRINT_ERROR("OMX_COMPONENT_GENERATE_FBD failure");
- pThis->omx_report_error ();
- break;
- }
- if (pThis->fill_buffer_done(&pThis->m_cmp,
- (OMX_BUFFERHEADERTYPE *)(intptr_t)p1) != OMX_ErrorNone ) {
- DEBUG_PRINT_ERROR("fill_buffer_done failure");
- pThis->omx_report_error ();
- break;
- }
-#if !HDR10_SETMETADATA_ENABLE
- if (pThis->output_capability != V4L2_PIX_FMT_VP9 &&
- pThis->output_capability != V4L2_PIX_FMT_HEVC)
- break;
-
- if (!pThis->m_cb.EventHandler) {
- DEBUG_PRINT_ERROR("fill_buffer_done: null event handler");
- break;
- }
- bool is_list_empty;
- is_list_empty = false;
- pthread_mutex_lock(&pThis->m_hdr10pluslock);
- is_list_empty = pThis->m_hdr10pluslist.empty();
- pthread_mutex_unlock(&pThis->m_hdr10pluslock);
- if (!is_list_empty) {
- DEBUG_PRINT_LOW("fill_buffer_done: event config update");
- pThis->m_cb.EventHandler(&pThis->m_cmp,
- pThis->m_app_data,
- OMX_EventConfigUpdate,
- OMX_CORE_OUTPUT_PORT_INDEX,
- OMX_QTIIndexConfigDescribeHDR10PlusInfo, NULL);
- }
-#endif
- break;
+ if (p2 != VDEC_S_SUCCESS) {
+ DEBUG_PRINT_ERROR("OMX_COMPONENT_GENERATE_FBD failure");
+ pThis->omx_report_error ();
+ break;
+ }
+ if (pThis->m_cb.EventHandler) {
+ OMX_BUFFERHEADERTYPE * buffer = (OMX_BUFFERHEADERTYPE *)(intptr_t)p1;
+ if (buffer->nFilledLen && (pThis->output_capability == V4L2_PIX_FMT_HEVC ||
+ (pThis->output_capability == V4L2_PIX_FMT_VP9 && buffer->pMarkData))) {
+ bool is_list_empty;
+ is_list_empty = false;
+ pthread_mutex_lock(&pThis->m_hdr10pluslock);
+ is_list_empty = pThis->m_hdr10pluslist.empty();
+ pthread_mutex_unlock(&pThis->m_hdr10pluslock);
+ if (!is_list_empty) {
+ DEBUG_PRINT_LOW("fill_buffer_done: event config update");
+ pThis->m_cb.EventHandler(&pThis->m_cmp, pThis->m_app_data,
+ OMX_EventConfigUpdate, OMX_CORE_OUTPUT_PORT_INDEX,
+ OMX_QTIIndexConfigDescribeHDR10PlusInfo, NULL);
+ }
+ }
+ }
+ if (pThis->fill_buffer_done(&pThis->m_cmp,
+ (OMX_BUFFERHEADERTYPE *)(intptr_t)p1) != OMX_ErrorNone ) {
+ DEBUG_PRINT_ERROR("fill_buffer_done failure");
+ pThis->omx_report_error ();
+ }
+ break;
case OMX_COMPONENT_GENERATE_EVENT_INPUT_FLUSH:
DEBUG_PRINT_HIGH("Driver flush i/p Port complete, flags %#llx",
@@ -1400,7 +1409,6 @@
DEBUG_PRINT_ERROR("ERROR: %s()::EventHandler is NULL", __func__);
}
pThis->prev_ts = LLONG_MAX;
- pThis->rst_prev_ts = true;
break;
case OMX_COMPONENT_GENERATE_HARDWARE_ERROR:
@@ -1469,11 +1477,7 @@
if (!m_debug.in_buffer_log)
return 0;
-#ifdef USE_ION
- do_cache_operations(fd);
-#else
- (void)fd;
-#endif
+ sync_start_read(fd);
if (m_debug.in_buffer_log && !m_debug.infile) {
if(!strncmp(drv_ctx.kind,"OMX.qcom.video.decoder.mpeg2", OMX_MAX_STRINGNAME_SIZE)) {
snprintf(m_debug.infile_name, OMX_MAX_STRINGNAME_SIZE, "%s/input_dec_%d_%d_%p_%" PRId64 ".mpg", m_debug.log_loc,
@@ -1499,9 +1503,7 @@
DEBUG_PRINT_HIGH("Failed to open input file: %s for logging (%d:%s)",
m_debug.infile_name, errno, strerror(errno));
m_debug.infile_name[0] = '\0';
-#ifdef USE_ION
- do_cache_operations(fd);
-#endif
+ sync_end_read(fd);
return -1;
}
if (!strncmp(drv_ctx.kind, "OMX.qcom.video.decoder.vp8", OMX_MAX_STRINGNAME_SIZE) ||
@@ -1523,18 +1525,21 @@
}
fwrite(buffer_addr, buffer_len, 1, m_debug.infile);
}
-#ifdef USE_ION
- do_cache_operations(fd);
-#endif
+ sync_end_read(fd);
return 0;
}
int omx_vdec::log_cc_output_buffers(OMX_BUFFERHEADERTYPE *buffer)
{
+ vdec_bufferpayload *vdec_buf = NULL;
+ int index = 0;
if (client_buffers.client_buffers_invalid() ||
!m_debug.out_cc_buffer_log || !buffer || !buffer->nFilledLen)
return 0;
+ index = buffer - m_out_mem_ptr;
+ vdec_buf = &drv_ctx.ptr_outputbuffer[index];
+ sync_start_read(vdec_buf->pmem_fd);
if (m_debug.out_cc_buffer_log && !m_debug.ccoutfile) {
snprintf(m_debug.ccoutfile_name, OMX_MAX_STRINGNAME_SIZE, "%s/output_cc_%d_%d_%p_%" PRId64 "_%d.yuv",
m_debug.log_loc, drv_ctx.video_resolution.frame_width, drv_ctx.video_resolution.frame_height, this,
@@ -1549,6 +1554,7 @@
}
fwrite(buffer->pBuffer, buffer->nFilledLen, 1, m_debug.ccoutfile);
+ sync_end_read(vdec_buf->pmem_fd);
return 0;
}
@@ -1774,10 +1780,9 @@
struct v4l2_control ctrl[2];
int conceal_color_8bit = 0, conceal_color_10bit = 0;
+ property_get("ro.board.platform", m_platform_name, "0");
#ifdef _ANDROID_
- char platform_name[PROPERTY_VALUE_MAX];
- property_get("ro.board.platform", platform_name, "0");
- if (!strncmp(platform_name, "msm8610", 7)) {
+ if (!strncmp(m_platform_name, "msm8610", 7)) {
device_name = (OMX_STRING)"/dev/video/q6_dec";
}
#endif
@@ -1855,6 +1860,15 @@
eCompressionFormat = (OMX_VIDEO_CODINGTYPE)QOMX_VIDEO_CodingHevc;
} else if (!strncmp(drv_ctx.kind, "OMX.qcom.video.decoder.vp8", \
OMX_MAX_STRINGNAME_SIZE)) {
+ char version[PROP_VALUE_MAX] = {0};
+ if (!strncmp(m_platform_name, "lito", 4))
+ if (property_get("vendor.media.target.version", version, "0") &&
+ ((atoi(version) == 2) || (atoi(version) == 3))) {
+ //sku version, VP8 is disabled on lagoon
+ DEBUG_PRINT_ERROR("VP8 unsupported on lagoon");
+ eRet = OMX_ErrorInvalidComponentName;
+ return eRet;
+ }
strlcpy((char *)m_cRole, "video_decoder.vp8",OMX_MAX_STRINGNAME_SIZE);
drv_ctx.decoder_format = VDEC_CODECTYPE_VP8;
output_capability = V4L2_PIX_FMT_VP8;
@@ -2476,16 +2490,25 @@
if (cmd == OMX_CommandFlush && (param1 == OMX_CORE_INPUT_PORT_INDEX ||
param1 == OMX_ALL)) {
if (android_atomic_add(0, &m_queued_codec_config_count) > 0) {
- struct timespec ts;
-
- clock_gettime(CLOCK_REALTIME, &ts);
- ts.tv_sec += 1;
- DEBUG_PRINT_LOW("waiting for %d EBDs of CODEC CONFIG buffers ",
+ struct timespec ts;
+ int rc = 0;
+#ifdef __BIONIC__
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+#elif __GLIBC__
+ clock_gettime(CLOCK_REALTIME, &ts);
+#endif
+ ts.tv_sec += 1;
+ DEBUG_PRINT_LOW("waiting for %d EBDs of CODEC CONFIG buffers ",
m_queued_codec_config_count);
- BITMASK_SET(&m_flags, OMX_COMPONENT_FLUSH_DEFERRED);
- if (sem_timedwait(&m_safe_flush, &ts)) {
- DEBUG_PRINT_ERROR("Failed to wait for EBDs of CODEC CONFIG buffers");
- }
+ BITMASK_SET(&m_flags, OMX_COMPONENT_FLUSH_DEFERRED);
+#ifdef __BIONIC__
+ rc = sem_timedwait_monotonic_np(&m_safe_flush, &ts);
+#elif __GLIBC__
+ rc = sem_timedwait(&m_safe_flush, &ts);
+#endif
+ if (rc) {
+ DEBUG_PRINT_ERROR("Failed to wait for EBDs of CODEC CONFIG buffers");
+ }
BITMASK_CLEAR (&m_flags,OMX_COMPONENT_FLUSH_DEFERRED);
}
}
@@ -2671,10 +2694,7 @@
pthread_mutex_lock(&m_lock);
DEBUG_PRINT_LOW("Initiate Output Flush");
- //reset last render TS
- if(m_last_rendered_TS > 0) {
- m_last_rendered_TS = 0;
- }
+ m_prev_timestampUs = 0;
while (m_ftb_q.m_size) {
m_ftb_q.pop_entry(&p1,&p2,&ident);
@@ -2729,11 +2749,11 @@
empty_buffer_done(&m_cmp,(OMX_BUFFERHEADERTYPE *)p1);
}
}
+ time_stamp_dts.flush_timestamp();
/*Check if Heap Buffers are to be flushed*/
pthread_mutex_unlock(&m_lock);
input_flush_progress = false;
prev_ts = LLONG_MAX;
- rst_prev_ts = true;
DEBUG_PRINT_HIGH("OMX flush i/p Port complete PenBuf(%d)", pending_input_buffers);
return bRet;
@@ -2852,6 +2872,7 @@
OMX_ERRORTYPE omx_vdec::get_supported_profile_level(OMX_VIDEO_PARAM_PROFILELEVELTYPE *profileLevelType)
{
OMX_ERRORTYPE eRet = OMX_ErrorNone;
+ bool hdr_supported = true;
struct v4l2_queryctrl profile_cap, level_cap, tier_cap;
int v4l2_profile;
int avc_profiles[5] = { QOMX_VIDEO_AVCProfileConstrainedBaseline,
@@ -2990,6 +3011,23 @@
DEBUG_PRINT_ERROR("%s: Invalid index corresponding profile not supported : %d ",__FUNCTION__, profileLevelType->eProfile);
eRet = OMX_ErrorNoMore;
}
+ if (m_disable_hdr & DEC_HDR_DISABLE_FLAG) {
+ if (output_capability == V4L2_PIX_FMT_VP9) {
+ if (profileLevelType->eProfile == OMX_VIDEO_VP9Profile2HDR || profileLevelType->eProfile == OMX_VIDEO_VP9Profile2HDR10Plus
+ || profileLevelType->eProfile == OMX_VIDEO_VP9Profile2)
+ hdr_supported = false;
+ }
+ if (output_capability == V4L2_PIX_FMT_HEVC) {
+ if (profileLevelType->eProfile == OMX_VIDEO_HEVCProfileMain10 || profileLevelType->eProfile == OMX_VIDEO_HEVCProfileMain10HDR10
+ || profileLevelType->eProfile == OMX_VIDEO_HEVCProfileMain10HDR10Plus) {
+ hdr_supported = false;
+ }
+ }
+ if (!hdr_supported) {
+ DEBUG_PRINT_LOW("%s: HDR profile unsupported", __FUNCTION__);
+ return OMX_ErrorHardware;
+ }
+ }
DEBUG_PRINT_LOW("get_parameter: OMX_IndexParamVideoProfileLevelQuerySupported for Input port returned Profile:%u, Level:%u",
(unsigned int)profileLevelType->eProfile, (unsigned int)profileLevelType->eLevel);
@@ -3191,7 +3229,7 @@
control.id = V4L2_CID_MPEG_VIDC_VIDEO_FRAME_RATE;
control.value = drv_ctx.frame_rate.fps_numerator / drv_ctx.frame_rate.fps_denominator;
control.value <<= 16;
- control.value |= (0x0000FFFF | drv_ctx.frame_rate.fps_numerator % drv_ctx.frame_rate.fps_denominator);
+ control.value |= (0x0000FFFF & (drv_ctx.frame_rate.fps_numerator % drv_ctx.frame_rate.fps_denominator));
DEBUG_PRINT_LOW("Calling IOCTL set control for id=%d, val=%d", control.id, control.value);
if (ioctl(drv_ctx.video_driver_fd, VIDIOC_S_CTRL, &control)) {
DEBUG_PRINT_ERROR("Unable to convey fps info to driver, \
@@ -3240,6 +3278,9 @@
control.id = V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE;
control.value = rate->nU32;
+ if (rate->nU32 > INT_MAX)
+ control.value = INT_MAX;
+
if (ioctl(drv_ctx.video_driver_fd, VIDIOC_S_CTRL, &control)) {
ret = errno == EBUSY ? OMX_ErrorInsufficientResources :
OMX_ErrorUnsupportedSetting;
@@ -3268,6 +3309,27 @@
}
return ret;
+ } else if ((int)configIndex == (int)OMX_IndexConfigLowLatency) {
+ OMX_CONFIG_BOOLEANTYPE *lowLatency = (OMX_CONFIG_BOOLEANTYPE *)configData;
+ DEBUG_PRINT_LOW("Set_config: low-latency %u",(uint32_t)lowLatency->bEnabled);
+
+ struct v4l2_control control;
+
+ control.id = V4L2_CID_MPEG_VIDC_VIDEO_LOWLATENCY_MODE;
+ if (lowLatency->bEnabled) {
+ control.value = V4L2_MPEG_MSM_VIDC_ENABLE;
+ } else {
+ control.value = V4L2_MPEG_MSM_VIDC_DISABLE;
+ }
+
+ if (ioctl(drv_ctx.video_driver_fd, VIDIOC_S_CTRL, &control)) {
+ DEBUG_PRINT_ERROR("Set low latency failed");
+ ret = OMX_ErrorUnsupportedSetting;
+ } else {
+ m_sParamLowLatency.bEnableLowLatencyMode = lowLatency->bEnabled;
+ }
+ return ret;
+
} else if ((int)configIndex == (int)OMX_IndexConfigAndroidVendorExtension) {
VALIDATE_OMX_PARAM_DATA(configData, OMX_CONFIG_ANDROID_VENDOR_EXTENSIONTYPE);
@@ -3424,7 +3486,7 @@
DESCRIPTION
Map the memory and run the ioctl SYNC operations
- on ION fd with DMA_BUF_IOCTL_SYNC
+ on ION fd
PARAMETERS
fd : ION fd
@@ -3438,11 +3500,8 @@
{
char *bufaddr = (char*)mmap(NULL, len, PROT_READ|PROT_WRITE,
MAP_SHARED, fd, 0);
- if (bufaddr != MAP_FAILED) {
-#ifdef USE_ION
- do_cache_operations(fd);
-#endif
- }
+ if (bufaddr != MAP_FAILED)
+ cache_clean_invalidate(fd);
return bufaddr;
}
@@ -3464,11 +3523,7 @@
========================================================================== */
OMX_ERRORTYPE omx_vdec::ion_unmap(int fd, void *bufaddr, int len)
{
-#ifdef USE_ION
- do_cache_operations(fd);
-#else
- (void)fd;
-#endif
+ cache_clean_invalidate(fd);
if (-1 == munmap(bufaddr, len)) {
DEBUG_PRINT_ERROR("munmap failed.");
return OMX_ErrorInsufficientResources;
@@ -4994,11 +5049,10 @@
if (!m_etb_count)
m_etb_count++;
m_etb_timestamp = buffer->nTimeStamp;
- DEBUG_PRINT_LOW("[ETB] nCnt(%u) BHdr(%p) pBuf(%p) nTS(%lld) nFL(%u)",
- m_etb_count, buffer, buffer->pBuffer, buffer->nTimeStamp, (unsigned int)buffer->nFilledLen);
buffer->pMarkData = (OMX_PTR)(unsigned long)m_etb_count;
post_event ((unsigned long)hComp,(unsigned long)buffer,OMX_COMPONENT_GENERATE_ETB);
+ time_stamp_dts.insert_timestamp(buffer);
return OMX_ErrorNone;
}
@@ -5284,10 +5338,6 @@
meta = (struct VideoDecoderOutputMetaData *)buffer->pBuffer;
handle = (private_handle_t *)meta->pHandle;
- //get the buffer type and fd info
- DEBUG_PRINT_LOW("FTB: metabuf: %p buftype: %d bufhndl: %p ",
- meta, meta->eType, meta->pHandle);
-
if (!handle) {
DEBUG_PRINT_ERROR("FTB: Error: IL client passed an invalid buf handle - %p", handle);
return OMX_ErrorBadParameter;
@@ -5308,8 +5358,6 @@
}
buffer->nAllocLen = handle->size;
- DEBUG_PRINT_LOW("%s: buffer size = d-%d:b-%d",
- __func__, (int)drv_ctx.op_buf.buffer_size, (int)handle->size);
if (!client_buffers.is_color_conversion_enabled()) {
drv_ctx.op_buf.buffer_size = handle->size;
@@ -6091,6 +6139,21 @@
}
#endif
+ /* For use buffer we need to copy the data */
+ if (!output_flush_progress) {
+ /* This is the error check for non-recoverable errros */
+ bool is_duplicate_ts_valid = true;
+ bool is_interlaced = (drv_ctx.interlace != VDEC_InterlaceFrameProgressive);
+
+ if (output_capability == V4L2_PIX_FMT_MPEG4 ||
+ output_capability == V4L2_PIX_FMT_MPEG2)
+ is_duplicate_ts_valid = false;
+
+ if (buffer->nFilledLen > 0) {
+ time_stamp_dts.get_next_timestamp(buffer,
+ is_interlaced && is_duplicate_ts_valid && !is_mbaff);
+ }
+ }
VIDC_TRACE_INT_LOW("FBD-TS", buffer->nTimeStamp / 1000);
if (m_cb.FillBufferDone) {
@@ -6118,7 +6181,6 @@
}
if (buffer->nFlags & OMX_BUFFERFLAG_EOS) {
prev_ts = LLONG_MAX;
- rst_prev_ts = true;
proc_frms = 0;
}
@@ -6129,37 +6191,35 @@
il_buffer = client_buffers.get_il_buf_hdr(buffer);
OMX_U32 current_framerate = (int)(drv_ctx.frame_rate.fps_numerator / drv_ctx.frame_rate.fps_denominator);
- if (il_buffer && m_last_rendered_TS >= 0) {
- OMX_TICKS ts_delta = (OMX_TICKS)llabs(il_buffer->nTimeStamp - m_last_rendered_TS);
- // Convert fps into ms value. 1 sec = 1000000 ms.
- OMX_U64 target_ts_delta = m_dec_hfr_fps ? 1000000 / m_dec_hfr_fps : ts_delta;
+ if (il_buffer && il_buffer->nTimeStamp >= 0 && m_dec_hfr_fps > 0 && buffer->nFilledLen > 0) {
+ uint64_t tsDeltaUs = llabs(il_buffer->nTimeStamp - m_prev_timestampUs);
+ double vsyncUs = 1e6/m_dec_hfr_fps;
+ double vsync_start = (static_cast<uint64_t>(il_buffer->nTimeStamp/vsyncUs)) * vsyncUs;
+ double vsync_end = vsync_start + vsyncUs;
+ bool render_frame = false;
- // Current frame can be send for rendering if
- // (a) current FPS is <= 60
- // (b) is the next frame after the frame with TS 0
- // (c) is the first frame after seek
- // (d) the delta TS b\w two consecutive frames is > 16 ms
- // (e) its TS is equal to previous frame TS
- // (f) if marked EOS
-
- if(current_framerate <= (OMX_U32)m_dec_hfr_fps || m_last_rendered_TS == 0 ||
- il_buffer->nTimeStamp == 0 || ts_delta >= (OMX_TICKS)target_ts_delta||
- ts_delta == 0 || (il_buffer->nFlags & OMX_BUFFERFLAG_EOS)) {
- m_last_rendered_TS = il_buffer->nTimeStamp;
+ if ((static_cast<double>(il_buffer->nTimeStamp + tsDeltaUs) > (vsync_end + 1.0)) ||
+ !m_prev_timestampUs || il_buffer->nFlags & OMX_BUFFERFLAG_EOS) {
+ render_frame = true;
+ }
+ // Render frames very close to boundaries of vsync interval
+ if ((abs(static_cast<double>(il_buffer->nTimeStamp) - vsync_start) < 1.0) ||
+ (abs(static_cast<double>(il_buffer->nTimeStamp) - vsync_end) < 1.0)) {
+ render_frame = true;
+ }
+ // Render frames for which ts_Delta == 0, only if previous frame was rendered.
+ if (tsDeltaUs == 0 && m_prev_frame_rendered) {
+ render_frame = true;
+ }
+ if (!render_frame) {
+ buffer->nFilledLen = 0;
+ m_prev_frame_rendered = false;
} else {
- //mark for droping
- buffer->nFilledLen = 0;
+ m_prev_frame_rendered = true;
}
- DEBUG_PRINT_LOW(" -- %s Frame -- info:: fps(%d) lastRenderTime(%lld) bufferTs(%lld) ts_delta(%lld)",
- buffer->nFilledLen? "Rendering":"Dropping",current_framerate,m_last_rendered_TS,
- il_buffer->nTimeStamp,ts_delta);
-
- //above code makes sure that delta b\w two consecutive frames is not
- //greater than 16ms, slow-mo feature, so cap fps to max 60
- if (current_framerate > (OMX_U32)m_dec_hfr_fps ) {
- current_framerate = m_dec_hfr_fps;
- }
+ m_prev_timestampUs = il_buffer->nTimeStamp;
+ DEBUG_PRINT_LOW(" -- %s Frame with bufferTs(%lld)", buffer->nFilledLen? "Rendering":"Dropping", il_buffer->nTimeStamp);
}
// add current framerate to gralloc meta data
@@ -6381,6 +6441,11 @@
if (vdec_msg->msgdata.output_frame.len <= omxhdr->nAllocLen) {
omxhdr->nFilledLen = vdec_msg->msgdata.output_frame.len;
+ } else {
+ DEBUG_PRINT_ERROR("Invalid filled length = %u, set it as buffer size = %u",
+ (unsigned int)vdec_msg->msgdata.output_frame.len, omxhdr->nAllocLen);
+ omxhdr->nFilledLen = omxhdr->nAllocLen;
+ }
omxhdr->nOffset = vdec_msg->msgdata.output_frame.offset;
omxhdr->nTimeStamp = vdec_msg->msgdata.output_frame.time_stamp;
omxhdr->nFlags = 0;
@@ -6423,6 +6488,9 @@
omxhdr->nFlags |= QOMX_VIDEO_BUFFERFLAG_BFRAME;
}
+ if (v4l2_buf_ptr->flags & V4L2_BUF_FLAG_CODECCONFIG)
+ omxhdr->nFlags |= OMX_BUFFERFLAG_CODECCONFIG;
+
if (vdec_msg->msgdata.output_frame.len) {
DEBUG_PRINT_LOW("Processing extradata");
reconfig_event_sent = omx->handle_extradata(omxhdr);
@@ -6507,12 +6575,6 @@
((unsigned long)vdec_msg->msgdata.output_frame.bufferaddr +
(unsigned long)vdec_msg->msgdata.output_frame.offset),
vdec_msg->msgdata.output_frame.len);
- } else {
- DEBUG_PRINT_ERROR("Invalid filled length = %u, buffer size = %u, prev_length = %u",
- (unsigned int)vdec_msg->msgdata.output_frame.len,
- omxhdr->nAllocLen, omx->prev_n_filled_len);
- omxhdr->nFilledLen = 0;
- }
omx->post_event ((unsigned long)omxhdr, vdec_msg->status_code,
OMX_COMPONENT_GENERATE_FBD);
@@ -6696,8 +6758,9 @@
DEBUG_PRINT_ERROR("ION: free called with invalid fd/allocdata");
return;
}
- DEBUG_PRINT_HIGH("Free ion memory: mmap fd %d ion_dev fd %d len %d flags %#x mask %#x",
- buf_ion_info->data_fd, buf_ion_info->dev_fd,
+
+ DEBUG_PRINT_HIGH("Free ion memory: fd (dev:%d data:%d) len %d flags %#x mask %#x",
+ buf_ion_info->dev_fd, buf_ion_info->data_fd,
(unsigned int)buf_ion_info->alloc_data.len,
(unsigned int)buf_ion_info->alloc_data.flags,
(unsigned int)buf_ion_info->alloc_data.heap_id_mask);
@@ -6712,24 +6775,6 @@
}
}
-void omx_vdec::do_cache_operations(int fd)
-{
- if (fd < 0)
- return;
-
- struct dma_buf_sync dma_buf_sync_data[2];
- dma_buf_sync_data[0].flags = DMA_BUF_SYNC_START | DMA_BUF_SYNC_RW;
- dma_buf_sync_data[1].flags = DMA_BUF_SYNC_END | DMA_BUF_SYNC_RW;
-
- for(unsigned int i=0; i<2; i++) {
- int rc = ioctl(fd, DMA_BUF_IOCTL_SYNC, &dma_buf_sync_data[i]);
- if (rc < 0) {
- DEBUG_PRINT_ERROR("Failed DMA_BUF_IOCTL_SYNC %s fd : %d", i==0?"start":"end", fd);
- return;
- }
- }
-}
-
#endif
void omx_vdec::free_output_buffer_header(bool intermediate)
{
@@ -7128,7 +7173,11 @@
return OMX_ErrorHardware;
}
drv_ctx.ip_buf.mincount = control.value;
- drv_ctx.ip_buf.actualcount = control.value;
+ // update actualcount only if it is small than mincount
+ if (drv_ctx.ip_buf.actualcount < drv_ctx.ip_buf.mincount){
+ DEBUG_PRINT_LOW("Updated actualcount same as mincount");
+ drv_ctx.ip_buf.actualcount = drv_ctx.ip_buf.mincount;
+ }
portDefn->eDir = OMX_DirInput;
portDefn->nBufferCountActual = drv_ctx.ip_buf.actualcount;
@@ -7481,8 +7530,7 @@
OMX_U32 new_frame_interval = 0;
if (VALID_TS(act_timestamp) && VALID_TS(prev_ts) && act_timestamp != prev_ts
&& (llabs(act_timestamp - prev_ts) > 2000 || frm_int == 0)) {
- new_frame_interval = client_set_fps ? frm_int : (act_timestamp - prev_ts) > 0 ?
- llabs(act_timestamp - prev_ts) : llabs(act_timestamp - prev_ts_actual);
+ new_frame_interval = client_set_fps ? frm_int : llabs(act_timestamp - prev_ts);
if (new_frame_interval != frm_int || frm_int == 0) {
frm_int = new_frame_interval;
if (frm_int) {
@@ -7498,7 +7546,7 @@
control.id = V4L2_CID_MPEG_VIDC_VIDEO_FRAME_RATE;
control.value = drv_ctx.frame_rate.fps_numerator / drv_ctx.frame_rate.fps_denominator;
control.value <<= 16;
- control.value |= (0x0000FFFF | drv_ctx.frame_rate.fps_numerator % drv_ctx.frame_rate.fps_denominator);
+ control.value |= (0x0000FFFF & (drv_ctx.frame_rate.fps_numerator % drv_ctx.frame_rate.fps_denominator));
DEBUG_PRINT_LOW("Calling IOCTL set control for id=%d, val=%d", control.id, control.value);
if (ioctl(drv_ctx.video_driver_fd, VIDIOC_S_CTRL, &control)) {
DEBUG_PRINT_ERROR("Unable to convey fps info to driver, \
@@ -7543,6 +7591,8 @@
switch (transfer) {
case MSM_VIDC_TRANSFER_BT709_5:
case MSM_VIDC_TRANSFER_601_6_525: // case MSM_VIDC_TRANSFER_601_6_625:
+ case MSM_VIDC_TRANSFER_BT_2020_10:
+ case MSM_VIDC_TRANSFER_BT_2020_12:
aspects->mTransfer = ColorAspects::TransferSMPTE170M;
break;
case MSM_VIDC_TRANSFER_BT_470_6_M:
@@ -7873,6 +7923,9 @@
void omx_vdec::get_preferred_color_aspects(ColorAspects& preferredColorAspects)
{
+ OMX_U32 width = drv_ctx.video_resolution.frame_width;
+ OMX_U32 height = drv_ctx.video_resolution.frame_height;
+
// For VPX, use client-color if specified.
// For the rest, try to use the stream-color if present
bool preferClientColor = (output_capability == V4L2_PIX_FMT_VP8 ||
@@ -7883,6 +7936,13 @@
const ColorAspects &defaultColor = preferClientColor ?
m_internal_color_space.sAspects : m_client_color_space.sAspects;
+ if ((width >= 3840 || height >= 3840 || width * (int64_t)height >= 3840 * 1634) &&
+ (m_client_color_space.sAspects.mPrimaries == ColorAspects::PrimariesBT2020) &&
+ (dpb_bit_depth == MSM_VIDC_BIT_DEPTH_8)) {
+ m_client_color_space.sAspects.mPrimaries = ColorAspects::PrimariesBT709_5;
+ m_client_color_space.sAspects.mMatrixCoeffs = ColorAspects::MatrixBT709_5;
+ }
+
preferredColorAspects.mPrimaries = preferredColor.mPrimaries != ColorAspects::PrimariesUnspecified ?
preferredColor.mPrimaries : defaultColor.mPrimaries;
preferredColorAspects.mTransfer = preferredColor.mTransfer != ColorAspects::TransferUnspecified ?
@@ -7983,6 +8043,7 @@
m_extradata_misr.output_crop_updated = OMX_FALSE;
data = (struct OMX_OTHER_EXTRADATATYPE *)p_extradata;
if (data) {
+ bool is_hdr10_plus_info_found = false;
while ((((consumed_len + sizeof(struct OMX_OTHER_EXTRADATATYPE)) <
drv_ctx.extradata_info.buffer_size) && ((consumed_len + data->nSize) <
drv_ctx.extradata_info.buffer_size))
@@ -8093,14 +8154,17 @@
(payload_len > HDR_DYNAMIC_META_DATA_SZ)) {
DEBUG_PRINT_ERROR("Invalid User extradata size %u for HDR10+", data->nDataSize);
} else {
-#if HDR10_SETMETADATA_ENABLE
+// enable setting metadata via gralloc handle
+//#if HDR10_SETMETADATA_ENABLE
color_mdata.dynamicMetaDataValid = true;
color_mdata.dynamicMetaDataLen = payload_len;
memcpy(color_mdata.dynamicMetaDataPayload, userdata_payload->data, payload_len);
DEBUG_PRINT_HIGH("Copied %u bytes of HDR10+ extradata", payload_len);
-#else
- store_hevc_hdr10plusinfo(payload_len, userdata_payload);
-#endif
+//#endif
+ if(!is_hdr10_plus_info_found) {
+ store_hevc_hdr10plusinfo(payload_len, userdata_payload);
+ is_hdr10_plus_info_found = true;
+ }
}
}
break;
@@ -8164,15 +8228,15 @@
final_color_aspects.mMatrixCoeffs = ColorAspects::MatrixBT601_6;
}
get_preferred_hdr_info(final_hdr_info);
-#if HDR10_SETMETADATA_ENABLE
+// enable setting metadata via gralloc handle
+//#if HDR10_SETMETADATA_ENABLE
convert_hdr_info_to_metadata(final_hdr_info, color_mdata);
convert_hdr10plusinfo_to_metadata(p_buf_hdr->pMarkData, color_mdata);
- remove_hdr10plusinfo_using_cookie(p_buf_hdr->pMarkData);
convert_color_aspects_to_metadata(final_color_aspects, color_mdata);
print_debug_hdr_color_info_mdata(&color_mdata);
print_debug_hdr10plus_metadata(color_mdata);
setMetaData(private_handle, COLOR_METADATA, (void*)&color_mdata);
-#endif
+//#endif
set_histogram_metadata(private_handle);
}
@@ -8407,6 +8471,7 @@
unsigned int src_size = 0, destination_size = 0;
unsigned int height, width;
struct v4l2_format fmt;
+ bool is_interlaced = false;
OMX_COLOR_FORMATTYPE drv_color_format;
if (!omx) {
@@ -8439,7 +8504,8 @@
bool resolution_upgrade = (height > m_c2d_height ||
width > m_c2d_width);
- bool is_interlaced = omx->m_progressive != MSM_VIDC_PIC_STRUCT_PROGRESSIVE;
+ if (omx->drv_ctx.output_format != VDEC_YUV_FORMAT_NV12)
+ is_interlaced = omx->m_progressive != MSM_VIDC_PIC_STRUCT_PROGRESSIVE;
if (resolution_upgrade) {
// resolution upgraded ? ensure we are yet to allocate;
// failing which, c2d buffers will never be reallocated and bad things will happen
@@ -8587,16 +8653,16 @@
bool status = false;
if (!omx->in_reconfig && !omx->output_flush_progress && bufadd->nFilledLen) {
pthread_mutex_lock(&omx->c_lock);
- omx->do_cache_operations(omx->drv_ctx.op_intermediate_buf_ion_info[index].data_fd);
DEBUG_PRINT_INFO("C2D: Start color convertion");
+ cache_invalidate(omx->drv_ctx.ptr_outputbuffer[index].pmem_fd);
status = c2dcc.convertC2D(
omx->drv_ctx.ptr_intermediate_outputbuffer[index].pmem_fd,
bufadd->pBuffer, bufadd->pBuffer,
omx->drv_ctx.ptr_outputbuffer[index].pmem_fd,
omx->m_out_mem_ptr[index].pBuffer,
omx->m_out_mem_ptr[index].pBuffer);
- omx->do_cache_operations(omx->drv_ctx.op_intermediate_buf_ion_info[index].data_fd);
+ cache_invalidate(omx->drv_ctx.ptr_outputbuffer[index].pmem_fd);
if (!status) {
DEBUG_PRINT_ERROR("Failed color conversion %d", status);
m_out_mem_ptr_client[index].nFilledLen = 0;
@@ -9071,7 +9137,7 @@
memset(&metadata, 0, sizeof(struct hdr10plusInfo));
metadata.nParamSizeUsed = payload_size;
memcpy(metadata.payload, hdr10plusdata->data , payload_size);
- metadata.is_new = true;
+ metadata.is_new = false;
if (m_etb_count) {
metadata.timestamp = m_etb_timestamp + 1;
}
@@ -9220,7 +9286,6 @@
void omx_vdec::get_hdr10plusinfo(DescribeHDR10PlusInfoParams *hdr10plusdata)
{
- std::list<hdr10plusInfo>::iterator iter;
bool is_list_empty = false;
if (output_capability != V4L2_PIX_FMT_VP9 &&
@@ -9237,19 +9302,12 @@
}
pthread_mutex_lock(&m_hdr10pluslock);
- iter = m_hdr10pluslist.begin();
- while (iter != m_hdr10pluslist.end()) {
- if (!iter->is_new) {
- hdr10plusdata->nParamSizeUsed = iter->nParamSizeUsed;
- memcpy(hdr10plusdata->nValue, iter->payload,
- iter->nParamSizeUsed);
- DEBUG_PRINT_LOW("found hdr10plus metadata with timestamp %lld, size %u",
- iter->timestamp, iter->nParamSizeUsed);
- iter = m_hdr10pluslist.erase(iter);
- break;
- }
- iter++;
- }
+ hdr10plusInfo item = m_hdr10pluslist.front();
+ hdr10plusdata->nParamSizeUsed = item.nParamSizeUsed;
+ memcpy(hdr10plusdata->nValue, item.payload,item.nParamSizeUsed);
+ DEBUG_PRINT_LOW("found hdr10plus metadata with timestamp %lld, size %u",
+ item.timestamp, item.nParamSizeUsed);
+ m_hdr10pluslist.pop_front();
pthread_mutex_unlock(&m_hdr10pluslock);
}
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2_params.cpp b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2_params.cpp
index e9e49a1..51d5414 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2_params.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2_params.cpp
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2010 - 2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2010 - 2020, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -609,7 +609,7 @@
control.id = V4L2_CID_MPEG_VIDC_VIDEO_FRAME_RATE;
control.value = drv_ctx.frame_rate.fps_numerator / drv_ctx.frame_rate.fps_denominator;
control.value <<= 16;
- control.value |= (0x0000FFFF | drv_ctx.frame_rate.fps_numerator % drv_ctx.frame_rate.fps_denominator);
+ control.value |= (0x0000FFFF & (drv_ctx.frame_rate.fps_numerator % drv_ctx.frame_rate.fps_denominator));
DEBUG_PRINT_LOW("Calling IOCTL set control for id=%d, val=%d", control.id, control.value);
ret = ioctl(drv_ctx.video_driver_fd, VIDIOC_S_CTRL, &control);
if (ret) {
@@ -923,6 +923,7 @@
pic_order = V4L2_MPEG_MSM_VIDC_DISABLE;
} else if (pictureOrder->eOutputPictureOrder == QOMX_VIDEO_DECODE_ORDER) {
pic_order = V4L2_MPEG_MSM_VIDC_ENABLE;
+ time_stamp_dts.set_timestamp_reorder_mode(false);
} else
eRet = OMX_ErrorBadParameter;
if (eRet == OMX_ErrorNone) {
@@ -1044,9 +1045,22 @@
#endif //ALLOCATE_OUTPUT_NATIVEHANDLE
#endif
case OMX_QcomIndexParamEnableTimeStampReorder: {
- DEBUG_PRINT_HIGH("timestamp reorder not supported anymore, arbitrary bytes mode has been moved to parser.");
- break;
- }
+ VALIDATE_OMX_PARAM_DATA(paramData, QOMX_INDEXTIMESTAMPREORDER);
+ QOMX_INDEXTIMESTAMPREORDER *reorder = (QOMX_INDEXTIMESTAMPREORDER *)paramData;
+ if (drv_ctx.picture_order == (vdec_output_order)QOMX_VIDEO_DISPLAY_ORDER) {
+ if (reorder->bEnable == OMX_TRUE) {
+ frm_int =0;
+ time_stamp_dts.set_timestamp_reorder_mode(true);
+ } else
+ time_stamp_dts.set_timestamp_reorder_mode(false);
+ } else {
+ time_stamp_dts.set_timestamp_reorder_mode(false);
+ if (reorder->bEnable == OMX_TRUE) {
+ eRet = OMX_ErrorUnsupportedSetting;
+ }
+ }
+ }
+ break;
case OMX_IndexParamVideoProfileLevelCurrent: {
VALIDATE_OMX_PARAM_DATA(paramData, OMX_VIDEO_PARAM_PROFILELEVELTYPE);
OMX_VIDEO_PARAM_PROFILELEVELTYPE *pParam = (OMX_VIDEO_PARAM_PROFILELEVELTYPE*)paramData;
@@ -1064,10 +1078,10 @@
QOMX_VIDEO_OUTPUT_FRAME_RATE *pParam = (QOMX_VIDEO_OUTPUT_FRAME_RATE*)paramData;
DEBUG_PRINT_LOW("set_parameter: decoder output-frame-rate %d", pParam->fps);
m_dec_hfr_fps=pParam->fps;
+ if (m_dec_hfr_fps > m_dec_output_rate)
+ m_dec_hfr_fps = m_dec_output_rate;
+
DEBUG_PRINT_HIGH("output-frame-rate value = %d", m_dec_hfr_fps);
- if (m_dec_hfr_fps) {
- m_last_rendered_TS = 0;
- }
break;
}
case OMX_QcomIndexParamVideoMetaBufferMode:
diff --git a/mm-video-v4l2/vidc/vdec/src/ts_parser.cpp b/mm-video-v4l2/vidc/vdec/src/ts_parser.cpp
index 809a1f7..e6c29ef 100644
--- a/mm-video-v4l2/vidc/vdec/src/ts_parser.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/ts_parser.cpp
@@ -266,6 +266,9 @@
if (!phead || !phead->entries_filled) return false;
+ if (header->nFlags & OMX_BUFFERFLAG_CODECCONFIG)
+ return true;
+
for (int i=0; i < TIME_SZ; i++) {
if (phead->input_timestamps[i].in_use) {
status = true;
diff --git a/mm-video-v4l2/vidc/venc/Android.mk b/mm-video-v4l2/vidc/venc/Android.mk
index 15ae709..9e8402b 100644
--- a/mm-video-v4l2/vidc/venc/Android.mk
+++ b/mm-video-v4l2/vidc/venc/Android.mk
@@ -37,7 +37,7 @@
libmm-venc-def += -U_UBWC_
endif
-ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_USE_FLAG_MSM8226)),true)
+ifneq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_USE_FLAG_MSM8226)))
libmm-venc-def += -D_MSM8226_
endif
@@ -47,7 +47,7 @@
libmm-venc-def += -DUSE_NATIVE_HANDLE_SOURCE
-ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true)
+ifneq (,$(call is-board-platform-in-list2, $(MASTER_SIDE_CP_TARGET_LIST)))
libmm-venc-def += -DMASTER_SIDE_CP
endif
@@ -66,10 +66,11 @@
libmm-venc-inc += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
libmm-venc-inc += $(TOP)/frameworks/native/libs/nativewindow/include
libmm-venc-inc += $(TOP)/frameworks/native/libs/nativebase/include
+libmm-venc-inc += $(TARGET_OUT_HEADERS)/fastcv
libmm-venc-inc += $(TOP)/frameworks/native/libs/arect/include
libmm-venc-inc += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
-ifneq ($(call is-board-platform-in-list, $(TARGETS_THAT_DONT_SUPPORT_SW_VENC_ROTATION)),true)
+ifeq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_DONT_SUPPORT_SW_VENC_ROTATION)))
libmm-venc-inc += hardware/libhardware/include/hardware
endif
@@ -83,6 +84,9 @@
include $(CLEAR_VARS)
LOCAL_MODULE := libOmxVenc
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_MODULE_TAGS := optional
LOCAL_VENDOR_MODULE := true
LOCAL_CFLAGS := $(libmm-venc-def)
@@ -113,6 +117,7 @@
LOCAL_SHARED_LIBRARIES += libc2dcolorconvert
# endif # ($(BOARD_USES_ADRENO), true)
LOCAL_SHARED_LIBRARIES += libqdMetaData
+LOCAL_SHARED_LIBRARIES += libfastcvopt
LOCAL_STATIC_LIBRARIES := libOmxVidcCommon
LOCAL_SRC_FILES := src/omx_video_base.cpp
@@ -122,7 +127,7 @@
include $(BUILD_SHARED_LIBRARY)
-ifneq ($(call is-board-platform-in-list, $(TARGETS_THAT_DONT_NEED_SW_VENC_MPEG4)),true)
+ifeq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_DONT_NEED_SW_VENC_MPEG4)))
# ---------------------------------------------------------------------------------
# Make the Shared library (libOmxSwVencMpeg4)
# ---------------------------------------------------------------------------------
@@ -132,6 +137,9 @@
libmm-venc-inc += $(TARGET_OUT_HEADERS)/mm-video/swvenc
LOCAL_MODULE := libOmxSwVencMpeg4
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE
LOCAL_MODULE_TAGS := optional
LOCAL_VENDOR_MODULE := true
@@ -159,8 +167,9 @@
LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libplatformconfig libion
LOCAL_SHARED_LIBRARIES += libMpeg4SwEncoder
LOCAL_SHARED_LIBRARIES += libqdMetaData
+LOCAL_SHARED_LIBRARIES += libfastcvopt
-ifneq ($(call is-board-platform-in-list, $(TARGETS_THAT_DONT_SUPPORT_SW_VENC_ROTATION)),true)
+ifeq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_DONT_SUPPORT_SW_VENC_ROTATION)))
LOCAL_SHARED_LIBRARIES += libui
LOCAL_SHARED_LIBRARIES += libutils
endif
diff --git a/mm-video-v4l2/vidc/venc/inc/omx_swvenc_mpeg4.h b/mm-video-v4l2/vidc/venc/inc/omx_swvenc_mpeg4.h
index 5d4df70..2e1f526 100644
--- a/mm-video-v4l2/vidc/venc/inc/omx_swvenc_mpeg4.h
+++ b/mm-video-v4l2/vidc/venc/inc/omx_swvenc_mpeg4.h
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -81,6 +81,8 @@
int dev_handle_input_extradata(void *, int, int);
bool dev_buffer_ready_to_queue(OMX_BUFFERHEADERTYPE *buffer);
bool dev_get_dimensions(OMX_U32 ,OMX_U32 *,OMX_U32 *);
+ bool dev_is_meta_mode();
+ bool dev_is_avtimer_needed();
void dev_set_extradata_cookie(void *);
int dev_set_format(int);
diff --git a/mm-video-v4l2/vidc/venc/inc/omx_video_base.h b/mm-video-v4l2/vidc/venc/inc/omx_video_base.h
index 1835342..9b89235 100644
--- a/mm-video-v4l2/vidc/venc/inc/omx_video_base.h
+++ b/mm-video-v4l2/vidc/venc/inc/omx_video_base.h
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2010-2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2010-2020, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -65,7 +65,6 @@
#include <linux/videodev2.h>
#include <dlfcn.h>
#include "C2DColorConverter.h"
-#include "vidc_debug.h"
#include <vector>
#include "vidc_vendor_extensions.h"
@@ -79,6 +78,7 @@
#undef LOG_TAG
#define LOG_TAG "OMX-VENC"
+#include "vidc_debug.h"
#ifdef _ANDROID_
using namespace android;
@@ -232,6 +232,7 @@
ColorConvertFormat mC2dDestFmt;
OMX_U32 mC2DFrameHeight;
OMX_U32 mC2DFrameWidth;
+ bool is_stop_in_progress;
omx_video(); // constructor
virtual ~omx_video(); // destructor
@@ -264,6 +265,8 @@
virtual bool dev_free_buf(void *,unsigned) = 0;
virtual bool dev_empty_buf(void *, void *,unsigned,unsigned) = 0;
virtual bool dev_fill_buf(void *buffer, void *,unsigned,unsigned) = 0;
+ virtual bool dev_is_meta_mode() = 0;
+ virtual bool dev_is_avtimer_needed() = 0;
virtual bool dev_get_buf_req(OMX_U32 *,OMX_U32 *,OMX_U32 *,OMX_U32) = 0;
virtual bool dev_get_dimensions(OMX_U32 ,OMX_U32 *,OMX_U32 *) = 0;
virtual bool is_streamon_done(OMX_U32 port) = 0;
@@ -623,7 +626,11 @@
client_extradata_info m_client_in_extradata_info;
void complete_pending_buffer_done_cbs();
+ bool is_rotation_enabled();
bool is_conv_needed(private_handle_t *handle);
+ bool is_flip_conv_needed(private_handle_t *handle);
+ OMX_ERRORTYPE do_flip_conversion(struct pmem *buffer);
+ void initFastCV();
void print_debug_color_aspects(ColorAspects *aspects, const char *prefix);
OMX_ERRORTYPE get_vendor_extension_config(
@@ -641,7 +648,6 @@
bool alloc_map_ion_memory(int size, venc_ion *ion_info,
int flag);
void free_ion_memory(struct venc_ion *buf_ion_info);
- void do_cache_operations(int fd);
#endif
//*************************************************************
@@ -783,7 +789,8 @@
OMX_U64 profile_start_time;
OMX_U64 profile_last_time;
bool profile_etb();
- int32_t m_c2d_rotation;
+ int32_t m_no_vpss;
+ bool m_fastCV_init_done;
};
#endif // __OMX_VIDEO_BASE_H__
diff --git a/mm-video-v4l2/vidc/venc/inc/omx_video_common.h b/mm-video-v4l2/vidc/venc/inc/omx_video_common.h
index 8660248..0407e9d 100644
--- a/mm-video-v4l2/vidc/venc/inc/omx_video_common.h
+++ b/mm-video-v4l2/vidc/venc/inc/omx_video_common.h
@@ -102,15 +102,18 @@
bool in_buffer_rotated_log;
bool out_buffer_log;
bool extradata_log;
+ bool cvp_log;
char infile_name[PROPERTY_VALUE_MAX];
char inrotatedfile_name[PROPERTY_VALUE_MAX];
char outfile_name[PROPERTY_VALUE_MAX];
char extradatafile_name[PROPERTY_VALUE_MAX];
+ char cvpfile_name[PROPERTY_VALUE_MAX];
char log_loc[PROPERTY_VALUE_MAX];
FILE *infile;
FILE *inrotatedfile;
FILE *outfile;
FILE *extradatafile;
+ FILE *cvpfile;
};
#ifdef USE_ION
struct venc_ion {
diff --git a/mm-video-v4l2/vidc/venc/inc/omx_video_encoder.h b/mm-video-v4l2/vidc/venc/inc/omx_video_encoder.h
index 707c466..6c62fa6 100644
--- a/mm-video-v4l2/vidc/venc/inc/omx_video_encoder.h
+++ b/mm-video-v4l2/vidc/venc/inc/omx_video_encoder.h
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2010-2017, The Linux Foundation. All rights reserved.
+Copyright (c) 2010-2017, 2020 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -55,6 +55,7 @@
bool is_secure_session();
//OMX strucutres
OMX_U32 m_nVenc_format;
+ char m_platform_name[PROPERTY_VALUE_MAX] = {0};
class venc_dev *handle;
int dev_handle_output_extradata(void *, int);
int dev_set_format(int);
@@ -71,6 +72,8 @@
bool dev_free_buf( void *,unsigned);
bool dev_empty_buf(void *, void *,unsigned,unsigned);
bool dev_fill_buf(void *, void *,unsigned,unsigned);
+ bool dev_is_meta_mode(void);
+ bool dev_is_avtimer_needed(void);
bool dev_buffer_ready_to_queue(OMX_BUFFERHEADERTYPE *buffer);
bool dev_get_buf_req(OMX_U32 *,OMX_U32 *,OMX_U32 *,OMX_U32);
bool dev_get_dimensions(OMX_U32 ,OMX_U32 *,OMX_U32 *);
diff --git a/mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h b/mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h
index eb7a0e8..0b15b30 100644
--- a/mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h
+++ b/mm-video-v4l2/vidc/venc/inc/video_encoder_device_v4l2.h
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -55,6 +55,7 @@
#define ENABLE_I_QP 0x1
#define ENABLE_P_QP 0x2
#define ENABLE_B_QP 0x4
+#define ENC_HDR_DISABLE_FLAG 0x2
#define OMX_VIDEO_LEVEL_UNKNOWN 0
@@ -74,6 +75,8 @@
#define REQUEST_LINEAR_COLOR_10_BIT 0x2
#define REQUEST_LINEAR_COLOR_ALL (REQUEST_LINEAR_COLOR_8_BIT | REQUEST_LINEAR_COLOR_10_BIT)
+#define VENC_QUALITY_BOOST_BITRATE_THRESHOLD 2000000
+
enum hier_type {
HIER_NONE = 0x0,
HIER_P = 0x1,
@@ -311,6 +314,8 @@
bool venc_free_buf(void*, unsigned);
bool venc_empty_buf(void *, void *,unsigned,unsigned);
bool venc_fill_buf(void *, void *,unsigned,unsigned);
+ bool venc_get_buffer_mode();
+ bool venc_is_avtimer_needed();
bool venc_get_buf_req(OMX_U32 *,OMX_U32 *,
OMX_U32 *,OMX_U32);
bool venc_set_buf_req(OMX_U32 *,OMX_U32 *,
@@ -342,6 +347,7 @@
OMX_ERRORTYPE venc_set_bitrate_ratios();
bool venc_validate_temporal_extn(OMX_VIDEO_PARAM_ANDROID_TEMPORALLAYERINGTYPE &temporalSettings);
bool venc_get_output_log_flag();
+ int venc_cvp_log_buffers(const char *metadataName, uint32_t buffer_len, uint8_t *buf);
int venc_output_log_buffers(const char *buffer_addr, int buffer_len, uint64_t timestamp);
int venc_input_log_buffers(OMX_BUFFERHEADERTYPE *buffer, int fd, int plane_offset,
unsigned long inputformat, bool interlaced);
@@ -377,6 +383,7 @@
bool is_auto_blur_disabled;
bool csc_enable;
bool m_bDimensionsNeedFlip;
+ int32_t m_disable_hdr;
unsigned long get_media_colorformat(unsigned long);
private:
@@ -422,6 +429,7 @@
bool set_nP_frames(unsigned long nPframes);
bool venc_set_target_bitrate(OMX_U32 nTargetBitrate);
bool venc_set_ratectrl_cfg(OMX_VIDEO_CONTROLRATETYPE eControlRate);
+ bool venc_set_bitrate_savings_mode(OMX_U32 bitrateSavingEnable);
bool venc_set_session_qp_range(OMX_QCOM_VIDEO_PARAM_IPB_QPRANGETYPE *qp_range);
bool venc_set_encode_framerate(OMX_U32 encode_framerate);
bool venc_set_intra_vop_refresh(OMX_BOOL intra_vop_refresh);
@@ -469,6 +477,8 @@
bool venc_get_cvp_metadata(private_handle_t *handle, struct v4l2_buffer *buf);
bool venc_set_cvp_skipratio_controls();
bool venc_superframe_enable(private_handle_t *handle);
+ void venc_set_quality_boost(OMX_BOOL c2d_enable);
+ bool reconfigure_avc_param(OMX_VIDEO_PARAM_AVCTYPE *param);
OMX_U32 pmem_free();
OMX_U32 pmem_allocate(OMX_U32 size, OMX_U32 alignment, OMX_U32 count);
@@ -525,7 +535,9 @@
bool venc_set_hdr_info(const MasteringDisplay&, const ContentLightLevel&);
bool mIsGridset;
OMX_U32 mUseLinearColorFormat;
- bool mBitrateSavingsEnable;
+ OMX_U32 mBitrateSavingsEnable;
+ bool mQualityBoostRequested;
+ bool mQualityBoostEligible;
union dynamicConfigData {
OMX_VIDEO_CONFIG_BITRATETYPE bitrate;
diff --git a/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp b/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp
index 22f7a83..6b17fab 100644
--- a/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp
+++ b/mm-video-v4l2/vidc/venc/src/omx_swvenc_mpeg4.cpp
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -598,10 +598,10 @@
}
/* set the frame attributes */
- /*Align stide and scanline to worst case*/
+ /*Align stride and scanline to worst case*/
/*------------------------------------------------------------------------------------------
* [Color Format] [Stride Alignment] [Scanline Alignment]
- * QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m 512 512
+ * QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m 512 or 128 512 or 32
* OMX_COLOR_FormatYUV420SemiPlanar 512 512
* QOMX_COLOR_FormatYVU420SemiPlanar 16 16
* HAL_PIXEL_FORMAT_NV21_ZSL 64 64
@@ -2778,6 +2778,20 @@
RETURN(true);
}
+bool omx_venc::dev_is_meta_mode()
+{
+ ENTER_FUNC();
+
+ RETURN(true);
+}
+
+bool omx_venc::dev_is_avtimer_needed()
+{
+ ENTER_FUNC();
+
+ RETURN(true);
+}
+
bool omx_venc::dev_color_align(OMX_BUFFERHEADERTYPE *buffer,
OMX_U32 width, OMX_U32 height)
{
diff --git a/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp b/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
index d969c32..60951d4 100644
--- a/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
+++ b/mm-video-v4l2/vidc/venc/src/omx_video_base.cpp
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2010-2019, Linux Foundation. All rights reserved.
+Copyright (c) 2010-2021, Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -43,6 +43,7 @@
#include <string.h>
#include <qdMetaData.h>
#include "omx_video_base.h"
+#include "fastcv.h"
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
@@ -251,6 +252,7 @@
m_sExtraData(0),
m_sParamConsumerUsage(0),
m_input_msg_id(OMX_COMPONENT_GENERATE_ETB),
+ m_nOperatingRate(0),
m_inp_mem_ptr(NULL),
m_out_mem_ptr(NULL),
m_client_output_extradata_mem_ptr(NULL),
@@ -276,7 +278,8 @@
profile_mode(false),
profile_frame_count(0),
profile_start_time(0),
- profile_last_time(0)
+ profile_last_time(0),
+ m_fastCV_init_done(false)
{
DEBUG_PRINT_HIGH("omx_video(): Inside Constructor()");
memset(&m_cmp,0,sizeof(m_cmp));
@@ -284,6 +287,7 @@
async_thread_created = false;
msg_thread_created = false;
msg_thread_stop = false;
+ is_stop_in_progress = false;
OMX_INIT_STRUCT(&m_blurInfo, OMX_QTI_VIDEO_CONFIG_BLURINFO);
m_blurInfo.nPortIndex == (OMX_U32)PORT_INDEX_IN;
@@ -292,6 +296,7 @@
{HAL_PIXEL_FORMAT_RGBA_8888, RGBA8888},
{HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS_UBWC, NV12_UBWC},
{HAL_PIXEL_FORMAT_NV12_ENCODEABLE, NV12_128m},
+ {HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS, NV12_128m},
});
pthread_mutex_init(&m_lock, NULL);
@@ -343,6 +348,11 @@
DEBUG_PRINT_HIGH("Input frame rate = %f",
((profile_frame_count - 1) * 1e6) / (profile_last_time - profile_start_time));
}
+ if (m_fastCV_init_done) {
+ fcvMemDeInit();
+ fcvCleanUp();
+ m_fastCV_init_done = false;
+ }
DEBUG_PRINT_HIGH("omx_video: Destructor exit");
DEBUG_PRINT_HIGH("Exiting OMX Video Encoder ...");
}
@@ -458,7 +468,6 @@
}
break;
case OMX_COMPONENT_GENERATE_ETB_OPQ:
- DEBUG_PRINT_LOW("OMX_COMPONENT_GENERATE_ETB_OPQ");
if (pThis->empty_this_buffer_opaque((OMX_HANDLETYPE)p1,\
(OMX_BUFFERHEADERTYPE *)p2) != OMX_ErrorNone) {
DEBUG_PRINT_ERROR("ERROR: ETBProxy() failed!");
@@ -655,6 +664,7 @@
}
}
+ is_stop_in_progress = false;
break;
case OMX_COMPONENT_GENERATE_HARDWARE_ERROR:
@@ -1301,6 +1311,7 @@
} else if (ident == OMX_COMPONENT_GENERATE_EBD) {
empty_buffer_done(&m_cmp,(OMX_BUFFERHEADERTYPE *)p1);
} else if (ident == OMX_COMPONENT_GENERATE_ETB_OPQ) {
+ print_omx_buffer("Flush ETB_OPQ", (OMX_BUFFERHEADERTYPE *)p2);
m_pCallbacks.EmptyBufferDone(&m_cmp,m_app_data,(OMX_BUFFERHEADERTYPE *)p2);
}
}
@@ -1453,7 +1464,6 @@
}
bRet = true;
- DEBUG_PRINT_LOW("Value of this pointer in post_event %p",this);
post_message(this, id);
pthread_mutex_unlock(&m_lock);
@@ -3066,6 +3076,8 @@
return OMX_ErrorBadParameter;
}
+ print_omx_buffer("free_input_buffer", bufferHdr);
+
index = bufferHdr - ((!meta_mode_enable)?m_inp_mem_ptr:meta_buffer_hdr);
#ifdef _ANDROID_ICS_
if (meta_mode_enable) {
@@ -3144,6 +3156,8 @@
}
index = bufferHdr - m_out_mem_ptr;
+ print_omx_buffer("free_output_buffer", bufferHdr);
+
if (index < m_sOutPortDef.nBufferCountActual &&
dev_free_buf(&m_pOutput_pmem[index],PORT_INDEX_OUT) != true) {
DEBUG_PRINT_ERROR("ERROR: dev_free_buf Failed for o/p buf");
@@ -3899,7 +3913,7 @@
return OMX_ErrorVersionMismatch;
}
- DEBUG_PRINT_LOW("ETB: buffer = %p, buffer->pBuffer[%p]", buffer, buffer->pBuffer);
+ print_omx_buffer("EmptyThisBuffer", buffer);
if (buffer->nInputPortIndex != (OMX_U32)PORT_INDEX_IN) {
DEBUG_PRINT_ERROR("ERROR: Bad port index to call empty_this_buffer");
return OMX_ErrorBadPortIndex;
@@ -3918,7 +3932,6 @@
m_etb_count++;
m_etb_timestamp = buffer->nTimeStamp;
- DEBUG_PRINT_LOW("DBG: i/p nTimestamp = %u", (unsigned)buffer->nTimeStamp);
post_event ((unsigned long)hComp,(unsigned long)buffer,m_input_msg_id);
return OMX_ErrorNone;
}
@@ -4053,6 +4066,14 @@
DEBUG_PRINT_ERROR("ERROR: ETBProxy: Input flush in progress");
return OMX_ErrorNone;
}
+
+ if (is_stop_in_progress == true) {
+ post_event ((unsigned long)buffer,0,
+ OMX_COMPONENT_GENERATE_EBD);
+ DEBUG_PRINT_ERROR("ERROR: ETBProxy: stop in progress");
+ return OMX_ErrorNone;
+ }
+
if (!meta_mode_enable) {
fd = m_pInput_pmem[nBufIndex].fd;
}
@@ -4179,7 +4200,7 @@
return OMX_ErrorBadParameter;
}
- DEBUG_PRINT_LOW("FTB: buffer->pBuffer[%p]", buffer->pBuffer);
+ print_omx_buffer("FillThisBuffer", buffer);
if (m_state != OMX_StateExecuting &&
m_state != OMX_StatePause &&
@@ -4241,9 +4262,6 @@
return OMX_ErrorBadParameter;
}
- if (bufferAdd != NULL) {
- DEBUG_PRINT_LOW("FTBProxy: bufferAdd->pBuffer[%p]", bufferAdd->pBuffer);
- }
if (bufferAdd == NULL || ((bufferAdd - m_out_mem_ptr) >= (int)m_sOutPortDef.nBufferCountActual) ) {
DEBUG_PRINT_ERROR("ERROR: FTBProxy: Invalid i/p params");
return OMX_ErrorBadParameter;
@@ -4712,8 +4730,6 @@
VIDC_TRACE_NAME_HIGH("FBD");
int index = buffer - m_out_mem_ptr;
- DEBUG_PRINT_LOW("fill_buffer_done: buffer->pBuffer[%p], flags=0x%x size = %u",
- buffer->pBuffer, (unsigned)buffer->nFlags, (unsigned int)buffer->nFilledLen);
if (buffer == NULL || ((buffer - m_out_mem_ptr) > (int)m_sOutPortDef.nBufferCountActual)) {
return OMX_ErrorBadParameter;
}
@@ -4723,6 +4739,7 @@
VIDC_TRACE_INT_LOW("FBD-TS", buffer->nTimeStamp / 1000);
VIDC_TRACE_INT_LOW("FBD-size", buffer->nFilledLen);
+ print_omx_buffer("FillBufferDone", buffer);
if (secure_session && m_pCallbacks.FillBufferDone) {
if (buffer->nFilledLen > 0)
m_fbd_count++;
@@ -4736,10 +4753,10 @@
m_fbd_count++;
if (dev_get_output_log_flag()) {
- do_cache_operations(m_pOutput_ion[index].data_fd);
+ sync_start_read(m_pOutput_ion[index].data_fd);
dev_output_log_buffers((const char*)buffer->pBuffer + buffer->nOffset, buffer->nFilledLen,
buffer->nTimeStamp);
- do_cache_operations(m_pOutput_ion[index].data_fd);
+ sync_end_read(m_pOutput_ion[index].data_fd);
}
}
@@ -4761,13 +4778,13 @@
int buffer_index = -1;
buffer_index = buffer - ((mUseProxyColorFormat && !mUsesColorConversion) ? meta_buffer_hdr : m_inp_mem_ptr);
- DEBUG_PRINT_LOW("empty_buffer_done: buffer[%p]", buffer);
if (buffer == NULL ||
((buffer_index > (int)m_sInPortDef.nBufferCountActual))) {
DEBUG_PRINT_ERROR("ERROR in empty_buffer_done due to index buffer");
return OMX_ErrorBadParameter;
}
+ print_omx_buffer("EmptyBufferDone", buffer);
pending_input_buffers--;
VIDC_TRACE_INT_LOW("ETB-pending", pending_input_buffers);
@@ -4856,50 +4873,18 @@
}
}
-void omx_video::do_cache_operations(int fd)
-{
-#ifdef USE_ION
- struct dma_buf_sync buf_sync;
-
- if (fd < 0)
- return;
-
- struct dma_buf_sync dma_buf_sync_data[2];
- dma_buf_sync_data[0].flags = DMA_BUF_SYNC_START | DMA_BUF_SYNC_RW;
- dma_buf_sync_data[1].flags = DMA_BUF_SYNC_END | DMA_BUF_SYNC_RW;
-
- for(unsigned int i=0; i<2; i++) {
- int rc = ioctl(fd, DMA_BUF_IOCTL_SYNC, &dma_buf_sync_data[i]);
- if (rc < 0) {
- DEBUG_PRINT_ERROR("Failed DMA_BUF_IOCTL_SYNC %s fd : %d", i==0?"start":"end", fd);
- return;
- }
- }
-#else
- (void)fd;
- return;
-#endif
-}
-
char *omx_video::ion_map(int fd, int len)
{
char *bufaddr = (char*)mmap(NULL, len, PROT_READ|PROT_WRITE,
MAP_SHARED, fd, 0);
-#ifdef USE_ION
- if (bufaddr != MAP_FAILED) {
- do_cache_operations(fd);
- }
-#endif
+ if (bufaddr != MAP_FAILED)
+ cache_clean_invalidate(fd);
return bufaddr;
}
OMX_ERRORTYPE omx_video::ion_unmap(int fd, void *bufaddr, int len)
{
-#ifdef USE_ION
- do_cache_operations(fd);
-#else
- (void)fd;
-#endif
+ cache_clean_invalidate(fd);
if (-1 == munmap(bufaddr, len)) {
DEBUG_PRINT_ERROR("munmap failed.");
return OMX_ErrorInsufficientResources;
@@ -4918,6 +4903,11 @@
return false;
}
+ if (is_stop_in_progress) {
+ DEBUG_PRINT_ERROR("Stop in progress: do not allocate any memory");
+ return false;
+ }
+
ion_info->data_fd = -1;
ion_info->dev_fd = ion_open();
if (ion_info->dev_fd <= 0) {
@@ -4966,6 +4956,11 @@
return false;
}
+ DEBUG_PRINT_HIGH("Alloc ion memory: fd (dev:%d data:%d) len %d flags %#x mask %#x",
+ ion_info->dev_fd, ion_info->data_fd, (unsigned int)ion_info->alloc_data.len,
+ (unsigned int)ion_info->alloc_data.flags,
+ (unsigned int)ion_info->alloc_data.heap_id_mask);
+
return true;
}
@@ -4975,6 +4970,11 @@
DEBUG_PRINT_ERROR("Invalid input to free_ion_memory");
return;
}
+ DEBUG_PRINT_HIGH("Free ion memory: fd (dev:%d data:%d) len %d flags %#x mask %#x",
+ buf_ion_info->dev_fd, buf_ion_info->data_fd,
+ (unsigned int)buf_ion_info->alloc_data.len,
+ (unsigned int)buf_ion_info->alloc_data.flags,
+ (unsigned int)buf_ion_info->alloc_data.heap_id_mask);
if (buf_ion_info->data_fd >= 0) {
close(buf_ion_info->data_fd);
buf_ion_info->data_fd = -1;
@@ -4993,7 +4993,6 @@
LEGACY_CAM_METADATA_TYPE *media_ptr;
struct pmem Input_pmem;
unsigned int index_pmem = 0;
- bool meta_error = false;
index_pmem = (buffer - m_inp_mem_ptr);
if (mUsesColorConversion &&
@@ -5009,10 +5008,9 @@
Input_pmem.fd = MetaBufferUtil::getFdAt(media_ptr->meta_handle, 0);
int size = MetaBufferUtil::getIntAt(media_ptr->meta_handle, 0, MetaBufferUtil::INT_SIZE);
int offset = MetaBufferUtil::getIntAt(media_ptr->meta_handle, 0, MetaBufferUtil::INT_OFFSET);
- if (Input_pmem.fd < 0 || size < 0 || offset < 0) {
+ if (Input_pmem.fd < 0 || size < 0 || offset < 0)
DEBUG_PRINT_ERROR("Invalid meta buffer");
- meta_error = true;
- }
+
Input_pmem.size = size;
Input_pmem.offset = offset;
DEBUG_PRINT_LOW("EBD fd = %d, offset = %d, size = %d",Input_pmem.fd,
@@ -5025,14 +5023,6 @@
Input_pmem.fd = handle->fd;
Input_pmem.offset = 0;
Input_pmem.size = handle->size;
- } else {
- meta_error = true;
- }
- if (!meta_error)
- meta_error = !dev_free_buf(&Input_pmem,PORT_INDEX_IN);
- if (meta_error) {
- DEBUG_PRINT_HIGH("In batchmode or dev_free_buf failed, flush %d",
- input_flush_progress);
}
}
}
@@ -5051,6 +5041,82 @@
!!interlace_flag;
}
+bool omx_video::is_rotation_enabled()
+{
+ bool bRet = false;
+
+ if (m_sConfigFrameRotation.nRotation == 90 ||
+ m_sConfigFrameRotation.nRotation == 180 ||
+ m_sConfigFrameRotation.nRotation == 270) {
+ bRet = true;
+ }
+
+ return bRet;
+}
+
+void omx_video::initFastCV() {
+ fcvSetOperationMode(FASTCV_OP_CPU_PERFORMANCE);
+ fcvMemInit();
+ m_fastCV_init_done = true;
+}
+
+bool omx_video::is_flip_conv_needed(private_handle_t *handle) {
+ OMX_MIRRORTYPE mirror;
+ mirror = m_sConfigFrameMirror.eMirror;
+ OMX_U32 captureRate = m_nOperatingRate >> 16;
+ bool is_flip_needed = false;
+
+ if (m_no_vpss && m_fastCV_init_done && captureRate <= 30 &&
+ (mirror == OMX_MirrorVertical || mirror == OMX_MirrorHorizontal ||
+ mirror == OMX_MirrorBoth)) {
+ is_flip_needed = true;
+ }
+
+ if (handle && !(handle->format == HAL_PIXEL_FORMAT_NV12_ENCODEABLE ||
+ handle->format == HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS)) {
+ is_flip_needed = false;
+ }
+
+ return is_flip_needed;
+}
+
+OMX_ERRORTYPE omx_video::do_flip_conversion(struct pmem *buffer) {
+ OMX_U32 width = m_sInPortDef.format.video.nFrameWidth;
+ OMX_U32 height = m_sInPortDef.format.video.nFrameHeight;
+ OMX_U32 stride = VENUS_Y_STRIDE(COLOR_FMT_NV12, width);
+ OMX_U32 scanLines = VENUS_Y_SCANLINES(COLOR_FMT_NV12, height);
+ fcvFlipDir direction;
+ OMX_ERRORTYPE ret = OMX_ErrorNone;
+
+ switch(m_sConfigFrameMirror.eMirror) {
+ case OMX_MirrorVertical:
+ direction = FASTCV_FLIP_VERT;
+ break;
+ case OMX_MirrorHorizontal:
+ direction = FASTCV_FLIP_HORIZ;
+ break;
+ case OMX_MirrorBoth:
+ direction = FASTCV_FLIP_BOTH;
+ break;
+ default:
+ return OMX_ErrorBadParameter;
+ }
+
+ unsigned char *uva = (unsigned char *)ion_map(buffer->fd, buffer->size);
+ if (uva == MAP_FAILED) {
+ ret = OMX_ErrorBadParameter;
+ return ret;
+ }
+ unsigned char *src = uva;
+ DEBUG_PRINT_LOW("start flip conversion");
+ fcvFlipu8( src, width, height, stride, src, stride, direction);
+ src = src + (stride * scanLines);
+ fcvFlipu16((OMX_U16 *)src,width/2,height/2,stride,(OMX_U16 *)src,stride,direction);
+
+ ion_unmap(buffer->fd, uva, buffer->size);
+ return ret;
+}
+
bool omx_video::is_conv_needed(private_handle_t *handle)
{
bool bRet = false;
@@ -5068,9 +5134,7 @@
bRet = false;
#endif
bRet |= interlaced;
- if (m_c2d_rotation && (m_sConfigFrameRotation.nRotation == 90 ||
- m_sConfigFrameRotation.nRotation == 180 ||
- m_sConfigFrameRotation.nRotation == 270)) {
+ if (m_no_vpss && is_rotation_enabled()) {
bRet = true;
}
DEBUG_PRINT_LOW("RGBA conversion %s. Format %d Flag %d interlace_flag = %d",
@@ -5167,7 +5231,7 @@
private_handle_t::PRIV_FLAGS_ITU_R_601_FR : 0;
if (m_sOutPortDef.format.video.eCompressionFormat == OMX_VIDEO_CodingImageHEIC)
- c2dDestFmt = NV12_128m;
+ c2dDestFmt = NV12_512;
if (c2dcc.getConversionNeeded() &&
c2dcc.isPropChanged(m_sInPortDef.format.video.nFrameWidth,
@@ -5178,9 +5242,7 @@
c2dSrcFmt, c2dDestFmt,
handle->flags, handle->width)) {
DEBUG_PRINT_HIGH("C2D setRotation - %u", m_sConfigFrameRotation.nRotation);
- if (m_c2d_rotation && (m_sConfigFrameRotation.nRotation == 90 ||
- m_sConfigFrameRotation.nRotation == 180 ||
- m_sConfigFrameRotation.nRotation == 270)) {
+ if (m_no_vpss && is_rotation_enabled()) {
c2dcc.setRotation(m_sConfigFrameRotation.nRotation);
}
DEBUG_PRINT_HIGH("C2D setResolution (0x%X -> 0x%x) HxW (%dx%d) Stride (%d)",
@@ -5223,6 +5285,44 @@
return OMX_ErrorNone;
}
+ if (dev_is_meta_mode()) {
+ LEGACY_CAM_METADATA_TYPE * meta_buf = NULL;
+
+ meta_buf = (LEGACY_CAM_METADATA_TYPE *)buffer->pBuffer;
+
+ if (meta_buf && m_no_vpss && is_rotation_enabled() &&
+ meta_buf->buffer_type == kMetadataBufferTypeGrallocSource) {
+ VideoGrallocMetadata *meta_buf = (VideoGrallocMetadata *)buffer->pBuffer;
+#ifdef USE_GBM
+ struct gbm_bo *handle = (struct gbm_bo *)meta_buf->pHandle;
+#else
+ private_handle_t *handle = (private_handle_t *)meta_buf->pHandle;
+#endif
+ if (!handle) {
+ DEBUG_PRINT_ERROR("%s : handle is null!", __FUNCTION__);
+ return OMX_ErrorUndefined;
+ }
+
+ // if input buffer dimensions is different from what is configured,
+ // reject the buffer
+#ifdef USE_GBM
+ if (ALIGN((int)m_sInPortDef.format.video.nFrameWidth,32) != ALIGN(handle->width,32) ||
+ ALIGN((int)m_sInPortDef.format.video.nFrameHeight,32) != ALIGN(handle->height,32)) {
+ ALOGE("%s: Graphic buf size(%dx%d) does not match configured size(%ux%u)",
+ __func__, handle->width, handle->height,
+#else
+ if (ALIGN((int)m_sInPortDef.format.video.nFrameWidth,32) != ALIGN(handle->unaligned_width,32) ||
+ ALIGN((int)m_sInPortDef.format.video.nFrameHeight,32) != ALIGN(handle->unaligned_height,32)) {
+ ALOGE("%s: Graphic buf size(%dx%d) does not match configured size(%ux%u)",
+ __func__, handle->unaligned_width, handle->unaligned_height,
+#endif
+ m_sInPortDef.format.video.nFrameWidth, m_sInPortDef.format.video.nFrameHeight);
+ m_pCallbacks.EmptyBufferDone(hComp, m_app_data, buffer);
+ return OMX_ErrorNone;
+ }
+ }
+ }
+
if (!psource_frame) {
psource_frame = buffer;
ret = push_input_buffer(hComp);
@@ -5279,6 +5379,7 @@
unsigned char *uva;
OMX_ERRORTYPE ret = OMX_ErrorNone;
unsigned long address = 0,p2,id;
+ LEGACY_CAM_METADATA_TYPE * meta_buf = NULL;
DEBUG_PRINT_LOW("In Convert and queue Meta Buffer");
if (!psource_frame || !pdest_frame) {
@@ -5318,6 +5419,28 @@
DEBUG_PRINT_ERROR("Color Conversion failed");
ret = OMX_ErrorBadParameter;
} else {
+ if (dev_is_avtimer_needed() && dev_is_meta_mode()) {
+ meta_buf = (LEGACY_CAM_METADATA_TYPE *)psource_frame->pBuffer;
+
+ if (meta_buf && m_no_vpss && is_rotation_enabled() &&
+ meta_buf->buffer_type == kMetadataBufferTypeGrallocSource) {
+ VideoGrallocMetadata *meta_buf = (VideoGrallocMetadata *)psource_frame->pBuffer;
+ private_handle_t *handle = (private_handle_t *)meta_buf->pHandle;
+
+ if (!handle) {
+ DEBUG_PRINT_ERROR("%s : handle is null!", __FUNCTION__);
+ ret = OMX_ErrorUndefined;
+ return ret;
+ }
+
+ uint64_t avTimerTimestampNs = psource_frame->nTimeStamp * 1000;
+ if (getMetaData(handle, GET_VT_TIMESTAMP, &avTimerTimestampNs) == 0
+ && avTimerTimestampNs > 0) {
+ psource_frame->nTimeStamp = avTimerTimestampNs / 1000;
+ DEBUG_PRINT_LOW("C2d AVTimer TS : %llu us", (unsigned long long)psource_frame->nTimeStamp);
+ }
+ }
+ }
unsigned int buf_size = 0;
buf_size = c2dcc.getBuffSize(C2D_OUTPUT);
pdest_frame->nOffset = 0;
@@ -5406,6 +5529,14 @@
Input_pmem_info.fd = handle->fd;
Input_pmem_info.offset = 0;
Input_pmem_info.size = handle->size;
+
+ if (is_flip_conv_needed(handle)) {
+ ret = do_flip_conversion(&Input_pmem_info);
+ if (ret != OMX_ErrorNone) {
+ return ret;
+ }
+ }
+
m_graphicbuffer_size = Input_pmem_info.size;
if (is_conv_needed(handle))
ret = convert_queue_buffer(hComp,Input_pmem_info,index);
diff --git a/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp b/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp
index b52ce94..b460745 100644
--- a/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp
+++ b/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2010-2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2010-2020 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -187,8 +187,8 @@
}
m_perf_control.perf_lock_acquire();
- Platform::Config::getInt32(Platform::vidc_c2d_rotation,
- (int32_t *)&m_c2d_rotation, 0);
+ Platform::Config::getInt32(Platform::vidc_no_vpss,
+ (int32_t *)&m_no_vpss, 0);
}
omx_venc::~omx_venc()
@@ -225,6 +225,7 @@
OMX_VIDEO_CODINGTYPE codec_type;
+ property_get("ro.board.platform", m_platform_name, "0");
DEBUG_PRINT_HIGH("omx_venc(): Inside component_init()");
// Copy the role information which provides the decoder m_nkind
strlcpy((char *)m_nkind,role,OMX_MAX_STRINGNAME_SIZE);
@@ -241,6 +242,15 @@
secure_session = true;
} else if (!strncmp((char *)m_nkind, "OMX.qcom.video.encoder.vp8", \
OMX_MAX_STRINGNAME_SIZE)) {
+ char version[PROP_VALUE_MAX] = {0};
+ if (!strncmp(m_platform_name, "lito", 4))
+ if (property_get("vendor.media.target.version", version, "0") &&
+ ((atoi(version) == 2) || (atoi(version) == 3))) {
+ //sku version, VP8 is disabled on lagoon
+ DEBUG_PRINT_ERROR("VP8 unsupported on lagoon");
+ eRet = OMX_ErrorInvalidComponentName;
+ return eRet;
+ }
strlcpy((char *)m_cRole, "video_encoder.vp8",OMX_MAX_STRINGNAME_SIZE);
codec_type = OMX_VIDEO_CodingVP8;
} else if (!strncmp((char *)m_nkind, "OMX.qcom.video.encoder.hevc", \
@@ -2031,6 +2041,15 @@
break;
}
+ case OMX_QTIIndexConfigContentAdaptiveCoding:
+ {
+ OMX_U32* bitrateSavingsMode = (OMX_U32*) configData;
+ if (!handle->venc_set_config(bitrateSavingsMode, (OMX_INDEXTYPE)OMX_QTIIndexConfigContentAdaptiveCoding)) {
+ DEBUG_PRINT_ERROR("Failed to set OMX_QTIIndexConfigContentAdaptiveCoding");
+ return OMX_ErrorUnsupportedSetting;
+ }
+ break;
+ }
default:
DEBUG_PRINT_ERROR("ERROR: unsupported index %d", (int) configIndex);
break;
@@ -2217,6 +2236,16 @@
return handle->venc_fill_buf(buffer, pmem_data_buf,index,fd);
}
+bool omx_venc::dev_is_meta_mode()
+{
+ return handle->venc_get_buffer_mode();;
+}
+
+bool omx_venc::dev_is_avtimer_needed()
+{
+ return handle->venc_is_avtimer_needed();
+}
+
bool omx_venc::dev_get_seq_hdr(void *buffer, unsigned size, unsigned *hdrlen)
{
return handle->venc_get_seq_hdr(buffer, size, hdrlen);
@@ -2415,6 +2444,7 @@
OMX_COMPONENT_GENERATE_START_DONE);
break;
case VEN_MSG_STOP:
+ omx->is_stop_in_progress = true;
omx->post_event (0,m_sVenc_msg->statuscode,\
OMX_COMPONENT_GENERATE_STOP_DONE);
break;
@@ -2468,7 +2498,6 @@
omxhdr->nFilledLen = m_sVenc_msg->buf.len;
omxhdr->nOffset = m_sVenc_msg->buf.offset;
omxhdr->nTimeStamp = m_sVenc_msg->buf.timestamp;
- DEBUG_PRINT_LOW("o/p TS = %u", (unsigned int)m_sVenc_msg->buf.timestamp);
omxhdr->nFlags = m_sVenc_msg->buf.flags;
/*Use buffer case*/
diff --git a/mm-video-v4l2/vidc/venc/src/omx_video_extensions.hpp b/mm-video-v4l2/vidc/venc/src/omx_video_extensions.hpp
index 484fcda..189cb59 100644
--- a/mm-video-v4l2/vidc/venc/src/omx_video_extensions.hpp
+++ b/mm-video-v4l2/vidc/venc/src/omx_video_extensions.hpp
@@ -147,6 +147,9 @@
ADD_EXTENSION("qti-ext-enc-roiinfo-rect-mode", OMX_QTIIndexConfigVideoRoiRectRegionInfo, OMX_DirOutput)
ADD_PARAM_END("enable", OMX_AndroidVendorValueInt32)
+
+ ADD_EXTENSION("qti-ext-enc-content-adaptive-mode", OMX_QTIIndexConfigContentAdaptiveCoding, OMX_DirInput)
+ ADD_PARAM_END("value", OMX_AndroidVendorValueInt32)
}
OMX_ERRORTYPE omx_video::get_vendor_extension_config(
@@ -332,6 +335,7 @@
}
case OMX_QTIIndexParamVideoEnableBlur:
case OMX_QTIIndexConfigVideoBlurResolution:
+ case OMX_QTIIndexConfigContentAdaptiveCoding:
{
break;
}
@@ -1033,6 +1037,23 @@
}
break;
}
+ case OMX_QTIIndexConfigContentAdaptiveCoding:
+ {
+ OMX_U32 bitrateSavingsMode;
+ valueSet |= vExt.readParamInt32(ext, "value", (OMX_S32 *)&(bitrateSavingsMode));
+ if (!valueSet) {
+ break;
+ }
+ DEBUG_PRINT_HIGH("VENDOR-EXT: set_config: OMX_QTIIndexConfigContentAdaptiveCoding : %u",
+ bitrateSavingsMode);
+
+ err = set_config(
+ NULL, (OMX_INDEXTYPE)OMX_QTIIndexConfigContentAdaptiveCoding, &bitrateSavingsMode);
+ if (err != OMX_ErrorNone) {
+ DEBUG_PRINT_ERROR("set_config: OMX_QTIIndexConfigContentAdaptiveCoding failed !");
+ }
+ break;
+ }
default:
{
return OMX_ErrorNotImplemented;
diff --git a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
index 6cc62a1..d0cbfee 100644
--- a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
+++ b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2010-2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2010-2020 The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -98,6 +98,8 @@
#undef LOG_TAG
#define LOG_TAG "OMX-VENC: venc_dev"
+#define LUMINANCE_MULTIPLICATION_FACTOR 10000
+
//constructor
venc_dev::venc_dev(class omx_venc *venc_class)
{
@@ -171,6 +173,8 @@
(int32_t *)&is_csc_custom_matrix_enabled, 0);
Platform::Config::getInt32(Platform::vidc_enc_auto_blur_disable,
(int32_t *)&is_auto_blur_disabled, 0);
+ Platform::Config::getInt32(Platform::vidc_disable_hdr,
+ (int32_t *)&m_disable_hdr, 0);
char property_value[PROPERTY_VALUE_MAX] = {0};
@@ -184,6 +188,9 @@
property_get("vendor.vidc.enc.log.extradata", property_value, "0");
m_debug.extradata_log = atoi(property_value);
+ property_get("vendor.vidc.cvp.log.in", property_value, "0");
+ m_debug.cvp_log |= atoi(property_value);
+
#ifdef _UBWC_
property_get("vendor.gralloc.disable_ubwc", property_value, "0");
if(!(strncmp(property_value, "1", PROPERTY_VALUE_MAX)) ||
@@ -206,7 +213,10 @@
Platform::Config::getInt32(Platform::vidc_enc_linear_color_format,
(int32_t *)&mUseLinearColorFormat, 0);
Platform::Config::getInt32(Platform::vidc_enc_bitrate_savings_enable,
- (int32_t *)&mBitrateSavingsEnable, 1);
+ (int32_t *)&mBitrateSavingsEnable, 3);
+ Platform::Config::getInt32(Platform::vidc_enc_quality_boost_enable,
+ (int32_t *)&mQualityBoostRequested, 0);
+ mQualityBoostEligible = false;
profile_level_converter::init();
}
@@ -321,7 +331,7 @@
venc_msg.buf.flags = 0;
venc_msg.buf.ptrbuffer = (OMX_U8 *)omx_venc_base->m_pOutput_pmem[v4l2_buf.index].buffer;
venc_msg.buf.clientdata=(void*)omxhdr;
- venc_msg.buf.timestamp = (uint64_t) v4l2_buf.timestamp.tv_sec * (uint64_t) 1000000 + (uint64_t) v4l2_buf.timestamp.tv_usec;
+ venc_msg.buf.timestamp = (int64_t) v4l2_buf.timestamp.tv_sec * (int64_t) 1000000 + (int64_t) v4l2_buf.timestamp.tv_usec;
/* TODO: ideally report other types of frames as well
* for now it doesn't look like IL client cares about
@@ -669,9 +679,7 @@
}
DEBUG_PRINT_HIGH("Processing Extradata for Buffer = %lld", nTimeStamp); // Useful for debugging
-#ifdef USE_ION
- venc_handle->do_cache_operations(input_extradata_info.ion[index].data_fd);
-#endif
+ sync_start_rw(input_extradata_info.ion[index].data_fd);
p_extradata = input_extradata_info.ion[index].uaddr;
data = (struct OMX_OTHER_EXTRADATATYPE *)p_extradata;
@@ -834,9 +842,7 @@
data->data[0] = 0;
bailout:
-#ifdef USE_ION
- venc_handle->do_cache_operations(input_extradata_info.ion[index].data_fd);
-#endif
+ sync_end_rw(input_extradata_info.ion[index].data_fd);
return status;
}
@@ -947,6 +953,7 @@
switch (color_format) {
case NV12_128m:
+ case NV12_512:
return venc_set_color_format((OMX_COLOR_FORMATTYPE)QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m);
case NV12_UBWC:
return venc_set_color_format((OMX_COLOR_FORMATTYPE)QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mCompressed);
@@ -1080,6 +1087,17 @@
eRet = OMX_ErrorNoMore;
}
+ if (m_disable_hdr & ENC_HDR_DISABLE_FLAG) {
+ if (m_sVenc_cfg.codectype == V4L2_PIX_FMT_HEVC) {
+ if (profileLevelType->eProfile == OMX_VIDEO_HEVCProfileMain10 ||
+ profileLevelType->eProfile == OMX_VIDEO_HEVCProfileMain10HDR10 ||
+ profileLevelType->eProfile == OMX_VIDEO_HEVCProfileMain10HDR10Plus) {
+ DEBUG_PRINT_LOW("%s: HDR profile unsupported", __FUNCTION__);
+ return OMX_ErrorHardware;
+ }
+ }
+ }
+
DEBUG_PRINT_LOW("get_parameter: OMX_IndexParamVideoProfileLevelQuerySupported for Input port returned Profile:%u, Level:%u",
(unsigned int)profileLevelType->eProfile, (unsigned int)profileLevelType->eLevel);
return eRet;
@@ -1128,10 +1146,8 @@
OMX_ERRORTYPE venc_dev::allocate_extradata(struct extradata_buffer_info *extradata_info, int flags)
{
- if (extradata_info->allocated) {
- DEBUG_PRINT_HIGH("2nd allocation return for port = %d",extradata_info->port_index);
+ if (extradata_info->allocated)
return OMX_ErrorNone;
- }
if (!extradata_info->buffer_size || !extradata_info->count) {
DEBUG_PRINT_ERROR("Invalid extradata buffer size(%lu) or count(%d) for port %d",
@@ -1214,6 +1230,45 @@
return (m_debug.out_buffer_log == 1);
}
+int venc_dev::venc_cvp_log_buffers(const char *metadataName, uint32_t buffer_len, uint8_t *buf)
+{
+ if (!m_debug.cvpfile && m_debug.cvp_log) {
+ int size = 0;
+
+ if (m_sVenc_cfg.codectype == V4L2_PIX_FMT_H264 ||
+ m_sVenc_cfg.codectype == V4L2_PIX_FMT_HEVC) {
+ size = snprintf(m_debug.cvpfile_name, PROPERTY_VALUE_MAX, "%s/enc_cvp_%lu_%lu_%p.bin",
+ m_debug.log_loc, m_sVenc_cfg.input_width, m_sVenc_cfg.input_height, this);
+ }
+
+ if ((size > PROPERTY_VALUE_MAX) && (size < 0)) {
+ DEBUG_PRINT_ERROR("Failed to open cvp file: %s for logging size:%d",
+ m_debug.cvpfile_name, size);
+ }
+
+ m_debug.cvpfile = fopen(m_debug.cvpfile_name, "ab");
+ if (!m_debug.cvpfile) {
+ DEBUG_PRINT_ERROR("Failed to open cvp file: %s for logging errno:%d",
+ m_debug.cvpfile_name, errno);
+ m_debug.cvpfile_name[0] = '\0';
+ return -1;
+ }
+ }
+
+ if (m_debug.cvpfile) {
+ // Truncate or Zero-filled to match the string size to 5
+ char name[6] = {0};
+ for(int i=0; i<5 && i<strlen(metadataName); i++) {
+ name[i] = metadataName[i];
+ }
+ fwrite(name, 5, 1, m_debug.cvpfile); // Metadata name
+ fwrite(&buffer_len, sizeof(buffer_len), 1, m_debug.cvpfile); // Blob size
+ fwrite(buf, buffer_len, 1, m_debug.cvpfile); // Blob data
+ }
+ return 0;
+}
+
+
int venc_dev::venc_output_log_buffers(const char *buffer_addr, int buffer_len, uint64_t timestamp)
{
if (venc_handle->is_secure_session()) {
@@ -1272,9 +1327,7 @@
else
fd = output_extradata_info.ion[index].data_fd;
-#ifdef USE_ION
- venc_handle->do_cache_operations(fd);
-#endif
+ sync_start_read(fd);
if (!m_debug.extradatafile && m_debug.extradata_log) {
int size = 0;
@@ -1294,9 +1347,7 @@
DEBUG_PRINT_ERROR("Failed to open extradata file: %s for logging errno:%d",
m_debug.extradatafile_name, errno);
m_debug.extradatafile_name[0] = '\0';
-#ifdef USE_ION
- venc_handle->do_cache_operations(fd);
-#endif
+ sync_end_read(fd);
return -1;
}
}
@@ -1309,9 +1360,7 @@
fwrite(p_extra, p_extra->nSize, 1, m_debug.extradatafile);
} while (p_extra->eType != OMX_ExtraDataNone);
}
-#ifdef USE_ION
- venc_handle->do_cache_operations(fd);
-#endif
+ sync_end_read(fd);
return 0;
}
@@ -1323,9 +1372,7 @@
return -1;
}
-#ifdef USE_ION
- venc_handle->do_cache_operations(fd);
-#endif
+ sync_start_read(fd);
if (!m_debug.infile) {
int size = snprintf(m_debug.infile_name, PROPERTY_VALUE_MAX, "%s/input_enc_%lu_%lu_%p.yuv",
m_debug.log_loc, m_sVenc_cfg.input_width, m_sVenc_cfg.input_height, this);
@@ -1383,6 +1430,23 @@
fwrite(ptemp, m_sVenc_cfg.input_width, 1, m_debug.infile);
ptemp += stride;
}
+ } else if (color_format == COLOR_FMT_NV12_512) {
+ stride = VENUS_Y_STRIDE(color_format, m_sVenc_cfg.input_width);
+ scanlines = VENUS_Y_SCANLINES(color_format, m_sVenc_cfg.input_height);
+
+ for (i = 0; i < scanlines; i++) {
+ fwrite(ptemp, stride, 1, m_debug.infile);
+ ptemp += stride;
+ }
+ if (metadatamode == 1) {
+ ptemp = pvirt + (stride * scanlines);
+ } else {
+ ptemp = (unsigned char *)pbuffer->pBuffer + (stride * scanlines);
+ }
+ for (i = 0; i < scanlines/2; i++) {
+ fwrite(ptemp, stride, 1, m_debug.infile);
+ ptemp += stride;
+ }
} else if (color_format == COLOR_FMT_RGBA8888) {
stride = VENUS_RGB_STRIDE(color_format, m_sVenc_cfg.input_width);
scanlines = VENUS_RGB_SCANLINES(color_format, m_sVenc_cfg.input_height);
@@ -1417,9 +1481,7 @@
}
}
bailout:
-#ifdef USE_ION
- venc_handle->do_cache_operations(fd);
-#endif
+ sync_end_read(fd);
return status;
}
@@ -1430,12 +1492,9 @@
struct v4l2_control control;
OMX_STRING device_name = (OMX_STRING)"/dev/video33";
char property_value[PROPERTY_VALUE_MAX] = {0};
- char platform_name[PROPERTY_VALUE_MAX] = {0};
FILE *soc_file = NULL;
char buffer[10];
- property_get("ro.board.platform", platform_name, "0");
-
m_nDriver_fd = open (device_name, O_RDWR);
if ((int)m_nDriver_fd < 0) {
DEBUG_PRINT_ERROR("ERROR: Omx_venc::Comp Init Returning failure");
@@ -1554,6 +1613,13 @@
m_sInput_buff_property.alignment = SZ_4K;
}
+ if (m_codec == OMX_VIDEO_CodingImageHEIC) {
+ if (!venc_set_grid_enable()) {
+ DEBUG_PRINT_ERROR("Failed to enable grid");
+ return false;
+ }
+ }
+
memset(&fmt, 0, sizeof(fmt));
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
fmt.fmt.pix_mp.height = m_sVenc_cfg.dvs_height;
@@ -1581,13 +1647,6 @@
ret = ioctl(m_nDriver_fd, VIDIOC_S_FMT, &fmt);
m_sInput_buff_property.datasize=fmt.fmt.pix_mp.plane_fmt[0].sizeimage;
- if (m_codec == OMX_VIDEO_CodingImageHEIC) {
- if (!venc_set_grid_enable()) {
- DEBUG_PRINT_ERROR("Failed to enable grid");
- return false;
- }
- }
-
bufreq.memory = V4L2_MEMORY_USERPTR;
bufreq.count = 2;
@@ -1717,6 +1776,11 @@
fclose(m_debug.extradatafile);
m_debug.extradatafile = NULL;
}
+
+ if (m_debug.cvpfile) {
+ fclose(m_debug.cvpfile);
+ m_debug.cvpfile = NULL;
+ }
}
bool venc_dev::venc_set_buf_req(OMX_U32 *min_buff_count,
@@ -2450,6 +2514,15 @@
}
}
+bool venc_dev::venc_get_buffer_mode()
+{
+ return metadatamode;
+}
+
+bool venc_dev::venc_is_avtimer_needed()
+{
+ return mUseAVTimerTimestamps;
+}
bool venc_dev::venc_empty_buf(void *buffer, void *pmem_data_buf, unsigned index, unsigned fd)
{
@@ -2476,8 +2549,6 @@
bufreq.count = m_sInput_buff_property.actualcount;
bufreq.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
- DEBUG_PRINT_LOW("Input buffer length %u, Timestamp = %lld", (unsigned int)bufhdr->nFilledLen, bufhdr->nTimeStamp);
-
if (pmem_data_buf) {
DEBUG_PRINT_LOW("\n Internal PMEM addr for i/p Heap UseBuf: %p", pmem_data_buf);
plane[0].m.userptr = (unsigned long)pmem_data_buf;
@@ -2648,8 +2719,8 @@
m_sVenc_cfg.inputformat = isUBWC ? V4L2_PIX_FMT_NV12_UBWC : V4L2_PIX_FMT_NV12;
DEBUG_PRINT_INFO("ENC_CONFIG: Input Color = NV12 %s", isUBWC ? "UBWC" : "Linear");
} else if (handle->format == HAL_PIXEL_FORMAT_NV12_HEIF) {
- m_sVenc_cfg.inputformat = V4L2_PIX_FMT_NV12;
- DEBUG_PRINT_INFO("ENC_CONFIG: Input Color = NV12");
+ m_sVenc_cfg.inputformat = V4L2_PIX_FMT_NV12_512;
+ DEBUG_PRINT_INFO("ENC_CONFIG: Input Color = NV12_512");
} else if (handle->format == HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS_UBWC) {
m_sVenc_cfg.inputformat = V4L2_PIX_FMT_NV12_UBWC;
DEBUG_PRINT_INFO("ENC_CONFIG: Input Color = NV12_UBWC");
@@ -2821,7 +2892,7 @@
if (encodePerfMode == OMX_TRUE)
buf.flags |= V4L2_BUF_FLAG_PERF_MODE;
// Clear SET_VIDEO_PERF_MODE in buffer handle
- clearMetaData(handle,SET_VIDEO_PERF_MODE);
+ setMetaData(handle, SET_VIDEO_PERF_MODE, 0);
}
fd = handle->fd;
plane[0].data_offset = 0;
@@ -2883,6 +2954,8 @@
}
}
+ venc_set_quality_boost((OMX_BOOL)c2d_enabled);
+
if (!downscalar_enabled) {
OMX_U32 inp_width = 0, inp_height = 0, out_width = 0, out_height = 0;
@@ -2970,6 +3043,7 @@
(OMX_U64)input_extradata_info.ion[index].uaddr, (unsigned int)plane[index].m.userptr);
venc_extradata_log_buffers((char *)plane[extra_idx].m.userptr, index, true);
}
+ print_v4l2_buffer("QBUF-ETB", &buf);
rc = ioctl(m_nDriver_fd, VIDIOC_QBUF, &buf);
if (rc) {
@@ -2989,6 +3063,9 @@
case V4L2_PIX_FMT_NV12:
color_format = COLOR_FMT_NV12;
break;
+ case V4L2_PIX_FMT_NV12_512:
+ color_format = COLOR_FMT_NV12_512;
+ break;
case V4L2_PIX_FMT_NV12_UBWC:
color_format = COLOR_FMT_NV12_UBWC;
break;
@@ -3128,6 +3205,7 @@
VIDC_TRACE_INT_LOW("ETB-TS", bufTimeStamp / 1000);
+ print_v4l2_buffer("QBUF-ETB", &buf);
rc = ioctl(m_nDriver_fd, VIDIOC_QBUF, &buf);
if (rc) {
DEBUG_PRINT_ERROR("%s: Failed to qbuf (etb) to driver", __func__);
@@ -3241,6 +3319,7 @@
return false;
}
+ print_v4l2_buffer("QBUF-FTB", &buf);
rc = ioctl(m_nDriver_fd, VIDIOC_QBUF, &buf);
if (rc) {
@@ -3535,7 +3614,7 @@
}
if (m_codec == OMX_VIDEO_CodingImageHEIC)
- format = V4L2_PIX_FMT_NV12;
+ format = V4L2_PIX_FMT_NV12_512;
return format;
}
@@ -3581,7 +3660,7 @@
}
if (m_codec == OMX_VIDEO_CodingImageHEIC)
- m_sVenc_cfg.inputformat = V4L2_PIX_FMT_NV12;
+ m_sVenc_cfg.inputformat = V4L2_PIX_FMT_NV12_512;
memset(&fmt, 0, sizeof(fmt));
fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
@@ -3878,15 +3957,63 @@
return true;
}
+bool venc_dev::reconfigure_avc_param(OMX_VIDEO_PARAM_AVCTYPE *param) {
+ param->eProfile = (OMX_VIDEO_AVCPROFILETYPE)QOMX_VIDEO_AVCProfileMain;
+
+ DEBUG_PRINT_LOW("reconfigure_avc_param");
+
+ if (!venc_set_profile (param->eProfile)) {
+ DEBUG_PRINT_ERROR("ERROR: Unsuccessful in updating Profile %d",
+ param->eProfile);
+ return false;
+ }
+ if (set_nP_frames(param->nPFrames) == false ||
+ (param->nBFrames && set_nB_frames(param->nBFrames) == false)) {
+ DEBUG_PRINT_ERROR("ERROR: Request for setting intra period failed");
+ return false;
+ }
+ if (!venc_set_entropy_config (param->bEntropyCodingCABAC, param->nCabacInitIdc)) {
+ DEBUG_PRINT_ERROR("ERROR: Request for setting Entropy failed");
+ return false;
+ }
+ if (!venc_set_inloop_filter (param->eLoopFilterMode)) {
+ DEBUG_PRINT_ERROR("ERROR: Request for setting Inloop filter failed");
+ return false;
+ }
+ if (!venc_set_multislice_cfg(V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB, param->nSliceHeaderSpacing)) {
+ DEBUG_PRINT_ERROR("WARNING: Unsuccessful in updating slice_config");
+ return false;
+ }
+ if (!venc_h264_transform_8x8(param->bDirect8x8Inference)) {
+ DEBUG_PRINT_ERROR("WARNING: Request for setting Transform8x8 failed");
+ return false;
+ }
+
+ return true;
+}
+
bool venc_dev::venc_set_operatingrate(OMX_U32 rate) {
struct v4l2_control control;
control.id = V4L2_CID_MPEG_VIDC_VIDEO_OPERATING_RATE;
control.value = rate;
+ if (rate > INT_MAX)
+ control.value = INT_MAX;
+
DEBUG_PRINT_LOW("venc_set_operating_rate: %u fps", rate >> 16);
DEBUG_PRINT_LOW("Calling IOCTL set control for id=%d, val=%u", control.id, control.value);
+ if (!strncmp(venc_handle->m_platform, "bengal", 6) &&
+ (rate >> 16) > 30 && m_sVenc_cfg.codectype == V4L2_PIX_FMT_H264 &&
+ venc_handle->m_sParamAVC.eProfile ==
+ (OMX_VIDEO_AVCPROFILETYPE)QOMX_VIDEO_AVCProfileHigh &&
+ (m_sVenc_cfg.input_width * m_sVenc_cfg.input_height >= 1920 * 1080)) {
+ if (!reconfigure_avc_param(&venc_handle->m_sParamAVC)) {
+ DEBUG_PRINT_ERROR("reconfigure avc param fails");
+ }
+ }
+
if(ioctl(m_nDriver_fd, VIDIOC_S_CTRL, &control)) {
hw_overload = errno == EBUSY;
DEBUG_PRINT_ERROR("Failed to set operating rate %d fps (%s)",
@@ -4330,7 +4457,7 @@
return false;
} else {
DEBUG_PRINT_ERROR("ERROR: External CVP mode disabled for this session and continue!");
- clearMetaData(handle, SET_CVP_METADATA);
+ setMetaData(handle, SET_CVP_METADATA, 0);
}
} else {
DEBUG_PRINT_INFO("venc_cvp_enable: cvp metadata not available");
@@ -4375,7 +4502,7 @@
buf->flags &= ~V4L2_BUF_FLAG_CVPMETADATA_SKIP;
cvpMetadata.size = 0;
if (getMetaData(handle, GET_CVP_METADATA, &cvpMetadata) == 0) {
- clearMetaData(handle, SET_CVP_METADATA);
+ setMetaData(handle, SET_CVP_METADATA, 0);
if (cvpMetadata.size != CVP_METADATA_SIZE) {
DEBUG_PRINT_ERROR("ERROR: Invalid CVP metadata size %d",
cvpMetadata.size);
@@ -4385,6 +4512,9 @@
return false;
}
DEBUG_PRINT_LOW("CVP metadata size %d", cvpMetadata.size);
+ if (m_debug.cvp_log) {
+ venc_cvp_log_buffers("CVP", cvpMetadata.size, cvpMetadata.payload);
+ }
} else {
DEBUG_PRINT_ERROR("ERROR: CVP metadata not available");
return false;
@@ -4407,8 +4537,13 @@
bool venc_dev::venc_config_bitrate(OMX_VIDEO_CONFIG_BITRATETYPE *bit_rate)
{
+ OMX_U32 bitrate = bit_rate->nEncodeBitrate;
if (bit_rate->nPortIndex == (OMX_U32)PORT_INDEX_OUT) {
- if (venc_set_target_bitrate(bit_rate->nEncodeBitrate) == false) {
+ // If quality boost is eligible, also increase bitrate by 15% in dynamic change case
+ if (mQualityBoostEligible && bitrate < VENC_QUALITY_BOOST_BITRATE_THRESHOLD) {
+ bitrate += bitrate * 15 / 100;
+ }
+ if (venc_set_target_bitrate(bitrate) == false) {
DEBUG_PRINT_ERROR("ERROR: Setting Target Bit rate failed");
return false;
}
@@ -4611,7 +4746,10 @@
mastering_disp_info.primaries.rgbPrimaries[2][1],
mastering_disp_info.primaries.whitePoint[0],
mastering_disp_info.primaries.whitePoint[1],
- mastering_disp_info.maxDisplayLuminance,
+ // maxDisplayLuminance is in cd/m^2 scale. But the standard requires this field
+ // to be in 0.0001 cd/m^2 scale. So, multiply with LUMINANCE_MULTIPLICATION_FACTOR
+ // and give to be driver
+ mastering_disp_info.maxDisplayLuminance * LUMINANCE_MULTIPLICATION_FACTOR,
mastering_disp_info.minDisplayLuminance,
content_light_level_info.maxContentLightLevel,
content_light_level_info.minPicAverageLightLevel
@@ -4836,3 +4974,55 @@
return data->nSize;
}
+void venc_dev::venc_set_quality_boost(OMX_BOOL c2d_enable)
+{
+ OMX_U32 initial_qp;
+ OMX_QCOM_VIDEO_PARAM_IPB_QPRANGETYPE qp_range;
+ OMX_QTI_VIDEO_CONFIG_BLURINFO blurinfo;
+
+ // Conditions to enable encoder quality boost,
+ // 1. Codec is AVC
+ // 2. RCMode is VBR
+ // 3. Input is RGBA/RGBA_UBWC (C2D enabled)
+ // 4. width <= 960 and height <= 960
+ // 5. width >= 400 and height >= 400
+ // 6. FPS <= 30
+ // 7. bitrate < 2Mbps
+
+ if (mQualityBoostRequested && c2d_enable &&
+ m_sVenc_cfg.codectype == V4L2_PIX_FMT_H264 &&
+ rate_ctrl.rcmode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR &&
+ m_sVenc_cfg.dvs_width <= 960 && m_sVenc_cfg.dvs_height <= 960 &&
+ m_sVenc_cfg.dvs_width >= 400 && m_sVenc_cfg.dvs_height >= 400 &&
+ (m_sVenc_cfg.fps_num / m_sVenc_cfg.fps_den) <= 30 &&
+ bitrate.target_bitrate < VENC_QUALITY_BOOST_BITRATE_THRESHOLD) {
+ mQualityBoostEligible = true;
+ DEBUG_PRINT_HIGH("Quality boost eligible encoder session");
+ } else {
+ return;
+ }
+
+ if (bitrate.target_bitrate <= 64000)
+ venc_set_level(OMX_VIDEO_AVCLevel1);
+
+ // Set below configurations to boost quality
+ // 1. Increase bitrate by 15%
+ bitrate.target_bitrate += bitrate.target_bitrate * 15 / 100;
+ venc_set_target_bitrate(bitrate.target_bitrate);
+
+ // 2. Set initial QP=30
+ initial_qp = 30;
+ venc_set_qp(initial_qp, initial_qp, initial_qp, 7);
+
+ // 3. Set QP range [10,40]
+ qp_range.minIQP = qp_range.minPQP = qp_range.minBQP = 10;
+ qp_range.maxIQP = qp_range.maxPQP = qp_range.maxBQP = 40;
+ venc_set_session_qp_range(&qp_range);
+
+ // 4. Disable blur (both external and internal)
+ blurinfo.nBlurInfo = 2;
+ venc_set_blur_resolution(&blurinfo);
+
+ // 5. Disable bitrate savings (CAC)
+ venc_set_bitrate_savings_mode(0);
+}
diff --git a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2_params.cpp b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2_params.cpp
index ef55daa..3bfcd98 100644
--- a/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2_params.cpp
+++ b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2_params.cpp
@@ -1,5 +1,5 @@
/*--------------------------------------------------------------------------
-Copyright (c) 2010-2019, The Linux Foundation. All rights reserved.
+Copyright (c) 2010-2020, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -63,6 +63,15 @@
DEBUG_PRINT_INFO("Clear UBWC consumer usage bits as 8-bit linear color requested");
}
+ if (venc_handle->is_flip_conv_needed(NULL))
+ *usage = *usage | GRALLOC_USAGE_SW_READ_OFTEN;
+
+ if (m_codec == OMX_VIDEO_CodingImageHEIC) {
+ DEBUG_PRINT_INFO("Clear UBWC and set HEIF consumer usage bit");
+ *usage &= ~GRALLOC_USAGE_PRIVATE_ALLOC_UBWC;
+ *usage |= GRALLOC_USAGE_PRIVATE_HEIF_VIDEO;
+ }
+
DEBUG_PRINT_INFO("venc_get_consumer_usage 0x%x", *usage);
}
@@ -129,10 +138,18 @@
OMX_CONFIG_MIRRORTYPE *mirror = (OMX_CONFIG_MIRRORTYPE*) configData;
DEBUG_PRINT_LOW("venc_set_param: OMX_IndexConfigCommonMirror");
- if (venc_set_mirror(mirror->eMirror) == false) {
+ if (!venc_handle->m_no_vpss && venc_set_mirror(mirror->eMirror) == false) {
DEBUG_PRINT_ERROR("ERROR: Setting OMX_IndexConfigCommonMirror failed");
return false;
+ } else if(venc_handle->m_no_vpss) {
+ if ((venc_handle->m_nOperatingRate >> 16) <= 30) {
+ venc_handle->initFastCV();
+ } else {
+ DEBUG_PRINT_ERROR("ERROR: Flip not supported fps %u",
+ venc_handle->m_nOperatingRate >> 16);
+ }
}
+
break;
}
case OMX_IndexConfigCommonRotate:
@@ -144,7 +161,7 @@
return false;
}
- if (venc_handle->m_c2d_rotation) {
+ if (venc_handle->m_no_vpss) {
if (venc_prepare_c2d_rotation(config_rotation->nRotation) == false) {
DEBUG_PRINT_ERROR("ERROR: venc_prepare_c2d_rotation failed");
return false;
@@ -387,6 +404,12 @@
case ColorAspects::TransferSRGB:
transfer_chars = MSM_VIDC_TRANSFER_SRGB;
break;
+ case ColorAspects::TransferST2084:
+ transfer_chars = MSM_VIDC_TRANSFER_SMPTE_ST2084;
+ break;
+ case ColorAspects::TransferHLG:
+ transfer_chars = MSM_VIDC_TRANSFER_HLG;
+ break;
default:
//params->sAspects.mTransfer = ColorAspects::TransferSMPTE170M;
transfer_chars = MSM_VIDC_TRANSFER_601_6_625;
@@ -451,6 +474,14 @@
}
break;
}
+ case OMX_QTIIndexConfigContentAdaptiveCoding:
+ {
+ if(!venc_set_bitrate_savings_mode(*(OMX_U32*) configData)) {
+ DEBUG_PRINT_LOW("Failed to set Bitrate Savings Mode");
+ return false;
+ }
+ break;
+ }
default:
DEBUG_PRINT_ERROR("Unsupported config index = %u", index);
break;
@@ -736,7 +767,10 @@
pParam->eProfile);
return false;
}
-
+ if(!venc_set_level(pParam->eLevel)) {
+ DEBUG_PRINT_ERROR("ERROR: Unsuccessful in updating level");
+ return false;
+ }
if (set_nP_frames(pParam->nPFrames) == false ||
(pParam->nBFrames && set_nB_frames(pParam->nBFrames) == false)) {
DEBUG_PRINT_ERROR("ERROR: Request for setting intra period failed");
@@ -1246,6 +1280,17 @@
return false;
}
+ if (m_disable_hdr & ENC_HDR_DISABLE_FLAG) {
+ if (m_sVenc_cfg.codectype == V4L2_PIX_FMT_HEVC) {
+ if (eProfile == OMX_VIDEO_HEVCProfileMain10 ||
+ eProfile == OMX_VIDEO_HEVCProfileMain10HDR10 ||
+ eProfile == OMX_VIDEO_HEVCProfileMain10HDR10Plus) {
+ DEBUG_PRINT_ERROR("%s: HDR profile unsupported", __FUNCTION__);
+ return false;
+ }
+ }
+ }
+
if (!profile_level_converter::convert_omx_profile_to_v4l2(m_sVenc_cfg.codectype, eProfile, &control.value)) {
DEBUG_PRINT_ERROR("Cannot find v4l2 profile for OMX profile : %d Codec : %lu ",
eProfile, m_sVenc_cfg.codectype);
@@ -1590,6 +1635,23 @@
return codectype;
}
+bool venc_dev::venc_set_bitrate_savings_mode(OMX_U32 bitrateSavingEnable)
+{
+ struct v4l2_control control;
+ int rc = 0;
+
+ DEBUG_PRINT_LOW("Set bitrate savings %d", bitrateSavingEnable);
+ control.id = V4L2_CID_MPEG_VIDC_VENC_BITRATE_SAVINGS;
+ control.value = bitrateSavingEnable;
+ rc = ioctl(m_nDriver_fd, VIDIOC_S_CTRL, &control);
+ if (rc) {
+ DEBUG_PRINT_HIGH("Non-Fatal: Request to set bitrate savings failed");
+ }
+ mBitrateSavingsEnable = bitrateSavingEnable;
+
+ return true;
+}
+
bool venc_dev::venc_set_ratectrl_cfg(OMX_VIDEO_CONTROLRATETYPE eControlRate)
{
bool status = true;
@@ -1651,13 +1713,7 @@
rate_ctrl.rcmode = control.value;
}
- DEBUG_PRINT_LOW("Set bitrate savings %d", mBitrateSavingsEnable);
- control.id = V4L2_CID_MPEG_VIDC_VENC_BITRATE_SAVINGS;
- control.value = mBitrateSavingsEnable;
- rc = ioctl(m_nDriver_fd, VIDIOC_S_CTRL, &control);
- if (rc) {
- DEBUG_PRINT_HIGH("Non-Fatal: Request to set bitrate savings failed");
- }
+ venc_set_bitrate_savings_mode(mBitrateSavingsEnable);
return status;
}
diff --git a/product.mk b/product.mk
index a303b79..0fc0212 100644
--- a/product.mk
+++ b/product.mk
@@ -1,6 +1,6 @@
MSM_VIDC_TARGET_LIST := kona lito bengal
-ifeq ($(call is-board-platform-in-list, $(QCOM_BOARD_PLATFORMS)),true)
+ifneq (,$(call is-board-platform-in-list2, $(QCOM_BOARD_PLATFORMS)))
#MM_CORE
MM_CORE := libmm-omxcore
@@ -10,7 +10,7 @@
endif
-ifeq ($(call is-board-platform-in-list, $(MSM_VIDC_TARGET_LIST)), true)
+ifneq (,$(call is-board-platform-in-list2, $(MSM_VIDC_TARGET_LIST)))
MM_VIDEO := ExoplayerDemo
MM_VIDEO += libc2dcolorconvert
@@ -19,6 +19,7 @@
MM_VIDEO += libOmxVdec
MM_VIDEO += libOmxVenc
MM_VIDEO += libstagefrighthw
+MM_VIDEO += init.qti.media.sh
PRODUCT_PACKAGES += $(MM_VIDEO)