1LOCAL_PATH := $(call my-dir) 2include $(CLEAR_VARS) 3 4# --------------------------------------------------------------------------------- 5# Common definitons 6# --------------------------------------------------------------------------------- 7 8libmm-venc-def := -g -O3 -Dlrintf=_ffix_r 9libmm-venc-def += -D__align=__alignx 10libmm-venc-def += -D__alignx\(x\)=__attribute__\(\(__aligned__\(x\)\)\) 11libmm-venc-def += -DT_ARM 12libmm-venc-def += -Dinline=__inline 13libmm-venc-def += -D_ANDROID_ 14libmm-venc-def += -UENABLE_DEBUG_LOW 15libmm-venc-def += -UENABLE_DEBUG_HIGH 16libmm-venc-def += -DENABLE_DEBUG_ERROR 17libmm-venc-def += -UINPUT_BUFFER_LOG 18libmm-venc-def += -UOUTPUT_BUFFER_LOG 19libmm-venc-def += -USINGLE_ENCODER_INSTANCE 20libmm-venc-def += -Werror 21libmm-venc-def += -D_ANDROID_ICS_ 22 23# KONA_TODO_UPDATE: Disable SW codec for kona for now 24TARGETS_THAT_USE_FLAG_MSM8226 := msm8226 msm8916 msm8909 25TARGETS_THAT_DONT_NEED_SW_VENC_MPEG4 := msm8226 msm8916 msm8992 msm8996 sdm660 msm8998 26TARGETS_THAT_DONT_SUPPORT_SW_VENC_ROTATION := msm8226 msm8916 msm8992 msm8996 sdm660 msm8998 msm8909 msm8937 27 28TARGETS_THAT_NEED_SW_VENC_HEVC := msm8992 29 30ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 31libmm-venc-def += -D_MSM8610_ 32endif 33 34libmm-venc-def += -D_UBWC_ 35 36ifeq ($(TARGET_BOARD_PLATFORM),bengal) 37libmm-venc-def += -U_UBWC_ 38endif 39 40ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_USE_FLAG_MSM8226)),true) 41libmm-venc-def += -D_MSM8226_ 42endif 43 44ifeq ($(TARGET_USES_ION),true) 45libmm-venc-def += -DUSE_ION 46endif 47 48libmm-venc-def += -DUSE_NATIVE_HANDLE_SOURCE 49 50ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true) 51libmm-venc-def += -DMASTER_SIDE_CP 52endif 53 54libmm-venc-def += -DUSE_CAMERA_METABUFFER_UTILS 55 56# Common Includes 57libmm-venc-inc := $(LOCAL_PATH)/inc 58libmm-venc-inc += $(TOP)/system/memory/libion/include 59libmm-venc-inc += $(TOP)/system/memory/libion/kernel-headers 60libmm-venc-inc += $(QCOM_MEDIA_ROOT)/mm-video-v4l2/vidc/common/inc 61libmm-venc-inc += $(QCOM_MEDIA_ROOT)/mm-core/inc 62libmm-venc-inc += $(QCOM_MEDIA_ROOT)/libstagefrighthw 63libmm-venc-inc += $(QCOM_MEDIA_ROOT)/libplatformconfig 64libmm-venc-inc += $(TARGET_OUT_HEADERS)/adreno 65libmm-venc-inc += $(QCOM_MEDIA_ROOT)/libc2dcolorconvert 66libmm-venc-inc += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 67libmm-venc-inc += $(TOP)/frameworks/native/libs/nativewindow/include 68libmm-venc-inc += $(TOP)/frameworks/native/libs/nativebase/include 69libmm-venc-inc += $(TARGET_OUT_HEADERS)/fastcv 70libmm-venc-inc += $(TOP)/frameworks/native/libs/arect/include 71libmm-venc-inc += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 72 73ifneq ($(call is-board-platform-in-list, $(TARGETS_THAT_DONT_SUPPORT_SW_VENC_ROTATION)),true) 74libmm-venc-inc += hardware/libhardware/include/hardware 75endif 76 77# Common Dependencies 78libmm-venc-add-dep := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 79 80# --------------------------------------------------------------------------------- 81# Make the Shared library (libOmxVenc) 82# --------------------------------------------------------------------------------- 83 84include $(CLEAR_VARS) 85 86LOCAL_MODULE := libOmxVenc 87LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD 88LOCAL_LICENSE_CONDITIONS := notice 89LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE 90LOCAL_MODULE_TAGS := optional 91LOCAL_VENDOR_MODULE := true 92LOCAL_CFLAGS := $(libmm-venc-def) 93 94ifeq ($(TARGET_ENABLE_VIDC_INTSAN), true) 95LOCAL_SANITIZE := integer_overflow 96ifeq ($(TARGET_ENABLE_VIDC_INTSAN_DIAG), true) 97$(warning INTSAN_DIAG_ENABLED) 98LOCAL_SANITIZE_DIAG := integer_overflow 99endif 100endif 101 102LOCAL_HEADER_LIBRARIES := \ 103 media_plugin_headers \ 104 libnativebase_headers \ 105 libcutils_headers \ 106 libutils_headers \ 107 libhardware_headers \ 108 display_intf_headers 109 110LOCAL_C_INCLUDES := $(libmm-venc-inc) 111LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-venc-add-dep) 112 113LOCAL_PRELINK_MODULE := false 114LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libplatformconfig libion 115 116# ifeq ($(BOARD_USES_ADRENO), true) 117LOCAL_SHARED_LIBRARIES += libc2dcolorconvert 118# endif # ($(BOARD_USES_ADRENO), true) 119LOCAL_SHARED_LIBRARIES += libqdMetaData 120LOCAL_SHARED_LIBRARIES += libfastcvopt 121LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 122 123LOCAL_SRC_FILES := src/omx_video_base.cpp 124LOCAL_SRC_FILES += src/omx_video_encoder.cpp 125LOCAL_SRC_FILES += src/video_encoder_device_v4l2.cpp 126LOCAL_SRC_FILES += src/video_encoder_device_v4l2_params.cpp 127 128include $(BUILD_SHARED_LIBRARY) 129 130ifneq ($(call is-board-platform-in-list, $(TARGETS_THAT_DONT_NEED_SW_VENC_MPEG4)),true) 131# --------------------------------------------------------------------------------- 132# Make the Shared library (libOmxSwVencMpeg4) 133# --------------------------------------------------------------------------------- 134 135include $(CLEAR_VARS) 136 137libmm-venc-inc += $(TARGET_OUT_HEADERS)/mm-video/swvenc 138 139LOCAL_MODULE := libOmxSwVencMpeg4 140LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD 141LOCAL_LICENSE_CONDITIONS := notice 142LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE 143 144LOCAL_MODULE_TAGS := optional 145LOCAL_VENDOR_MODULE := true 146LOCAL_CFLAGS := $(libmm-venc-def) 147 148ifeq ($(TARGET_ENABLE_VIDC_INTSAN), true) 149LOCAL_SANITIZE := integer_overflow 150ifeq ($(TARGET_ENABLE_VIDC_INTSAN_DIAG), true) 151$(warning INTSAN_DIAG_ENABLED) 152LOCAL_SANITIZE_DIAG := integer_overflow 153endif 154endif 155 156LOCAL_HEADER_LIBRARIES := \ 157 media_plugin_headers \ 158 libnativebase_headers \ 159 libutils_headers \ 160 libhardware_headers \ 161 display_intf_headers 162 163LOCAL_C_INCLUDES := $(libmm-venc-inc) 164LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-venc-add-dep) 165 166LOCAL_PRELINK_MODULE := false 167LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libplatformconfig libion 168LOCAL_SHARED_LIBRARIES += libMpeg4SwEncoder 169LOCAL_SHARED_LIBRARIES += libqdMetaData 170LOCAL_SHARED_LIBRARIES += libfastcvopt 171 172ifneq ($(call is-board-platform-in-list, $(TARGETS_THAT_DONT_SUPPORT_SW_VENC_ROTATION)),true) 173LOCAL_SHARED_LIBRARIES += libui 174LOCAL_SHARED_LIBRARIES += libutils 175endif 176 177# ifeq ($(BOARD_USES_ADRENO), true) 178LOCAL_SHARED_LIBRARIES += libc2dcolorconvert 179# endif # ($(BOARD_USES_ADRENO), true) 180LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 181 182LOCAL_SRC_FILES := src/omx_video_base.cpp 183LOCAL_SRC_FILES += src/omx_swvenc_mpeg4.cpp 184 185include $(BUILD_SHARED_LIBRARY) 186endif 187 188 189# --------------------------------------------------------------------------------- 190# END 191# --------------------------------------------------------------------------------- 192