Merge Android 12
Bug: 202323961
Merged-In: I7b09b730f08983d74daa74d7410a533428738c81
Change-Id: I5affd455fa2d794294c1a952e24ea93e3951c29a
diff --git a/Android.mk b/Android.mk
index a326b2d..17479e6 100644
--- a/Android.mk
+++ b/Android.mk
@@ -18,5 +18,6 @@
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 9ee35f3..664cd0c 100644
--- a/conf_files/bengal/bengal.mk
+++ b/conf_files/bengal/bengal.mk
@@ -7,20 +7,26 @@
$(CONFIG_PATH)/media_codecs_vendor_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_audio.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_v0.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
-ifeq ($(filter $(TARGET_BOARD_SUFFIX), _32 _32go),$(TARGET_BOARD_SUFFIX))
+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
+ $(CONFIG_PATH)/media_codecs_vendor_scuba_v0_32.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v2.xml \
+ $(CONFIG_PATH)/media_codecs_vendor_khaje_v0_32.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v3.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_scuba_v0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v2.xml \
+ $(CONFIG_PATH)/media_codecs_vendor_khaje_v0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_vendor_v3.xml
endif
# Vendor property overrides
@@ -31,8 +37,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 273ecf6..411a524 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 |
|__________|_________________________________________|
@@ -111,8 +111,8 @@
______________________________________________________
| Codec | W H fps Mbps MB/s |
|__________|_________________________________________|
- | h264 | 1920 1088 60 60 489600 |
- | hevc | 1920 1088 60 60 489600 |
+ | 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 |
|__________|_________________________________________|
@@ -133,12 +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="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="60" />
- <Limit name="performance-point-1280x720" value="120" />
+ <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" />
@@ -147,21 +148,22 @@
<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" />
<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" />
+ <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" />
@@ -217,13 +219,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-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" />
+ <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" />
@@ -231,7 +234,7 @@
<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" />
@@ -245,13 +248,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-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" />
+ <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" />
@@ -259,7 +263,7 @@
<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" />
@@ -273,13 +277,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-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" />
+ <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" />
@@ -287,7 +292,7 @@
<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" />
diff --git a/conf_files/bengal/media_codecs_performance.xml b/conf_files/bengal/media_codecs_performance.xml
index 2e94378..bb025c0 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" />
diff --git a/conf_files/bengal/media_codecs_performance_khaje_v0.xml b/conf_files/bengal/media_codecs_performance_khaje_v0.xml
new file mode 100644
index 0000000..4185b1c
--- /dev/null
+++ b/conf_files/bengal/media_codecs_performance_khaje_v0.xml
@@ -0,0 +1,177 @@
+<?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="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" />
+ </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_scuba_v0.xml b/conf_files/bengal/media_codecs_performance_scuba_v0.xml
index 3c8f92b..6b8ad28 100644
--- a/conf_files/bengal/media_codecs_performance_scuba_v0.xml
+++ b/conf_files/bengal/media_codecs_performance_scuba_v0.xml
@@ -34,12 +34,15 @@
<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" />
+ <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="125-135" />
+ <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" />
@@ -64,12 +67,13 @@
</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="130-175" />
+ <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="119-168" />
+ <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" />
@@ -80,7 +84,7 @@
</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-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" />
@@ -102,10 +106,11 @@
<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="220-220" />
+ <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">
diff --git a/conf_files/bengal/media_codecs_performance_v1.xml b/conf_files/bengal/media_codecs_performance_v1.xml
index 2e94378..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" />
diff --git a/conf_files/bengal/media_codecs_vendor.xml b/conf_files/bengal/media_codecs_vendor.xml
index dc7a1a4..53dafcc 100644
--- a/conf_files/bengal/media_codecs_vendor.xml
+++ b/conf_files/bengal/media_codecs_vendor.xml
@@ -162,7 +162,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/bengal/media_codecs_vendor_32.xml b/conf_files/bengal/media_codecs_vendor_32.xml
index 16a7080..8b08088 100644
--- a/conf_files/bengal/media_codecs_vendor_32.xml
+++ b/conf_files/bengal/media_codecs_vendor_32.xml
@@ -150,7 +150,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/bengal/media_codecs_vendor_audio.xml b/conf_files/bengal/media_codecs_vendor_audio.xml
index 0cd3294..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,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/bengal/media_codecs_vendor_khaje_v0.xml b/conf_files/bengal/media_codecs_vendor_khaje_v0.xml
new file mode 100644
index 0000000..33b5f26
--- /dev/null
+++ b/conf_files/bengal/media_codecs_vendor_khaje_v0.xml
@@ -0,0 +1,351 @@
+<?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 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_khaje_v0_32.xml b/conf_files/bengal/media_codecs_vendor_khaje_v0_32.xml
new file mode 100644
index 0000000..4bc0064
--- /dev/null
+++ b/conf_files/bengal/media_codecs_vendor_khaje_v0_32.xml
@@ -0,0 +1,297 @@
+<?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 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_scuba_v0.xml b/conf_files/bengal/media_codecs_vendor_scuba_v0.xml
index e674234..2346071 100644
--- a/conf_files/bengal/media_codecs_vendor_scuba_v0.xml
+++ b/conf_files/bengal/media_codecs_vendor_scuba_v0.xml
@@ -164,7 +164,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/bengal/media_codecs_vendor_scuba_v0_32.xml b/conf_files/bengal/media_codecs_vendor_scuba_v0_32.xml
index a2214e7..b5b97c0 100644
--- a/conf_files/bengal/media_codecs_vendor_scuba_v0_32.xml
+++ b/conf_files/bengal/media_codecs_vendor_scuba_v0_32.xml
@@ -152,7 +152,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/bengal/media_codecs_vendor_v1.xml b/conf_files/bengal/media_codecs_vendor_v1.xml
index e674234..2346071 100644
--- a/conf_files/bengal/media_codecs_vendor_v1.xml
+++ b/conf_files/bengal/media_codecs_vendor_v1.xml
@@ -164,7 +164,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/bengal/media_codecs_vendor_v1_32.xml b/conf_files/bengal/media_codecs_vendor_v1_32.xml
index a2214e7..b5b97c0 100644
--- a/conf_files/bengal/media_codecs_vendor_v1_32.xml
+++ b/conf_files/bengal/media_codecs_vendor_v1_32.xml
@@ -152,7 +152,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/bengal/media_profiles.xml b/conf_files/bengal/media_profiles.xml
index d3ceb1d..9623b91 100644
--- a/conf_files/bengal/media_profiles.xml
+++ b/conf_files/bengal/media_profiles.xml
@@ -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>
@@ -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..facb240
--- /dev/null
+++ b/conf_files/bengal/media_profiles_khaje.xml
@@ -0,0 +1,1197 @@
+<?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) #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/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 545b5f4..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,9 +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 76c03de..a0a50aa 100644
--- a/conf_files/kona/kona.mk
+++ b/conf_files/kona/kona.mk
@@ -3,9 +3,9 @@
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_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_vendor.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 \
@@ -30,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_performance.xml b/conf_files/kona/media_codecs_performance.xml
index d9ac7e8..ff66263 100644
--- a/conf_files/kona/media_codecs_performance.xml
+++ b/conf_files/kona/media_codecs_performance.xml
@@ -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">
@@ -44,12 +44,12 @@
</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="56-81" />
+ <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>
@@ -96,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>
@@ -187,18 +188,18 @@
<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="573-1136" />
<Limit name="measured-frame-rate-640x360" range="200-450" />
- <Limit name="measured-frame-rate-1280x720" range="190-244" />
+ <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="601-1177" />
- <Limit name="measured-frame-rate-640x360" range="222-302" />
+ <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_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/lito/lito.mk b/conf_files/lito/lito.mk
index 59a583c..9b8cffe 100644
--- a/conf_files/lito/lito.mk
+++ b/conf_files/lito/lito.mk
@@ -33,9 +33,7 @@
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 += \
diff --git a/conf_files/lito/media_codecs.xml b/conf_files/lito/media_codecs.xml
index 3b0af5b..699f935 100644
--- a/conf_files/lito/media_codecs.xml
+++ b/conf_files/lito/media_codecs.xml
@@ -175,7 +175,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_codecs_performance.xml b/conf_files/lito/media_codecs_performance.xml
index cbdac98..e4e44d4 100644
--- a/conf_files/lito/media_codecs_performance.xml
+++ b/conf_files/lito/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="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" />
@@ -45,7 +48,7 @@
</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>
diff --git a/conf_files/lito/media_codecs_performance_lagoon_v0.xml b/conf_files/lito/media_codecs_performance_lagoon_v0.xml
index b8af425..043dc01 100644
--- a/conf_files/lito/media_codecs_performance_lagoon_v0.xml
+++ b/conf_files/lito/media_codecs_performance_lagoon_v0.xml
@@ -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-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="226-226" />
+ <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" />
@@ -41,7 +44,7 @@
<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="75-130" />
</MediaCodec>
<MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
<Limit name="measured-frame-rate-320x240" range="215-215" />
@@ -88,18 +91,18 @@
<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" />
+ <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="210-230" />
+ <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="292-292" />
+ <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" />
@@ -110,7 +113,7 @@
<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="220-220" />
+ <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">
@@ -150,13 +153,13 @@
<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="115-169" />
+ <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="128-178" />
+ <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" />
@@ -167,17 +170,18 @@
<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="374-542" />
+ <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="65-91" />
- <Limit name="measured-frame-rate-1280x720" range="34-49" />
+ <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>
diff --git a/conf_files/lito/media_codecs_performance_lagoon_v1.xml b/conf_files/lito/media_codecs_performance_lagoon_v1.xml
index b8af425..da92aea 100644
--- a/conf_files/lito/media_codecs_performance_lagoon_v1.xml
+++ b/conf_files/lito/media_codecs_performance_lagoon_v1.xml
@@ -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-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="226-226" />
+ <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" />
@@ -41,7 +44,7 @@
<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="75-130" />
</MediaCodec>
<MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
<Limit name="measured-frame-rate-320x240" range="215-215" />
@@ -88,18 +91,18 @@
<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" />
+ <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="210-230" />
+ <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="292-292" />
+ <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" />
@@ -110,7 +113,7 @@
<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="220-220" />
+ <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">
@@ -150,13 +153,13 @@
<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="115-169" />
+ <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="128-178" />
+ <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" />
@@ -167,17 +170,18 @@
<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="374-542" />
+ <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="65-91" />
- <Limit name="measured-frame-rate-1280x720" range="34-49" />
+ <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>
diff --git a/conf_files/lito/media_codecs_performance_v1.xml b/conf_files/lito/media_codecs_performance_v1.xml
index 27048cb..d02b672 100644
--- a/conf_files/lito/media_codecs_performance_v1.xml
+++ b/conf_files/lito/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="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" />
@@ -45,7 +48,7 @@
</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>
diff --git a/conf_files/lito/media_codecs_vendor.xml b/conf_files/lito/media_codecs_vendor.xml
index f9a5cc3..705f3cd 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" />
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
index 282c42d..689bcd0 100644
--- a/conf_files/lito/media_codecs_vendor_lagoon_v0.xml
+++ b/conf_files/lito/media_codecs_vendor_lagoon_v0.xml
@@ -167,7 +167,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_codecs_vendor_lagoon_v1.xml b/conf_files/lito/media_codecs_vendor_lagoon_v1.xml
index 9ee2141..21815f3 100644
--- a/conf_files/lito/media_codecs_vendor_lagoon_v1.xml
+++ b/conf_files/lito/media_codecs_vendor_lagoon_v1.xml
@@ -167,7 +167,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_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/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 b29279e..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)
diff --git a/libplatformconfig/PlatformConfig.h b/libplatformconfig/PlatformConfig.h
index d758860..be23673 100644
--- a/libplatformconfig/PlatformConfig.h
+++ b/libplatformconfig/PlatformConfig.h
@@ -74,7 +74,7 @@
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,
@@ -101,7 +101,7 @@
{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"},
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..74ff277
--- /dev/null
+++ b/media-prop/init.qti.media.rc
@@ -0,0 +1,43 @@
+#==============================================================================
+# init.qti.media.rc
+#
+# Copyright (c) 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:
+# * 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
+ 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..fa9f77f
--- /dev/null
+++ b/media-prop/init.qti.media.sh
@@ -0,0 +1,61 @@
+#! /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.
+#===============================================================================
+
+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
+ ;;
+ *)
+ 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
+ ;;
+ esac
+ ;;
+esac
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/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 8ec43ef..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
@@ -51,5 +51,5 @@
};
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 279e297..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
@@ -54,3 +54,4 @@
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/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 d4d6d66..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;
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/inc/omx_vdec.h b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
index 9fbe6db..dab7b75 100644
--- a/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
+++ b/mm-video-v4l2/vidc/vdec/inc/omx_vdec.h
@@ -1201,7 +1201,8 @@
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;
diff --git a/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp b/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp
index fcf7626..6ce7eb6 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_swvdec.cpp
@@ -192,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);
@@ -1177,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)
@@ -3184,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);
@@ -3574,7 +3545,6 @@
OMX_U32 size)
{
OMX_ERRORTYPE retval = OMX_ErrorNone;
- SWVDEC_STATUS retval_swvdec = SWVDEC_STATUS_SUCCESS;
unsigned int ii;
@@ -3663,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,
@@ -3723,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)
@@ -3812,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,
@@ -3998,7 +3942,6 @@
OMX_U8 *p_buffer)
{
OMX_ERRORTYPE retval = OMX_ErrorNone;
- SWVDEC_STATUS retval_swvdec;
unsigned int ii;
(void) size;
@@ -4109,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 ?
@@ -4168,7 +4101,6 @@
OMX_BUFFERHEADERTYPE *p_buffer_hdr)
{
OMX_ERRORTYPE retval = OMX_ErrorNone;
- SWVDEC_STATUS retval_swvdec = SWVDEC_STATUS_SUCCESS;
unsigned int ii;
@@ -4202,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;
@@ -4275,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)
@@ -4311,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);
@@ -4333,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);
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 eb0db84..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:
@@ -584,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),
@@ -1078,7 +1079,6 @@
pThis->omx_report_error ();
break;
}
-#if !HDR10_SETMETADATA_ENABLE
if (pThis->m_cb.EventHandler) {
OMX_BUFFERHEADERTYPE * buffer = (OMX_BUFFERHEADERTYPE *)(intptr_t)p1;
if (buffer->nFilledLen && (pThis->output_capability == V4L2_PIX_FMT_HEVC ||
@@ -1096,7 +1096,6 @@
}
}
}
-#endif
if (pThis->fill_buffer_done(&pThis->m_cmp,
(OMX_BUFFERHEADERTYPE *)(intptr_t)p1) != OMX_ErrorNone ) {
DEBUG_PRINT_ERROR("fill_buffer_done failure");
@@ -2491,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);
}
}
@@ -2686,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);
@@ -3008,7 +3013,8 @@
}
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)
+ 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) {
@@ -3223,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, \
@@ -3303,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);
@@ -5022,8 +5049,6 @@
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);
@@ -5313,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;
@@ -5337,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;
@@ -6130,9 +6149,10 @@
output_capability == V4L2_PIX_FMT_MPEG2)
is_duplicate_ts_valid = false;
- time_stamp_dts.get_next_timestamp(buffer,
- is_interlaced && is_duplicate_ts_valid && !is_mbaff);
-
+ 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);
@@ -6171,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
@@ -6423,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;
@@ -6552,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);
@@ -6741,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);
@@ -7155,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;
@@ -7524,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, \
@@ -7569,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:
@@ -7899,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 ||
@@ -7909,7 +7936,9 @@
const ColorAspects &defaultColor = preferClientColor ?
m_internal_color_space.sAspects : m_client_color_space.sAspects;
- if ((m_client_color_space.sAspects.mPrimaries == ColorAspects::PrimariesBT2020) && (dpb_bit_depth == MSM_VIDC_BIT_DEPTH_8)) {
+ 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;
}
@@ -8125,17 +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
+//#endif
if(!is_hdr10_plus_info_found) {
store_hevc_hdr10plusinfo(payload_len, userdata_payload);
is_hdr10_plus_info_found = true;
}
-#endif
}
}
break;
@@ -8199,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);
}
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 463a347..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
@@ -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) {
@@ -1082,9 +1082,6 @@
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/venc/Android.mk b/mm-video-v4l2/vidc/venc/Android.mk
index a93f00e..9d34ce6 100644
--- a/mm-video-v4l2/vidc/venc/Android.mk
+++ b/mm-video-v4l2/vidc/venc/Android.mk
@@ -66,6 +66,7 @@
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
@@ -116,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
@@ -165,6 +167,7 @@
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)
LOCAL_SHARED_LIBRARIES += libui
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 9efdbca..a63edd5 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;
@@ -264,6 +264,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 +625,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(
@@ -782,7 +788,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 48c5c74..6c62fa6 100644
--- a/mm-video-v4l2/vidc/venc/inc/omx_video_encoder.h
+++ b/mm-video-v4l2/vidc/venc/inc/omx_video_encoder.h
@@ -72,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 291d505..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
@@ -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
@@ -313,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 *,
@@ -344,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);
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 61457c2..3532f50 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));
@@ -344,6 +347,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 ...");
}
@@ -459,7 +467,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!");
@@ -1302,6 +1309,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);
}
}
@@ -1454,7 +1462,6 @@
}
bRet = true;
- DEBUG_PRINT_LOW("Value of this pointer in post_event %p",this);
post_message(this, id);
pthread_mutex_unlock(&m_lock);
@@ -3067,6 +3074,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) {
@@ -3145,6 +3154,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");
@@ -3900,7 +3911,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;
@@ -3919,7 +3930,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;
}
@@ -4180,7 +4190,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 &&
@@ -4242,9 +4252,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;
@@ -4713,8 +4720,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;
}
@@ -4724,6 +4729,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++;
@@ -4762,13 +4768,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);
@@ -4935,6 +4941,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;
}
@@ -4944,6 +4955,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;
@@ -4962,7 +4978,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 &&
@@ -4978,10 +4993,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,
@@ -4994,14 +5008,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);
}
}
}
@@ -5020,6 +5026,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;
@@ -5037,9 +5119,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",
@@ -5136,7 +5216,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,
@@ -5147,9 +5227,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)",
@@ -5192,6 +5270,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);
@@ -5248,6 +5364,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) {
@@ -5287,6 +5404,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;
@@ -5375,6 +5514,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 4b6f46c..fb93713 100644
--- a/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp
+++ b/mm-video-v4l2/vidc/venc/src/omx_video_encoder.cpp
@@ -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()
@@ -2236,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);
@@ -2487,7 +2497,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/video_encoder_device_v4l2.cpp b/mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp
index a29918d..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
@@ -81,7 +81,6 @@
#define HEVC_MAIN10_START (HEVC_MAIN_START + 13)
#define POLL_TIMEOUT 1000
#define MAX_SUPPORTED_SLICES_PER_FRAME 28 /* Max supported slices with 32 output buffers */
-#define ENC_HDR_DISABLE_FLAG 0x2
#define SZ_4K 0x1000
#define SZ_1M 0x100000
@@ -99,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)
{
@@ -187,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)) ||
@@ -327,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
@@ -949,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);
@@ -1082,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;
@@ -1130,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",
@@ -1216,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()) {
@@ -1377,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);
@@ -1706,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,
@@ -2439,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)
{
@@ -2465,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;
@@ -2637,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");
@@ -2961,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) {
@@ -2980,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;
@@ -3119,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__);
@@ -3232,6 +3319,7 @@
return false;
}
+ print_v4l2_buffer("QBUF-FTB", &buf);
rc = ioctl(m_nDriver_fd, VIDIOC_QBUF, &buf);
if (rc) {
@@ -3526,7 +3614,7 @@
}
if (m_codec == OMX_VIDEO_CodingImageHEIC)
- format = V4L2_PIX_FMT_NV12;
+ format = V4L2_PIX_FMT_NV12_512;
return format;
}
@@ -3572,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;
@@ -4424,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;
@@ -4655,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
@@ -4891,13 +4985,15 @@
// 2. RCMode is VBR
// 3. Input is RGBA/RGBA_UBWC (C2D enabled)
// 4. width <= 960 and height <= 960
- // 5. FPS <= 30
- // 6. bitrate < 2Mbps
+ // 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;
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 0efc7ca..7001690 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
@@ -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;
@@ -1260,6 +1277,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);
diff --git a/product.mk b/product.mk
index a303b79..f763856 100644
--- a/product.mk
+++ b/product.mk
@@ -19,6 +19,7 @@
MM_VIDEO += libOmxVdec
MM_VIDEO += libOmxVenc
MM_VIDEO += libstagefrighthw
+MM_VIDEO += init.qti.media.sh
PRODUCT_PACKAGES += $(MM_VIDEO)