summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStricted <info@stricted.net>2025-01-17 03:42:56 +0100
committerStricted <info@stricted.net>2025-01-19 08:16:30 +0100
commit10eee2c2fcbb018b267dab572cbf0793d44dd99f (patch)
tree6d0961d7f61e24d59518d1a273e5e53490deb68e
parente8775bc8c5f730bd24b16908f4a7425354f5cfe1 (diff)
openmax: convert to bpw16.0
Change-Id: I07f7be75a276d14aa4b9238ded16fb6a07ccf633
-rw-r--r--Android.bp2
-rw-r--r--Android.mk18
-rw-r--r--openmax/Android.mk55
-rw-r--r--openmax/component/common/Android.bp111
-rw-r--r--openmax/component/common/Android.mk97
-rw-r--r--openmax/component/video/dec/Android.bp61
-rw-r--r--openmax/component/video/dec/Android.mk61
-rw-r--r--openmax/component/video/dec/h264/Android.bp95
-rw-r--r--openmax/component/video/dec/h264/Android.mk101
-rw-r--r--openmax/component/video/dec/hevc/Android.bp90
-rw-r--r--openmax/component/video/dec/hevc/Android.mk100
-rw-r--r--openmax/component/video/dec/mpeg2/Android.bp83
-rw-r--r--openmax/component/video/dec/mpeg2/Android.mk91
-rw-r--r--openmax/component/video/dec/mpeg4/Android.bp83
-rw-r--r--openmax/component/video/dec/mpeg4/Android.mk91
-rw-r--r--openmax/component/video/dec/vc1/Android.bp83
-rw-r--r--openmax/component/video/dec/vc1/Android.mk91
-rw-r--r--openmax/component/video/dec/vp8/Android.bp84
-rw-r--r--openmax/component/video/dec/vp8/Android.mk92
-rw-r--r--openmax/component/video/dec/vp9/Android.bp88
-rw-r--r--openmax/component/video/dec/vp9/Android.mk92
-rw-r--r--openmax/component/video/enc/Android.bp72
-rw-r--r--openmax/component/video/enc/Android.mk73
-rw-r--r--openmax/component/video/enc/h264/Android.bp80
-rw-r--r--openmax/component/video/enc/h264/Android.mk93
-rw-r--r--openmax/component/video/enc/h264wfd/Android.bp86
-rw-r--r--openmax/component/video/enc/h264wfd/Android.mk78
-rw-r--r--openmax/component/video/enc/hevc/Android.bp88
-rw-r--r--openmax/component/video/enc/hevc/Android.mk92
-rw-r--r--openmax/component/video/enc/hevcwfd/Android.bp83
-rw-r--r--openmax/component/video/enc/hevcwfd/Android.mk78
-rw-r--r--openmax/component/video/enc/mpeg4/Android.bp78
-rw-r--r--openmax/component/video/enc/mpeg4/Android.mk83
-rw-r--r--openmax/component/video/enc/vp8/Android.bp79
-rw-r--r--openmax/component/video/enc/vp8/Android.mk84
-rw-r--r--openmax/component/video/enc/vp9/Android.bp83
-rw-r--r--openmax/component/video/enc/vp9/Android.mk83
-rw-r--r--openmax/core/Android.bp93
-rw-r--r--openmax/core/Android.mk92
-rw-r--r--openmax/osal/Android.bp191
-rw-r--r--openmax/osal/Android.mk231
-rw-r--r--videocodec/Android.bp65
-rw-r--r--videocodec/Android.mk74
-rw-r--r--videocodec/osal/include/ExynosVideo_OSAL.h2
44 files changed, 1779 insertions, 1951 deletions
diff --git a/Android.bp b/Android.bp
index aacc0e8..f389a59 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,5 +1,7 @@
soong_namespace {
imports:[
+ "hardware/samsung_slsi-linaro/exynos",
+ "hardware/samsung_slsi-linaro/graphics",
"hardware/samsung_slsi-linaro/interfaces"
],
}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 7f78a01..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-ifeq ($(TARGET_SLSI_VARIANT),linaro)
-ifneq ($(filter exynos, $(TARGET_SOC_NAME)),)
-openmax_dirs := \
- videocodec \
- openmax
-
-include $(call all-named-subdir-makefiles,$(openmax_dirs))
-else
-PREFIX := $(shell echo $(TARGET_BOARD_PLATFORM) | head -c 6)
-ifneq ($(filter exynos, $(PREFIX)),)
-openmax_dirs := \
- videocodec \
- openmax
-
-include $(call all-named-subdir-makefiles,$(openmax_dirs))
-endif
-endif
-endif
diff --git a/openmax/Android.mk b/openmax/Android.mk
deleted file mode 100644
index 7d3a465..0000000
--- a/openmax/Android.mk
+++ /dev/null
@@ -1,55 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-BOARD_USE_ANDROID := true
-BOARD_USE_SKYPE_HD := true
-
-# Set to false to use Android's OMX header files
-BOARD_USE_KHRONOS_OMX_HEADER := false
-
-ifeq ($(BOARD_USE_ANDROID), false)
-BOARD_USE_KHRONOS_OMX_HEADER := true
-endif
-
-EXYNOS_OMX_SUPPORT_TUNNELING := false
-EXYNOS_OMX_SUPPORT_EGL_IMAGE := false
-
-EXYNOS_OMX_TOP := $(LOCAL_PATH)
-
-EXYNOS_OMX_INC := $(EXYNOS_OMX_TOP)/include
-EXYNOS_OMX_COMPONENT := $(EXYNOS_OMX_TOP)/component
-
-EXYNOS_VIDEO_CODEC := \
- $(EXYNOS_OMX_TOP)/../videocodec
-
-include $(EXYNOS_OMX_TOP)/osal/Android.mk
-include $(EXYNOS_OMX_TOP)/core/Android.mk
-
-include $(EXYNOS_OMX_COMPONENT)/common/Android.mk
-include $(EXYNOS_OMX_COMPONENT)/video/dec/Android.mk
-include $(EXYNOS_OMX_COMPONENT)/video/dec/h264/Android.mk
-include $(EXYNOS_OMX_COMPONENT)/video/dec/hevc/Android.mk
-include $(EXYNOS_OMX_COMPONENT)/video/dec/mpeg4/Android.mk
-include $(EXYNOS_OMX_COMPONENT)/video/dec/vp8/Android.mk
-include $(EXYNOS_OMX_COMPONENT)/video/dec/mpeg2/Android.mk
-include $(EXYNOS_OMX_COMPONENT)/video/dec/vc1/Android.mk
-
-include $(EXYNOS_OMX_COMPONENT)/video/enc/Android.mk
-include $(EXYNOS_OMX_COMPONENT)/video/enc/h264/Android.mk
-include $(EXYNOS_OMX_COMPONENT)/video/enc/mpeg4/Android.mk
-include $(EXYNOS_OMX_COMPONENT)/video/enc/vp8/Android.mk
-
-ifeq ($(BOARD_USE_HEVCENC_SUPPORT), true)
-include $(EXYNOS_OMX_COMPONENT)/video/enc/hevc/Android.mk
-endif
-ifeq ($(BOARD_USE_VP9DEC_SUPPORT), true)
-include $(EXYNOS_OMX_COMPONENT)/video/dec/vp9/Android.mk
-endif
-ifeq ($(BOARD_USE_VP9ENC_SUPPORT), true)
-include $(EXYNOS_OMX_COMPONENT)/video/enc/vp9/Android.mk
-endif
-ifeq ($(BOARD_USE_WFDENC_SUPPORT), true)
-include $(EXYNOS_OMX_COMPONENT)/video/enc/h264wfd/Android.mk
-include $(EXYNOS_OMX_COMPONENT)/video/enc/hevcwfd/Android.mk
-endif
diff --git a/openmax/component/common/Android.bp b/openmax/component/common/Android.bp
new file mode 100644
index 0000000..3f077fa
--- /dev/null
+++ b/openmax/component/common/Android.bp
@@ -0,0 +1,111 @@
+cc_library_static {
+ name: "libExynosOMX_Basecomponent",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-Wno-unused-function",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "EGL_IMAGE_SUPPORT"), {
+ "true": ["-DEGL_IMAGE_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_Basecomponent.c",
+ "Exynos_OMX_Baseport.c",
+ ],
+
+ shared_libs: [
+ "libcutils",
+ "libutils",
+ ],
+
+ static_libs: [
+ "libExynosOMX_OSAL",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
+
+cc_library_shared {
+ name: "libExynosOMX_Resourcemanager",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-Wno-unused-function",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "EGL_IMAGE_SUPPORT"), {
+ "true": ["-DEGL_IMAGE_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "TUNNELING_SUPPORT"), {
+ "true": ["-DTUNNELING_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SECURE_WITH_NONSECURE"), {
+ "true": ["-DUSE_SECURE_WITH_NONSECURE"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_DRM"), {
+ "true": ["-DUSE_SINGLE_DRM"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "MAX_COMPONENT_NU"), {
+ any @ flag_val: ["-DMAX_COMPONENT_NU=" + flag_val],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_Resourcemanager.c",
+ ],
+
+ shared_libs: [
+ "libcutils",
+ "libutils",
+ "liblog",
+ ],
+
+ static_libs: [
+ "libExynosOMX_OSAL",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+} \ No newline at end of file
diff --git a/openmax/component/common/Android.mk b/openmax/component/common/Android.mk
deleted file mode 100644
index ecb7d72..0000000
--- a/openmax/component/common/Android.mk
+++ /dev/null
@@ -1,97 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_Basecomponent.c \
- Exynos_OMX_Baseport.c
-
-LOCAL_MODULE := libExynosOMX_Basecomponent
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_OSAL
-LOCAL_SHARED_LIBRARIES := libcutils libutils
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_VIDEO_CODEC)/include
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(EXYNOS_OMX_SUPPORT_EGL_IMAGE), true)
-LOCAL_CFLAGS += -DEGL_IMAGE_SUPPORT
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-function
-
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_Resourcemanager.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libExynosOMX_Resourcemanager
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_OSAL
-LOCAL_SHARED_LIBRARIES := libcutils libutils liblog
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(EXYNOS_OMX_SUPPORT_TUNNELING), true)
-LOCAL_CFLAGS += -DTUNNELING_SUPPORT
-endif
-
-ifneq ($(BOARD_NOT_SUPPORT_DCPP), true)
-LOCAL_CFLAGS += -DUSE_SECURE_WITH_NONSECURE
-endif
-
-ifeq ($(BOARD_USE_SINGLE_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-ifdef BOARD_USE_MAX_COMPONENT_NUM
-LOCAL_CFLAGS += -DMAX_COMPONENT_NUM=$(BOARD_USE_MAX_COMPONENT_NUM)
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-function
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/dec/Android.bp b/openmax/component/video/dec/Android.bp
new file mode 100644
index 0000000..d75f3fb
--- /dev/null
+++ b/openmax/component/video/dec/Android.bp
@@ -0,0 +1,61 @@
+cc_library_static {
+ name: "libExynosOMX_Vdec",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "TUNNELING_SUPPORT"), {
+ "true": ["-DTUNNELING_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SMALL_SECURE_MEMORY"), {
+ "true": ["-DUSE_SMALL_SECURE_MEMORY"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_COMPRESSED_COLOR"), {
+ "true": ["-DUSE_COMPRESSED_COLOR"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_VdecControl.c",
+ "Exynos_OMX_Vdec.c",
+ ],
+
+ shared_libs: [
+ "liblog",
+ ],
+
+ static_libs: [
+ "libExynosVideoApi",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/dec/Android.mk b/openmax/component/video/dec/Android.mk
deleted file mode 100644
index f34c239..0000000
--- a/openmax/component/video/dec/Android.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_VdecControl.c \
- Exynos_OMX_Vdec.c
-
-LOCAL_MODULE := libExynosOMX_Vdec
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_TAGS := optional
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/dec \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-LOCAL_STATIC_LIBRARIES := libExynosVideoApi libVendorVideoApi libExynosOMX_OSAL
-LOCAL_SHARED_LIBRARIES := liblog
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(EXYNOS_OMX_SUPPORT_TUNNELING), true)
-LOCAL_CFLAGS += -DTUNNELING_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
-LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
-endif
-
-ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
-LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_STATIC_LIBRARY)
diff --git a/openmax/component/video/dec/h264/Android.bp b/openmax/component/video/dec/h264/Android.bp
new file mode 100644
index 0000000..447418a
--- /dev/null
+++ b/openmax/component/video/dec/h264/Android.bp
@@ -0,0 +1,95 @@
+cc_library_shared {
+ name: "libOMX.Exynos.AVC.Decoder",
+ relative_install_path: "omx",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_S3D_SUPPORT"), {
+ "true": ["-DUSE_S3D_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SKYPE_HD"), {
+ "true": [
+ "-DUSE_SKYPE_HD",
+ "-DBUILD_DEC",
+ ],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SMALL_SECURE_MEMORY"), {
+ "true": ["-DUSE_SMALL_SECURE_MEMORY"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_COMPRESSED_COLOR"), {
+ "true": ["-DUSE_COMPRESSED_COLOR"],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_H264dec.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Vdec",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ] + select(soong_config_variable("openmax", "USE_SKYPE_HD"), {
+ "true": ["libExynosOMX_SkypeHD_Dec"],
+ default: [],
+ }),
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/dec/h264/Android.mk b/openmax/component/video/dec/h264/Android.mk
deleted file mode 100644
index 0e62984..0000000
--- a/openmax/component/video/dec/h264/Android.mk
+++ /dev/null
@@ -1,101 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_H264dec.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.AVC.Decoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_S3D_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_S3D_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
- libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/dec \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_SKYPE_HD), true)
-LOCAL_CFLAGS += -DUSE_SKYPE_HD
-LOCAL_CFLAGS += -DBUILD_DEC
-LOCAL_STATIC_LIBRARIES += libExynosOMX_SkypeHD_Dec
-endif
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
-LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
-endif
-
-ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
-LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/dec/hevc/Android.bp b/openmax/component/video/dec/hevc/Android.bp
new file mode 100644
index 0000000..3b51b89
--- /dev/null
+++ b/openmax/component/video/dec/hevc/Android.bp
@@ -0,0 +1,90 @@
+cc_library_shared {
+ name: "libOMX.Exynos.HEVC.Decoder",
+ relative_install_path: "omx",
+ vendor: true,
+
+ cflags: [
+ "-DUSE_HEVC_SUPPORT",
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_S3D_SUPPORT"), {
+ "true": ["-DUSE_S3D_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_FULL_ST2094_40"), {
+ "true": ["-DUSE_FULL_ST2094_40"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SMALL_SECURE_MEMORY"), {
+ "true": ["-DUSE_SMALL_SECURE_MEMORY"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_COMPRESSED_COLOR"), {
+ "true": ["-DUSE_COMPRESSED_COLOR"],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_HEVCdec.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Vdec",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/dec/hevc/Android.mk b/openmax/component/video/dec/hevc/Android.mk
deleted file mode 100644
index 2e3cf84..0000000
--- a/openmax/component/video/dec/hevc/Android.mk
+++ /dev/null
@@ -1,100 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_HEVCdec.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.HEVC.Decoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-LOCAL_CFLAGS += -DUSE_HEVC_SUPPORT
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_S3D_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_S3D_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifeq ($(BOARD_USE_FULL_ST2094_40), true)
-LOCAL_CFLAGS += -DUSE_FULL_ST2094_40
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
- libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/dec \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
-LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
-endif
-
-ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
-LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/dec/mpeg2/Android.bp b/openmax/component/video/dec/mpeg2/Android.bp
new file mode 100644
index 0000000..508c187
--- /dev/null
+++ b/openmax/component/video/dec/mpeg2/Android.bp
@@ -0,0 +1,83 @@
+cc_library_shared {
+ name: "libOMX.Exynos.MPEG2.Decoder",
+ relative_install_path: "omx",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SMALL_SECURE_MEMORY"), {
+ "true": ["-DUSE_SMALL_SECURE_MEMORY"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_COMPRESSED_COLOR"), {
+ "true": ["-DUSE_COMPRESSED_COLOR"],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_Mpeg2dec.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Vdec",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/dec/mpeg2/Android.mk b/openmax/component/video/dec/mpeg2/Android.mk
deleted file mode 100644
index 4988f6b..0000000
--- a/openmax/component/video/dec/mpeg2/Android.mk
+++ /dev/null
@@ -1,91 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_Mpeg2dec.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.MPEG2.Decoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
- libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/dec \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
-LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
-endif
-
-ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
-LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/dec/mpeg4/Android.bp b/openmax/component/video/dec/mpeg4/Android.bp
new file mode 100644
index 0000000..ce2d7b3
--- /dev/null
+++ b/openmax/component/video/dec/mpeg4/Android.bp
@@ -0,0 +1,83 @@
+cc_library_shared {
+ name: "libOMX.Exynos.MPEG4.Decoder",
+ relative_install_path: "omx",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SMALL_SECURE_MEMORY"), {
+ "true": ["-DUSE_SMALL_SECURE_MEMORY"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_COMPRESSED_COLOR"), {
+ "true": ["-DUSE_COMPRESSED_COLOR"],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_Mpeg4dec.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Vdec",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/dec/mpeg4/Android.mk b/openmax/component/video/dec/mpeg4/Android.mk
deleted file mode 100644
index e23f3ff..0000000
--- a/openmax/component/video/dec/mpeg4/Android.mk
+++ /dev/null
@@ -1,91 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_Mpeg4dec.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.MPEG4.Decoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
- libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/dec \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
-LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
-endif
-
-ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
-LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/dec/vc1/Android.bp b/openmax/component/video/dec/vc1/Android.bp
new file mode 100644
index 0000000..2c8ac96
--- /dev/null
+++ b/openmax/component/video/dec/vc1/Android.bp
@@ -0,0 +1,83 @@
+cc_library_shared {
+ name: "libOMX.Exynos.WMV.Decoder",
+ relative_install_path: "omx",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SMALL_SECURE_MEMORY"), {
+ "true": ["-DUSE_SMALL_SECURE_MEMORY"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_COMPRESSED_COLOR"), {
+ "true": ["-DUSE_COMPRESSED_COLOR"],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_Wmvdec.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Vdec",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/dec/vc1/Android.mk b/openmax/component/video/dec/vc1/Android.mk
deleted file mode 100644
index 730bba3..0000000
--- a/openmax/component/video/dec/vc1/Android.mk
+++ /dev/null
@@ -1,91 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_Wmvdec.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.WMV.Decoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
- libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/dec \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
-LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
-endif
-
-ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
-LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/dec/vp8/Android.bp b/openmax/component/video/dec/vp8/Android.bp
new file mode 100644
index 0000000..f4f109a
--- /dev/null
+++ b/openmax/component/video/dec/vp8/Android.bp
@@ -0,0 +1,84 @@
+cc_library_shared {
+ name: "libOMX.Exynos.VP8.Decoder",
+ relative_install_path: "omx",
+ vendor: true,
+
+ cflags: [
+ "-DUSE_VP8_SUPPORT",
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SMALL_SECURE_MEMORY"), {
+ "true": ["-DUSE_SMALL_SECURE_MEMORY"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_COMPRESSED_COLOR"), {
+ "true": ["-DUSE_COMPRESSED_COLOR"],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_Vp8dec.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Vdec",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/dec/vp8/Android.mk b/openmax/component/video/dec/vp8/Android.mk
deleted file mode 100644
index bcfd169..0000000
--- a/openmax/component/video/dec/vp8/Android.mk
+++ /dev/null
@@ -1,92 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_Vp8dec.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.VP8.Decoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-LOCAL_CFLAGS += -DUSE_VP8_SUPPORT
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
- libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/dec \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
-LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
-endif
-
-ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
-LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/dec/vp9/Android.bp b/openmax/component/video/dec/vp9/Android.bp
new file mode 100644
index 0000000..86dd698
--- /dev/null
+++ b/openmax/component/video/dec/vp9/Android.bp
@@ -0,0 +1,88 @@
+cc_library_shared {
+ name: "libOMX.Exynos.VP9.Decoder",
+ relative_install_path: "omx",
+ vendor: true,
+ enabled: select(soong_config_variable("openmax", "USE_VP9DEC_SUPPORT"), {
+ "true": true,
+ default: false,
+ }),
+
+ cflags: [
+ "-DUSE_VP9_SUPPORT",
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SMALL_SECURE_MEMORY"), {
+ "true": ["-DUSE_SMALL_SECURE_MEMORY"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_COMPRESSED_COLOR"), {
+ "true": ["-DUSE_COMPRESSED_COLOR"],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_Vp9dec.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Vdec",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/dec/vp9/Android.mk b/openmax/component/video/dec/vp9/Android.mk
deleted file mode 100644
index 2fb00f6..0000000
--- a/openmax/component/video/dec/vp9/Android.mk
+++ /dev/null
@@ -1,92 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_Vp9dec.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.VP9.Decoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-LOCAL_CFLAGS += -DUSE_VP9_SUPPORT
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_Vdec libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
- libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/dec \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
-LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
-endif
-
-ifeq ($(BOARD_USE_COMPRESSED_COLOR), true)
-LOCAL_CFLAGS += -DUSE_COMPRESSED_COLOR
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/enc/Android.bp b/openmax/component/video/enc/Android.bp
new file mode 100644
index 0000000..9abc842
--- /dev/null
+++ b/openmax/component/video/enc/Android.bp
@@ -0,0 +1,72 @@
+cc_library_static {
+ name: "libExynosOMX_Venc",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "TUNNELING_SUPPORT"), {
+ "true": ["-DTUNNELING_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_HW_CSC_GRALLOC_SOURCE"), {
+ "true": ["-DUSE_HW_CSC_GRALLOC_SOURCE"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_FIMC_RGB_ENCODER"), {
+ "true": [
+ "-DUSE_HW_CSC_GRALLOC_SOURCE",
+ "-DUSE_FIMC_CSC",
+ ],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_VIDEO_EXT_FOR_WFD_HDCP"), {
+ "true": ["-DUSE_VIDEO_EXT_FOR_WFD_HDCP"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SMALL_SECURE_MEMORY"), {
+ "true": ["-DUSE_SMALL_SECURE_MEMORY"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_VencControl.c",
+ "Exynos_OMX_Venc.c",
+ ],
+
+ shared_libs: [
+ "liblog",
+ "libcsc",
+ ],
+
+ static_libs: [
+ "libVendorVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/enc/Android.mk b/openmax/component/video/enc/Android.mk
deleted file mode 100644
index aa47635..0000000
--- a/openmax/component/video/enc/Android.mk
+++ /dev/null
@@ -1,73 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_VencControl.c \
- Exynos_OMX_Venc.c
-
-LOCAL_MODULE := libExynosOMX_Venc
-LOCAL_ARM_MODE := arm
-LOCAL_MODULE_TAGS := optional
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/enc \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-ifeq ($(EXYNOS_OMX_SUPPORT_TUNNELING), true)
-LOCAL_CFLAGS += -DTUNNELING_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_GSC_RGB_ENCODER), true)
-LOCAL_CFLAGS += -DUSE_HW_CSC_GRALLOC_SOURCE
-endif
-
-ifeq ($(BOARD_USE_FIMC_RGB_ENCODER), true)
-LOCAL_CFLAGS += -DUSE_HW_CSC_GRALLOC_SOURCE
-LOCAL_CFLAGS += -DUSE_FIMC_CSC
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_VIDEO_EXT_FOR_WFD_HDCP), true)
-LOCAL_CFLAGS += -DUSE_VIDEO_EXT_FOR_WFD_HDCP
-endif
-
-ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
-LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_STATIC_LIBRARIES := libVendorVideoApi
-LOCAL_SHARED_LIBRARIES := liblog libcsc
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-include $(BUILD_STATIC_LIBRARY)
diff --git a/openmax/component/video/enc/h264/Android.bp b/openmax/component/video/enc/h264/Android.bp
new file mode 100644
index 0000000..ebd1d49
--- /dev/null
+++ b/openmax/component/video/enc/h264/Android.bp
@@ -0,0 +1,80 @@
+cc_library_shared {
+ name: "libOMX.Exynos.AVC.Encoder",
+ relative_install_path: "omx",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SMALL_SECURE_MEMORY"), {
+ "true": ["-DUSE_SMALL_SECURE_MEMORY"],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_H264enc.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Venc",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/enc/h264/Android.mk b/openmax/component/video/enc/h264/Android.mk
deleted file mode 100644
index 65c83a9..0000000
--- a/openmax/component/video/enc/h264/Android.mk
+++ /dev/null
@@ -1,93 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_H264enc.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.AVC.Encoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_Venc libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
- libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/enc \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_SKYPE_HD), true)
-LOCAL_CFLAGS += -DUSE_SKYPE_HD
-LOCAL_CFLAGS += -DBUILD_ENC
-LOCAL_STATIC_LIBRARIES += libExynosOMX_SkypeHD_Enc
-endif
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
-LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/enc/h264wfd/Android.bp b/openmax/component/video/enc/h264wfd/Android.bp
new file mode 100644
index 0000000..1872afc
--- /dev/null
+++ b/openmax/component/video/enc/h264wfd/Android.bp
@@ -0,0 +1,86 @@
+cc_library_shared {
+ name: "libOMX.Exynos.AVC.WFD.Encoder",
+ relative_install_path: "omx",
+ vendor: true,
+ enabled: select(soong_config_variable("openmax", "USE_WFDENC_SUPPORT"), {
+ "true": true,
+ default: false,
+ }),
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-Wno-unused-parameter",
+ "-Wno-unused-function",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SMALL_SECURE_MEMORY"), {
+ "true": ["-DUSE_SMALL_SECURE_MEMORY"],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_H264enc_wfd.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Venc",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/enc/h264wfd/Android.mk b/openmax/component/video/enc/h264wfd/Android.mk
deleted file mode 100644
index cffbd23..0000000
--- a/openmax/component/video/enc/h264wfd/Android.mk
+++ /dev/null
@@ -1,78 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_H264enc_wfd.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.AVC.WFD.Encoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libVendorVideoApi libExynosOMX_OSAL libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/enc \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-parameter -Wno-unused-function
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/enc/hevc/Android.bp b/openmax/component/video/enc/hevc/Android.bp
new file mode 100644
index 0000000..ed5bf1e
--- /dev/null
+++ b/openmax/component/video/enc/hevc/Android.bp
@@ -0,0 +1,88 @@
+cc_library_shared {
+ name: "libOMX.Exynos.HEVC.Encoder",
+ relative_install_path: "omx",
+ vendor: true,
+ enabled: select(soong_config_variable("openmax", "USE_HEVCENC_SUPPORT"), {
+ "true": true,
+ default: false,
+ }),
+
+ cflags: [
+ "-DUSE_HEVC_SUPPORT",
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_FULL_ST2094_40"), {
+ "true": ["-DUSE_FULL_ST2094_40"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SMALL_SECURE_MEMORY"), {
+ "true": ["-DUSE_SMALL_SECURE_MEMORY"],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_HEVCenc.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Venc",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/enc/hevc/Android.mk b/openmax/component/video/enc/hevc/Android.mk
deleted file mode 100644
index f1b67af..0000000
--- a/openmax/component/video/enc/hevc/Android.mk
+++ /dev/null
@@ -1,92 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_HEVCenc.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.HEVC.Encoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-LOCAL_CFLAGS += -DUSE_HEVC_SUPPORT
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifeq ($(BOARD_USE_FULL_ST2094_40), true)
-LOCAL_CFALGS += -DUSE_FULL_ST2094_40
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_Venc libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
- libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/enc \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_SMALL_SECURE_MEMORY), true)
-LOCAL_CFLAGS += -DUSE_SMALL_SECURE_MEMORY
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/enc/hevcwfd/Android.bp b/openmax/component/video/enc/hevcwfd/Android.bp
new file mode 100644
index 0000000..3faa4ca
--- /dev/null
+++ b/openmax/component/video/enc/hevcwfd/Android.bp
@@ -0,0 +1,83 @@
+cc_library_shared {
+ name: "libOMX.Exynos.HEVC.WFD.Encoder",
+ relative_install_path: "omx",
+ vendor: true,
+ enabled: select(soong_config_variable("openmax", "USE_WFDENC_SUPPORT"), {
+ "true": true,
+ default: false,
+ }),
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-Wno-unused-parameter",
+ "-Wno-unused-function",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_HEVCenc_wfd.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Venc",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/enc/hevcwfd/Android.mk b/openmax/component/video/enc/hevcwfd/Android.mk
deleted file mode 100644
index 9b73867..0000000
--- a/openmax/component/video/enc/hevcwfd/Android.mk
+++ /dev/null
@@ -1,78 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_HEVCenc_wfd.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.HEVC.WFD.Encoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libVendorVideoApi libExynosOMX_OSAL libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/enc \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-parameter -Wno-unused-function
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/enc/mpeg4/Android.bp b/openmax/component/video/enc/mpeg4/Android.bp
new file mode 100644
index 0000000..3d11a9f
--- /dev/null
+++ b/openmax/component/video/enc/mpeg4/Android.bp
@@ -0,0 +1,78 @@
+cc_library_shared {
+ name: "libOMX.Exynos.MPEG4.Encoder",
+ relative_install_path: "omx",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-Wno-unused-function",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_Mpeg4enc.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Venc",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/enc/mpeg4/Android.mk b/openmax/component/video/enc/mpeg4/Android.mk
deleted file mode 100644
index ad92c35..0000000
--- a/openmax/component/video/enc/mpeg4/Android.mk
+++ /dev/null
@@ -1,83 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_Mpeg4enc.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.MPEG4.Encoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_Venc libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
- libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/enc \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-function
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/enc/vp8/Android.bp b/openmax/component/video/enc/vp8/Android.bp
new file mode 100644
index 0000000..c80b5e2
--- /dev/null
+++ b/openmax/component/video/enc/vp8/Android.bp
@@ -0,0 +1,79 @@
+cc_library_shared {
+ name: "libOMX.Exynos.VP8.Encoder",
+ relative_install_path: "omx",
+ vendor: true,
+
+ cflags: [
+ "-DUSE_VP8_SUPPORT",
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-Wno-unused-function",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_Vp8enc.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Venc",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/enc/vp8/Android.mk b/openmax/component/video/enc/vp8/Android.mk
deleted file mode 100644
index 27a79ee..0000000
--- a/openmax/component/video/enc/vp8/Android.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_Vp8enc.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.VP8.Encoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-LOCAL_CFLAGS += -DUSE_VP8_SUPPORT
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_Venc libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
- libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/enc \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-function
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/component/video/enc/vp9/Android.bp b/openmax/component/video/enc/vp9/Android.bp
new file mode 100644
index 0000000..3437ed5
--- /dev/null
+++ b/openmax/component/video/enc/vp9/Android.bp
@@ -0,0 +1,83 @@
+cc_library_shared {
+ name: "libOMX.Exynos.VP9.Encoder",
+ relative_install_path: "omx",
+ vendor: true,
+ enabled: select(soong_config_variable("openmax", "USE_VP9ENC_SUPPORT"), {
+ "true": true,
+ default: false,
+ }),
+
+ cflags: [
+ "-DUSE_VP9_SUPPORT",
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-Wno-unused-function",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PLANE_IN_DRM"), {
+ "true": ["-DUSE_SINGLE_PLANE_IN_DRM"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OMX_Vp9enc.c",
+ "library_register.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "libdl",
+ "liblog",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libstagefright_foundation",
+ "libexynosv4l2",
+ "libion_exynos",
+ "libcsc",
+ "libExynosOMX_Resourcemanager",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosOMX_Venc",
+ "libVendorVideoApi",
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ "libExynosVideoApi",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/component/video/enc/vp9/Android.mk b/openmax/component/video/enc/vp9/Android.mk
deleted file mode 100644
index 5bfb1fd..0000000
--- a/openmax/component/video/enc/vp9/Android.mk
+++ /dev/null
@@ -1,83 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_Vp9enc.c \
- library_register.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libOMX.Exynos.VP9.Encoder
-LOCAL_MODULE_RELATIVE_PATH := omx
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS := -DUSE_VP9_SUPPORT
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PLANE_IN_DRM
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_Venc libVendorVideoApi libExynosOMX_OSAL libExynosOMX_Basecomponent \
- libExynosVideoApi
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- libdl \
- liblog \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libstagefright_foundation \
- libexynosv4l2 \
- libion_exynos \
- libcsc \
- libExynosOMX_Resourcemanager
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/enc \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-function
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/core/Android.bp b/openmax/core/Android.bp
new file mode 100644
index 0000000..ac792ac
--- /dev/null
+++ b/openmax/core/Android.bp
@@ -0,0 +1,93 @@
+cc_library_shared {
+ name: "libExynosOMX_Core",
+ vendor: true,
+
+ cflags: [
+ "-DUSE_VP9_SUPPORT",
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DISABLE_RAPID_COMPONENT_LOA"), {
+ "true": ["-DUSE_DISABLE_RAPID_COMPONENT_LOA"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CUSTOM_COMPONENT_SUPPORT"), {
+ "true": ["-DUSE_CUSTOM_COMPONENT_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "TUNNELING_SUPPORT"), {
+ "true": ["-DTUNNELING_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "EGL_IMAGE_SUPPORT"), {
+ "true": ["-DEGL_IMAGE_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_HEVCENC_SUPPORT"), {
+ "true": [],
+ default: [
+ "-DDISABLE_HEVC_ENC_CODEC",
+ "-DDISABLE_CODEC_COMP",
+ ],
+ }) + select(soong_config_variable("openmax", "USE_VP9DEC_SUPPORT"), {
+ "true": [],
+ default: [
+ "-DDISABLE_VP9_DEC_CODEC",
+ "-DDISABLE_CODEC_COMP",
+ ],
+ }) + select(soong_config_variable("openmax", "USE_VP9ENC_SUPPORT"), {
+ "true": [],
+ default: [
+ "-DDISABLE_VP9_ENC_CODEC",
+ "-DDISABLE_CODEC_COMP",
+ ],
+ }) + select(soong_config_variable("openmax", "USE_WFDENC_SUPPORT"), {
+ "true": [],
+ default: [
+ "-DDISABLE_WFD_ENC_CODEC",
+ "-DDISABLE_CODEC_COMP",
+ ],
+ }) + select(soong_config_variable("openmax", "USE_NON_DRM_CODEC_ONLY"), {
+ "true": [],
+ default: [
+ "-DDISABLE_SECURE_CODEC",
+ "-DDISABLE_CODEC_COMP",
+ ],
+ }),
+
+ srcs: [
+ "Exynos_OMX_Component_Register.c",
+ "Exynos_OMX_Core.c",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libdl",
+ "libcutils",
+ "libutils",
+ "liblog",
+ "libExynosOMX_Resourcemanager",
+ ],
+
+ static_libs: [
+ "libExynosOMX_OSAL",
+ "libExynosOMX_Basecomponent",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+}
diff --git a/openmax/core/Android.mk b/openmax/core/Android.mk
deleted file mode 100644
index 7c97fdf..0000000
--- a/openmax/core/Android.mk
+++ /dev/null
@@ -1,92 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OMX_Component_Register.c \
- Exynos_OMX_Core.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libExynosOMX_Core
-LOCAL_PROPRIETARY_MODULE := true
-
-LOCAL_CFLAGS :=
-
-LOCAL_ARM_MODE := arm
-
-LOCAL_STATIC_LIBRARIES := libExynosOMX_OSAL libExynosOMX_Basecomponent
-LOCAL_SHARED_LIBRARIES := libc libdl libcutils libutils liblog \
- libExynosOMX_Resourcemanager
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_TOP)/component/common
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_DISABLE_RAPID_COMPONENT_LOAD), true)
-LOCAL_CFLAGS += -DUSE_DISABLE_RAPID_COMPONENT_LOAD
-endif
-
-ifeq ($(BOARD_USE_CUSTOM_COMPONENT_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_CUSTOM_COMPONENT_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_ALP_AUDIO), true)
- ifeq ($(BOARD_USE_SEIREN_AUDIO), true)
- LOCAL_CFLAGS += -DUSE_SEIREN_AUDIO_COMPONENT_LOAD
- else
- LOCAL_CFLAGS += -DUSE_ALP_AUDIO_COMPONENT_LOAD
- endif
-endif
-
-ifeq ($(EXYNOS_OMX_SUPPORT_TUNNELING), true)
-LOCAL_CFLAGS += -DTUNNELING_SUPPORT
-endif
-
-ifeq ($(EXYNOS_OMX_SUPPORT_EGL_IMAGE), true)
-LOCAL_CFLAGS += -DEGL_IMAGE_SUPPORT
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-ifneq ($(BOARD_USE_HEVCENC_SUPPORT), true)
-LOCAL_CFLAGS += -DDISABLE_HEVC_ENC_CODEC
-LOCAL_CFLAGS += -DDISABLE_CODEC_COMP
-endif
-
-ifneq ($(BOARD_USE_VP9DEC_SUPPORT), true)
-LOCAL_CFLAGS += -DDISABLE_VP9_DEC_CODEC
-LOCAL_CFLAGS += -DDISABLE_CODEC_COMP
-endif
-
-ifneq ($(BOARD_USE_VP9ENC_SUPPORT), true)
-LOCAL_CFLAGS += -DDISABLE_VP9_ENC_CODEC
-LOCAL_CFLAGS += -DDISABLE_CODEC_COMP
-endif
-
-ifneq ($(BOARD_USE_WFDENC_SUPPORT), true)
-LOCAL_CFLAGS += -DDISABLE_WFD_ENC_CODEC
-LOCAL_CFLAGS += -DDISABLE_CODEC_COMP
-endif
-
-ifeq ($(BOARD_USE_NON_DRM_CODEC_ONLY), true)
-LOCAL_CFLAGS += -DDISABLE_SECURE_CODEC
-LOCAL_CFLAGS += -DDISABLE_CODEC_COMP
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/openmax/osal/Android.bp b/openmax/osal/Android.bp
new file mode 100644
index 0000000..950e92f
--- /dev/null
+++ b/openmax/osal/Android.bp
@@ -0,0 +1,191 @@
+cc_library_static {
+ name: "libExynosOMX_SkypeHD_Enc",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_VENDOR_IMAGE",
+ "-DUSE_SKYPE_HD",
+ "-DBUILD_ENC",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OSAL_SkypeHD.c",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc/h264",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ ],
+}
+
+cc_library_static {
+ name: "libExynosOMX_SkypeHD_Dec",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_VENDOR_IMAGE",
+ "-DUSE_SKYPE_HD",
+ "-DBUILD_DEC",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OSAL_SkypeHD.c",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec/h264",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ ],
+}
+
+cc_library_static {
+ name: "libExynosOMX_OSAL",
+ vendor: true,
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-DUSE_VENDOR_IMAGE",
+ "-DUSE_ANDROID",
+ ] + select(soong_config_variable("openmax", "USE_DMA_BUF"), {
+ "true": ["-DUSE_DMA_BUF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_CSC_HW"), {
+ "true": ["-DUSE_CSC_HW"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_NON_CACHED_GRAPHICBUFFER"), {
+ "true": ["-DUSE_NON_CACHED_GRAPHICBUFFER"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "CHROMA_VALIGN"), {
+ any @ flag_val: ["-DCHROMA_VALIGN=" + flag_val],
+ default: ["-DCHROMA_VALIGN=1"],
+ }) + select(soong_config_variable("openmax", "USE_WA_ION_BUF_REF"), {
+ "true": ["-DUSE_WA_ION_BUF_REF"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["-DOMX_USES_EPIC"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_BT709_SUPPORT"), {
+ "true": ["-DUSE_BT709_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "GRALLOC_VERSION0"), {
+ "true": ["-DGRALLOC_VERSION0"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_PRIV_FORMAT"), {
+ "true": ["-DUSE_PRIV_FORMAT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_PRIV_USAGE"), {
+ "true": ["-DUSE_PRIV_USAGE"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SKYPE_HD"), {
+ "true": ["-DUSE_SKYPE_HD"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_FULL_ST2094_40"), {
+ "true": ["-DUSE_FULL_ST2094_40"],
+ default: [],
+ }) + select(soong_config_variable("arm_gralloc", "exynos_s10b_format_align"), {
+ any @ flag_val: ["-DS10B_FORMAT_8B_ALIGNMENT=" + flag_val],
+ default: [],
+ }) + select(soong_config_variable("openmax", "MSCL_EXT_SIZE"), {
+ any @ flag_val: ["-DMSCL_EXT_SIZE=" + flag_val],
+ default: ["-DMSCL_EXT_SIZE=0"],
+ }) + select(soong_config_variable("arm_gralloc", "gralloc_version"), {
+ "none": [
+ "-DGRALLOC_VERSION0",
+ "-DUSE_PRIV_FORMAT",
+ ],
+ "three": [
+ "-DUSE_WA_ION_BUF_REF",
+ "-DUSE_PRIV_USAGE",
+ ],
+ default: [],
+ }),
+
+ srcs: [
+ "Exynos_OSAL_Event.c",
+ "Exynos_OSAL_Queue.c",
+ "Exynos_OSAL_ETC.c",
+ "Exynos_OSAL_Mutex.c",
+ "Exynos_OSAL_Thread.c",
+ "Exynos_OSAL_Memory.c",
+ "Exynos_OSAL_Semaphore.c",
+ "Exynos_OSAL_Library.c",
+ "Exynos_OSAL_Log.c",
+ "Exynos_OSAL_SharedMemory.c",
+ "Exynos_OSAL_Android.cpp",
+ "Exynos_OSAL_ImageConverter.cpp",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ shared_libs: [
+ "libc",
+ "libcutils",
+ "libutils",
+ "liblog",
+ "libion",
+ "libhardware",
+ "libhidlbase",
+ "libui",
+ "libexynosgraphicbuffer",
+ "libion_exynos",
+ ] + select(soong_config_variable("openmax", "OMX_USES_EPIC"), {
+ "true": ["libepicoperator"],
+ default: [],
+ }),
+
+ static_libs: [
+ "libExynosVideoApi",
+ "libVendorVideoApi",
+ ],
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/openmax/openmax/core",
+ "hardware/samsung_slsi-linaro/openmax/openmax/include/exynos",
+ "hardware/samsung_slsi-linaro/openmax/openmax/osal",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/common",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/dec",
+ "hardware/samsung_slsi-linaro/openmax/openmax/component/video/enc",
+ "hardware/samsung_slsi-linaro/openmax/videocodec/include",
+ "hardware/samsung_slsi-linaro/exynos/include",
+ "hardware/samsung_slsi-linaro/graphics/base/libion/include",
+ "system/core/libsystem/include",
+ ],
+} \ No newline at end of file
diff --git a/openmax/osal/Android.mk b/openmax/osal/Android.mk
deleted file mode 100644
index 0b43acb..0000000
--- a/openmax/osal/Android.mk
+++ /dev/null
@@ -1,231 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-ifeq ($(BOARD_USE_SKYPE_HD), true)
-
-#################################
-#### libExynosOMX_SkypeHD_Enc ###
-#################################
-include $(CLEAR_VARS)
-
-LOCAL_CFLAGS :=
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libExynosOMX_SkypeHD_Enc
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_CFLAGS += -DUSE_VENDOR_IMAGE
-
-LOCAL_CFLAGS += -DUSE_SKYPE_HD
-LOCAL_CFLAGS += -DBUILD_ENC
-
-LOCAL_SRC_FILES := Exynos_OSAL_SkypeHD.c
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/enc \
- $(EXYNOS_OMX_COMPONENT)/video/enc/h264 \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_STATIC_LIBRARY)
-
-#################################
-#### libExynosOMX_SkypeHD_Dec ###
-#################################
-include $(CLEAR_VARS)
-
-LOCAL_CFLAGS :=
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libExynosOMX_SkypeHD_Dec
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_CFLAGS += -DUSE_VENDOR_IMAGE
-
-LOCAL_CFLAGS += -DUSE_SKYPE_HD
-LOCAL_CFLAGS += -DBUILD_DEC
-LOCAL_SRC_FILES := Exynos_OSAL_SkypeHD.c
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/dec \
- $(EXYNOS_OMX_COMPONENT)/video/dec/h264 \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_STATIC_LIBRARY)
-endif # for Skype HD
-
-
-##########################
-#### libExynosOMX_OSAL ###
-##########################
-include $(CLEAR_VARS)
-
-LOCAL_CFLAGS :=
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := \
- Exynos_OSAL_Event.c \
- Exynos_OSAL_Queue.c \
- Exynos_OSAL_ETC.c \
- Exynos_OSAL_Mutex.c \
- Exynos_OSAL_Thread.c \
- Exynos_OSAL_Memory.c \
- Exynos_OSAL_Semaphore.c \
- Exynos_OSAL_Library.c \
- Exynos_OSAL_Log.c \
- Exynos_OSAL_SharedMemory.c
-
-LOCAL_PRELINK_MODULE := false
-LOCAL_MODULE := libExynosOMX_OSAL
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_CFLAGS += -DUSE_VENDOR_IMAGE
-
-ifeq ($(BOARD_USE_DMA_BUF), true)
-LOCAL_CFLAGS += -DUSE_DMA_BUF
-endif
-
-ifeq ($(BOARD_USE_CSC_HW), true)
-LOCAL_CFLAGS += -DUSE_CSC_HW
-endif
-
-ifeq ($(BOARD_USE_NON_CACHED_GRAPHICBUFFER), true)
-LOCAL_CFLAGS += -DUSE_NON_CACHED_GRAPHICBUFFER
-endif
-
-ifdef BOARD_MFC_CHROMA_VALIGN
-LOCAL_CFLAGS += -DCHROMA_VALIGN=$(BOARD_MFC_CHROMA_VALIGN)
-else
-LOCAL_CFLAGS += -DCHROMA_VALIGN=1
-endif
-
-ifeq ($(BOARD_USE_WA_ION_BUF_REF), true)
-LOCAL_CFLAGS += -DUSE_WA_ION_BUF_REF
-endif
-
-ifeq ($(BOARD_USES_EXYNOS_GRALLOC_VERSION), 3)
-LOCAL_CFLAGS += -DUSE_WA_ION_BUF_REF
-endif
-
-LOCAL_STATIC_LIBRARIES := libExynosVideoApi
-
-LOCAL_SHARED_LIBRARIES := \
- libc \
- libcutils \
- libutils \
- liblog \
- libion \
- libhardware \
- libhidlbase \
- libui \
- libexynosgraphicbuffer \
- libion_exynos
-
-ifeq ($(BOARD_OMX_USES_EPIC), true)
-LOCAL_SHARED_LIBRARIES += \
- libepicoperator
-
-LOCAL_CFLAGS += -DOMX_USES_EPIC
-endif
-
-LOCAL_C_INCLUDES := \
- $(EXYNOS_OMX_TOP)/core \
- $(EXYNOS_OMX_INC)/exynos \
- $(EXYNOS_OMX_TOP)/osal \
- $(EXYNOS_OMX_COMPONENT)/common \
- $(EXYNOS_OMX_COMPONENT)/video/dec \
- $(EXYNOS_OMX_COMPONENT)/video/enc \
- $(EXYNOS_VIDEO_CODEC)/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/libion/include \
- $(TOP)/system/core/libsystem/include/
-
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_SRC_FILES += \
- Exynos_OSAL_Android.cpp \
- Exynos_OSAL_ImageConverter.cpp
-
-LOCAL_STATIC_LIBRARIES += libVendorVideoApi
-
-ifeq ($(BOARD_USES_EXYNOS_DATASPACE_FEATURE), true)
-LOCAL_CFLAGS += -DUSE_BT709_SUPPORT
-endif
-
-ifeq ($(BOARD_USES_EXYNOS_GRALLOC_VERSION), 0)
-LOCAL_CFLAGS += -DGRALLOC_VERSION0
-LOCAL_CFLAGS += -DUSE_PRIV_FORMAT
-else
-LOCAL_CFLAGS += -DUSE_PRIV_USAGE
-endif
-endif
-
-ifeq ($(BOARD_USE_SKYPE_HD), true)
-LOCAL_CFLAGS += -DUSE_SKYPE_HD
-endif
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_CFLAGS += -DUSE_KHRONOS_OMX_HEADER
-LOCAL_C_INCLUDES += $(EXYNOS_OMX_INC)/khronos
-else
-ifeq ($(BOARD_USE_ANDROID), true)
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-LOCAL_CFLAGS += -DUSE_ANDROID
-endif
-endif
-
-ifeq ($(BOARD_USE_FULL_ST2094_40), true)
-LOCAL_CFLAGS += -DUSE_FULL_ST2094_40
-endif
-
-ifdef BOARD_EXYNOS_S10B_FORMAT_ALIGN
-LOCAL_CFLAGS += -DS10B_FORMAT_8B_ALIGNMENT=$(BOARD_EXYNOS_S10B_FORMAT_ALIGN)
-endif
-
-ifeq ($(BOARD_HAS_SCALER_ALIGN_RESTRICTION), true)
-LOCAL_CFLAGS += -DMSCL_EXT_SIZE=512
-else
-LOCAL_CFLAGS += -DMSCL_EXT_SIZE=0
-endif
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label
-
-include $(BUILD_STATIC_LIBRARY)
diff --git a/videocodec/Android.bp b/videocodec/Android.bp
new file mode 100644
index 0000000..d6941eb
--- /dev/null
+++ b/videocodec/Android.bp
@@ -0,0 +1,65 @@
+cc_library_static {
+ name: "libExynosVideoApi",
+ vendor: true,
+ shared_libs: [
+ "libion_exynos",
+ "liblog",
+ ],
+
+ cflags: [
+ "-Wno-unused-variable",
+ "-Wno-unused-label",
+ "-Wno-unused-function",
+ ] + select(soong_config_variable("openmax", "USE_EXYNOS_MEDIA_EXT"), {
+ "true": ["-DUSE_EXYNOS_MEDIA_EXT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_DEFINE_H264_SEI_TYPE"), {
+ "true": ["-DUSE_DEFINE_H264_SEI_TYPE"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_ORIGINAL_HEADER"), {
+ "true": ["-DUSE_ORIGINAL_HEADER"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_MFC_HEADER"), {
+ "true": ["-DUSE_MFC_HEADER"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "MAINLINE_FEATURE_IN_SINCE_4_19"), {
+ "true": ["-DMAINLINE_FEATURE_IN_SINCE_4_19"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_HEVC_HWIP"), {
+ "true": ["-DUSE_HEVC_HWIP"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_DEINTERLACING_SUPPORT"), {
+ "true": ["-DUSE_DEINTERLACING_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "USE_SINGLE_PALNE_SUPPORT"), {
+ "true": ["-DUSE_SINGLE_PALNE_SUPPORT"],
+ default: [],
+ }) + select(soong_config_variable("openmax", "FRAMERATE_THRESH_HOLD"), {
+ any @ flag_val: ["-DFRAMERATE_THRESH_HOLD=" + flag_val],
+ default: [],
+ }),
+
+ srcs: [
+ "ExynosVideoInterface.c",
+ "osal/ExynosVideo_OSAL.c",
+ "dec/ExynosVideoDecoder.c",
+ "enc/ExynosVideoEncoder.c",
+ ],
+
+ header_libs: [
+ "device_kernel_headers",
+ "media_plugin_headers",
+ ],
+
+ local_include_dirs: [
+ "include",
+ "osal/include",
+ ] + select(soong_config_variable("openmax", "USE_MFC_HEADER"), {
+ "true": ["mfc_headers"],
+ default: [],
+ }),
+
+ include_dirs: [
+ "hardware/samsung_slsi-linaro/exynos/include",
+ ],
+}
diff --git a/videocodec/Android.mk b/videocodec/Android.mk
deleted file mode 100644
index 3cb3fa9..0000000
--- a/videocodec/Android.mk
+++ /dev/null
@@ -1,74 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := \
- ExynosVideoInterface.c \
- osal/ExynosVideo_OSAL.c \
- dec/ExynosVideoDecoder.c \
- enc/ExynosVideoEncoder.c
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/include \
- $(LOCAL_PATH)/osal/include \
- $(TOP)/hardware/samsung_slsi-linaro/exynos/include \
-
-LOCAL_SHARED_LIBRARIES := libion_exynos
-
-LOCAL_SHARED_LIBRARIES += liblog
-
-ifeq ($(BOARD_USE_KHRONOS_OMX_HEADER), true)
-LOCAL_C_INCLUDES += $(TOP)/hardware/samsung_slsi-linaro/openmax/include/khronos
-else
-LOCAL_HEADER_LIBRARIES := media_plugin_headers
-endif
-
-LOCAL_CFLAGS :=
-LOCAL_PROPRIETARY_MODULE := true
-
-# only 3.4 kernel
-ifeq ($(filter-out 3.4, $(TARGET_LINUX_KERNEL_VERSION)),)
-LOCAL_CFLAGS += -DUSE_EXYNOS_MEDIA_EXT
-endif
-
-# since 3.10 kernel
-ifneq ($(filter-out 3.4, $(TARGET_LINUX_KERNEL_VERSION)),)
-LOCAL_CFLAGS += -DUSE_DEFINE_H264_SEI_TYPE
-endif
-
-# since 3.18 kernel
-ifneq ($(filter-out 3.4 3.10, $(TARGET_LINUX_KERNEL_VERSION)),)
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/mfc_headers
-LOCAL_CFLAGS += -DUSE_ORIGINAL_HEADER
-LOCAL_CFLAGS += -DUSE_MFC_HEADER
-endif
-
-# since 4.19 kernel
-ifneq ($(filter 4.19 5.4, $(TARGET_LINUX_KERNEL_VERSION)),)
-LOCAL_CFLAGS += -DMAINLINE_FEATURE_IN_SINCE_4_19
-endif
-
-ifeq ($(BOARD_USE_HEVC_HWIP), true)
-LOCAL_CFLAGS += -DUSE_HEVC_HWIP
-endif
-
-ifeq ($(BOARD_USE_DEINTERLACING_SUPPORT), true)
-LOCAL_CFLAGS += -DUSE_DEINTERLACING_SUPPORT
-endif
-
-ifeq ($(BOARD_USE_SINGLE_PLANE_IN_DRM), true)
-LOCAL_CFLAGS += -DUSE_SINGLE_PALNE_SUPPORT
-endif
-
-ifneq ($(BOARD_USE_FRAMERATE_THRESH_HOLD),)
-LOCAL_CFLAGS += -DFRAMERATE_THRESH_HOLD=$(BOARD_USE_FRAMERATE_THRESH_HOLD)
-endif
-
-LOCAL_MODULE := libExynosVideoApi
-LOCAL_MODULE_TAGS := optional
-LOCAL_PRELINK_MODULE := false
-LOCAL_ARM_MODE := arm
-
-LOCAL_CFLAGS += -Wno-unused-variable -Wno-unused-label -Wno-unused-function
-
-include $(BUILD_STATIC_LIBRARY)
diff --git a/videocodec/osal/include/ExynosVideo_OSAL.h b/videocodec/osal/include/ExynosVideo_OSAL.h
index 5c032ec..93d0cf3 100644
--- a/videocodec/osal/include/ExynosVideo_OSAL.h
+++ b/videocodec/osal/include/ExynosVideo_OSAL.h
@@ -30,7 +30,7 @@
#include "exynos_v4l2.h"
-#include "videodev2_exynos_media.h"
+#include <linux/videodev2_exynos_media.h>
#ifdef USE_EXYNOS_MEDIA_EXT
#include "videodev2_exynos_media_ext.h"
#endif