Home | History | Annotate | Download | only in venc
      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 msm8998
     28 TARGETS_THAT_SUPPORT_VQZIP := msm8996 msm8998
     29 TARGETS_THAT_SUPPORT_PQ := msm8996 msm8998 sdm660 msm8953
     30 TARGETS_THAT_USE_NV21 := sdm660 msm8953
     31 
     32 ifeq ($(TARGET_BOARD_PLATFORM),msm8610)
     33 libmm-venc-def += -DMAX_RES_720P
     34 libmm-venc-def += -D_MSM8610_
     35 else
     36 ifeq ($(TARGET_BOARD_PLATFORM),msm8226)
     37 libmm-venc-def += -DMAX_RES_1080P
     38 else
     39 libmm-venc-def += -DMAX_RES_1080P
     40 libmm-venc-def += -DMAX_RES_1080P_EBI
     41 endif
     42 endif
     43 
     44 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_UBWC)),true)
     45 libmm-venc-def += -D_UBWC_
     46 endif
     47 
     48 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_USE_NV21)),true)
     49 libmm-venc-def += -D_NV21_
     50 endif
     51 
     52 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_VQZIP)),true)
     53 libmm-venc-def += -D_VQZIP_
     54 endif
     55 
     56 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_PQ)),true)
     57 libmm-venc-def += -D_PQ_
     58 endif
     59 
     60 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_USE_FLAG_MSM8226)),true)
     61 libmm-venc-def += -D_MSM8226_
     62 endif
     63 
     64 ifeq ($(TARGET_USES_ION),true)
     65 libmm-venc-def += -DUSE_ION
     66 endif
     67 
     68 ifeq ($(TARGET_USES_MEDIA_EXTENSIONS),true)
     69 libmm-venc-def += -DUSE_NATIVE_HANDLE_SOURCE
     70 endif
     71 
     72 ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true)
     73 libmm-venc-def += -DMASTER_SIDE_CP
     74 endif
     75 
     76 ifeq ($(TARGET_USES_MEDIA_EXTENSIONS),true)
     77 libmm-venc-def += -DSUPPORT_CONFIG_INTRA_REFRESH
     78 endif
     79 
     80 libmm-venc-def += -DUSE_CAMERA_METABUFFER_UTILS
     81 
     82 # Common Includes
     83 libmm-venc-inc      := $(LOCAL_PATH)/inc
     84 libmm-venc-inc      += $(QCOM_MEDIA_ROOT)/mm-video-v4l2/vidc/common/inc
     85 libmm-venc-inc      += $(QCOM_MEDIA_ROOT)/mm-core/inc
     86 libmm-venc-inc      += $(QCOM_MEDIA_ROOT)/libstagefrighthw
     87 libmm-venc-inc      += $(TARGET_OUT_HEADERS)/qcom/display
     88 libmm-venc-inc      += $(TARGET_OUT_HEADERS)/adreno
     89 libmm-venc-inc      += frameworks/native/include/media/hardware
     90 libmm-venc-inc      += frameworks/native/include/media/openmax
     91 libmm-venc-inc      += $(QCOM_MEDIA_ROOT)/libc2dcolorconvert
     92 libmm-venc-inc      += $(TARGET_OUT_HEADERS)/libvqzip
     93 libmm-venc-inc      += frameworks/av/include/media/stagefright
     94 libmm-venc-inc      += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
     95 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_PQ)),true)
     96 libmm-venc-inc      += $(TARGET_OUT_HEADERS)/libgpustats
     97 endif
     98 
     99 # Common Dependencies
    100 ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true)
    101 libmm-venc-add-dep  := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
    102 endif
    103 
    104 # ---------------------------------------------------------------------------------
    105 # 			Make the Shared library (libOmxVenc)
    106 # ---------------------------------------------------------------------------------
    107 
    108 include $(CLEAR_VARS)
    109 
    110 LOCAL_MODULE                    := libOmxVenc
    111 LOCAL_MODULE_TAGS               := optional
    112 LOCAL_CFLAGS                    := $(libmm-venc-def)
    113 LOCAL_C_INCLUDES                := $(libmm-venc-inc)
    114 LOCAL_ADDITIONAL_DEPENDENCIES   := $(libmm-venc-add-dep)
    115 
    116 LOCAL_PRELINK_MODULE      := false
    117 LOCAL_SHARED_LIBRARIES    := liblog libutils libbinder libcutils \
    118                              libdl libgui
    119 ifeq ($(BOARD_USES_ADRENO), true)
    120 LOCAL_SHARED_LIBRARIES    += libc2dcolorconvert
    121 endif # ($(BOARD_USES_ADRENO), true)
    122 LOCAL_SHARED_LIBRARIES += libqdMetaData
    123 LOCAL_STATIC_LIBRARIES    := libOmxVidcCommon
    124 
    125 LOCAL_SRC_FILES   := src/omx_video_base.cpp
    126 LOCAL_SRC_FILES   += src/omx_video_encoder.cpp
    127 LOCAL_SRC_FILES   += src/video_encoder_device_v4l2.cpp
    128 
    129 include $(BUILD_SHARED_LIBRARY)
    130 
    131 ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_VENC_MPEG4)),true)
    132 # ---------------------------------------------------------------------------------
    133 # 			Make the Shared library (libOmxSwVencMpeg4)
    134 # ---------------------------------------------------------------------------------
    135 
    136 include $(CLEAR_VARS)
    137 
    138 libmm-venc-inc      += $(TARGET_OUT_HEADERS)/mm-video/swvenc
    139 
    140 LOCAL_MODULE                    := libOmxSwVencMpeg4
    141 
    142 LOCAL_MODULE_TAGS               := optional
    143 LOCAL_CFLAGS                    := $(libmm-venc-def)
    144 LOCAL_C_INCLUDES                := $(libmm-venc-inc)
    145 LOCAL_ADDITIONAL_DEPENDENCIES   := $(libmm-venc-add-dep)
    146 
    147 LOCAL_PRELINK_MODULE      := false
    148 LOCAL_SHARED_LIBRARIES    := liblog libutils libbinder libcutils \
    149                              libdl libgui
    150 LOCAL_SHARED_LIBRARIES    += libMpeg4SwEncoder
    151 ifeq ($(BOARD_USES_ADRENO), true)
    152 LOCAL_SHARED_LIBRARIES    += libc2dcolorconvert
    153 endif # ($(BOARD_USES_ADRENO), true)
    154 LOCAL_STATIC_LIBRARIES    := libOmxVidcCommon
    155 
    156 LOCAL_SRC_FILES   := src/omx_video_base.cpp
    157 LOCAL_SRC_FILES   += src/omx_swvenc_mpeg4.cpp
    158 
    159 include $(BUILD_SHARED_LIBRARY)
    160 endif
    161 
    162 
    163 # ---------------------------------------------------------------------------------
    164 # 					END
    165 # ---------------------------------------------------------------------------------
    166