1LOCAL_PATH := $(call my-dir) 2include $(CLEAR_VARS) 3 4# --------------------------------------------------------------------------------- 5# Common definitons 6# --------------------------------------------------------------------------------- 7 8libmm-vdec-def := -D__alignx\(x\)=__attribute__\(\(__aligned__\(x\)\)\) 9libmm-vdec-def += -D__align=__alignx 10libmm-vdec-def += -Dinline=__inline 11libmm-vdec-def += -g -O3 12libmm-vdec-def += -DIMAGE_APPS_PROC 13libmm-vdec-def += -D_ANDROID_ 14libmm-vdec-def += -DCDECL 15libmm-vdec-def += -DT_ARM 16libmm-vdec-def += -DNO_ARM_CLZ 17libmm-vdec-def += -UENABLE_DEBUG_LOW 18libmm-vdec-def += -UENABLE_DEBUG_HIGH 19libmm-vdec-def += -DENABLE_DEBUG_ERROR 20libmm-vdec-def += -UINPUT_BUFFER_LOG 21libmm-vdec-def += -UOUTPUT_BUFFER_LOG 22libmm-vdec-def += -Wno-parentheses 23libmm-vdec-def += -D_ANDROID_ICS_ 24libmm-vdec-def += -D_MSM8974_ 25libmm-vdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT 26libmm-vdec-def += -DMAX_RES_1080P 27libmm-vdec-def += -DMAX_RES_1080P_EBI 28 29TARGETS_THAT_USE_HEVC_ADSP_HEAP := msm8226 msm8974 30TARGETS_THAT_HAVE_VENUS_HEVC := apq8084 msm8994 msm8996 31TARGETS_THAT_NEED_HEVC_LIB := msm8974 msm8610 msm8226 msm8916 32TARGETS_THAT_NEED_SW_HEVC := msm8974 msm8226 msm8916 33TARGETS_THAT_SUPPORT_UBWC := msm8996 titanium 34TARGETS_THAT_NEED_SW_VDEC := msm8937 35 36ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_USE_HEVC_ADSP_HEAP)),true) 37libmm-vdec-def += -D_HEVC_USE_ADSP_HEAP_ 38endif 39 40ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_HAVE_VENUS_HEVC)),true) 41libmm-vdec-def += -DVENUS_HEVC 42endif 43 44ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 45libmm-vdec-def += -DSMOOTH_STREAMING_DISABLED 46libmm-vdec-def += -DH264_PROFILE_LEVEL_CHECK 47endif 48 49ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_UBWC)),true) 50libmm-vdec-def += -D_UBWC_ 51endif 52 53ifeq ($(TARGET_USES_ION),true) 54libmm-vdec-def += -DUSE_ION 55endif 56 57ifneq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 18 ))" ))) 58libmm-vdec-def += -DANDROID_JELLYBEAN_MR1=1 59endif 60 61ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true) 62libmm-vdec-def += -DMASTER_SIDE_CP 63endif 64 65include $(CLEAR_VARS) 66 67# Common Includes 68libmm-vdec-inc := $(LOCAL_PATH)/inc 69libmm-vdec-inc += $(TOP)/hardware/qcom/media/msm8996/mm-video-v4l2/vidc/common/inc 70libmm-vdec-inc += $(TOP)/hardware/qcom/media/msm8996/mm-core/inc 71libmm-vdec-inc += $(TARGET_OUT_HEADERS)/qcom/display 72libmm-vdec-inc += $(TARGET_OUT_HEADERS)/adreno 73libmm-vdec-inc += $(TOP)/frameworks/native/include/media/openmax 74libmm-vdec-inc += $(TOP)/frameworks/native/include/media/hardware 75libmm-vdec-inc += $(TOP)/hardware/qcom/media/msm8996/libc2dcolorconvert 76libmm-vdec-inc += $(TOP)/frameworks/av/include/media/stagefright 77libmm-vdec-inc += $(TARGET_OUT_HEADERS)/mm-video/SwVdec 78libmm-vdec-inc += $(TARGET_OUT_HEADERS)/mm-video/swvdec 79ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) 80libmm-vdec-inc += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 81endif 82 83ifeq ($(PLATFORM_SDK_VERSION), 18) #JB_MR2 84libmm-vdec-def += -DANDROID_JELLYBEAN_MR2=1 85libmm-vdec-inc += $(TOP)/hardware/qcom/media/msm8996/libstagefrighthw 86endif 87 88# Common Dependencies 89ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) 90libmm-vdec-add-dep := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 91endif 92 93ifeq ($(call is-platform-sdk-version-at-least, 19),true) 94# This feature is enabled for Android KK+ 95libmm-vdec-def += -DADAPTIVE_PLAYBACK_SUPPORTED 96endif 97 98ifeq ($(call is-platform-sdk-version-at-least, 22),true) 99# This feature is enabled for Android LMR1 100libmm-vdec-def += -DFLEXYUV_SUPPORTED 101endif 102 103# --------------------------------------------------------------------------------- 104# Make the Shared library (libOmxVdec) 105# --------------------------------------------------------------------------------- 106 107include $(CLEAR_VARS) 108 109LOCAL_MODULE := libOmxVdec 110LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD 111LOCAL_LICENSE_CONDITIONS := notice 112LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE 113LOCAL_MODULE_TAGS := optional 114LOCAL_PROPRIETARY_MODULE := true 115LOCAL_CFLAGS := $(libmm-vdec-def) -Werror 116LOCAL_C_INCLUDES += $(libmm-vdec-inc) 117LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 118 119LOCAL_PRELINK_MODULE := false 120LOCAL_SHARED_LIBRARIES := liblog libutils libui libbinder libcutils libdl 121 122LOCAL_SHARED_LIBRARIES += libqdMetaData 123LOCAL_HEADER_LIBRARIES := copybit_headers gralloc_headers media_plugin_headers 124 125LOCAL_SRC_FILES := src/frameparser.cpp 126LOCAL_SRC_FILES += src/h264_utils.cpp 127LOCAL_SRC_FILES += src/ts_parser.cpp 128LOCAL_SRC_FILES += src/mp4_utils.cpp 129LOCAL_SRC_FILES += src/hevc_utils.cpp 130LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 131LOCAL_SRC_FILES += src/omx_vdec_v4l2.cpp 132 133LOCAL_CFLAGS += -Wno-error 134 135include $(BUILD_SHARED_LIBRARY) 136 137 138# --------------------------------------------------------------------------------- 139# Make the Shared library (libOmxVdecHevc) 140# --------------------------------------------------------------------------------- 141 142include $(CLEAR_VARS) 143 144# libOmxVdecHevc library is not built for OSS builds as QCPATH is null in OSS builds. 145 146ifneq "$(wildcard $(QCPATH) )" "" 147ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_HEVC_LIB)),true) 148 149LOCAL_MODULE := libOmxVdecHevc 150LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD 151LOCAL_LICENSE_CONDITIONS := notice 152LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE 153LOCAL_MODULE_TAGS := optional 154LOCAL_PROPRIETARY_MODULE := true 155LOCAL_CFLAGS := $(libmm-vdec-def) 156LOCAL_C_INCLUDES += $(libmm-vdec-inc) 157LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 158 159LOCAL_PRELINK_MODULE := false 160LOCAL_SHARED_LIBRARIES := liblog libutils libbinder libcutils libdl 161 162LOCAL_SHARED_LIBRARIES += libqdMetaData 163LOCAL_HEADER_LIBRARIES := media_plugin_headers 164 165LOCAL_SRC_FILES := src/frameparser.cpp 166LOCAL_SRC_FILES += src/h264_utils.cpp 167LOCAL_SRC_FILES += src/ts_parser.cpp 168LOCAL_SRC_FILES += src/mp4_utils.cpp 169 170ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_HEVC)),true) 171LOCAL_SHARED_LIBRARIES += libHevcSwDecoder 172LOCAL_SRC_FILES += src/omx_vdec_hevc_swvdec.cpp 173else 174LOCAL_SRC_FILES += src/omx_vdec_hevc.cpp 175endif 176 177LOCAL_SRC_FILES += src/hevc_utils.cpp 178 179LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 180 181LOCAL_CFLAGS += -Wno-error 182 183include $(BUILD_SHARED_LIBRARY) 184endif 185endif 186 187# --------------------------------------------------------------------------------- 188# Make the Shared library (libOmxSwVdec) 189# --------------------------------------------------------------------------------- 190 191include $(CLEAR_VARS) 192ifneq "$(wildcard $(QCPATH) )" "" 193ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_VDEC)),true) 194 195LOCAL_MODULE := libOmxSwVdec 196LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD 197LOCAL_LICENSE_CONDITIONS := notice 198LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE 199LOCAL_MODULE_TAGS := optional 200LOCAL_PROPRIETARY_MODULE := true 201LOCAL_CFLAGS := $(libmm-vdec-def) 202LOCAL_C_INCLUDES += $(libmm-vdec-inc) 203LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 204 205LOCAL_PRELINK_MODULE := false 206LOCAL_SHARED_LIBRARIES := liblog libcutils 207LOCAL_SHARED_LIBRARIES += libswvdec 208 209LOCAL_SRC_FILES := src/omx_swvdec.cpp 210LOCAL_SRC_FILES += src/omx_swvdec_utils.cpp 211 212include $(BUILD_SHARED_LIBRARY) 213endif 214endif 215 216 217# --------------------------------------------------------------------------------- 218# END 219# --------------------------------------------------------------------------------- 220