summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjay Singh <sisanj@codeaurora.org>2018-09-11 21:44:46 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2018-09-19 22:23:18 -0700
commitc0f2c6bc5c19ecd578c51601b7b503a11538379e (patch)
tree1f93dd4defc47edd8e00ad879d02856dbb42df04
parent5a6f70d45d18ad9cb01a17a04bf6d1fa195789ca (diff)
downloadandroid_hardware_qcom_media-c0f2c6bc5c19ecd578c51601b7b503a11538379e.tar.gz
android_hardware_qcom_media-c0f2c6bc5c19ecd578c51601b7b503a11538379e.tar.bz2
android_hardware_qcom_media-c0f2c6bc5c19ecd578c51601b7b503a11538379e.zip
mm-video-v4l2: vdec: Disable publication of 10 bit HEVC support
Disabled publication of HEVC 10 bit profiles for targets which does not support 10 bit decoding. Change-Id: Id61601601c959bff557136385ccb509f33992c99
-rw-r--r--mm-video-v4l2/vidc/vdec/Android.mk5
-rw-r--r--mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp2
2 files changed, 7 insertions, 0 deletions
diff --git a/mm-video-v4l2/vidc/vdec/Android.mk b/mm-video-v4l2/vidc/vdec/Android.mk
index ea8f8cad..7466039a 100644
--- a/mm-video-v4l2/vidc/vdec/Android.mk
+++ b/mm-video-v4l2/vidc/vdec/Android.mk
@@ -35,6 +35,7 @@ TARGETS_THAT_NEED_SW_VDEC := msm8937 msm8909
TARGETS_THAT_SUPPORT_MAX_H264_LEVEL_42 := msm8937
TARGETS_THAT_SUPPORT_MAX_H264_LEVEL_51 := msm8953 sdm660
TARGETS_THAT_SUPPORT_MAX_H264_LEVEL_52 := msm8996 msm8998 apq8098_latv
+TARGETS_THAT_DOES_NOT_SUPPORT_HEVC_HDR_10 := msm8909 msm8937 msm8953
ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_USE_HEVC_ADSP_HEAP)),true)
libmm-vdec-def += -D_HEVC_USE_ADSP_HEAP_
@@ -69,6 +70,10 @@ ifeq ($(call is-platform-sdk-version-at-least,27),true) # O-MR1
libmm-vdec-def += -D_ANDROID_O_MR1_DIVX_CHANGES
endif
+ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_DOES_NOT_SUPPORT_HEVC_HDR_10)),true)
+libmm-vdec-def += -DHEVC_PROFILE_HDR10_NOT_SUPPORTED
+endif
+
libmm-vdec-def += -D_QUERY_DISP_RES_
include $(CLEAR_VARS)
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 edb35164..78db9156 100644
--- a/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
+++ b/mm-video-v4l2/vidc/vdec/src/omx_vdec_v4l2.cpp
@@ -3729,12 +3729,14 @@ OMX_ERRORTYPE omx_vdec::get_supported_profile_level(OMX_VIDEO_PARAM_PROFILELEVEL
if (profileLevelType->nProfileIndex == 0) {
profileLevelType->eProfile = OMX_VIDEO_HEVCProfileMain;
profileLevelType->eLevel = OMX_VIDEO_HEVCMainTierLevel51;
+#ifndef HEVC_PROFILE_HDR10_NOT_SUPPORTED
} else if (profileLevelType->nProfileIndex == 1) {
profileLevelType->eProfile = OMX_VIDEO_HEVCProfileMain10;
profileLevelType->eLevel = OMX_VIDEO_HEVCMainTierLevel51;
} else if (profileLevelType->nProfileIndex == 2) {
profileLevelType->eProfile = OMX_VIDEO_HEVCProfileMain10HDR10;
profileLevelType->eLevel = OMX_VIDEO_HEVCMainTierLevel51;
+#endif
} else {
DEBUG_PRINT_LOW("get_parameter: OMX_IndexParamVideoProfileLevelQuerySupported nProfileIndex ret NoMore %u",
(unsigned int)profileLevelType->nProfileIndex);