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