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 += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT 25 26TARGETS_THAT_HAVE_VENUS_HEVC := apq8084 msm8994 msm8996 27# KONA_TODO_UPDATE: Disable SW codec for Kona for now 28TARGETS_THAT_DONT_NEED_SW_VDEC := msm8226 msm8916 msm8992 msm8996 sdm660 msm8998 msm8909 29 30ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_HAVE_VENUS_HEVC)),true) 31libmm-vdec-def += -DVENUS_HEVC 32endif 33 34ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 35libmm-vdec-def += -DSMOOTH_STREAMING_DISABLED 36endif 37 38libmm-vdec-def += -D_UBWC_ 39 40ifeq ($(TARGET_BOARD_PLATFORM),bengal) 41libmm-vdec-def += -U_UBWC_ 42endif 43 44ifeq ($(TARGET_USES_ION),true) 45libmm-vdec-def += -DUSE_ION 46endif 47 48ifneq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 18 ))" ))) 49libmm-vdec-def += -DANDROID_JELLYBEAN_MR1=1 50endif 51 52ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true) 53libmm-vdec-def += -DMASTER_SIDE_CP 54endif 55 56ifeq ($(call is-platform-sdk-version-at-least,27),true) # O-MR1 57libmm-vdec-def += -D_ANDROID_O_MR1_DIVX_CHANGES 58endif 59 60include $(CLEAR_VARS) 61 62# Common Includes 63libmm-vdec-inc := $(LOCAL_PATH)/inc 64# b/146051949 65libmm-vdec-inc += $(TOP)/system/memory/libion/include 66libmm-vdec-inc += $(TOP)/system/memory/libion/kernel-headers 67libmm-vdec-inc += $(QCOM_MEDIA_ROOT)/mm-video-v4l2/vidc/common/inc 68libmm-vdec-inc += $(QCOM_MEDIA_ROOT)/mm-core/inc 69libmm-vdec-inc += $(QCOM_MEDIA_ROOT)/libplatformconfig 70libmm-vdec-inc += $(TARGET_OUT_HEADERS)/adreno 71libmm-vdec-inc += $(QCOM_MEDIA_ROOT)/libc2dcolorconvert 72libmm-vdec-inc += $(TARGET_OUT_HEADERS)/mm-video/SwVdec 73libmm-vdec-inc += $(TARGET_OUT_HEADERS)/mm-video/swvdec 74libmm-vdec-inc += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 75 76 77ifeq ($(PLATFORM_SDK_VERSION), 18) #JB_MR2 78libmm-vdec-def += -DANDROID_JELLYBEAN_MR2=1 79libmm-vdec-inc += $(QCOM_MEDIA_ROOT)/libstagefrighthw 80endif 81 82# Common Dependencies 83libmm-vdec-add-dep := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 84 85ifeq ($(call is-platform-sdk-version-at-least, 19),true) 86# This feature is enabled for Android KK+ 87libmm-vdec-def += -DADAPTIVE_PLAYBACK_SUPPORTED 88endif 89 90ifeq ($(call is-platform-sdk-version-at-least, 22),true) 91# This feature is enabled for Android LMR1 92libmm-vdec-def += -DFLEXYUV_SUPPORTED 93endif 94 95libmm-vdec-def += -DALLOCATE_OUTPUT_NATIVEHANDLE 96 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)/../../../NOTICE 107LOCAL_MODULE_TAGS := optional 108LOCAL_VENDOR_MODULE := true 109LOCAL_CFLAGS := $(libmm-vdec-def) -Werror 110 111ifeq ($(TARGET_ENABLE_VIDC_INTSAN), true) 112LOCAL_SANITIZE := integer_overflow 113ifeq ($(TARGET_ENABLE_VIDC_INTSAN_DIAG), true) 114$(warning INTSAN_DIAG_ENABLED) 115LOCAL_SANITIZE_DIAG := integer_overflow 116endif 117endif 118 119LOCAL_HEADER_LIBRARIES := \ 120 media_plugin_headers \ 121 libnativebase_headers \ 122 libutils_headers \ 123 libhardware_headers \ 124 display_intf_headers 125 126LOCAL_C_INCLUDES += $(libmm-vdec-inc) 127LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 128 129LOCAL_PRELINK_MODULE := false 130LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libion 131LOCAL_SHARED_LIBRARIES += libc2dcolorconvert 132LOCAL_SHARED_LIBRARIES += libqdMetaData 133LOCAL_SHARED_LIBRARIES += libplatformconfig 134 135LOCAL_SRC_FILES := src/ts_parser.cpp 136LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 137LOCAL_SRC_FILES += src/omx_vdec_v4l2.cpp 138LOCAL_SRC_FILES += src/omx_vdec_v4l2_params.cpp 139 140include $(BUILD_SHARED_LIBRARY) 141 142 143 144 145# --------------------------------------------------------------------------------- 146# Make the Shared library (libOmxSwVdec) 147# --------------------------------------------------------------------------------- 148 149include $(CLEAR_VARS) 150ifneq "$(wildcard $(QCPATH) )" "" 151ifneq ($(call is-board-platform-in-list, $(TARGETS_THAT_DONT_NEED_SW_VDEC)),true) 152 153LOCAL_MODULE := libOmxSwVdec 154LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD 155LOCAL_LICENSE_CONDITIONS := notice 156LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE 157LOCAL_MODULE_TAGS := optional 158LOCAL_VENDOR_MODULE := true 159LOCAL_CFLAGS := $(libmm-vdec-def) 160 161ifeq ($(TARGET_ENABLE_VIDC_INTSAN), true) 162LOCAL_SANITIZE := integer_overflow 163ifeq ($(TARGET_ENABLE_VIDC_INTSAN_DIAG), true) 164$(warning INTSAN_DIAG_ENABLED) 165LOCAL_SANITIZE_DIAG := integer_overflow 166endif 167endif 168 169LOCAL_HEADER_LIBRARIES := \ 170 media_plugin_headers \ 171 libnativebase_headers \ 172 libutils_headers \ 173 libhardware_headers \ 174 display_intf_headers 175 176LOCAL_C_INCLUDES += $(libmm-vdec-inc) 177LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 178 179LOCAL_PRELINK_MODULE := false 180LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 181LOCAL_SHARED_LIBRARIES := liblog libcutils libc2dcolorconvert libion 182LOCAL_SHARED_LIBRARIES += libswvdec 183 184LOCAL_SRC_FILES := src/omx_swvdec.cpp 185LOCAL_SRC_FILES += src/omx_swvdec_utils.cpp 186 187include $(BUILD_SHARED_LIBRARY) 188endif 189endif 190 191# --------------------------------------------------------------------------------- 192# END 193# --------------------------------------------------------------------------------- 194