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_ 22libmm-venc-def += -D_MSM8974_ 23 24TARGETS_THAT_USE_FLAG_MSM8226 := msm8226 msm8916 msm8909 25TARGETS_THAT_NEED_SW_VENC_MPEG4 := msm8909 msm8937 26TARGETS_THAT_NEED_SW_VENC_HEVC := msm8992 27TARGETS_THAT_SUPPORT_UBWC := msm8996 msm8998 28TARGETS_THAT_SUPPORT_VQZIP := 29TARGETS_THAT_SUPPORT_PQ := msm8998 30TARGETS_THAT_USE_NV21 := sdm660 msm8953 31 32ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 33libmm-venc-def += -DMAX_RES_720P 34libmm-venc-def += -D_MSM8610_ 35else 36ifeq ($(TARGET_BOARD_PLATFORM),msm8226) 37libmm-venc-def += -DMAX_RES_1080P 38else 39libmm-venc-def += -DMAX_RES_1080P 40libmm-venc-def += -DMAX_RES_1080P_EBI 41endif 42endif 43 44ifneq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_SUPPORT_UBWC))) 45libmm-venc-def += -D_UBWC_ 46endif 47 48ifneq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_USE_NV21))) 49libmm-venc-def += -D_NV21_ 50endif 51 52ifneq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_SUPPORT_VQZIP))) 53libmm-venc-def += -D_VQZIP_ 54endif 55 56ifneq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_SUPPORT_PQ))) 57ifneq ($(wildcard vendor/qcom/$(TARGET_BOARD_PLATFORM)/prebuilts/grease/),) 58libmm-venc-def += -D_PQ_ 59else 60$(warning "venc: PQ compiled out") 61endif 62endif 63 64ifneq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_USE_FLAG_MSM8226))) 65libmm-venc-def += -D_MSM8226_ 66endif 67 68ifeq ($(TARGET_USES_ION),true) 69libmm-venc-def += -DUSE_ION 70endif 71 72libmm-venc-def += -DUSE_NATIVE_HANDLE_SOURCE 73 74ifneq (,$(call is-board-platform-in-list2, $(MASTER_SIDE_CP_TARGET_LIST))) 75libmm-venc-def += -DMASTER_SIDE_CP 76endif 77 78libmm-venc-def += -DSUPPORT_CONFIG_INTRA_REFRESH 79 80libmm-venc-def += -DUSE_CAMERA_METABUFFER_UTILS 81 82# Common Includes 83libmm-venc-inc := $(LOCAL_PATH)/inc 84libmm-venc-inc += $(QCOM_MEDIA_ROOT)/mm-video-v4l2/vidc/common/inc 85libmm-venc-inc += $(QCOM_MEDIA_ROOT)/mm-core/inc 86libmm-venc-inc += $(QCOM_MEDIA_ROOT)/libstagefrighthw 87libmm-venc-inc += $(TARGET_OUT_HEADERS)/qcom/display 88libmm-venc-inc += $(TARGET_OUT_HEADERS)/adreno 89libmm-venc-inc += frameworks/native/include/media/hardware 90libmm-venc-inc += frameworks/native/include/media/openmax 91libmm-venc-inc += frameworks/native/libs/nativewindow/include 92libmm-venc-inc += frameworks/native/libs/nativebase/include 93libmm-venc-inc += frameworks/native/libs/arect/include 94libmm-venc-inc += $(QCOM_MEDIA_ROOT)/libc2dcolorconvert 95libmm-venc-inc += $(TARGET_OUT_HEADERS)/libvqzip 96libmm-venc-inc += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 97ifneq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_SUPPORT_PQ))) 98libmm-venc-inc += $(TARGET_OUT_HEADERS)/libgpustats 99endif 100 101# Common Dependencies 102ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) 103libmm-venc-add-dep := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 104endif 105 106# --------------------------------------------------------------------------------- 107# Make the Shared library (libOmxVenc) 108# --------------------------------------------------------------------------------- 109 110include $(CLEAR_VARS) 111 112LOCAL_MODULE := libOmxVenc 113LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD 114LOCAL_LICENSE_CONDITIONS := notice 115LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE 116LOCAL_MODULE_TAGS := optional 117LOCAL_VENDOR_MODULE := true 118LOCAL_CFLAGS := $(libmm-venc-def) 119LOCAL_C_INCLUDES := $(libmm-venc-inc) 120LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-venc-add-dep) 121 122LOCAL_PRELINK_MODULE := false 123LOCAL_SHARED_LIBRARIES := liblog libcutils libdl 124LOCAL_HEADER_LIBRARIES := \ 125 media_plugin_headers \ 126 libhardware_headers \ 127 128ifeq ($(BOARD_USES_ADRENO), true) 129LOCAL_SHARED_LIBRARIES += libc2dcolorconvert 130endif # ($(BOARD_USES_ADRENO), true) 131LOCAL_SHARED_LIBRARIES += libqdMetaData 132LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 133 134LOCAL_SRC_FILES := src/omx_video_base.cpp 135LOCAL_SRC_FILES += src/omx_video_encoder.cpp 136LOCAL_SRC_FILES += src/video_encoder_device_v4l2.cpp 137 138# Allow implicit fallthrough in omx_video_encoder.cpp:2322 until it is fixed. 139LOCAL_CFLAGS += -Wno-implicit-fallthrough 140 141include $(BUILD_SHARED_LIBRARY) 142 143ifneq (,$(call is-board-platform-in-list2, $(TARGETS_THAT_NEED_SW_VENC_MPEG4))) 144# --------------------------------------------------------------------------------- 145# Make the Shared library (libOmxSwVencMpeg4) 146# --------------------------------------------------------------------------------- 147 148include $(CLEAR_VARS) 149 150libmm-venc-inc += $(TARGET_OUT_HEADERS)/mm-video/swvenc 151 152LOCAL_MODULE := libOmxSwVencMpeg4 153LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD 154LOCAL_LICENSE_CONDITIONS := notice 155LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../NOTICE 156 157LOCAL_MODULE_TAGS := optional 158LOCAL_VENDOR_MODULE := true 159LOCAL_CFLAGS := $(libmm-venc-def) 160LOCAL_C_INCLUDES := $(libmm-venc-inc) 161LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-venc-add-dep) 162 163LOCAL_PRELINK_MODULE := false 164LOCAL_SHARED_LIBRARIES := liblog libcutils libdl 165LOCAL_SHARED_LIBRARIES += libMpeg4SwEncoder 166ifeq ($(BOARD_USES_ADRENO), true) 167LOCAL_SHARED_LIBRARIES += libc2dcolorconvert 168endif # ($(BOARD_USES_ADRENO), true) 169LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 170 171LOCAL_SRC_FILES := src/omx_video_base.cpp 172LOCAL_SRC_FILES += src/omx_swvenc_mpeg4.cpp 173 174LOCAL_CFLAGS += -Wno-error 175 176include $(BUILD_SHARED_LIBRARY) 177endif 178 179 180# --------------------------------------------------------------------------------- 181# END 182# --------------------------------------------------------------------------------- 183