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