1LOCAL_PATH := $(call my-dir) 2LIBION_HEADER_PATH_WRAPPER := $(QC_OPEN_PATH)/core-utils/build/libion_header_paths/libion_path.mk 3 4include $(CLEAR_VARS) 5include $(LIBION_HEADER_PATH_WRAPPER) 6 7# --------------------------------------------------------------------------------- 8# Common definitons 9# --------------------------------------------------------------------------------- 10 11libmm-vdec-def := -D__alignx\(x\)=__attribute__\(\(__aligned__\(x\)\)\) 12libmm-vdec-def += -D__align=__alignx 13libmm-vdec-def += -Dinline=__inline 14libmm-vdec-def += -g -O3 15libmm-vdec-def += -DIMAGE_APPS_PROC 16libmm-vdec-def += -D_ANDROID_ 17libmm-vdec-def += -DCDECL 18libmm-vdec-def += -DT_ARM 19libmm-vdec-def += -DNO_ARM_CLZ 20libmm-vdec-def += -UENABLE_DEBUG_LOW 21libmm-vdec-def += -UENABLE_DEBUG_HIGH 22libmm-vdec-def += -DENABLE_DEBUG_ERROR 23libmm-vdec-def += -UINPUT_BUFFER_LOG 24libmm-vdec-def += -UOUTPUT_BUFFER_LOG 25libmm-vdec-def += -Wno-parentheses 26libmm-vdec-def += -D_ANDROID_ICS_ 27libmm-vdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT 28 29TARGETS_THAT_HAVE_VENUS_HEVC := apq8084 msm8994 msm8996 30TARGETS_THAT_DONT_NEED_SW_VDEC := msm8226 msm8916 msm8992 msm8996 sdm660 msm8998 msm8909 31 32ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_HAVE_VENUS_HEVC)),true) 33libmm-vdec-def += -DVENUS_HEVC 34endif 35 36ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 37libmm-vdec-def += -DSMOOTH_STREAMING_DISABLED 38endif 39 40libmm-vdec-def += -D_UBWC_ 41 42ifeq ($(TARGET_USES_ION),true) 43libmm-vdec-def += -DUSE_ION 44endif 45 46ifneq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 18 ))" ))) 47libmm-vdec-def += -DANDROID_JELLYBEAN_MR1=1 48endif 49 50ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true) 51libmm-vdec-def += -DMASTER_SIDE_CP 52endif 53 54ifeq ($(call is-platform-sdk-version-at-least,27),true) # O-MR1 55libmm-vdec-def += -D_ANDROID_O_MR1_DIVX_CHANGES 56endif 57 58include $(CLEAR_VARS) 59 60# Common Includes 61libmm-vdec-inc := $(LOCAL_PATH)/inc 62libmm-vdec-inc += $(LIBION_HEADER_PATHS) 63libmm-vdec-inc += $(QCOM_MEDIA_ROOT)/mm-video-v4l2/vidc/common/inc 64libmm-vdec-inc += $(QCOM_MEDIA_ROOT)/mm-core/inc 65libmm-vdec-inc += $(QCOM_MEDIA_ROOT)/libplatformconfig 66libmm-vdec-inc += $(TARGET_OUT_HEADERS)/adreno 67libmm-vdec-inc += $(QCOM_MEDIA_ROOT)/libc2dcolorconvert 68libmm-vdec-inc += $(TARGET_OUT_HEADERS)/mm-video/SwVdec 69libmm-vdec-inc += $(TARGET_OUT_HEADERS)/mm-video/swvdec 70libmm-vdec-inc += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 71libmm-vdec-inc += $(QCOM_MEDIA_ROOT)/libarbitrarybytes/inc 72 73ifeq ($(PLATFORM_SDK_VERSION), 18) #JB_MR2 74libmm-vdec-def += -DANDROID_JELLYBEAN_MR2=1 75libmm-vdec-inc += $(TOP)/hardware/qcom/sm8150/media/libstagefrighthw 76endif 77 78# Common Dependencies 79libmm-vdec-add-dep := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 80 81ifeq ($(call is-platform-sdk-version-at-least, 19),true) 82# This feature is enabled for Android KK+ 83libmm-vdec-def += -DADAPTIVE_PLAYBACK_SUPPORTED 84endif 85 86ifeq ($(call is-platform-sdk-version-at-least, 22),true) 87# This feature is enabled for Android LMR1 88libmm-vdec-def += -DFLEXYUV_SUPPORTED 89endif 90 91libmm-vdec-def += -DALLOCATE_OUTPUT_NATIVEHANDLE 92 93ifeq ($(ENABLE_HYP),true) 94libmm-vdec-def += -DHYPERVISOR 95libmm-vdec-inc += $(TOP)/hardware/qcom/media/hypv-intercept 96endif 97# --------------------------------------------------------------------------------- 98# Make the Shared library (libOmxVdec) 99# --------------------------------------------------------------------------------- 100 101include $(CLEAR_VARS) 102 103LOCAL_MODULE := libOmxVdec 104LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD 105LOCAL_LICENSE_CONDITIONS := notice 106LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../LICENSE 107LOCAL_MODULE_TAGS := optional 108LOCAL_VENDOR_MODULE := true 109LOCAL_CFLAGS := $(libmm-vdec-def) -Wno-enum-compare -Werror 110 111LOCAL_HEADER_LIBRARIES := \ 112 media_plugin_headers \ 113 libnativebase_headers \ 114 libutils_headers \ 115 libhardware_headers \ 116 display_intf_headers 117 118LOCAL_C_INCLUDES += $(libmm-vdec-inc) 119LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 120 121LOCAL_PRELINK_MODULE := false 122LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libion 123LOCAL_SHARED_LIBRARIES += libc2dcolorconvert 124LOCAL_SHARED_LIBRARIES += libqdMetaData 125LOCAL_SHARED_LIBRARIES += libplatformconfig 126LOCAL_SHARED_LIBRARIES += libarbitrarybytes 127LOCAL_SHARED_LIBRARIES += libnativewindow 128ifeq ($(ENABLE_HYP),true) 129LOCAL_SHARED_LIBRARIES += libhypv_intercept 130endif 131 132LOCAL_SRC_FILES := src/ts_parser.cpp 133LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 134LOCAL_SRC_FILES += src/omx_vdec_v4l2.cpp 135 136include $(BUILD_SHARED_LIBRARY) 137 138 139 140 141# --------------------------------------------------------------------------------- 142# Make the Shared library (libOmxSwVdec) 143# --------------------------------------------------------------------------------- 144 145include $(CLEAR_VARS) 146ifneq "$(wildcard $(QCPATH) )" "" 147ifneq ($(call is-board-platform-in-list, $(TARGETS_THAT_DONT_NEED_SW_VDEC)),true) 148 149LOCAL_MODULE := libOmxSwVdec 150LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD 151LOCAL_LICENSE_CONDITIONS := notice 152LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../LICENSE 153LOCAL_MODULE_TAGS := optional 154LOCAL_VENDOR_MODULE := true 155LOCAL_CFLAGS := $(libmm-vdec-def) 156 157LOCAL_HEADER_LIBRARIES := \ 158 media_plugin_headers \ 159 libnativebase_headers \ 160 libutils_headers \ 161 libhardware_headers \ 162 display_intf_headers 163 164LOCAL_C_INCLUDES += $(libmm-vdec-inc) 165LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 166 167LOCAL_PRELINK_MODULE := false 168LOCAL_SHARED_LIBRARIES := liblog libcutils libc2dcolorconvert libion 169LOCAL_SHARED_LIBRARIES += libswvdec 170LOCAL_SHARED_LIBRARIES += libnativewindow 171 172LOCAL_SRC_FILES := src/omx_swvdec.cpp 173LOCAL_SRC_FILES += src/omx_swvdec_utils.cpp 174 175include $(BUILD_SHARED_LIBRARY) 176endif 177endif 178 179# --------------------------------------------------------------------------------- 180# END 181# --------------------------------------------------------------------------------- 182