summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPradosh Das <prados@codeaurora.org>2020-06-23 09:47:22 +0530
committerPradosh Das <prados@codeaurora.org>2020-06-23 09:47:22 +0530
commit9eb8380718346e988720e494a4edae30fbc10705 (patch)
tree1cf7a4feafe77e48f62ea88ccffca86119e64255
parentc85e398500cc2c96085da8354af84ba4dd808cb5 (diff)
parent6f1cb2662004a1a3be39a9bced799424bb9436ef (diff)
Merge commit '6f1cb2662004a1a3be39a9bced799424bb9436ef' into HEAD
Change-Id: I79f3590fc654d30858c9185be8ba9dbcf8f181a4
-rw-r--r--conf_files/atoll/atoll.mk2
-rw-r--r--conf_files/atoll/media_codecs.xml6
-rw-r--r--conf_files/atoll/media_codecs_vendor.xml6
-rw-r--r--conf_files/msmnile/msmnile.mk3
-rw-r--r--conf_files/sm6150/media_codecs.xml12
-rw-r--r--conf_files/sm6150/sm6150.mk8
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp17
-rw-r--r--mm-video-v4l2/vidc/venc/src/video_encoder_device_v4l2.cpp7
-rw-r--r--product.mk2
9 files changed, 51 insertions, 12 deletions
diff --git a/conf_files/atoll/atoll.mk b/conf_files/atoll/atoll.mk
index aeecb4b3..d660bdd4 100644
--- a/conf_files/atoll/atoll.mk
+++ b/conf_files/atoll/atoll.mk
@@ -24,4 +24,6 @@ else
#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
+ PRODUCT_COPY_FILES += \
+ device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml
endif
diff --git a/conf_files/atoll/media_codecs.xml b/conf_files/atoll/media_codecs.xml
index 1d0185c2..48da4905 100644
--- a/conf_files/atoll/media_codecs.xml
+++ b/conf_files/atoll/media_codecs.xml
@@ -198,7 +198,9 @@ Only the three quirks included above are recognized at this point:
<Limit name="bitrate" range="1-2000000" />
<Limit name="frame-rate" range="1-30" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-864x480" value="30" />
<Limit name="performance-point-720x480" value="30" />
+ <Limit name="performance-point-720x576" value="25" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -211,7 +213,9 @@ Only the three quirks included above are recognized at this point:
<Limit name="bitrate" range="1-8000000" />
<Limit name="frame-rate" range="1-30" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-864x480" value="30" />
<Limit name="performance-point-720x480" value="30" />
+ <Limit name="performance-point-720x576" value="25" />
</MediaCodec>
</Encoders>
<Decoders>
@@ -360,7 +364,9 @@ Only the three quirks included above are recognized at this point:
<Limit name="frame-rate" range="1-30" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-864x480" value="30" />
<Limit name="performance-point-720x480" value="30" />
+ <Limit name="performance-point-720x576" value="25" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
<Quirk name="requires-allocate-on-input-ports" />
diff --git a/conf_files/atoll/media_codecs_vendor.xml b/conf_files/atoll/media_codecs_vendor.xml
index 959da1c4..49234b07 100644
--- a/conf_files/atoll/media_codecs_vendor.xml
+++ b/conf_files/atoll/media_codecs_vendor.xml
@@ -211,7 +211,9 @@ Only the three quirks included above are recognized at this point:
<Limit name="bitrate" range="1-2000000" />
<Limit name="frame-rate" range="1-30" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-864x480" value="30" />
<Limit name="performance-point-720x480" value="30" />
+ <Limit name="performance-point-720x576" value="25" />
</MediaCodec>
<MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" >
<Quirk name="requires-allocate-on-input-ports" />
@@ -224,7 +226,9 @@ Only the three quirks included above are recognized at this point:
<Limit name="bitrate" range="1-8000000" />
<Limit name="frame-rate" range="1-30" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-864x480" value="30" />
<Limit name="performance-point-720x480" value="30" />
+ <Limit name="performance-point-720x576" value="25" />
</MediaCodec>
</Encoders>
<Decoders>
@@ -373,7 +377,9 @@ Only the three quirks included above are recognized at this point:
<Limit name="frame-rate" range="1-30" />
<Feature name="adaptive-playback" />
<Limit name="concurrent-instances" max="16" />
+ <Limit name="performance-point-864x480" value="30" />
<Limit name="performance-point-720x480" value="30" />
+ <Limit name="performance-point-720x576" value="25" />
</MediaCodec>
<MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es">
<Quirk name="requires-allocate-on-input-ports" />
diff --git a/conf_files/msmnile/msmnile.mk b/conf_files/msmnile/msmnile.mk
index 5c723b2d..34944439 100644
--- a/conf_files/msmnile/msmnile.mk
+++ b/conf_files/msmnile/msmnile.mk
@@ -36,9 +36,8 @@ else ifneq ($(TARGET_FWK_SUPPORTS_AV_VALUEADDS),false)
#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
- PRODUCT_PROPERTY_OVERRIDES += media.settings.xml=/vendor/etc/media_profiles_vendor.xml
PRODUCT_COPY_FILES += \
- $(CONFIG_PATH)/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml \
+ device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml \
$(CONFIG_PATH)/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml
else
diff --git a/conf_files/sm6150/media_codecs.xml b/conf_files/sm6150/media_codecs.xml
index 4ba2b135..b76d0da8 100644
--- a/conf_files/sm6150/media_codecs.xml
+++ b/conf_files/sm6150/media_codecs.xml
@@ -169,6 +169,18 @@ Only the three quirks included above are recognized at this point:
<Limit name="performance-point-3840x2160" value="30" />
<Limit name="performance-point-1920x1080" value="120" />
<Limit name="performance-point-1280x720" value="240" />
+ <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="frame-rate" range="1-20" />
+ <Limit name="concurrent-instances" max="16" />
+ <Limit name="quality" range="0-100" default="80" />
+ <Limit name="performance-point-512x512" value="480" />
+ <Feature name="bitrate-modes" value="CQ" />
+ </MediaCodec>
</MediaCodec>
<!-- Video Software -->
<MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" >
diff --git a/conf_files/sm6150/sm6150.mk b/conf_files/sm6150/sm6150.mk
index 547951e8..565f61a3 100644
--- a/conf_files/sm6150/sm6150.mk
+++ b/conf_files/sm6150/sm6150.mk
@@ -40,7 +40,7 @@ ifeq ($(GENERIC_ODM_IMAGE),true)
PRODUCT_COPY_FILES += \
device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml \
device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml
-else
+else ifneq ($(TARGET_FWK_SUPPORTS_AV_VALUEADDS),false)
$(warning "Enabling codec2.0 SW only for non-generic odm build variant")
DEVICE_MANIFEST_FILE += hardware/qcom/media/conf_files/sm6150/c2_manifest.xml
#Rank OMX SW codecs lower than OMX HW codecs
@@ -50,4 +50,10 @@ else
PRODUCT_COPY_FILES += \
device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml \
$(CONFIG_PATH)/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml
+else
+ $(warning "Compiling without value-added features")
+ DEVICE_MANIFEST_FILE += hardware/qcom/media/conf_files/msmnile/c2_manifest.xml
+ PRODUCT_COPY_FILES += \
+ device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_ODM)/etc/media_profiles_V1_0.xml \
+ device/qcom/common/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml
endif
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 011fbdc0..6bb39b6d 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -1140,7 +1140,8 @@ OMX_ERRORTYPE omx_vdec::decide_dpb_buffer_mode()
capture_capability = V4L2_PIX_FMT_SDE_Y_CBCR_H2V2_P010_VENUS;
capability_changed = true;
}
- } else if (m_progressive == MSM_VIDC_PIC_STRUCT_PROGRESSIVE) {
+ } else if (m_progressive == MSM_VIDC_PIC_STRUCT_PROGRESSIVE &&
+ eCompressionFormat != OMX_VIDEO_CodingMPEG2) {
enable_split = true;
} else {
// Hardware does not support NV12+interlace clips.
@@ -8986,6 +8987,11 @@ int omx_vdec::async_message_process (void *context, void* message)
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;
@@ -9162,12 +9168,6 @@ int omx_vdec::async_message_process (void *context, void* message)
((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);
@@ -12608,7 +12608,8 @@ bool omx_vdec::allocate_color_convert_buf::set_color_format(
DEBUG_PRINT_LOW("Enabling C2D");
if (dest_color_format == OMX_COLOR_FormatYUV420Planar ||
dest_color_format == OMX_COLOR_FormatYUV420SemiPlanar ||
- (omx->m_progressive != MSM_VIDC_PIC_STRUCT_PROGRESSIVE &&
+ ((omx->m_progressive != MSM_VIDC_PIC_STRUCT_PROGRESSIVE ||
+ omx->eCompressionFormat == OMX_VIDEO_CodingMPEG2) &&
dest_color_format == (OMX_COLOR_FORMATTYPE)QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m)) {
ColorFormat = dest_color_format;
if (dest_color_format == OMX_COLOR_FormatYUV420Planar) {
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 bd12c3d6..4713294a 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
@@ -120,6 +120,8 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#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)
{
@@ -7670,7 +7672,10 @@ bool venc_dev::venc_set_hdr_info(const MasteringDisplay& mastering_disp_info,
ctrl[8].value = mastering_disp_info.primaries.whitePoint[1];
ctrl[9].id = V4L2_CID_MPEG_VIDC_VENC_MAX_DISP_LUM;
- ctrl[9].value = 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
+ ctrl[9].value = mastering_disp_info.maxDisplayLuminance * LUMINANCE_MULTIPLICATION_FACTOR;
ctrl[10].id = V4L2_CID_MPEG_VIDC_VENC_MIN_DISP_LUM;
ctrl[10].value = mastering_disp_info.minDisplayLuminance;
diff --git a/product.mk b/product.mk
index 319290b3..ddffee39 100644
--- a/product.mk
+++ b/product.mk
@@ -24,6 +24,8 @@ PRODUCT_PACKAGES += $(MM_VIDEO)
ifeq ($(call is-board-platform-in-list, msmnile $(MSMSTEPPE) atoll $(TRINKET)),true)
include hardware/qcom/media/conf_files/$(TARGET_BOARD_PLATFORM)/$(TARGET_BOARD_PLATFORM).mk
+else ifeq ($(TARGET_BOARD_PLATFORM), sdmshrike)
+include hardware/qcom/media/conf_files/msmnile/msmnile.mk
endif
endif