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_MODULE_TAGS := optional 111LOCAL_CFLAGS := $(libmm-vdec-def) -Werror 112LOCAL_C_INCLUDES += $(libmm-vdec-inc) 113LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 114 115LOCAL_PRELINK_MODULE := false 116LOCAL_SHARED_LIBRARIES := liblog libutils libbinder libcutils libdl 117 118LOCAL_SHARED_LIBRARIES += libqdMetaData 119 120LOCAL_SRC_FILES := src/frameparser.cpp 121LOCAL_SRC_FILES += src/h264_utils.cpp 122LOCAL_SRC_FILES += src/ts_parser.cpp 123LOCAL_SRC_FILES += src/mp4_utils.cpp 124LOCAL_SRC_FILES += src/hevc_utils.cpp 125LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 126LOCAL_SRC_FILES += src/omx_vdec_v4l2.cpp 127 128include $(BUILD_SHARED_LIBRARY) 129 130 131# --------------------------------------------------------------------------------- 132# Make the Shared library (libOmxVdecHevc) 133# --------------------------------------------------------------------------------- 134 135include $(CLEAR_VARS) 136 137# libOmxVdecHevc library is not built for OSS builds as QCPATH is null in OSS builds. 138 139ifneq "$(wildcard $(QCPATH) )" "" 140ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_HEVC_LIB)),true) 141 142LOCAL_MODULE := libOmxVdecHevc 143LOCAL_MODULE_TAGS := optional 144LOCAL_CFLAGS := $(libmm-vdec-def) 145LOCAL_C_INCLUDES += $(libmm-vdec-inc) 146LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 147 148LOCAL_PRELINK_MODULE := false 149LOCAL_SHARED_LIBRARIES := liblog libutils libbinder libcutils libdl 150 151LOCAL_SHARED_LIBRARIES += libqdMetaData 152 153LOCAL_SRC_FILES := src/frameparser.cpp 154LOCAL_SRC_FILES += src/h264_utils.cpp 155LOCAL_SRC_FILES += src/ts_parser.cpp 156LOCAL_SRC_FILES += src/mp4_utils.cpp 157 158ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_HEVC)),true) 159LOCAL_SHARED_LIBRARIES += libHevcSwDecoder 160LOCAL_SRC_FILES += src/omx_vdec_hevc_swvdec.cpp 161else 162LOCAL_SRC_FILES += src/omx_vdec_hevc.cpp 163endif 164 165LOCAL_SRC_FILES += src/hevc_utils.cpp 166 167LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 168 169include $(BUILD_SHARED_LIBRARY) 170endif 171endif 172 173# --------------------------------------------------------------------------------- 174# Make the Shared library (libOmxSwVdec) 175# --------------------------------------------------------------------------------- 176 177include $(CLEAR_VARS) 178ifneq "$(wildcard $(QCPATH) )" "" 179ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_VDEC)),true) 180 181LOCAL_MODULE := libOmxSwVdec 182LOCAL_MODULE_TAGS := optional 183LOCAL_CFLAGS := $(libmm-vdec-def) 184LOCAL_C_INCLUDES += $(libmm-vdec-inc) 185LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 186 187LOCAL_PRELINK_MODULE := false 188LOCAL_SHARED_LIBRARIES := liblog libcutils 189LOCAL_SHARED_LIBRARIES += libswvdec 190 191LOCAL_SRC_FILES := src/omx_swvdec.cpp 192LOCAL_SRC_FILES += src/omx_swvdec_utils.cpp 193 194include $(BUILD_SHARED_LIBRARY) 195endif 196endif 197 198 199# --------------------------------------------------------------------------------- 200# END 201# --------------------------------------------------------------------------------- 202