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_LICENSE_KINDS             := SPDX-license-identifier-BSD
114LOCAL_LICENSE_CONDITIONS        := notice
115LOCAL_MODULE_TAGS               := optional
116LOCAL_CFLAGS                    := $(libOmxVdec-def)
117LOCAL_C_INCLUDES                += $(libmm-vdec-inc)
118
119LOCAL_SHARED_LIBRARIES  := liblog libutils libui libbinder libcutils libdl
120
121LOCAL_SHARED_LIBRARIES  += libdivxdrmdecrypt
122LOCAL_SHARED_LIBRARIES  += libqdMetaData
123
124LOCAL_SRC_FILES         := vdec/src/frameparser.cpp
125LOCAL_SRC_FILES         += vdec/src/h264_utils.cpp
126LOCAL_SRC_FILES         += vdec/src/ts_parser.cpp
127LOCAL_SRC_FILES         += vdec/src/mp4_utils.cpp
128LOCAL_SRC_FILES         += vdec/src/hevc_utils.cpp
129ifneq ($(filter msm8974 msm8610 msm8226 msm8084 msm8952 msm8992 msm8994,$(TARGET_BOARD_PLATFORM)),)
130LOCAL_SRC_FILES         += vdec/src/omx_vdec_msm8974.cpp
131else
132LOCAL_SHARED_LIBRARIES  += libhardware
133libmm-vdec-inc          += $(TARGET_OUT_HEADERS)/qcom/display
134LOCAL_SRC_FILES         += vdec/src/power_module.cpp
135LOCAL_SRC_FILES         += vdec/src/omx_vdec.cpp
136endif
137
138LOCAL_SRC_FILES         += common/src/extra_data_handler.cpp
139LOCAL_SRC_FILES         += common/src/vidc_color_converter.cpp
140
141# omx_vdec_msm8974.cpp:9375:16: address of array 'extra->data' will always evaluate to 'true'
142LOCAL_CLANG_CFLAGS      += -Wno-pointer-bool-conversion
143
144LOCAL_CFLAGS            += -Wno-error
145
146include $(BUILD_SHARED_LIBRARY)
147
148
149# ---------------------------------------------------------------------------------
150# 			Make the Shared library (libOmxVdecHevc)
151# ---------------------------------------------------------------------------------
152
153include $(CLEAR_VARS)
154LOCAL_PATH:= $(ROOT_DIR)
155
156ifneq ($(filter msm8974 msm8610 msm8084 msm8952 msm8992 msm8994,$(TARGET_BOARD_PLATFORM)),)
157
158LOCAL_MODULE                    := libOmxVdecHevc
159LOCAL_LICENSE_KINDS             := SPDX-license-identifier-BSD
160LOCAL_LICENSE_CONDITIONS        := notice
161LOCAL_MODULE_TAGS               := optional
162LOCAL_CFLAGS                    := $(libOmxVdec-def)
163LOCAL_C_INCLUDES                += $(libmm-vdec-inc)
164
165LOCAL_SHARED_LIBRARIES  := liblog libutils libui libbinder libcutils libdl
166
167LOCAL_SHARED_LIBRARIES  += libdivxdrmdecrypt
168LOCAL_SHARED_LIBRARIES  += libqdMetaData
169
170LOCAL_SRC_FILES         := vdec/src/frameparser.cpp
171LOCAL_SRC_FILES         += vdec/src/h264_utils.cpp
172LOCAL_SRC_FILES         += vdec/src/ts_parser.cpp
173LOCAL_SRC_FILES         += vdec/src/mp4_utils.cpp
174
175LOCAL_SRC_FILES         += vdec/src/omx_vdec_hevc.cpp
176LOCAL_SRC_FILES         += vdec/src/hevc_utils.cpp
177
178LOCAL_SRC_FILES         += common/src/extra_data_handler.cpp
179LOCAL_SRC_FILES         += common/src/vidc_color_converter.cpp
180
181LOCAL_CFLAGS            += -Wno-error
182
183#include $(BUILD_SHARED_LIBRARY)
184
185endif
186
187# ---------------------------------------------------------------------------------
188# 			Make the apps-test (mm-vdec-omx-test)
189# ---------------------------------------------------------------------------------
190include $(CLEAR_VARS)
191
192mm-vdec-test-inc    := hardware/qcom/media/msm8974/mm-core/inc
193mm-vdec-test-inc    += $(LOCAL_PATH)/vdec/inc
194mm-vdec-test-inc    += $(vdec-inc)
195
196LOCAL_MODULE                    := mm-vdec-omx-test
197LOCAL_LICENSE_KINDS             := SPDX-license-identifier-BSD
198LOCAL_LICENSE_CONDITIONS        := notice
199LOCAL_MODULE_TAGS               := optional
200LOCAL_CFLAGS                    := $(libOmxVdec-def)
201LOCAL_C_INCLUDES                := $(mm-vdec-test-inc)
202
203LOCAL_SHARED_LIBRARIES    := libutils libui libOmxCore libOmxVdec libbinder libcutils
204
205LOCAL_SRC_FILES           := vdec/src/queue.c
206LOCAL_SRC_FILES           += vdec/test/omx_vdec_test.cpp
207
208#include $(BUILD_EXECUTABLE)
209
210# ---------------------------------------------------------------------------------
211# 			Make the driver-test (mm-video-driver-test)
212# ---------------------------------------------------------------------------------
213include $(CLEAR_VARS)
214
215mm-vdec-drv-test-inc    := hardware/qcom/media/msm8974/mm-core/inc
216mm-vdec-drv-test-inc    += $(LOCAL_PATH)/vdec/inc
217mm-vdec-drv-test-inc    += $(vdec-inc)
218
219LOCAL_MODULE                    := mm-video-driver-test
220LOCAL_LICENSE_KINDS             := SPDX-license-identifier-BSD
221LOCAL_LICENSE_CONDITIONS        := notice
222LOCAL_MODULE_TAGS               := optional
223LOCAL_CFLAGS                    := $(libOmxVdec-def)
224LOCAL_C_INCLUDES                := $(mm-vdec-drv-test-inc)
225
226LOCAL_SRC_FILES                 := vdec/src/message_queue.c
227LOCAL_SRC_FILES                 += vdec/test/decoder_driver_test.c
228
229#include $(BUILD_EXECUTABLE)
230
231endif #BUILD_TINY_ANDROID
232
233# ---------------------------------------------------------------------------------
234#                END
235# ---------------------------------------------------------------------------------
236