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