1ifneq ($(BUILD_TINY_ANDROID),true)
2
3ROOT_DIR := $(call my-dir)
4OMX_VIDEO_PATH := $(ROOT_DIR)/..
5
6include $(CLEAR_VARS)
7LOCAL_PATH:= $(ROOT_DIR)
8
9# ---------------------------------------------------------------------------------
10# 				Common definitons
11# ---------------------------------------------------------------------------------
12
13libOmxVdec-def := -D__alignx\(x\)=__attribute__\(\(__aligned__\(x\)\)\)
14libOmxVdec-def += -D__align=__alignx
15libOmxVdec-def += -Dinline=__inline
16libOmxVdec-def += -g -O3
17libOmxVdec-def += -DIMAGE_APPS_PROC
18libOmxVdec-def += -D_ANDROID_
19libOmxVdec-def += -DCDECL
20libOmxVdec-def += -DT_ARM
21libOmxVdec-def += -DNO_ARM_CLZ
22libOmxVdec-def += -UENABLE_DEBUG_LOW
23libOmxVdec-def += -DENABLE_DEBUG_HIGH
24libOmxVdec-def += -DENABLE_DEBUG_ERROR
25libOmxVdec-def += -UINPUT_BUFFER_LOG
26libOmxVdec-def += -UOUTPUT_BUFFER_LOG
27libOmxVdec-def += -Wno-parentheses
28ifeq ($(TARGET_BOARD_PLATFORM),msm8660)
29libOmxVdec-def += -DMAX_RES_1080P
30libOmxVdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT
31libOmxVdec-def += -DTEST_TS_FROM_SEI
32endif
33ifeq ($(TARGET_BOARD_PLATFORM),msm8960)
34libOmxVdec-def += -DMAX_RES_1080P
35libOmxVdec-def += -DMAX_RES_1080P_EBI
36libOmxVdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT
37libOmxVdec-def += -D_MSM8960_
38endif
39ifeq ($(TARGET_BOARD_PLATFORM),msm8974)
40libOmxVdec-def += -DMAX_RES_1080P
41libOmxVdec-def += -DMAX_RES_1080P_EBI
42libOmxVdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT
43libOmxVdec-def += -D_MSM8974_
44libOmxVdec-def += -D_HEVC_USE_ADSP_HEAP_
45libOmxVdec-def += -DDISABLE_INPUT_BUFFER_CACHE
46libOmxVdec-def += -DDISABLE_EXTRADATA
47endif
48ifeq ($(TARGET_BOARD_PLATFORM),msm7627a)
49libOmxVdec-def += -DMAX_RES_720P
50endif
51ifeq ($(TARGET_BOARD_PLATFORM),msm7630_surf)
52libOmxVdec-def += -DMAX_RES_720P
53endif
54ifeq ($(TARGET_BOARD_PLATFORM),msm8610)
55libOmxVdec-def += -DMAX_RES_1080P
56libOmxVdec-def += -DMAX_RES_1080P_EBI
57libOmxVdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT
58libOmxVdec-def += -DSMOOTH_STREAMING_DISABLED
59libOmxVdec-def += -DH264_PROFILE_LEVEL_CHECK
60libOmxVdec-def += -D_MSM8974_
61endif
62ifeq ($(TARGET_BOARD_PLATFORM),msm8226)
63libOmxVdec-def += -DMAX_RES_1080P
64libOmxVdec-def += -DMAX_RES_1080P_EBI
65libOmxVdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT
66libOmxVdec-def += -D_MSM8974_
67endif
68ifeq ($(TARGET_BOARD_PLATFORM),msm8084)
69libOmxVdec-def += -DMAX_RES_1080P
70libOmxVdec-def += -DMAX_RES_1080P_EBI
71libOmxVdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT
72libOmxVdec-def += -D_MSM8974_
73libOmxVdec-def += -D_ION_HEAP_MASK_COMPATIBILITY_WA
74libOmxVdec-def += -DDISABLE_INPUT_BUFFER_CACHE
75endif
76ifneq ($(filter msm8952 msm8992 msm8994,$(TARGET_BOARD_PLATFORM)),)
77libOmxVdec-def += -DMAX_RES_1080P
78libOmxVdec-def += -DMAX_RES_1080P_EBI
79libOmxVdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT
80libOmxVdec-def += -D_MSM8974_
81endif
82libOmxVdec-def += -D_ANDROID_ICS_
83
84ifeq ($(TARGET_USES_ION),true)
85libOmxVdec-def += -DUSE_ION
86endif
87
88libOmxVdec-def += -DFLEXYUV_SUPPORTED
89libOmxVdec-def += -DADAPTIVE_PLAYBACK_SUPPORTED
90
91# ---------------------------------------------------------------------------------
92# 			Make the Shared library (libOmxVdec)
93# ---------------------------------------------------------------------------------
94
95include $(CLEAR_VARS)
96LOCAL_PATH:= $(ROOT_DIR)
97
98libmm-vdec-inc          := $(LOCAL_PATH)/vdec/inc
99libmm-vdec-inc          += $(OMX_VIDEO_PATH)/vidc/common/inc
100libmm-vdec-inc          += hardware/qcom/media/msm8974/mm-core/inc
101#DRM include - Interface which loads the DRM library
102libmm-vdec-inc	        += $(OMX_VIDEO_PATH)/DivxDrmDecrypt/inc
103libmm-vdec-inc          += $(TARGET_OUT_HEADERS)/qcom/display
104libmm-vdec-inc          += $(TARGET_OUT_HEADERS)/adreno
105libmm-vdec-inc          += frameworks/native/include/media/openmax
106libmm-vdec-inc          += frameworks/native/include/media/hardware
107libmm-vdec-inc          += $(vdec-inc)
108libmm-vdec-inc      += hardware/qcom/media/msm8974/libc2dcolorconvert
109libmm-vdec-inc      += frameworks/av/include/media/stagefright
110
111
112LOCAL_MODULE                    := libOmxVdec
113LOCAL_MODULE_TAGS               := optional
114LOCAL_CFLAGS                    := $(libOmxVdec-def)
115LOCAL_C_INCLUDES                += $(libmm-vdec-inc)
116
117LOCAL_SHARED_LIBRARIES  := liblog libutils libbinder libcutils libdl
118
119LOCAL_SHARED_LIBRARIES  += libdivxdrmdecrypt
120LOCAL_SHARED_LIBRARIES  += libqdMetaData
121
122LOCAL_SRC_FILES         := vdec/src/frameparser.cpp
123LOCAL_SRC_FILES         += vdec/src/h264_utils.cpp
124LOCAL_SRC_FILES         += vdec/src/ts_parser.cpp
125LOCAL_SRC_FILES         += vdec/src/mp4_utils.cpp
126LOCAL_SRC_FILES         += vdec/src/hevc_utils.cpp
127ifneq ($(filter msm8974 msm8610 msm8226 msm8084 msm8952 msm8992 msm8994,$(TARGET_BOARD_PLATFORM)),)
128LOCAL_SRC_FILES         += vdec/src/omx_vdec_msm8974.cpp
129else
130LOCAL_SHARED_LIBRARIES  += libhardware
131libmm-vdec-inc          += $(TARGET_OUT_HEADERS)/qcom/display
132LOCAL_SRC_FILES         += vdec/src/power_module.cpp
133LOCAL_SRC_FILES         += vdec/src/omx_vdec.cpp
134endif
135
136LOCAL_SRC_FILES         += common/src/extra_data_handler.cpp
137LOCAL_SRC_FILES         += common/src/vidc_color_converter.cpp
138
139# omx_vdec_msm8974.cpp:9375:16: address of array 'extra->data' will always evaluate to 'true'
140LOCAL_CLANG_CFLAGS      += -Wno-pointer-bool-conversion
141
142include $(BUILD_SHARED_LIBRARY)
143
144
145# ---------------------------------------------------------------------------------
146# 			Make the Shared library (libOmxVdecHevc)
147# ---------------------------------------------------------------------------------
148
149include $(CLEAR_VARS)
150LOCAL_PATH:= $(ROOT_DIR)
151
152ifneq ($(filter msm8974 msm8610 msm8084 msm8952 msm8992 msm8994,$(TARGET_BOARD_PLATFORM)),)
153
154LOCAL_MODULE                    := libOmxVdecHevc
155LOCAL_MODULE_TAGS               := optional
156LOCAL_CFLAGS                    := $(libOmxVdec-def)
157LOCAL_C_INCLUDES                += $(libmm-vdec-inc)
158
159LOCAL_SHARED_LIBRARIES  := liblog libutils libbinder libcutils libdl
160
161LOCAL_SHARED_LIBRARIES  += libdivxdrmdecrypt
162LOCAL_SHARED_LIBRARIES  += libqdMetaData
163
164LOCAL_SRC_FILES         := vdec/src/frameparser.cpp
165LOCAL_SRC_FILES         += vdec/src/h264_utils.cpp
166LOCAL_SRC_FILES         += vdec/src/ts_parser.cpp
167LOCAL_SRC_FILES         += vdec/src/mp4_utils.cpp
168
169LOCAL_SRC_FILES         += vdec/src/omx_vdec_hevc.cpp
170LOCAL_SRC_FILES         += vdec/src/hevc_utils.cpp
171
172LOCAL_SRC_FILES         += common/src/extra_data_handler.cpp
173LOCAL_SRC_FILES         += common/src/vidc_color_converter.cpp
174
175#include $(BUILD_SHARED_LIBRARY)
176
177endif
178
179# ---------------------------------------------------------------------------------
180# 			Make the apps-test (mm-vdec-omx-test)
181# ---------------------------------------------------------------------------------
182include $(CLEAR_VARS)
183
184mm-vdec-test-inc    := hardware/qcom/media/msm8974/mm-core/inc
185mm-vdec-test-inc    += $(LOCAL_PATH)/vdec/inc
186mm-vdec-test-inc    += $(vdec-inc)
187
188LOCAL_MODULE                    := mm-vdec-omx-test
189LOCAL_MODULE_TAGS               := optional
190LOCAL_CFLAGS                    := $(libOmxVdec-def)
191LOCAL_C_INCLUDES                := $(mm-vdec-test-inc)
192
193LOCAL_SHARED_LIBRARIES    := libutils libOmxCore libOmxVdec libbinder libcutils
194
195LOCAL_SRC_FILES           := vdec/src/queue.c
196LOCAL_SRC_FILES           += vdec/test/omx_vdec_test.cpp
197
198#include $(BUILD_EXECUTABLE)
199
200# ---------------------------------------------------------------------------------
201# 			Make the driver-test (mm-video-driver-test)
202# ---------------------------------------------------------------------------------
203include $(CLEAR_VARS)
204
205mm-vdec-drv-test-inc    := hardware/qcom/media/msm8974/mm-core/inc
206mm-vdec-drv-test-inc    += $(LOCAL_PATH)/vdec/inc
207mm-vdec-drv-test-inc    += $(vdec-inc)
208
209LOCAL_MODULE                    := mm-video-driver-test
210LOCAL_MODULE_TAGS               := optional
211LOCAL_CFLAGS                    := $(libOmxVdec-def)
212LOCAL_C_INCLUDES                := $(mm-vdec-drv-test-inc)
213
214LOCAL_SRC_FILES                 := vdec/src/message_queue.c
215LOCAL_SRC_FILES                 += vdec/test/decoder_driver_test.c
216
217#include $(BUILD_EXECUTABLE)
218
219endif #BUILD_TINY_ANDROID
220
221# ---------------------------------------------------------------------------------
222#                END
223# ---------------------------------------------------------------------------------
224