1LOCAL_PATH := $(call my-dir)
2include $(CLEAR_VARS)
3
4# ---------------------------------------------------------------------------------
5# 				Common definitons
6# ---------------------------------------------------------------------------------
7
8libmm-vdec-def := -D__alignx\(x\)=__attribute__\(\(__aligned__\(x\)\)\)
9libmm-vdec-def += -D__align=__alignx
10libmm-vdec-def += -Dinline=__inline
11libmm-vdec-def += -g -O3
12libmm-vdec-def += -DIMAGE_APPS_PROC
13libmm-vdec-def += -D_ANDROID_
14libmm-vdec-def += -DCDECL
15libmm-vdec-def += -DT_ARM
16libmm-vdec-def += -DNO_ARM_CLZ
17libmm-vdec-def += -UENABLE_DEBUG_LOW
18libmm-vdec-def += -UENABLE_DEBUG_HIGH
19libmm-vdec-def += -DENABLE_DEBUG_ERROR
20libmm-vdec-def += -UINPUT_BUFFER_LOG
21libmm-vdec-def += -UOUTPUT_BUFFER_LOG
22libmm-vdec-def += -Wno-parentheses
23libmm-vdec-def += -D_ANDROID_ICS_
24libmm-vdec-def += -DPROCESS_EXTRADATA_IN_OUTPUT_PORT
25
26TARGETS_THAT_HAVE_VENUS_HEVC := apq8084 msm8994 msm8996
27TARGETS_THAT_SUPPORT_UBWC := msm8996 msm8953 msm8998 sdm660 sdm845 msmpeafowl sdm710 qcs605
28TARGETS_THAT_NEED_SW_VDEC := msm8937 sdm845 msmpeafowl sdm710 qcs605
29
30ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_HAVE_VENUS_HEVC)),true)
31libmm-vdec-def += -DVENUS_HEVC
32endif
33
34ifeq ($(TARGET_BOARD_PLATFORM),msm8610)
35libmm-vdec-def += -DSMOOTH_STREAMING_DISABLED
36endif
37
38ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_SUPPORT_UBWC)),true)
39libmm-vdec-def += -D_UBWC_
40endif
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
54include $(CLEAR_VARS)
55
56# Common Includes
57libmm-vdec-inc          := $(LOCAL_PATH)/inc
58libmm-vdec-inc          += $(QCOM_MEDIA_ROOT)/mm-video-v4l2/vidc/common/inc
59libmm-vdec-inc          += $(QCOM_MEDIA_ROOT)/mm-core/inc
60libmm-vdec-inc          += $(QCOM_MEDIA_ROOT)/libplatformconfig
61libmm-vdec-inc          += $(TARGET_OUT_HEADERS)/qcom/display
62libmm-vdec-inc          += $(TARGET_OUT_HEADERS)/adreno
63libmm-vdec-inc          += $(QCOM_MEDIA_ROOT)/libc2dcolorconvert
64libmm-vdec-inc          += $(TARGET_OUT_HEADERS)/mm-video/SwVdec
65libmm-vdec-inc          += $(TARGET_OUT_HEADERS)/mm-video/swvdec
66libmm-vdec-inc          += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
67
68ifeq ($(PLATFORM_SDK_VERSION), 18)  #JB_MR2
69libmm-vdec-def += -DANDROID_JELLYBEAN_MR2=1
70libmm-vdec-inc += $(QCOM_MEDIA_ROOT)/libstagefrighthw
71endif
72
73# Common Dependencies
74libmm-vdec-add-dep := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
75
76ifeq ($(call is-platform-sdk-version-at-least, 19),true)
77# This feature is enabled for Android KK+
78libmm-vdec-def += -DADAPTIVE_PLAYBACK_SUPPORTED
79endif
80
81ifeq ($(call is-platform-sdk-version-at-least, 22),true)
82# This feature is enabled for Android LMR1
83libmm-vdec-def += -DFLEXYUV_SUPPORTED
84endif
85
86libmm-vdec-def += -DALLOCATE_OUTPUT_NATIVEHANDLE
87
88# ---------------------------------------------------------------------------------
89# 			Make the Shared library (libOmxVdec)
90# ---------------------------------------------------------------------------------
91
92include $(CLEAR_VARS)
93
94LOCAL_MODULE                    := libOmxVdec
95LOCAL_MODULE_TAGS               := optional
96LOCAL_VENDOR_MODULE             := true
97LOCAL_CFLAGS                    := $(libmm-vdec-def) -Werror
98
99LOCAL_HEADER_LIBRARIES := \
100        media_plugin_headers \
101        libnativebase_headers \
102        libutils_headers \
103        libhardware_headers
104
105LOCAL_C_INCLUDES                += $(libmm-vdec-inc)
106LOCAL_ADDITIONAL_DEPENDENCIES   := $(libmm-vdec-add-dep)
107
108LOCAL_PRELINK_MODULE    := false
109LOCAL_SHARED_LIBRARIES  := liblog libcutils libdl
110LOCAL_SHARED_LIBRARIES  += libc2dcolorconvert
111LOCAL_SHARED_LIBRARIES  += libqdMetaData
112LOCAL_SHARED_LIBRARIES  += libplatformconfig
113LOCAL_SHARED_LIBRARIES  += libnativewindow
114LOCAL_HEADER_LIBRARIES  := libnativebase_headers
115LOCAL_HEADER_LIBRARIES  += media_plugin_headers
116LOCAL_HEADER_LIBRARIES  += libhardware_headers
117
118LOCAL_SRC_FILES         := src/ts_parser.cpp
119LOCAL_STATIC_LIBRARIES  := libOmxVidcCommon
120LOCAL_SRC_FILES         += src/omx_vdec_v4l2.cpp
121
122LOCAL_CFLAGS            += -Wno-error
123
124include $(BUILD_SHARED_LIBRARY)
125
126
127
128# ---------------------------------------------------------------------------------
129# 			Make the Shared library (libOmxSwVdec)
130# ---------------------------------------------------------------------------------
131
132include $(CLEAR_VARS)
133ifneq "$(wildcard $(QCPATH) )" ""
134ifeq ($(call is-board-platform-in-list, $(TARGETS_THAT_NEED_SW_VDEC)),true)
135
136LOCAL_MODULE                  := libOmxSwVdec
137LOCAL_MODULE_TAGS             := optional
138LOCAL_VENDOR_MODULE           := true
139LOCAL_CFLAGS                  := $(libmm-vdec-def)
140
141LOCAL_HEADER_LIBRARIES := \
142        media_plugin_headers \
143        libnativebase_headers \
144        libutils_headers \
145        libhardware_headers
146
147LOCAL_C_INCLUDES              += $(libmm-vdec-inc)
148LOCAL_ADDITIONAL_DEPENDENCIES := $(libmm-vdec-add-dep)
149
150LOCAL_PRELINK_MODULE          := false
151LOCAL_SHARED_LIBRARIES        := liblog libcutils libc2dcolorconvert libswvdec
152LOCAL_SHARED_LIBRARIES        += libnativewindow
153
154LOCAL_SRC_FILES               := src/omx_swvdec.cpp
155LOCAL_SRC_FILES               += src/omx_swvdec_utils.cpp
156
157include $(BUILD_SHARED_LIBRARY)
158endif
159endif
160
161# ---------------------------------------------------------------------------------
162#                END
163# ---------------------------------------------------------------------------------
164