• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
44ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_UBWC)),true)
45libmm-venc-def += -D_UBWC_
46endif
47
48ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_USE_NV21)),true)
49libmm-venc-def += -D_NV21_
50endif
51
52ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_VQZIP)),true)
53libmm-venc-def += -D_VQZIP_
54endif
55
56ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_PQ)),true)
57ifneq ($(wildcard vendor/qcom/$(TARGET_BOARD_PLATFORM)/prebuilts/grease/),)
58libmm-venc-def += -D_PQ_
59else
60$(warning "venc: PQ compiled out")
61endif
62endif
63
64ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_USE_FLAG_MSM8226)),true)
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
74ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true)
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
97ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_PQ)),true)
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_MODULE_TAGS               := optional
114LOCAL_VENDOR_MODULE             := true
115LOCAL_CFLAGS                    := $(libmm-venc-def)
116LOCAL_C_INCLUDES                := $(libmm-venc-inc)
117LOCAL_ADDITIONAL_DEPENDENCIES   := $(libmm-venc-add-dep)
118
119LOCAL_PRELINK_MODULE      := false
120LOCAL_SHARED_LIBRARIES    := liblog libcutils libdl
121LOCAL_HEADER_LIBRARIES    := \
122    media_plugin_headers \
123    libhardware_headers \
124
125ifeq ($(BOARD_USES_ADRENO), true)
126LOCAL_SHARED_LIBRARIES    += libc2dcolorconvert
127endif # ($(BOARD_USES_ADRENO), true)
128LOCAL_SHARED_LIBRARIES += libqdMetaData
129LOCAL_STATIC_LIBRARIES    := libOmxVidcCommon
130
131LOCAL_SRC_FILES   := src/omx_video_base.cpp
132LOCAL_SRC_FILES   += src/omx_video_encoder.cpp
133LOCAL_SRC_FILES   += src/video_encoder_device_v4l2.cpp
134
135# Allow implicit fallthrough in omx_video_encoder.cpp:2322 until it is fixed.
136LOCAL_CFLAGS += -Wno-error=implicit-fallthrough
137
138include $(BUILD_SHARED_LIBRARY)
139
140ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_VENC_MPEG4)),true)
141# ---------------------------------------------------------------------------------
142# 			Make the Shared library (libOmxSwVencMpeg4)
143# ---------------------------------------------------------------------------------
144
145include $(CLEAR_VARS)
146
147libmm-venc-inc      += $(TARGET_OUT_HEADERS)/mm-video/swvenc
148
149LOCAL_MODULE                    := libOmxSwVencMpeg4
150
151LOCAL_MODULE_TAGS               := optional
152LOCAL_VENDOR_MODULE             := true
153LOCAL_CFLAGS                    := $(libmm-venc-def)
154LOCAL_C_INCLUDES                := $(libmm-venc-inc)
155LOCAL_ADDITIONAL_DEPENDENCIES   := $(libmm-venc-add-dep)
156
157LOCAL_PRELINK_MODULE      := false
158LOCAL_SHARED_LIBRARIES    := liblog libcutils libdl
159LOCAL_SHARED_LIBRARIES    += libMpeg4SwEncoder
160ifeq ($(BOARD_USES_ADRENO), true)
161LOCAL_SHARED_LIBRARIES    += libc2dcolorconvert
162endif # ($(BOARD_USES_ADRENO), true)
163LOCAL_STATIC_LIBRARIES    := libOmxVidcCommon
164
165LOCAL_SRC_FILES   := src/omx_video_base.cpp
166LOCAL_SRC_FILES   += src/omx_swvenc_mpeg4.cpp
167
168LOCAL_CFLAGS      += -Wno-error
169
170include $(BUILD_SHARED_LIBRARY)
171endif
172
173
174# ---------------------------------------------------------------------------------
175# 					END
176# ---------------------------------------------------------------------------------
177