1 LOCAL_PATH := $(call my-dir) 2 include $(CLEAR_VARS) 3 4 # --------------------------------------------------------------------------------- 5 # Common definitons 6 # --------------------------------------------------------------------------------- 7 8 libmm-venc-def := -g -O3 -Dlrintf=_ffix_r 9 libmm-venc-def += -D__align=__alignx 10 libmm-venc-def += -D__alignx\(x\)=__attribute__\(\(__aligned__\(x\)\)\) 11 libmm-venc-def += -DT_ARM 12 libmm-venc-def += -Dinline=__inline 13 libmm-venc-def += -D_ANDROID_ 14 libmm-venc-def += -UENABLE_DEBUG_LOW 15 libmm-venc-def += -UENABLE_DEBUG_HIGH 16 libmm-venc-def += -DENABLE_DEBUG_ERROR 17 libmm-venc-def += -UINPUT_BUFFER_LOG 18 libmm-venc-def += -UOUTPUT_BUFFER_LOG 19 libmm-venc-def += -USINGLE_ENCODER_INSTANCE 20 libmm-venc-def += -Werror 21 libmm-venc-def += -D_ANDROID_ICS_ 22 libmm-venc-def += -D_MSM8974_ 23 24 TARGETS_THAT_USE_FLAG_MSM8226 := msm8226 msm8916 msm8909 25 TARGETS_THAT_NEED_SW_VENC_MPEG4 := msm8909 msm8937 26 TARGETS_THAT_NEED_SW_VENC_HEVC := msm8992 27 TARGETS_THAT_SUPPORT_UBWC := msm8996 msmcobalt 28 TARGETS_THAT_SUPPORT_VQZIP := msm8996 msmcobalt 29 TARGETS_THAT_SUPPORT_PQ := msm8996 msmcobalt 30 31 ifeq ($(TARGET_BOARD_PLATFORM),msm8610) 32 libmm-venc-def += -DMAX_RES_720P 33 libmm-venc-def += -D_MSM8610_ 34 else 35 ifeq ($(TARGET_BOARD_PLATFORM),msm8226) 36 libmm-venc-def += -DMAX_RES_1080P 37 else 38 libmm-venc-def += -DMAX_RES_1080P 39 libmm-venc-def += -DMAX_RES_1080P_EBI 40 endif 41 endif 42 43 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_UBWC)),true) 44 libmm-venc-def += -D_UBWC_ 45 endif 46 47 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_VQZIP)),true) 48 libmm-venc-def += -D_VQZIP_ 49 endif 50 51 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_PQ)),true) 52 libmm-venc-def += -D_PQ_ 53 endif 54 55 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_USE_FLAG_MSM8226)),true) 56 libmm-venc-def += -D_MSM8226_ 57 endif 58 59 ifeq ($(TARGET_USES_ION),true) 60 libmm-venc-def += -DUSE_ION 61 endif 62 63 ifeq ($(TARGET_USES_MEDIA_EXTENSIONS),true) 64 libmm-venc-def += -DUSE_NATIVE_HANDLE_SOURCE 65 endif 66 67 ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true) 68 libmm-venc-def += -DMASTER_SIDE_CP 69 endif 70 71 ifeq ($(TARGET_USES_MEDIA_EXTENSIONS),true) 72 libmm-venc-def += -DSUPPORT_CONFIG_INTRA_REFRESH 73 endif 74 75 # Common Includes 76 libmm-venc-inc := $(LOCAL_PATH)/inc 77 libmm-venc-inc += $(QCOM_MEDIA_ROOT)/mm-video-v4l2/vidc/common/inc 78 libmm-venc-inc += $(QCOM_MEDIA_ROOT)/mm-core/inc 79 libmm-venc-inc += $(QCOM_MEDIA_ROOT)/libstagefrighthw 80 libmm-venc-inc += $(TARGET_OUT_HEADERS)/qcom/display 81 libmm-venc-inc += $(TARGET_OUT_HEADERS)/adreno 82 libmm-venc-inc += frameworks/native/include/media/hardware 83 libmm-venc-inc += frameworks/native/include/media/openmax 84 libmm-venc-inc += $(QCOM_MEDIA_ROOT)/libc2dcolorconvert 85 libmm-venc-inc += $(TARGET_OUT_HEADERS)/libvqzip 86 libmm-venc-inc += $(TARGET_OUT_HEADERS)/libgpustats 87 libmm-venc-inc += frameworks/av/include/media/stagefright 88 ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) 89 libmm-venc-inc += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 90 91 # Common Dependencies 92 libmm-venc-add-dep := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 93 endif 94 95 # --------------------------------------------------------------------------------- 96 # Make the Shared library (libOmxVenc) 97 # --------------------------------------------------------------------------------- 98 99 include $(CLEAR_VARS) 100 101 LOCAL_MODULE := libOmxVenc 102 LOCAL_MODULE_TAGS := optional 103 LOCAL_CFLAGS := $(libmm-venc-def) 104 LOCAL_C_INCLUDES := $(libmm-venc-inc) 105 LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-venc-add-dep) 106 107 LOCAL_PRELINK_MODULE := false 108 LOCAL_SHARED_LIBRARIES := liblog libutils libbinder libcutils \ 109 libdl libgui 110 ifeq ($(BOARD_USES_ADRENO), true) 111 LOCAL_SHARED_LIBRARIES += libc2dcolorconvert 112 endif # ($(BOARD_USES_ADRENO), true) 113 LOCAL_SHARED_LIBRARIES += libqdMetaData 114 LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 115 116 LOCAL_SRC_FILES := src/omx_video_base.cpp 117 LOCAL_SRC_FILES += src/omx_video_encoder.cpp 118 LOCAL_SRC_FILES += src/video_encoder_device_v4l2.cpp 119 120 include $(BUILD_SHARED_LIBRARY) 121 122 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_VENC_MPEG4)),true) 123 # --------------------------------------------------------------------------------- 124 # Make the Shared library (libOmxSwVencMpeg4) 125 # --------------------------------------------------------------------------------- 126 127 include $(CLEAR_VARS) 128 129 libmm-venc-inc += $(TARGET_OUT_HEADERS)/mm-video/swvenc 130 131 LOCAL_MODULE := libOmxSwVencMpeg4 132 133 LOCAL_MODULE_TAGS := optional 134 LOCAL_CFLAGS := $(libmm-venc-def) 135 LOCAL_C_INCLUDES := $(libmm-venc-inc) 136 LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-venc-add-dep) 137 138 LOCAL_PRELINK_MODULE := false 139 LOCAL_SHARED_LIBRARIES := liblog libutils libbinder libcutils \ 140 libdl libgui 141 LOCAL_SHARED_LIBRARIES += libMpeg4SwEncoder 142 ifeq ($(BOARD_USES_ADRENO), true) 143 LOCAL_SHARED_LIBRARIES += libc2dcolorconvert 144 endif # ($(BOARD_USES_ADRENO), true) 145 LOCAL_STATIC_LIBRARIES := libOmxVidcCommon 146 147 LOCAL_SRC_FILES := src/omx_video_base.cpp 148 LOCAL_SRC_FILES += src/omx_swvenc_mpeg4.cpp 149 150 include $(BUILD_SHARED_LIBRARY) 151 endif 152 153 154 # --------------------------------------------------------------------------------- 155 # END 156 # --------------------------------------------------------------------------------- 157