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 += -D_MSM8974_ 25 libmm-vdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT 26 libmm-vdec-def += -DMAX_RES_1080P 27 libmm-vdec-def += -DMAX_RES_1080P_EBI 28 29 TARGETS_THAT_USE_HEVC_ADSP_HEAP := msm8226 msm8974 30 TARGETS_THAT_HAVE_VENUS_HEVC := apq8084 msm8994 msm8996 31 TARGETS_THAT_NEED_HEVC_LIB := msm8974 msm8610 msm8226 msm8916 32 TARGETS_THAT_NEED_SW_HEVC := msm8974 msm8226 msm8916 33 TARGETS_THAT_SUPPORT_UBWC := msm8996 titanium 34 TARGETS_THAT_NEED_SW_VDEC := msm8937 35 36 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_USE_HEVC_ADSP_HEAP)),true) 37 libmm-vdec-def += -D_HEVC_USE_ADSP_HEAP_ 38 endif 39 40 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_HAVE_VENUS_HEVC)),true) 41 libmm-vdec-def += -DVENUS_HEVC 42 endif 43 44 ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 45 libmm-vdec-def += -DSMOOTH_STREAMING_DISABLED 46 libmm-vdec-def += -DH264_PROFILE_LEVEL_CHECK 47 endif 48 49 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_UBWC)),true) 50 libmm-vdec-def += -D_UBWC_ 51 endif 52 53 ifeq ($(TARGET_USES_ION),true) 54 libmm-vdec-def += -DUSE_ION 55 endif 56 57 ifneq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 18 ))" ))) 58 libmm-vdec-def += -DANDROID_JELLYBEAN_MR1=1 59 endif 60 61 ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true) 62 libmm-vdec-def += -DMASTER_SIDE_CP 63 endif 64 65 include $(CLEAR_VARS) 66 67 # Common Includes 68 libmm-vdec-inc := $(LOCAL_PATH)/inc 69 libmm-vdec-inc += $(TOP)/hardware/qcom/media/msm8996/mm-video-v4l2/vidc/common/inc 70 libmm-vdec-inc += $(TOP)/hardware/qcom/media/msm8996/mm-core/inc 71 libmm-vdec-inc += $(TARGET_OUT_HEADERS)/qcom/display 72 libmm-vdec-inc += $(TARGET_OUT_HEADERS)/adreno 73 libmm-vdec-inc += $(TOP)/frameworks/native/include/media/openmax 74 libmm-vdec-inc += $(TOP)/frameworks/native/include/media/hardware 75 libmm-vdec-inc += $(TOP)/hardware/qcom/media/msm8996/libc2dcolorconvert 76 libmm-vdec-inc += $(TOP)/frameworks/av/include/media/stagefright 77 libmm-vdec-inc += $(TARGET_OUT_HEADERS)/mm-video/SwVdec 78 libmm-vdec-inc += $(TARGET_OUT_HEADERS)/mm-video/swvdec 79 ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) 80 libmm-vdec-inc += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 81 endif 82 83 ifeq ($(PLATFORM_SDK_VERSION), 18) #JB_MR2 84 libmm-vdec-def += -DANDROID_JELLYBEAN_MR2=1 85 libmm-vdec-inc += $(TOP)/hardware/qcom/media/msm8996/libstagefrighthw 86 endif 87 88 # Common Dependencies 89 ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) 90 libmm-vdec-add-dep := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 91 endif 92 93 ifeq ($(call is-platform-sdk-version-at-least, 19),true) 94 # This feature is enabled for Android KK+ 95 libmm-vdec-def += -DADAPTIVE_PLAYBACK_SUPPORTED 96 endif 97 98 ifeq ($(call is-platform-sdk-version-at-least, 22),true) 99 # This feature is enabled for Android LMR1 100 libmm-vdec-def += -DFLEXYUV_SUPPORTED 101 endif 102 103 # --------------------------------------------------------------------------------- 104 # Make the Shared library (libOmxVdec) 105 # --------------------------------------------------------------------------------- 106 107 include $(CLEAR_VARS) 108 109 LOCAL_MODULE := libOmxVdec 110 LOCAL_MODULE_TAGS := optional 111 LOCAL_CFLAGS := $(libmm-vdec-def) -Werror 112 LOCAL_C_INCLUDES += $(libmm-vdec-inc) 113 LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 114 115 LOCAL_PRELINK_MODULE := false 116 LOCAL_SHARED_LIBRARIES := liblog libutils libbinder libcutils libdl 117 118 LOCAL_SHARED_LIBRARIES += libqdMetaData 119 120 LOCAL_SRC_FILES := src/frameparser.cpp 121 LOCAL_SRC_FILES += src/h264_utils.cpp 122 LOCAL_SRC_FILES += src/ts_parser.cpp 123 LOCAL_SRC_FILES += src/mp4_utils.cpp 124 LOCAL_SRC_FILES += src/hevc_utils.cpp 125 LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 126 LOCAL_SRC_FILES += src/omx_vdec_v4l2.cpp 127 128 include $(BUILD_SHARED_LIBRARY) 129 130 131 # --------------------------------------------------------------------------------- 132 # Make the Shared library (libOmxVdecHevc) 133 # --------------------------------------------------------------------------------- 134 135 include $(CLEAR_VARS) 136 137 # libOmxVdecHevc library is not built for OSS builds as QCPATH is null in OSS builds. 138 139 ifneq "$(wildcard $(QCPATH) )" "" 140 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_HEVC_LIB)),true) 141 142 LOCAL_MODULE := libOmxVdecHevc 143 LOCAL_MODULE_TAGS := optional 144 LOCAL_CFLAGS := $(libmm-vdec-def) 145 LOCAL_C_INCLUDES += $(libmm-vdec-inc) 146 LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 147 148 LOCAL_PRELINK_MODULE := false 149 LOCAL_SHARED_LIBRARIES := liblog libutils libbinder libcutils libdl 150 151 LOCAL_SHARED_LIBRARIES += libqdMetaData 152 153 LOCAL_SRC_FILES := src/frameparser.cpp 154 LOCAL_SRC_FILES += src/h264_utils.cpp 155 LOCAL_SRC_FILES += src/ts_parser.cpp 156 LOCAL_SRC_FILES += src/mp4_utils.cpp 157 158 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_HEVC)),true) 159 LOCAL_SHARED_LIBRARIES += libHevcSwDecoder 160 LOCAL_SRC_FILES += src/omx_vdec_hevc_swvdec.cpp 161 else 162 LOCAL_SRC_FILES += src/omx_vdec_hevc.cpp 163 endif 164 165 LOCAL_SRC_FILES += src/hevc_utils.cpp 166 167 LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 168 169 include $(BUILD_SHARED_LIBRARY) 170 endif 171 endif 172 173 # --------------------------------------------------------------------------------- 174 # Make the Shared library (libOmxSwVdec) 175 # --------------------------------------------------------------------------------- 176 177 include $(CLEAR_VARS) 178 ifneq "$(wildcard $(QCPATH) )" "" 179 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_VDEC)),true) 180 181 LOCAL_MODULE := libOmxSwVdec 182 LOCAL_MODULE_TAGS := optional 183 LOCAL_CFLAGS := $(libmm-vdec-def) 184 LOCAL_C_INCLUDES += $(libmm-vdec-inc) 185 LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep) 186 187 LOCAL_PRELINK_MODULE := false 188 LOCAL_SHARED_LIBRARIES := liblog libcutils 189 LOCAL_SHARED_LIBRARIES += libswvdec 190 191 LOCAL_SRC_FILES := src/omx_swvdec.cpp 192 LOCAL_SRC_FILES += src/omx_swvdec_utils.cpp 193 194 include $(BUILD_SHARED_LIBRARY) 195 endif 196 endif 197 198 199 # --------------------------------------------------------------------------------- 200 # END 201 # --------------------------------------------------------------------------------- 202