1LOCAL_PATH := $(call my-dir)
2LIBION_HEADER_PATH_WRAPPER := $(QC_OPEN_PATH)/core-utils/build/libion_header_paths/libion_path.mk
3
4include $(CLEAR_VARS)
5include $(LIBION_HEADER_PATH_WRAPPER)
6
7# ---------------------------------------------------------------------------------
8# 				Common definitons
9# ---------------------------------------------------------------------------------
10
11libmm-vdec-def := -D__alignx\(x\)=__attribute__\(\(__aligned__\(x\)\)\)
12libmm-vdec-def += -D__align=__alignx
13libmm-vdec-def += -Dinline=__inline
14libmm-vdec-def += -g -O3
15libmm-vdec-def += -DIMAGE_APPS_PROC
16libmm-vdec-def += -D_ANDROID_
17libmm-vdec-def += -DCDECL
18libmm-vdec-def += -DT_ARM
19libmm-vdec-def += -DNO_ARM_CLZ
20libmm-vdec-def += -UENABLE_DEBUG_LOW
21libmm-vdec-def += -UENABLE_DEBUG_HIGH
22libmm-vdec-def += -DENABLE_DEBUG_ERROR
23libmm-vdec-def += -UINPUT_BUFFER_LOG
24libmm-vdec-def += -UOUTPUT_BUFFER_LOG
25libmm-vdec-def += -Wno-parentheses
26libmm-vdec-def += -D_ANDROID_ICS_
27libmm-vdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT
28
29TARGETS_THAT_HAVE_VENUS_HEVC := apq8084 msm8994 msm8996
30TARGETS_THAT_DONT_NEED_SW_VDEC := msm8226 msm8916 msm8992 msm8996 sdm660 msm8998 msm8909
31
32ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_HAVE_VENUS_HEVC)),true)
33libmm-vdec-def += -DVENUS_HEVC
34endif
35
36ifeq ($(TARGET_BOARD_PLATFORM),msm8610)
37libmm-vdec-def += -DSMOOTH_STREAMING_DISABLED
38endif
39
40libmm-vdec-def += -D_UBWC_
41
42ifeq ($(TARGET_USES_ION),true)
43libmm-vdec-def += -DUSE_ION
44endif
45
46ifneq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 18 ))" )))
47libmm-vdec-def += -DANDROID_JELLYBEAN_MR1=1
48endif
49
50ifeq ($(call is-board-platform-in-list, $(MASTER_SIDE_CP_TARGET_LIST)),true)
51libmm-vdec-def += -DMASTER_SIDE_CP
52endif
53
54ifeq ($(call is-platform-sdk-version-at-least,27),true) # O-MR1
55libmm-vdec-def += -D_ANDROID_O_MR1_DIVX_CHANGES
56endif
57
58include $(CLEAR_VARS)
59
60# Common Includes
61libmm-vdec-inc          := $(LOCAL_PATH)/inc
62libmm-vdec-inc          += $(LIBION_HEADER_PATHS)
63libmm-vdec-inc          += $(QCOM_MEDIA_ROOT)/mm-video-v4l2/vidc/common/inc
64libmm-vdec-inc          += $(QCOM_MEDIA_ROOT)/mm-core/inc
65libmm-vdec-inc          += $(QCOM_MEDIA_ROOT)/libplatformconfig
66libmm-vdec-inc          += $(TARGET_OUT_HEADERS)/adreno
67libmm-vdec-inc      	+= $(QCOM_MEDIA_ROOT)/libc2dcolorconvert
68libmm-vdec-inc      	+= $(TARGET_OUT_HEADERS)/mm-video/SwVdec
69libmm-vdec-inc      	+= $(TARGET_OUT_HEADERS)/mm-video/swvdec
70libmm-vdec-inc      	+= $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
71libmm-vdec-inc      	+= $(QCOM_MEDIA_ROOT)/libarbitrarybytes/inc
72
73ifeq ($(PLATFORM_SDK_VERSION), 18)  #JB_MR2
74libmm-vdec-def += -DANDROID_JELLYBEAN_MR2=1
75libmm-vdec-inc += $(TOP)/hardware/qcom/sm8150/media/libstagefrighthw
76endif
77
78# Common Dependencies
79libmm-vdec-add-dep := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
80
81ifeq ($(call is-platform-sdk-version-at-least, 19),true)
82# This feature is enabled for Android KK+
83libmm-vdec-def += -DADAPTIVE_PLAYBACK_SUPPORTED
84endif
85
86ifeq ($(call is-platform-sdk-version-at-least, 22),true)
87# This feature is enabled for Android LMR1
88libmm-vdec-def += -DFLEXYUV_SUPPORTED
89endif
90
91libmm-vdec-def += -DALLOCATE_OUTPUT_NATIVEHANDLE
92
93ifeq ($(ENABLE_HYP),true)
94libmm-vdec-def += -DHYPERVISOR
95libmm-vdec-inc += $(TOP)/hardware/qcom/media/hypv-intercept
96endif
97# ---------------------------------------------------------------------------------
98# 			Make the Shared library (libOmxVdec)
99# ---------------------------------------------------------------------------------
100
101include $(CLEAR_VARS)
102
103LOCAL_MODULE                    := libOmxVdec
104LOCAL_MODULE_TAGS               := optional
105LOCAL_VENDOR_MODULE             := true
106LOCAL_CFLAGS                    := $(libmm-vdec-def) -Wno-enum-compare -Werror
107
108LOCAL_HEADER_LIBRARIES := \
109        media_plugin_headers \
110        libnativebase_headers \
111        libutils_headers \
112        libhardware_headers \
113        display_intf_headers
114
115LOCAL_C_INCLUDES                += $(libmm-vdec-inc)
116LOCAL_ADDITIONAL_DEPENDENCIES   := $(libmm-vdec-add-dep)
117
118LOCAL_PRELINK_MODULE    := false
119LOCAL_SHARED_LIBRARIES  := liblog libcutils libdl libion
120LOCAL_SHARED_LIBRARIES  += libc2dcolorconvert
121LOCAL_SHARED_LIBRARIES  += libqdMetaData
122LOCAL_SHARED_LIBRARIES  += libplatformconfig
123LOCAL_SHARED_LIBRARIES  += libarbitrarybytes
124LOCAL_SHARED_LIBRARIES  += libnativewindow
125ifeq ($(ENABLE_HYP),true)
126LOCAL_SHARED_LIBRARIES  += libhypv_intercept
127endif
128
129LOCAL_SRC_FILES         := src/ts_parser.cpp
130LOCAL_STATIC_LIBRARIES  := libOmxVidcCommon
131LOCAL_SRC_FILES         += src/omx_vdec_v4l2.cpp
132
133include $(BUILD_SHARED_LIBRARY)
134
135
136
137
138# ---------------------------------------------------------------------------------
139# 			Make the Shared library (libOmxSwVdec)
140# ---------------------------------------------------------------------------------
141
142include $(CLEAR_VARS)
143ifneq "$(wildcard $(QCPATH) )" ""
144ifneq ($(call is-board-platform-in-list, $(TARGETS_THAT_DONT_NEED_SW_VDEC)),true)
145
146LOCAL_MODULE                  := libOmxSwVdec
147LOCAL_MODULE_TAGS             := optional
148LOCAL_VENDOR_MODULE           := true
149LOCAL_CFLAGS                  := $(libmm-vdec-def)
150
151LOCAL_HEADER_LIBRARIES := \
152        media_plugin_headers \
153        libnativebase_headers \
154        libutils_headers \
155        libhardware_headers \
156        display_intf_headers
157
158LOCAL_C_INCLUDES              += $(libmm-vdec-inc)
159LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep)
160
161LOCAL_PRELINK_MODULE          := false
162LOCAL_SHARED_LIBRARIES        := liblog libcutils libc2dcolorconvert libion
163LOCAL_SHARED_LIBRARIES        += libswvdec
164LOCAL_SHARED_LIBRARIES        += libnativewindow
165
166LOCAL_SRC_FILES               := src/omx_swvdec.cpp
167LOCAL_SRC_FILES               += src/omx_swvdec_utils.cpp
168
169include $(BUILD_SHARED_LIBRARY)
170endif
171endif
172
173# ---------------------------------------------------------------------------------
174#                END
175# ---------------------------------------------------------------------------------
176