1 LOCAL_PATH := $(call my-dir) 2 include $(CLEAR_VARS) 3 4 # --------------------------------------------------------------------------------- 5 # Common definitons 6 # --------------------------------------------------------------------------------- 7 8 libmm-vdec-def := -D__alignx\(x\)=__attribute__\(\(__aligned__\(x\)\)\) 9 libmm-vdec-def += -D__align=__alignx 10 libmm-vdec-def += -Dinline=__inline 11 libmm-vdec-def += -g -O3 12 libmm-vdec-def += -DIMAGE_APPS_PROC 13 libmm-vdec-def += -D_ANDROID_ 14 libmm-vdec-def += -DCDECL 15 libmm-vdec-def += -DT_ARM 16 libmm-vdec-def += -DNO_ARM_CLZ 17 libmm-vdec-def += -UENABLE_DEBUG_LOW 18 libmm-vdec-def += -UENABLE_DEBUG_HIGH 19 libmm-vdec-def += -DENABLE_DEBUG_ERROR 20 libmm-vdec-def += -UINPUT_BUFFER_LOG 21 libmm-vdec-def += -UOUTPUT_BUFFER_LOG 22 libmm-vdec-def += -Wno-parentheses 23 libmm-vdec-def += -D_ANDROID_ICS_ 24 libmm-vdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT 25 26 TARGETS_THAT_HAVE_VENUS_HEVC := apq8084 msm8994 msm8996 27 TARGETS_THAT_SUPPORT_UBWC := msm8996 msm8953 msm8998 sdm660 sdm845 28 TARGETS_THAT_NEED_SW_VDEC := msm8937 sdm845 29 30 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_HAVE_VENUS_HEVC)),true) 31 libmm-vdec-def += -DVENUS_HEVC 32 endif 33 34 ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 35 libmm-vdec-def += -DSMOOTH_STREAMING_DISABLED 36 endif 37 38 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_UBWC)),true) 39 libmm-vdec-def += -D_UBWC_ 40 endif 41 42 ifeq ($(TARGET_USES_ION),true) 43 libmm-vdec-def += -DUSE_ION 44 endif 45 46 ifneq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 18 ))" ))) 47 libmm-vdec-def += -DANDROID_JELLYBEAN_MR1=1 48 endif 49 50 ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true) 51 libmm-vdec-def += -DMASTER_SIDE_CP 52 endif 53 54 include $(CLEAR_VARS) 55 56 # Common Includes 57 libmm-vdec-inc := $(LOCAL_PATH)/inc 58 libmm-vdec-inc += $(TOP)/hardware/qcom/media/sdm845/mm-video-v4l2/vidc/common/inc 59 libmm-vdec-inc += $(TOP)/hardware/qcom/media/sdm845/mm-core/inc 60 libmm-vdec-inc += $(TARGET_OUT_HEADERS)/qcom/display 61 libmm-vdec-inc += $(TARGET_OUT_HEADERS)/adreno 62 libmm-vdec-inc += $(TOP)/frameworks/native/include/media/openmax 63 libmm-vdec-inc += $(TOP)/frameworks/native/include/media/hardware 64 libmm-vdec-inc += $(TOP)/hardware/qcom/media/sdm845/libc2dcolorconvert 65 libmm-vdec-inc += $(TARGET_OUT_HEADERS)/mm-video/SwVdec 66 libmm-vdec-inc += $(TARGET_OUT_HEADERS)/mm-video/swvdec 67 libmm-vdec-inc += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 68 libmm-vdec-inc += $(TOP)/frameworks/native/libs/nativebase/include 69 70 ifeq ($(PLATFORM_SDK_VERSION), 18) #JB_MR2 71 libmm-vdec-def += -DANDROID_JELLYBEAN_MR2=1 72 libmm-vdec-inc += $(TOP)/hardware/qcom/media/sdm845/libstagefrighthw 73 endif 74 75 # Common Dependencies 76 libmm-vdec-add-dep := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 77 78 ifeq ($(call is-platform-sdk-version-at-least, 19),true) 79 # This feature is enabled for Android KK+ 80 libmm-vdec-def += -DADAPTIVE_PLAYBACK_SUPPORTED 81 endif 82 83 ifeq ($(call is-platform-sdk-version-at-least, 22),true) 84 # This feature is enabled for Android LMR1 85 libmm-vdec-def += -DFLEXYUV_SUPPORTED 86 endif 87 88 ifeq ($(TARGET_USES_MEDIA_EXTENSIONS),true) 89 libmm-vdec-def += -DALLOCATE_OUTPUT_NATIVEHANDLE 90 endif 91 92 # --------------------------------------------------------------------------------- 93 # Make the Shared library (libOmxVdec) 94 # --------------------------------------------------------------------------------- 95 96 include $(CLEAR_VARS) 97 98 LOCAL_MODULE := libOmxVdec 99 LOCAL_MODULE_TAGS := optional 100 LOCAL_VENDOR_MODULE := true 101 LOCAL_CFLAGS := $(libmm-vdec-def) -Werror 102 LOCAL_C_INCLUDES += $(libmm-vdec-inc) 103 LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 104 LOCAL_HEADER_LIBRARIES := libnativebase_headers 105 106 LOCAL_PRELINK_MODULE := false 107 LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libui 108 LOCAL_SHARED_LIBRARIES += libc2dcolorconvert 109 LOCAL_SHARED_LIBRARIES += libqdMetaData 110 111 LOCAL_SRC_FILES := src/ts_parser.cpp 112 LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 113 LOCAL_SRC_FILES += src/omx_vdec_v4l2.cpp 114 115 include $(BUILD_SHARED_LIBRARY) 116 117 118 119 # --------------------------------------------------------------------------------- 120 # Make the Shared library (libOmxSwVdec) 121 # --------------------------------------------------------------------------------- 122 123 include $(CLEAR_VARS) 124 ifneq "$(wildcard $(QCPATH) )" "" 125 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_VDEC)),true) 126 127 LOCAL_MODULE := libOmxSwVdec 128 LOCAL_MODULE_TAGS := optional 129 LOCAL_VENDOR_MODULE := true 130 LOCAL_CFLAGS := $(libmm-vdec-def) 131 LOCAL_C_INCLUDES += $(libmm-vdec-inc) 132 LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 133 134 LOCAL_PRELINK_MODULE := false 135 LOCAL_SHARED_LIBRARIES := liblog libcutils libc2dcolorconvert 136 LOCAL_SHARED_LIBRARIES += libswvdec 137 138 LOCAL_SRC_FILES := src/omx_swvdec.cpp 139 LOCAL_SRC_FILES += src/omx_swvdec_utils.cpp 140 141 include $(BUILD_SHARED_LIBRARY) 142 endif 143 endif 144 145 # --------------------------------------------------------------------------------- 146 # END 147 # --------------------------------------------------------------------------------- 148