diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000000000000000000000000000000000000..25bedf2c8c9ede46cbe517cb18d67469eac2ed93 --- /dev/null +++ b/Android.mk @@ -0,0 +1,16 @@ +# +# Copyright (C) 2016 The CyanogenMod Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +include $(call all-subdir-makefiles) diff --git a/config/symbols.mk b/config/symbols.mk index bd1777f999b6de9307f5ab3b931f776a538c73a1..9be9f47708583545fae1d66ad03a5e4011f32464 100644 --- a/config/symbols.mk +++ b/config/symbols.mk @@ -21,11 +21,12 @@ ifeq ($(TARGET_INCLUDE_PBBUILDER_SYMBOLS),true) LINKER_FORCED_SHIM_LIBS := $(LINKER_FORCED_SHIM_LIBS):/system/vendor/bin/program_binary_builder|libmtkshim_pbbuilder.so:/system/vendor/lib/libprogrambinary.so:libmtkshim_pbbuilder.so:/system/vendor/lib64/libprogrambinary.so:libmtkshim_pbbuilder.so endif ifeq ($(TARGET_INCLUDE_VTMAL_SYMBOLS),true) -LINKER_FORCED_SHIM_LIBS := $(LINKER_FORCED_SHIM_LIBS):/system/vendor/lib/libvtmal.so|libmtkshim_vtmal.so:/system/vendor/lib/libvtmal.so|libvt_custom.so:/system/vendor/bin/vtservice|libmtkshim_vtmal.so +LINKER_FORCED_SHIM_LIBS := $(LINKER_FORCED_SHIM_LIBS):/system/vendor/lib/libvtmal.so|libmtkshim_vtmal.so:/system/vendor/bin/vtservice|libmtkshim_vtmal.so +endif +ifeq ($(TARGET_INCLUDE_MEDIAJNI_SYMBOLS),true) +LINKER_FORCED_SHIM_LIBS := $(LINKER_FORCED_SHIM_LIBS):/system/lib/libmedia_jni.so|libmtkshim_mediajni.so:/system/lib64/libmedia_jni.so|libmtkshim_mediajni.so endif ifeq ($(TARGET_INCLUDE_CAMERA_SYMBOLS),true) LINKER_FORCED_SHIM_LIBS := $(LINKER_FORCED_SHIM_LIBS):/system/vendor/lib/libfeatureio.so|libmtkshim_camera.so:/system/vendor/lib64/libfeatureio.so|libmtkshim_camera.so:/system/vendor/lib/libcam.camnode.so|libmtkshim_camera.so:/system/vendor/lib64/libcam.camnode.so|libmtkshim_camera.so endif #LINKER_FORCED_SHIM_LIBS := $(LINKER_FORCED_SHIM_LIBS):/system/vendor/lib/libmal_rilproxy.so|mtk-rilproxy.so:/system/vendor/lib64/libmal_rilproxy.so|mtk-rilproxy.so - - diff --git a/libmtkshims/Android.mk b/libmtkshims/Android.mk index 0c0534dfd5423eae20ba2d2a95699c37523ff09e..2bf6f3968bd8829f68b95d58138248c98548cff2 100644 --- a/libmtkshims/Android.mk +++ b/libmtkshims/Android.mk @@ -85,6 +85,14 @@ ifeq ($(TARGET_INCLUDE_PARCEL_SYMBOLS),true) include $(BUILD_SHARED_LIBRARY) endif +ifeq ($(TARGET_INCLUDE_MEDIAJNI_SYMBOLS),true) + include $(CLEAR_VARS) + LOCAL_SRC_FILES := mediajni.cpp + LOCAL_MODULE := libmtkshim_mediajni + LOCAL_PROPRIETARY_MODULE := true + include $(BUILD_SHARED_LIBRARY) +endif + ifeq ($(TARGET_INCLUDE_FENCE_SYMBOLS),true) include $(CLEAR_VARS) LOCAL_SRC_FILES := fence.cpp diff --git a/libmtkshims/mediajni.cpp b/libmtkshims/mediajni.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4851c86b61f2fbe4f4ebe8c05b358a478124b516 --- /dev/null +++ b/libmtkshims/mediajni.cpp @@ -0,0 +1,5 @@ +extern "C" { + int _ZN12SkFILEStreamC1EP7__sFILENS_9OwnershipE(); { + return 644; + } +} diff --git a/mtklibs/AcdApiDaemon/AcdApiDaemon b/mtklibs/AcdApiDaemon/AcdApiDaemon new file mode 100755 index 0000000000000000000000000000000000000000..8e64a647bf94a63767de0999fe173eb3e04e40eb Binary files /dev/null and b/mtklibs/AcdApiDaemon/AcdApiDaemon differ diff --git a/mtklibs/AcdApiDaemon/Android.mk_ b/mtklibs/AcdApiDaemon/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..835b199c95af3773efbaf9edb4250167da69cbd6 --- /dev/null +++ b/mtklibs/AcdApiDaemon/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = AcdApiDaemon +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = $(PRODUCT_OUT)/system/bin +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libui libbinder libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = AcdApiDaemon +include $(BUILD_PREBUILT) diff --git a/mtklibs/AcdApiDaemon/README b/mtklibs/AcdApiDaemon/README new file mode 100755 index 0000000000000000000000000000000000000000..68b3aed7c1c1ed4a2e2f9b4563936c771ebca5fe --- /dev/null +++ b/mtklibs/AcdApiDaemon/README @@ -0,0 +1,19 @@ +AcdApiDaemon daemon + +WHAT IT DOES? +============= +AcdApiDaemon daemon + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +liblog libcutils libutils libui libbinder + +and the following libs from MediaTek: +1. N/A + +HOW TO USE IT? +============== +Start AcdApiDaemon service + +All the source code of this library were written by ALPS ELECTRIC co.. diff --git a/mtklibs/Android.mk_ b/mtklibs/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..5053e7d64389d3eaa35c6e807277fff9f83898f6 --- /dev/null +++ b/mtklibs/Android.mk_ @@ -0,0 +1 @@ +include $(call all-subdir-makefiles) diff --git a/mtklibs/MTKLogger/Android.mk_ b/mtklibs/MTKLogger/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..070b7d060ae6516f4c1a75bdef1b15352dabbb17 --- /dev/null +++ b/mtklibs/MTKLogger/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = MTKLogger +LOCAL_MODULE_CLASS = APPS +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .apk +LOCAL_CERTIFICATE = platform +LOCAL_SRC_FILES = MTKLogger.apk +include $(BUILD_PREBUILT) diff --git a/mtklibs/MTKLogger/MTKLogger.apk b/mtklibs/MTKLogger/MTKLogger.apk new file mode 100755 index 0000000000000000000000000000000000000000..cd446d68573185dd20525d9350a7ff52b7f7c71a Binary files /dev/null and b/mtklibs/MTKLogger/MTKLogger.apk differ diff --git a/mtklibs/akmd09911/Android.mk_ b/mtklibs/akmd09911/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..13c6a47ad5b69c1c8c23b4da9d62c1ae1ee44b78 --- /dev/null +++ b/mtklibs/akmd09911/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = akmd09911 +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = akmd09911 +include $(BUILD_PREBUILT) diff --git a/mtklibs/akmd09911/NOTICE b/mtklibs/akmd09911/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..b234c0b87909bd56d2cbcc8be2279c2bc9c8d288 --- /dev/null +++ b/mtklibs/akmd09911/NOTICE @@ -0,0 +1,22 @@ +* Copyright (c) 2004 Asahi Kasei Microdevices Corporation, Japan: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/akmd09911/README b/mtklibs/akmd09911/README new file mode 100755 index 0000000000000000000000000000000000000000..bead66be1f020a77f74ea3de63b3687f7937f5bb --- /dev/null +++ b/mtklibs/akmd09911/README @@ -0,0 +1,19 @@ +akmd09911 daemon + +WHAT IT DOES? +============= +akmd09911 daemon + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +libc libm libutils libcutils + +and the following libs from MediaTek: +1. N/A + +HOW TO USE IT? +============== +Start akmd09911 service + +All the source code of this library were written by InvenSense co.. diff --git a/mtklibs/akmd09911/akmd09911 b/mtklibs/akmd09911/akmd09911 new file mode 100755 index 0000000000000000000000000000000000000000..fb30b555520c8b49ab8da6199af5bd9a64a7a5ac Binary files /dev/null and b/mtklibs/akmd09911/akmd09911 differ diff --git a/mtklibs/akmd8963/Android.mk_ b/mtklibs/akmd8963/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..58d321e459dcd3b00f05a1a0efbcad9818b5524c --- /dev/null +++ b/mtklibs/akmd8963/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = akmd8963 +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libz libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = akmd8963 +include $(BUILD_PREBUILT) diff --git a/mtklibs/akmd8963/NOTICE b/mtklibs/akmd8963/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..b234c0b87909bd56d2cbcc8be2279c2bc9c8d288 --- /dev/null +++ b/mtklibs/akmd8963/NOTICE @@ -0,0 +1,22 @@ +* Copyright (c) 2004 Asahi Kasei Microdevices Corporation, Japan: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/akmd8963/README b/mtklibs/akmd8963/README new file mode 100755 index 0000000000000000000000000000000000000000..bead66be1f020a77f74ea3de63b3687f7937f5bb --- /dev/null +++ b/mtklibs/akmd8963/README @@ -0,0 +1,19 @@ +akmd09911 daemon + +WHAT IT DOES? +============= +akmd09911 daemon + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +libc libm libutils libcutils + +and the following libs from MediaTek: +1. N/A + +HOW TO USE IT? +============== +Start akmd09911 service + +All the source code of this library were written by InvenSense co.. diff --git a/mtklibs/akmd8963/akmd8963 b/mtklibs/akmd8963/akmd8963 new file mode 100755 index 0000000000000000000000000000000000000000..e5db3d72864512894f33315e569f8b8db10998e5 Binary files /dev/null and b/mtklibs/akmd8963/akmd8963 differ diff --git a/mtklibs/akmd8975/Android.mk_ b/mtklibs/akmd8975/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d3a26b1fef5a0a7341317249bd1aef0b78e80092 --- /dev/null +++ b/mtklibs/akmd8975/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = akmd8975 +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libz libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = akmd8975 +include $(BUILD_PREBUILT) diff --git a/mtklibs/akmd8975/NOTICE b/mtklibs/akmd8975/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/akmd8975/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/akmd8975/README b/mtklibs/akmd8975/README new file mode 100755 index 0000000000000000000000000000000000000000..07d6b33e16bb27a20c70ad3d2887c3ebd6ff237c --- /dev/null +++ b/mtklibs/akmd8975/README @@ -0,0 +1,22 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. + diff --git a/mtklibs/akmd8975/akmd8975 b/mtklibs/akmd8975/akmd8975 new file mode 100755 index 0000000000000000000000000000000000000000..6600e0a2cb051d8f2ae2ab607fbf93285372a681 Binary files /dev/null and b/mtklibs/akmd8975/akmd8975 differ diff --git a/mtklibs/ami304d/Android.mk_ b/mtklibs/ami304d/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d76f6d2f2601d4544207e80927b6132ef737994f --- /dev/null +++ b/mtklibs/ami304d/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = ami304d +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = $(PRODUCT_OUT)/system/bin +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = ami304d +include $(BUILD_PREBUILT) diff --git a/mtklibs/ami304d/NOTICE b/mtklibs/ami304d/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/ami304d/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/ami304d/README b/mtklibs/ami304d/README new file mode 100755 index 0000000000000000000000000000000000000000..07d6b33e16bb27a20c70ad3d2887c3ebd6ff237c --- /dev/null +++ b/mtklibs/ami304d/README @@ -0,0 +1,22 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. + diff --git a/mtklibs/ami304d/ami304d b/mtklibs/ami304d/ami304d new file mode 100755 index 0000000000000000000000000000000000000000..ae1631b593a52aa5bb59ce63228487ebe990666d Binary files /dev/null and b/mtklibs/ami304d/ami304d differ diff --git a/mtklibs/anrappmanager/Android.mk_ b/mtklibs/anrappmanager/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..316edc69fd97bd5b35f344e57d79a328478a4783 --- /dev/null +++ b/mtklibs/anrappmanager/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = anrappmanager +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/anrappmanager/README b/mtklibs/anrappmanager/README new file mode 100755 index 0000000000000000000000000000000000000000..51046272fc8b02fb1d497d28b00ca6dfd4a5a1ff --- /dev/null +++ b/mtklibs/anrappmanager/README @@ -0,0 +1,18 @@ +This module is ANR app manager. +This library is pre-built by MediaTek internally. + +WHAT IT DOES? +============= +The purpose of ANR app manager is to let ANR process dump message history +and message queue when ANR happens. + +HOW IT WAS BUILT? +================== +mmm vendor/mediatek/proprietary/protect/frameworks/base/anrappmanager + +HOW TO USE IT? +============== +ANR app manager should not be used directly by an application developer. +It is used by ANR manager. + +The majority of source code for this library were written by MediaTek. \ No newline at end of file diff --git a/mtklibs/anrappmanager/javalib.jar b/mtklibs/anrappmanager/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..3f602b331616eed03db9285aa81e149f2ed705a3 Binary files /dev/null and b/mtklibs/anrappmanager/javalib.jar differ diff --git a/mtklibs/anrmanager/Android.mk_ b/mtklibs/anrmanager/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..b06102fddc2b9035c7f5668b6f76f36c09af9956 --- /dev/null +++ b/mtklibs/anrmanager/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = anrmanager +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/anrmanager/README b/mtklibs/anrmanager/README new file mode 100755 index 0000000000000000000000000000000000000000..3f17d6087f085f2e538187bc4528749d331f05d6 --- /dev/null +++ b/mtklibs/anrmanager/README @@ -0,0 +1,26 @@ +This module is ANR manager. +This library is pre-built by MediaTek internally. + +WHAT IT DOES? +============= +The purpose of ANR manager is to do the following functionality. +1. Key dispatching timeout ANR predump +2. Service timeout ANR predump +3. Broadcast timeout ANR predump +4. Binder monitor/watchdog +5. Precise CPU usage measurement +6. Enable/disable ANR mechanism from adb command +7. Zram thrashing logging mechanism +8. Multi-thread RTT dump + +HOW IT WAS BUILT? +================== +1. framework.jar needs to be built in advance. +2. mmm vendor/mediatek/proprietary/protect/frameworks/base/anrmanager + +HOW TO USE IT? +============== +ANR manager should not be used directly by an application developer. +It is used by AMS(activity manager service) to have some ANR mechanisms for debugging. + +The majority of source code for this library were written by MediaTek. \ No newline at end of file diff --git a/mtklibs/anrmanager/javalib.jar b/mtklibs/anrmanager/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..ff686068357c03249efb41cf055a7fcbfcabd5fa Binary files /dev/null and b/mtklibs/anrmanager/javalib.jar differ diff --git a/mtklibs/arch_helper/Android.mk_ b/mtklibs/arch_helper/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..c434f1ba6a64f08e93c41a4e9dbad722680b211d --- /dev/null +++ b/mtklibs/arch_helper/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = arch_helper +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/arch_helper/README b/mtklibs/arch_helper/README new file mode 100755 index 0000000000000000000000000000000000000000..3e8b93c07bd817b33ee03ec25ec0a7a076f8e43c --- /dev/null +++ b/mtklibs/arch_helper/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +Used to decide package arch according to libs within assets + +HOW IT WAS BUILT? +================== +This module is built to a static java library arch_helper, whichi is linked to service.core + +HOW TO USE IT? +============== + - Init an instance of ArchHelper and pass an apk file to it. Then call getSupportedAbi to get the APK abi diff --git a/mtklibs/arch_helper/javalib.jar b/mtklibs/arch_helper/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..06a5dda717c1f5f2714fa25ad707d6a4d03881a3 Binary files /dev/null and b/mtklibs/arch_helper/javalib.jar differ diff --git a/mtklibs/bmm050d/Android.mk_ b/mtklibs/bmm050d/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..2da50ecd4e341d42dbd64c1ad00688ce3a05b261 --- /dev/null +++ b/mtklibs/bmm050d/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = bmm050d +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = bmm050d +include $(BUILD_PREBUILT) diff --git a/mtklibs/bmm050d/NOTICE b/mtklibs/bmm050d/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/bmm050d/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/bmm050d/README b/mtklibs/bmm050d/README new file mode 100755 index 0000000000000000000000000000000000000000..07d6b33e16bb27a20c70ad3d2887c3ebd6ff237c --- /dev/null +++ b/mtklibs/bmm050d/README @@ -0,0 +1,22 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. + diff --git a/mtklibs/bmm050d/bmm050d b/mtklibs/bmm050d/bmm050d new file mode 100755 index 0000000000000000000000000000000000000000..9bc62b356cd40dfae5411c72f6c8fa6ef78d5f94 Binary files /dev/null and b/mtklibs/bmm050d/bmm050d differ diff --git a/mtklibs/calib.dat/Android.mk_ b/mtklibs/calib.dat/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..42aed76f0d61dc0b86b708875ee37a95569abbeb --- /dev/null +++ b/mtklibs/calib.dat/Android.mk_ @@ -0,0 +1,14 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = calib.dat +LOCAL_MODULE_CLASS = ETC +LOCAL_MODULE_PATH = $(PRODUCT_OUT)/data/misc/acdapi +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SRC_FILES = calib.dat +include $(BUILD_PREBUILT) diff --git a/mtklibs/calib.dat/README b/mtklibs/calib.dat/README new file mode 100755 index 0000000000000000000000000000000000000000..68b3aed7c1c1ed4a2e2f9b4563936c771ebca5fe --- /dev/null +++ b/mtklibs/calib.dat/README @@ -0,0 +1,19 @@ +AcdApiDaemon daemon + +WHAT IT DOES? +============= +AcdApiDaemon daemon + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +liblog libcutils libutils libui libbinder + +and the following libs from MediaTek: +1. N/A + +HOW TO USE IT? +============== +Start AcdApiDaemon service + +All the source code of this library were written by ALPS ELECTRIC co.. diff --git a/mtklibs/calib.dat/calib.dat b/mtklibs/calib.dat/calib.dat new file mode 100755 index 0000000000000000000000000000000000000000..9c11639b3f60262ee28ba2de1f41e14ef48f4df3 --- /dev/null +++ b/mtklibs/calib.dat/calib.dat @@ -0,0 +1,10 @@ +xc3d:0 +yc3d:0 +zc3d:0 +r3d:139 +ax:1000 +ay:1000 +az:1000 +sgm:244 +Acnt:0 +lvl:3 diff --git a/mtklibs/ccci_fsd/Android.mk_ b/mtklibs/ccci_fsd/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a388c9e0e2127533f6e5eb050aa791844534b5fc --- /dev/null +++ b/mtklibs/ccci_fsd/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = ccci_fsd +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libnvram libhardware_legacy libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = ccci_fsd +include $(BUILD_PREBUILT) diff --git a/mtklibs/ccci_fsd/NOTICE b/mtklibs/ccci_fsd/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..f28eabd18ec9b922791142ecc0ec008f4e4c3057 --- /dev/null +++ b/mtklibs/ccci_fsd/NOTICE @@ -0,0 +1,3 @@ +This MediaTek software package contains software with the following notices and under the following licenses: + +============================================================================= diff --git a/mtklibs/ccci_fsd/README b/mtklibs/ccci_fsd/README new file mode 100755 index 0000000000000000000000000000000000000000..70874c941334af392cc9375a96caf919f3864eff --- /dev/null +++ b/mtklibs/ccci_fsd/README @@ -0,0 +1,22 @@ +The bin file 'ccci_fsd' is a daemon service. +This bin is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= + +ccci_fsd is based on linux fs and used to store modem data into AP flash, +it is called by modem RPC via ccci channel. + + +HOW IT WAS BUILT? +================== + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + + +HOW TO USE IT? +============== + +The bin file is a system service, and it's started at system booting up while parsing init.modem.rc. diff --git a/mtklibs/ccci_fsd/ccci_fsd b/mtklibs/ccci_fsd/ccci_fsd new file mode 100755 index 0000000000000000000000000000000000000000..beacf92494edf074f19a410fdc0beed66c972295 Binary files /dev/null and b/mtklibs/ccci_fsd/ccci_fsd differ diff --git a/mtklibs/ccci_mdinit/Android.mk_ b/mtklibs/ccci_mdinit/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..209a6642cd1e7d14f9bc0ed74f7f2b424d4064e5 --- /dev/null +++ b/mtklibs/ccci_mdinit/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = ccci_mdinit +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libnvram libccci_util libhardware_legacy libaed libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = ccci_mdinit +include $(BUILD_PREBUILT) diff --git a/mtklibs/ccci_mdinit/NOTICE b/mtklibs/ccci_mdinit/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..f28eabd18ec9b922791142ecc0ec008f4e4c3057 --- /dev/null +++ b/mtklibs/ccci_mdinit/NOTICE @@ -0,0 +1,3 @@ +This MediaTek software package contains software with the following notices and under the following licenses: + +============================================================================= diff --git a/mtklibs/ccci_mdinit/README b/mtklibs/ccci_mdinit/README new file mode 100755 index 0000000000000000000000000000000000000000..6dc6931a0b76841e239d87ddbcb611f06b0b4e37 --- /dev/null +++ b/mtklibs/ccci_mdinit/README @@ -0,0 +1,21 @@ +The bin file 'ccci_mdinit' is a daemon service. +This bin is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= + +ccci_mdinit comunicates with ccci drvier to control modem life-cycle and state, such as when to start and stop modem, +how to handle flight mode, how to modem exception, and etc. + +HOW IT WAS BUILT? +================== + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + + +HOW TO USE IT? +============== + +The bin file is a system service, and it's started at system booting up while parsing init.modem.rc. diff --git a/mtklibs/ccci_mdinit/ccci_mdinit b/mtklibs/ccci_mdinit/ccci_mdinit new file mode 100755 index 0000000000000000000000000000000000000000..8fe21f967b3f42bb4aca80b3a311da8d53b05b3a Binary files /dev/null and b/mtklibs/ccci_mdinit/ccci_mdinit differ diff --git a/mtklibs/cert/Infrared/InfraredKey.pk8 b/mtklibs/cert/Infrared/InfraredKey.pk8 new file mode 100755 index 0000000000000000000000000000000000000000..9ffd6841db3056dc8ec1980b6db3cf547b3c43ac Binary files /dev/null and b/mtklibs/cert/Infrared/InfraredKey.pk8 differ diff --git a/mtklibs/cert/Infrared/InfraredKey.x509.pem b/mtklibs/cert/Infrared/InfraredKey.x509.pem new file mode 100755 index 0000000000000000000000000000000000000000..626ac5f9e70ef988b293d9e474c530c0f1c212aa --- /dev/null +++ b/mtklibs/cert/Infrared/InfraredKey.x509.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDDTCCAfWgAwIBAgIEcMwOxjANBgkqhkiG9w0BAQsFADA3MQswCQYDVQQGEwJV +UzEQMA4GA1UEChMHQW5kcm9pZDEWMBQGA1UEAxMNQW5kcm9pZCBEZWJ1ZzAeFw0x +NTExMjYwODQ3NTRaFw00NTExMTgwODQ3NTRaMDcxCzAJBgNVBAYTAlVTMRAwDgYD +VQQKEwdBbmRyb2lkMRYwFAYDVQQDEw1BbmRyb2lkIERlYnVnMIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlIJGiRNn36ZzlNKiNamw3kJN52a8nXxaYkh3 +b7aJ811fCDozjWYvQdH2BvcgjlLjLWkFMtV9Fb8JvYPhwBEEYqa8cGBFZkObvy8t +Dywv7Jh5/N54HIEY6VKustddk5P5EbiwirimFcs77PqProoyPwrxN6e4ckRsMN8h +tC7k4LTHkKxoidTC5WA3PbopTXLCrNDwXQV0Xit3PuSGxY1zpvEoQUfY/gusysTm +L8ka9aGDrfCN/umyzzZv1MWY5V4N1306bMFtZLRbZL25fwChOAq+0qIkj/wts5Vy +xSnpHsoqseExuHmnl7JaD2RTvbJ7x6sugUqkLYdFXtOOmZnxBQIDAQABoyEwHzAd +BgNVHQ4EFgQU/PgmP/Dr1RcZhVw16Ye7bptpUNYwDQYJKoZIhvcNAQELBQADggEB +AB4MjFyYng20VlEMuBFrzR1Dyg7E5tVuoLxPg+JFHzEUFZPDokgoCPhGvs4F7x2S +hzhw4XYsMmpTCkW7xfjbCHHy1NOp15uuh7AAP79d2iR8r9gOYmN6A2mPwsqdREBL +FqzHn/SNjSLhvb8m3JGeBul24qox8BhTpDubBEkEb3irCJ9jZdxbeENCQSFr7AtS +MWnLes1KSBd3vr4a4MSNYarcnUhJgyEDwW17wnUdo0FC4MClx1bW9v68wqCOb+jg ++J2c6fzJ3j7JIlPnK16ppvX/Z/Wbduh1X1EL7jJMfmZWS+Rl9gydm8AohWPC5a7r +7xHF8GXvYUSOZHe0jahdp0E= +-----END CERTIFICATE----- diff --git a/mtklibs/cert/Infrared/debug.keystore b/mtklibs/cert/Infrared/debug.keystore new file mode 100755 index 0000000000000000000000000000000000000000..939c547cd50fa145a85e72d710bb4e71e7f819f5 Binary files /dev/null and b/mtklibs/cert/Infrared/debug.keystore differ diff --git a/mtklibs/cert/master/debug.keystore b/mtklibs/cert/master/debug.keystore new file mode 100755 index 0000000000000000000000000000000000000000..1f11c56f3ed16b9fd336ae8991e05c4d1de650aa Binary files /dev/null and b/mtklibs/cert/master/debug.keystore differ diff --git a/mtklibs/cert/master/masterKey.pk8 b/mtklibs/cert/master/masterKey.pk8 new file mode 100755 index 0000000000000000000000000000000000000000..6f3302b73904d8bed50435965a8f56d4615eeade Binary files /dev/null and b/mtklibs/cert/master/masterKey.pk8 differ diff --git a/mtklibs/cert/master/masterKey.x509.pem b/mtklibs/cert/master/masterKey.x509.pem new file mode 100755 index 0000000000000000000000000000000000000000..e64e2476a7e489d4d02dc38814c9e084245a696d --- /dev/null +++ b/mtklibs/cert/master/masterKey.x509.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDDTCCAfWgAwIBAgIEAO9Z5zANBgkqhkiG9w0BAQsFADA3MQswCQYDVQQGEwJV +UzEQMA4GA1UEChMHQW5kcm9pZDEWMBQGA1UEAxMNQW5kcm9pZCBEZWJ1ZzAeFw0x +NTEwMTAwOTU2MzlaFw00NTEwMDIwOTU2MzlaMDcxCzAJBgNVBAYTAlVTMRAwDgYD +VQQKEwdBbmRyb2lkMRYwFAYDVQQDEw1BbmRyb2lkIERlYnVnMIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4UMI3FXzmOR3Ym/E3HTP2AaZGh+IAAj7jeKN +atPrdJ9ikzgTnSTaHzYNdXg2tVt2BE1fkz8VnPnVQuJ8alQjBVNkrMxflxlaQ7DY +J/BhJNoLcP8HumVrTBEDC+sFtNvnLvBB3imzPXfXGjV3RT7myuUxijnKeyB+R/MN +A4umOdxwPc9/KBMgqvybTd1qfOhpxpyU+aSzLMHUl5PPnEPnvAQiz/zmOQE2/XQY +8GbLl4QyiUQmSasRE2HNWXB2488R4fT6R71tlu9KuBZYOu0Y36n5634FbM/3rlRh +81vdRLrOp1UkVe7UPhpAeUtp8EnOfh7tmVwcI6Htq/FQlcv3/wIDAQABoyEwHzAd +BgNVHQ4EFgQUKivZFnbL4ABGCapUOhge/KfneU0wDQYJKoZIhvcNAQELBQADggEB +AGDuyak8n++za3je+sPyaMd+v/H3JB/ZVBs9rsQGbBrnOlczc/LPR2tcac1RcVKe +mqOpwMLIQY9H2T4mPFVFoKXWERLj7lNbsc+srRkz9Va8gODimmDaaXoAT43T6tnd +2rcOWFOSLgjDv2v1rPxLmzXQ6AsGfhC6aItWZKHM+XQSjFeydUuaODvzmuVSyzgv +1mmn/PMXOeIHglfo7YDySGE3Q1NO9+7BjPFElkPCh10dJN5W8cvT2iCDwJK8XsKs +m2XmKETsSADQ8M3IE8PjAjwAO+ueYFxsVXhN6G+OqTYLwpV9v4RzQBLueKaNpjdG +1wik7NpvpHBOcvtLl20s6fc= +-----END CERTIFICATE----- diff --git a/mtklibs/com.google.widevine.software.drm/Android.mk_ b/mtklibs/com.google.widevine.software.drm/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..3c7abc438f36426f20853586b5232c77c54b72e6 --- /dev/null +++ b/mtklibs/com.google.widevine.software.drm/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = com.google.widevine.software.drm +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/com.google.widevine.software.drm/NOTICE b/mtklibs/com.google.widevine.software.drm/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..594a7f436c16363bb70a0771bfe77806c9b556da --- /dev/null +++ b/mtklibs/com.google.widevine.software.drm/NOTICE @@ -0,0 +1,22 @@ + * Copyright (C) 2011 Google, Inc. All Rights Reserved: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/com.google.widevine.software.drm/README b/mtklibs/com.google.widevine.software.drm/README new file mode 100755 index 0000000000000000000000000000000000000000..2b81286952e0b7a0d7284cab08f8feecb67e10dd --- /dev/null +++ b/mtklibs/com.google.widevine.software.drm/README @@ -0,0 +1,20 @@ +library of Drm features, including widevine drm plugin api. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libdrmwvmcommon is used by widevine plugin, it contains method in DrmEngine. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libdrmwvmcommon is used by widevine plugin, it implements DrmEngine method. diff --git a/mtklibs/com.google.widevine.software.drm/javalib.jar b/mtklibs/com.google.widevine.software.drm/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..3882544857d6f818c4a735a672d2815ce69117a6 Binary files /dev/null and b/mtklibs/com.google.widevine.software.drm/javalib.jar differ diff --git a/mtklibs/com.mediatek.lbs.em2.utils/Android.mk_ b/mtklibs/com.mediatek.lbs.em2.utils/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a13bc330f659ff127fdd7c44e1982309ac2be2dd --- /dev/null +++ b/mtklibs/com.mediatek.lbs.em2.utils/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = com.mediatek.lbs.em2.utils +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/com.mediatek.lbs.em2.utils/README b/mtklibs/com.mediatek.lbs.em2.utils/README new file mode 100755 index 0000000000000000000000000000000000000000..16368ecbedab224707e9fa582cfc51b9e81bc1e3 --- /dev/null +++ b/mtklibs/com.mediatek.lbs.em2.utils/README @@ -0,0 +1,21 @@ +The Java Archive file 'com.mediatek.lbs.em2.utils' is a static Java library +This Android Package is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +'com.mediatek.lbs.em2.utils' is the implementation that provides the +interfaces for Android Package to communicate with the binary file 'mtk_agpsd'. + +HOW IT WAS BUILT? +================== +All source/dependency modules of this module are already put in +'vendor/mediatek/libs'. + +HOW TO USE IT? +============== +The static java library 'com.mediatek.lbs.em2.utils' is used by +'LocationEM2.apk' at compile time. + +Source +============== +All the source code of this Android Package were written by MediaTek co.. diff --git a/mtklibs/com.mediatek.lbs.em2.utils/javalib.jar b/mtklibs/com.mediatek.lbs.em2.utils/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..365ca8dbe1dee8e2ab49845b17e8f88770304a27 Binary files /dev/null and b/mtklibs/com.mediatek.lbs.em2.utils/javalib.jar differ diff --git a/mtklibs/com.mediatek.protect.email/Android.mk_ b/mtklibs/com.mediatek.protect.email/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..e2fafa04f4aa504125bcc329234ca2aaa27e8a02 --- /dev/null +++ b/mtklibs/com.mediatek.protect.email/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = com.mediatek.protect.email +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/com.mediatek.protect.email/NOTICE b/mtklibs/com.mediatek.protect.email/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..699b885bd994d3eef5c89343915723d8752080b1 --- /dev/null +++ b/mtklibs/com.mediatek.protect.email/NOTICE @@ -0,0 +1,22 @@ +* Copyright (C) 2010 The Android Open Source Project: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/com.mediatek.protect.email/README b/mtklibs/com.mediatek.protect.email/README new file mode 100755 index 0000000000000000000000000000000000000000..3da058a67dbabba965194b7fd8997bef793f8989 --- /dev/null +++ b/mtklibs/com.mediatek.protect.email/README @@ -0,0 +1,18 @@ + +WHAT IT DOES? +============= +Mediatek mail is the java libary for com.android.email app, which named +com.mediatek.protect.email. + +HOW IT WAS BUILT? +================== +This package is pre-built by MediaTek internal. + +HOW TO USE IT? +============== +It can be referenced as static java library. + +Source +============== +Most of the source code of this Android Package were written by MediaTek co.. + diff --git a/mtklibs/com.mediatek.protect.email/javalib.jar b/mtklibs/com.mediatek.protect.email/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..7b2961101bfb695039a52cdce4a38d4ddaaa023d Binary files /dev/null and b/mtklibs/com.mediatek.protect.email/javalib.jar differ diff --git a/mtklibs/com.mediatek.tatf.common/Android.mk_ b/mtklibs/com.mediatek.tatf.common/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..779e3896249e69db051ba905b17b08bbd82d2ebb --- /dev/null +++ b/mtklibs/com.mediatek.tatf.common/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = com.mediatek.tatf.common +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/com.mediatek.tatf.common/NOTICE b/mtklibs/com.mediatek.tatf.common/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..4db2da178b47a55582f01de065448c5f499bdecf --- /dev/null +++ b/mtklibs/com.mediatek.tatf.common/NOTICE @@ -0,0 +1,23 @@ +* Copyright (C) 2014 MediaTek Inc.: + * Copyright (C) 2006-2008 The Android Open Source Project: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/com.mediatek.tatf.common/README b/mtklibs/com.mediatek.tatf.common/README new file mode 100755 index 0000000000000000000000000000000000000000..aae9f5af5232102c47aea7c68c2c6e237716db43 --- /dev/null +++ b/mtklibs/com.mediatek.tatf.common/README @@ -0,0 +1,15 @@ +Library of MTK WFD features, controlling output bitrate. + + +WHAT IT DOES? +============= +tatflib as a jar between Host app and tatfserver. +It is only for tatf internal used. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP + +HOW TO USE IT? +============== +Host include the lib and add TatfBaseService. diff --git a/mtklibs/com.mediatek.tatf.common/javalib.jar b/mtklibs/com.mediatek.tatf.common/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..d892e5e7be0ab5c40c75ae66748051ca5ee004c6 Binary files /dev/null and b/mtklibs/com.mediatek.tatf.common/javalib.jar differ diff --git a/mtklibs/com.mediatek.vcalendar/Android.mk_ b/mtklibs/com.mediatek.vcalendar/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a7146eab234f269437fd2dc0338ae9674a1291de --- /dev/null +++ b/mtklibs/com.mediatek.vcalendar/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = com.mediatek.vcalendar +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/com.mediatek.vcalendar/NOTICE b/mtklibs/com.mediatek.vcalendar/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..bd11b52a428226e0846a1c5757e841bad1509596 --- /dev/null +++ b/mtklibs/com.mediatek.vcalendar/NOTICE @@ -0,0 +1,15 @@ + + Copyright (C) 2012 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/mtklibs/com.mediatek.vcalendar/README b/mtklibs/com.mediatek.vcalendar/README new file mode 100755 index 0000000000000000000000000000000000000000..eb6570b41a7ece64a02786f410f0ae486247914b --- /dev/null +++ b/mtklibs/com.mediatek.vcalendar/README @@ -0,0 +1,18 @@ +vCalendar is the java libary part of calendar event sharing feature and backup restore module. + +WHAT IT DOES? +============= +It implements the parse/compose vcs content flow. + +HOW IT WAS BUILT? +================== +This package is pre-built by MediaTek internal. +And it is binary release module + +HOW TO USE IT? +============== +It can be referenced as static java library. + +Source +============== +Most of the source code of this Android Package were written by MediaTek co.. diff --git a/mtklibs/com.mediatek.vcalendar/javalib.jar b/mtklibs/com.mediatek.vcalendar/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..ae09bef5e84dbae3b2a3999d643417c5573c85d3 Binary files /dev/null and b/mtklibs/com.mediatek.vcalendar/javalib.jar differ diff --git a/mtklibs/com_mediatek_amplus/Android.mk_ b/mtklibs/com_mediatek_amplus/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..3ff2bb5a0ff6df5b263d47c44023721ce40efc41 --- /dev/null +++ b/mtklibs/com_mediatek_amplus/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = com_mediatek_amplus +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/com_mediatek_amplus/README b/mtklibs/com_mediatek_amplus/README new file mode 100755 index 0000000000000000000000000000000000000000..10f0ed211f9c7ca4182e65e497fa715495dd7594 --- /dev/null +++ b/mtklibs/com_mediatek_amplus/README @@ -0,0 +1,2 @@ +this module is for AlarmGrouping feature to get MaxTriggerTime for an alarm. + diff --git a/mtklibs/com_mediatek_amplus/javalib.jar b/mtklibs/com_mediatek_amplus/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..caddfe8d06784b66a961b7610d1443894bbaa4a2 Binary files /dev/null and b/mtklibs/com_mediatek_amplus/javalib.jar differ diff --git a/mtklibs/compasslib_h6_gcc_armv4t/Android.mk_ b/mtklibs/compasslib_h6_gcc_armv4t/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..0582f45f37a0f5527ab9f9aa4fc7511f7b95ee08 --- /dev/null +++ b/mtklibs/compasslib_h6_gcc_armv4t/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = compasslib_h6_gcc_armv4t +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/compasslib_h6_gcc_armv4t.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/compasslib_h6_gcc_armv4t/NOTICE b/mtklibs/compasslib_h6_gcc_armv4t/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/compasslib_h6_gcc_armv4t/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/compasslib_h6_gcc_armv4t/README b/mtklibs/compasslib_h6_gcc_armv4t/README new file mode 100755 index 0000000000000000000000000000000000000000..bb33af8b207a9a445676a8a56815fc03f53e7955 --- /dev/null +++ b/mtklibs/compasslib_h6_gcc_armv4t/README @@ -0,0 +1,21 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. \ No newline at end of file diff --git a/mtklibs/compasslib_h6_gcc_armv4t/arm/compasslib_h6_gcc_armv4t.a b/mtklibs/compasslib_h6_gcc_armv4t/arm/compasslib_h6_gcc_armv4t.a new file mode 100755 index 0000000000000000000000000000000000000000..0250c87c924b17695edd197508fc7e42b9312fe6 Binary files /dev/null and b/mtklibs/compasslib_h6_gcc_armv4t/arm/compasslib_h6_gcc_armv4t.a differ diff --git a/mtklibs/compasslib_h6_gcc_armv4t_1/Android.mk_ b/mtklibs/compasslib_h6_gcc_armv4t_1/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..55901040baa80eae9a1ee8b5863104e5c7eb92a0 --- /dev/null +++ b/mtklibs/compasslib_h6_gcc_armv4t_1/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = compasslib_h6_gcc_armv4t_1 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/compasslib_h6_gcc_armv4t_1.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/compasslib_h6_gcc_armv4t_1/NOTICE b/mtklibs/compasslib_h6_gcc_armv4t_1/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/compasslib_h6_gcc_armv4t_1/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/compasslib_h6_gcc_armv4t_1/README b/mtklibs/compasslib_h6_gcc_armv4t_1/README new file mode 100755 index 0000000000000000000000000000000000000000..bb33af8b207a9a445676a8a56815fc03f53e7955 --- /dev/null +++ b/mtklibs/compasslib_h6_gcc_armv4t_1/README @@ -0,0 +1,21 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. \ No newline at end of file diff --git a/mtklibs/compasslib_h6_gcc_armv4t_1/arm/compasslib_h6_gcc_armv4t_1.a b/mtklibs/compasslib_h6_gcc_armv4t_1/arm/compasslib_h6_gcc_armv4t_1.a new file mode 100755 index 0000000000000000000000000000000000000000..62040300d3764730961acdced36523aa1570b083 Binary files /dev/null and b/mtklibs/compasslib_h6_gcc_armv4t_1/arm/compasslib_h6_gcc_armv4t_1.a differ diff --git a/mtklibs/device-vendor.mk b/mtklibs/device-vendor.mk new file mode 100755 index 0000000000000000000000000000000000000000..6bff04198a933ac8b50d87550032247900a8657a --- /dev/null +++ b/mtklibs/device-vendor.mk @@ -0,0 +1,39 @@ +# Automatically generated file; DO NOT EDIT. + +PRODUCT_COPY_FILES += vendor/ulefone/t1/images/md32_d.bin:system/firmware/md32_d.bin:mtk +PRODUCT_COPY_FILES += vendor/ulefone/t1/images/md32_p.bin:system/firmware/md32_p.bin:mtk +PRODUCT_COPY_FILES += vendor/ulefone/t1/images/tz.img:tz.img:mtk + +PRODUCT_PACKAGES += lib3a +PRODUCT_PACKAGES += libGdmaScalerPipe +PRODUCT_PACKAGES += libJpgDecPipe +PRODUCT_PACKAGES += libJpgEncPipe +PRODUCT_PACKAGES += libSwJpgCodec +PRODUCT_PACKAGES += libamr_wrap +PRODUCT_PACKAGES += libawb_wrap +PRODUCT_PACKAGES += libcamalgo +PRODUCT_PACKAGES += libcomutils +PRODUCT_PACKAGES += libdpframework +PRODUCT_PACKAGES += libged +PRODUCT_PACKAGES += libgpu_aux +PRODUCT_PACKAGES += libimsma +PRODUCT_PACKAGES += libimsma_rtp +PRODUCT_PACKAGES += libimsma_socketwrapper +PRODUCT_PACKAGES += libmhalImageCodec +PRODUCT_PACKAGES += libmtk_drvb +PRODUCT_PACKAGES += libmtkjpeg +PRODUCT_PACKAGES += libmtksqlite3_android +PRODUCT_PACKAGES += libnvram_platform +PRODUCT_PACKAGES += libnvram_sec +PRODUCT_PACKAGES += libnvramagentclient +PRODUCT_PACKAGES += libpq_prot +PRODUCT_PACKAGES += libsink +PRODUCT_PACKAGES += libsource +PRODUCT_PACKAGES += libtouchfilter +PRODUCT_PACKAGES += libvcodec_cap +PRODUCT_PACKAGES += libvcodecdrv +PRODUCT_PACKAGES += libvt_avsync +PRODUCT_PACKAGES += libvt_socketbind +PRODUCT_PACKAGES += mmp +PRODUCT_PACKAGES += sink +PRODUCT_PACKAGES += source diff --git a/mtklibs/epdg_wod/Android.mk_ b/mtklibs/epdg_wod/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..761753bc05eefe3e556e7166fb989577485e0973 --- /dev/null +++ b/mtklibs/epdg_wod/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = epdg_wod +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libhardware libhardware_legacy libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = epdg_wod +include $(BUILD_PREBUILT) diff --git a/mtklibs/epdg_wod/NOTICE b/mtklibs/epdg_wod/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..090fb862dcee02e8e85ffec7413c818b98d38691 --- /dev/null +++ b/mtklibs/epdg_wod/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/epdg_wod/README b/mtklibs/epdg_wod/README new file mode 100755 index 0000000000000000000000000000000000000000..194b8b938622e20b0305266bba548ac926844edd --- /dev/null +++ b/mtklibs/epdg_wod/README @@ -0,0 +1,21 @@ +WHAT IT DOES? +============= +This module is provide interface for ePDG Data Framework to handle WiFi PDN (Wifi offload S2b). + +HOW IT WAS BUILT? +================== +It needs the following executed files from Mediatek: +charon starter stroke ipsec + +It needs the following library from Mediatek: +libcharon libhydra libstrongswan libsimaka + +The above exceuted files and library are already built in 'vendor/mediatek/proprietary/external/strongswan' folder. + +HOW TO USE IT? +============== +ePDG daemon are interface between ePDG Data Framework and strongswan to transfer ATCMD format to strnogsawn config files, +and to build/break PDN connection over WiFi. + +The source code for this module were written by MediaTek and dedicated for Mediatek usage. +There is no open API for public use. diff --git a/mtklibs/epdg_wod/epdg_wod b/mtklibs/epdg_wod/epdg_wod new file mode 100755 index 0000000000000000000000000000000000000000..3bb8e8f10aefae4a0e9895cb4ac1146fce63cef0 Binary files /dev/null and b/mtklibs/epdg_wod/epdg_wod differ diff --git a/mtklibs/fsck_msdos_mtk/Android.mk_ b/mtklibs/fsck_msdos_mtk/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..26baf107ab4eefb52bbbdb7a23033e31d194da99 --- /dev/null +++ b/mtklibs/fsck_msdos_mtk/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = fsck_msdos_mtk +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = fsck_msdos_mtk +include $(BUILD_PREBUILT) diff --git a/mtklibs/fsck_msdos_mtk/NOTICE b/mtklibs/fsck_msdos_mtk/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2b05cfc90af0be3846ae34e678bb0b67b86b0d9c --- /dev/null +++ b/mtklibs/fsck_msdos_mtk/NOTICE @@ -0,0 +1,99 @@ +/* + * Copyright (C) 1995, 1997 Wolfgang Solfrank + * Copyright (c) 1995 Martin Husemann + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Martin Husemann + * and Wolfgang Solfrank. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + + +/* + * Copyright (C) 1995, 1996, 1997 Wolfgang Solfrank + * Copyright (c) 1995 Martin Husemann + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Martin Husemann + * and Wolfgang Solfrank. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + + +/* + * Copyright (C) 1995 Wolfgang Solfrank + * Copyright (c) 1995 Martin Husemann + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Martin Husemann + * and Wolfgang Solfrank. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ diff --git a/mtklibs/fsck_msdos_mtk/README b/mtklibs/fsck_msdos_mtk/README new file mode 100755 index 0000000000000000000000000000000000000000..68af568b82131b261ca1919cc68010f9a2eef8e9 --- /dev/null +++ b/mtklibs/fsck_msdos_mtk/README @@ -0,0 +1,15 @@ + +WHAT IT DOES? +============= +With Low Cost Android + large size FAT (usb/sdcard/...), we may have limit memory to run the original fsck_msdos on them. +The MTK fsck_msdos_mtk design a new approach to largely reduce the memory foot print but with the increase of the checking time. + +HOW IT WAS BUILT? +================== +Turn on the feature at corresponding ProjectConfig.mk as following and rebuild. +MTK_FSCK_MSDOS_MTK=yes + + +HOW TO USE IT? +============== +After the rebuild, VOLD will use fsck_msdos_mtk to check FAT partition automatically diff --git a/mtklibs/fsck_msdos_mtk/fsck_msdos_mtk b/mtklibs/fsck_msdos_mtk/fsck_msdos_mtk new file mode 100755 index 0000000000000000000000000000000000000000..a4e297c20ff71180e96a5182ec264305962694fa Binary files /dev/null and b/mtklibs/fsck_msdos_mtk/fsck_msdos_mtk differ diff --git a/mtklibs/geomagneticd/Android.mk_ b/mtklibs/geomagneticd/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..419b1f7b45575ebcb43932f02a6a620023a8e9ba --- /dev/null +++ b/mtklibs/geomagneticd/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = geomagneticd +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = geomagneticd +include $(BUILD_PREBUILT) diff --git a/mtklibs/geomagneticd/NOTICE b/mtklibs/geomagneticd/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/geomagneticd/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/geomagneticd/README b/mtklibs/geomagneticd/README new file mode 100755 index 0000000000000000000000000000000000000000..bb33af8b207a9a445676a8a56815fc03f53e7955 --- /dev/null +++ b/mtklibs/geomagneticd/README @@ -0,0 +1,21 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. \ No newline at end of file diff --git a/mtklibs/geomagneticd/geomagneticd b/mtklibs/geomagneticd/geomagneticd new file mode 100755 index 0000000000000000000000000000000000000000..f176c2037a79f49c8b6ddaf38faf8e77a3ff3d5c Binary files /dev/null and b/mtklibs/geomagneticd/geomagneticd differ diff --git a/mtklibs/gralloc.mt6757/Android.mk_ b/mtklibs/gralloc.mt6757/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..7d4e4ba1e522b116fc2ef274a8e5699c468f5323 --- /dev/null +++ b/mtklibs/gralloc.mt6757/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = gralloc.mt6757 +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = hw +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libhardware libGLESv1_CM libion libgralloc_extra libion_mtk libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = gralloc.mt6757.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = gralloc.mt6757 +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = hw +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libhardware libGLESv1_CM libion libgralloc_extra libion_mtk libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/gralloc.mt6757.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/gralloc.mt6757/NOTICE b/mtklibs/gralloc.mt6757/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..426adffff90962814d3ddce6029da0ad445b57d4 --- /dev/null +++ b/mtklibs/gralloc.mt6757/NOTICE @@ -0,0 +1,24 @@ + * Copyright (C) 2010 ARM Limited. All rights reserved.: + * Copyright (C) 2008 The Android Open Source Project: + * Copyright (C) 2014 ARM Limited. All rights reserved.: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/gralloc.mt6757/README b/mtklibs/gralloc.mt6757/README new file mode 100755 index 0000000000000000000000000000000000000000..539c59cd722e67727d0c6e2304f276a3ae639ec0 --- /dev/null +++ b/mtklibs/gralloc.mt6757/README @@ -0,0 +1,21 @@ +WHAT IT DOES? +============= +The library implementation used to process gralloc. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libhardware +2. liblog +3. libcutils +4. libGLESv1_CM +5. libutils +6. libgralloc_extra +7. libion_mtk +8. libdl + + + +HOW TO USE IT? +============== +This module is responsible for preparing gralloc jobs to GPU. diff --git a/mtklibs/gralloc.mt6757/arm/gralloc.mt6757.so b/mtklibs/gralloc.mt6757/arm/gralloc.mt6757.so new file mode 100755 index 0000000000000000000000000000000000000000..bebd26864bcbe6fecdb56168f28242ec2f5a8196 Binary files /dev/null and b/mtklibs/gralloc.mt6757/arm/gralloc.mt6757.so differ diff --git a/mtklibs/gralloc.mt6757/gralloc.mt6757.so b/mtklibs/gralloc.mt6757/gralloc.mt6757.so new file mode 100755 index 0000000000000000000000000000000000000000..5df461e6da97e6a084458f4775d8e44c272b3d7f Binary files /dev/null and b/mtklibs/gralloc.mt6757/gralloc.mt6757.so differ diff --git a/mtklibs/hwcomposer.mt6757.1.4.1/Android.mk_ b/mtklibs/hwcomposer.mt6757.1.4.1/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..ce5963657ccbe15a15aa314fdcc3ef1678df29f1 --- /dev/null +++ b/mtklibs/hwcomposer.mt6757.1.4.1/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = hwcomposer.mt6757.1.4.1 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = hwcomposer.mt6757.1.4.1.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = hwcomposer.mt6757.1.4.1 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/hwcomposer.mt6757.1.4.1.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/hwcomposer.mt6757.1.4.1/NOTICE b/mtklibs/hwcomposer.mt6757.1.4.1/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..ec925ed5d57cb64bffe9ddaeb6d15ee3d7d83299 --- /dev/null +++ b/mtklibs/hwcomposer.mt6757.1.4.1/NOTICE @@ -0,0 +1,23 @@ +* Copyright (C) 2014 MediaTek Inc.: + * Copyright (C) 2007 The Android Open Source Project: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/hwcomposer.mt6757.1.4.1/README b/mtklibs/hwcomposer.mt6757.1.4.1/README new file mode 100755 index 0000000000000000000000000000000000000000..92c87e0257bc67e99f997e2ab0e14dfffb8f62db --- /dev/null +++ b/mtklibs/hwcomposer.mt6757.1.4.1/README @@ -0,0 +1,51 @@ +This directory contains HWComposer HAL interface, which defines the interface of +HWComposer and is used to build a hwcomposer shared library. + + +WHAT IT DOES? +============= + +HWComposer is the implementation that leverages HW IPs to +share the workload of GPU, which reduces the power consumption and +accelerates the rendering performance. + +It defines the interface of HWComposer v1.4 and is used to +build the hwcomposer shared library. + + +HOW IT WAS BUILT? +================== + +It needs the following libs from AOSP: +1. libEGL.so +2. libGLESv1_CM.so +3. libui.so +4. libutils.so +5. libcutils.so +6. libsync.so +7. libion.so +8. libhardware.so + +and the following libs from MediaTek: +1. libm4u.so +2. libion_mtk.so +3. libdpframework.so +4. libgralloc_extra.so +5. hwcomposer.$(CHIP_NAME).1.4.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a shared library 'hwcomposer.$(CHIP_NAME).so'. + +The shared library 'hwcomposer.mt6582.so' is loaded and invoked by +SurfaceFlinger at runtime and behaves as a hardware compositor that +shrares the workload with SurfaceFlinger for layer comsopition. + + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/hwcomposer.mt6757.1.4.1/arm/hwcomposer.mt6757.1.4.1.a b/mtklibs/hwcomposer.mt6757.1.4.1/arm/hwcomposer.mt6757.1.4.1.a new file mode 100755 index 0000000000000000000000000000000000000000..8cbceaa4aa6eccfac4ef45f4082a12ee4c02a17a Binary files /dev/null and b/mtklibs/hwcomposer.mt6757.1.4.1/arm/hwcomposer.mt6757.1.4.1.a differ diff --git a/mtklibs/hwcomposer.mt6757.1.4.1/hwcomposer.mt6757.1.4.1.a b/mtklibs/hwcomposer.mt6757.1.4.1/hwcomposer.mt6757.1.4.1.a new file mode 100755 index 0000000000000000000000000000000000000000..d5e9df25c8b8b71d23cef4bc8f46899744487e98 Binary files /dev/null and b/mtklibs/hwcomposer.mt6757.1.4.1/hwcomposer.mt6757.1.4.1.a differ diff --git a/mtklibs/images/md32_d.bin b/mtklibs/images/md32_d.bin new file mode 100755 index 0000000000000000000000000000000000000000..80024370f37a9983b814a4687d2141630807b9ed Binary files /dev/null and b/mtklibs/images/md32_d.bin differ diff --git a/mtklibs/images/md32_p.bin b/mtklibs/images/md32_p.bin new file mode 100755 index 0000000000000000000000000000000000000000..a17e2fc97255e698b6e4932089021903a7d84645 Binary files /dev/null and b/mtklibs/images/md32_p.bin differ diff --git a/mtklibs/images/tz.img b/mtklibs/images/tz.img new file mode 100755 index 0000000000000000000000000000000000000000..5b86964fb2a1235b21f8bdb1702b5b08be797b9e Binary files /dev/null and b/mtklibs/images/tz.img differ diff --git a/mtklibs/jpe_tool/Android.mk_ b/mtklibs/jpe_tool/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..b9a8bde325fecf451128933f2f24603dff09382f --- /dev/null +++ b/mtklibs/jpe_tool/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = true +LOCAL_MODULE = jpe_tool +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = host/javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/jpe_tool/README b/mtklibs/jpe_tool/README new file mode 100755 index 0000000000000000000000000000000000000000..468fa4275d8ef6b2ccbce9fc2f508444d1627e2a --- /dev/null +++ b/mtklibs/jpe_tool/README @@ -0,0 +1,17 @@ +Host Library of MTK JPE feature + + +WHAT IT DOES? +============= +It provides MTK Anti-clone security mechanism + +HOW IT WAS BUILT? +================== +All source/dependency modules of this module are already put in +'vendor\mediatek\proprietary\protect\frameworks\base\jpe\tool' folder. + +HOW TO USE IT? +============== +It is proprietary used by build system and not opened interface to other modules. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/jpe_tool/host/javalib.jar b/mtklibs/jpe_tool/host/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..6e7671bf3fa45c68dac5f0d0340dae9da70f0419 Binary files /dev/null and b/mtklibs/jpe_tool/host/javalib.jar differ diff --git a/mtklibs/lib3a/Android.mk_ b/mtklibs/lib3a/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..96f6edd875fb87ca2f2958833713f2a1bcb64b72 --- /dev/null +++ b/mtklibs/lib3a/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = lib3a +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = lib3a.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = lib3a +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/lib3a.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/lib3a/NOTICE b/mtklibs/lib3a/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/lib3a/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/lib3a/README b/mtklibs/lib3a/README new file mode 100755 index 0000000000000000000000000000000000000000..cf104dd0e1131528e279f918b48263d832e77a89 --- /dev/null +++ b/mtklibs/lib3a/README @@ -0,0 +1,25 @@ +The share library "lib3a.so" is the platform-specific 3A algorithm implementation. +This library is pre-built by MediaTek internally. + +WHAT IT DOES? +================== +lb3a.so: MTK 3A algorithm including AE (Auto Exposure) algorithm, AF (Auto Focus) algorithm, +AWB (Auto White Balance) algorithm, and strobe AE/AWB algorithm + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libcutils.so +2. liblog.so +3. libstlport.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== +3A algorithms have dedicated algorithm manager for algorithm control and state machine for 3A flow control, +please refer to the files in 'vendor/mediatek/proprietary/platform/mt6582/hardware/mtkcam/core/featureio/pipe/aaa' folder. +Public 3A HAL interface is defined in aaa_hal_base.h in 'vendor/mediatek/proprietary/hardware/include/mtkcam/hal' folder. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/lib3a/arm/lib3a.so b/mtklibs/lib3a/arm/lib3a.so new file mode 100755 index 0000000000000000000000000000000000000000..628a744b264b7cf5b64fae7ad53b4388bf46d2f2 Binary files /dev/null and b/mtklibs/lib3a/arm/lib3a.so differ diff --git a/mtklibs/lib3a/lib3a.so b/mtklibs/lib3a/lib3a.so new file mode 100755 index 0000000000000000000000000000000000000000..d18eed2a7581173c68ccfab84ee1949db76becab Binary files /dev/null and b/mtklibs/lib3a/lib3a.so differ diff --git a/mtklibs/libClearMotionFW/Android.mk_ b/mtklibs/libClearMotionFW/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a3d51b29dd976ae8c3940f2130d6035024a9dc87 --- /dev/null +++ b/mtklibs/libClearMotionFW/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libClearMotionFW +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libClearMotionFW.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libClearMotionFW/README b/mtklibs/libClearMotionFW/README new file mode 100755 index 0000000000000000000000000000000000000000..1dcf33c995aae04922447948a14e81d991202be3 --- /dev/null +++ b/mtklibs/libClearMotionFW/README @@ -0,0 +1,30 @@ +Library of MTK ClearMotion features, icluding frame-rate detection, frame-rate conversion. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libClearMotionFW.so contains MediaTek developed ClearMotion related post-processing modules. +Without them, ClearMotion functionalities will not work¡¨ + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libcutils.so + +and the following libs from MediaTek: +1. libMtkOmxVdec.so +2. libmet-tag.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +Provide api for ClearMotion feature called from libMtkOmxVdec. +all api interfaces are at (vendor/mediatek/proprietary/protect-bsp/hardware/omx/video) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libClearMotionFW/arm/libClearMotionFW.a b/mtklibs/libClearMotionFW/arm/libClearMotionFW.a new file mode 100755 index 0000000000000000000000000000000000000000..a8c1c9d4b3fdee072a8005e1f808761605c02a6b Binary files /dev/null and b/mtklibs/libClearMotionFW/arm/libClearMotionFW.a differ diff --git a/mtklibs/libGLES_mali/Android.mk_ b/mtklibs/libGLES_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d55ad802748a37d45a02bf02892b3bcc3ef91d15 --- /dev/null +++ b/mtklibs/libGLES_mali/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libGLES_mali +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = egl +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libz libhardware libui libbinder libc++ libged libgpu_aux libgralloc_extra +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libGLES_mali.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libGLES_mali +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = egl +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libz libhardware libui libbinder libc++ libged libgpu_aux libgralloc_extra +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libGLES_mali.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libGLES_mali/NOTICE b/mtklibs/libGLES_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libGLES_mali/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libGLES_mali/README b/mtklibs/libGLES_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..6b7ca1f0eb2b16f22b243bc497a1375b68404df6 --- /dev/null +++ b/mtklibs/libGLES_mali/README @@ -0,0 +1,43 @@ +The share library "libGLES_mali.so" is the core Mali 3D GPU driver implementation. +(OpenGL ES 1.x/OpenGL ES 2.0/OpenGL ES 3.0/OpenCL 1.0/OpenCL 1.2) + +It is mainly responsible for 3D graphics(EGL/GLES1.x/GLES2.0/GLES3.0) rendering +and General Purpose computing on GPU. +This library is pre-built by MediaTek internally. + +WHAT IT DOES? +================== +libGLES_mali.so: +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +The 3D HW jobs will be prepared and submit to kernel driver for further handling. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +================== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libGLES_mali/arm/libGLES_mali.so b/mtklibs/libGLES_mali/arm/libGLES_mali.so new file mode 100755 index 0000000000000000000000000000000000000000..35b86b6f56d939f2b40a5ec61074d4f8f7578e6e Binary files /dev/null and b/mtklibs/libGLES_mali/arm/libGLES_mali.so differ diff --git a/mtklibs/libGLES_mali/libGLES_mali.so b/mtklibs/libGLES_mali/libGLES_mali.so new file mode 100755 index 0000000000000000000000000000000000000000..f32a98c269c81dab3e3f0f7745916374455fdd71 Binary files /dev/null and b/mtklibs/libGLES_mali/libGLES_mali.so differ diff --git a/mtklibs/libGdmaScalerPipe/Android.mk_ b/mtklibs/libGdmaScalerPipe/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..fc4d219a6f0defb97cf0e9421d40d270ad93b512 --- /dev/null +++ b/mtklibs/libGdmaScalerPipe/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libGdmaScalerPipe +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libdpframework libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libGdmaScalerPipe.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libGdmaScalerPipe +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libdpframework libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libGdmaScalerPipe.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libGdmaScalerPipe/NOTICE b/mtklibs/libGdmaScalerPipe/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libGdmaScalerPipe/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libGdmaScalerPipe/README b/mtklibs/libGdmaScalerPipe/README new file mode 100755 index 0000000000000000000000000000000000000000..507dbe9f53f93cfc5e8f03bb83d83526b1438f79 --- /dev/null +++ b/mtklibs/libGdmaScalerPipe/README @@ -0,0 +1,28 @@ +Library of MTK JPEG Decode feature. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libGdmaScalerPipe.so provides resizing, rotating and picture quality tuning functionalities +through using MTK internal HW MDP. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libutils.so +3. libcutils.so + +and the following libs from MediaTek: +1. libdpframework.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== +Provide api for JPEG Decode feature called from libJpgDecPipe.so. +all api interfaces are at (vendor\mediatek\proprietary\protect-bsp\platform\mt6752\hardware\gdma\inc) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libGdmaScalerPipe/arm/libGdmaScalerPipe.so b/mtklibs/libGdmaScalerPipe/arm/libGdmaScalerPipe.so new file mode 100755 index 0000000000000000000000000000000000000000..f329d9a783327d4a0a922008b4aed6d1e003f6df Binary files /dev/null and b/mtklibs/libGdmaScalerPipe/arm/libGdmaScalerPipe.so differ diff --git a/mtklibs/libGdmaScalerPipe/libGdmaScalerPipe.so b/mtklibs/libGdmaScalerPipe/libGdmaScalerPipe.so new file mode 100755 index 0000000000000000000000000000000000000000..f7b6545a7b86de5fcd112fc4680360afd7f945a2 Binary files /dev/null and b/mtklibs/libGdmaScalerPipe/libGdmaScalerPipe.so differ diff --git a/mtklibs/libHdrCoreNeon/Android.mk_ b/mtklibs/libHdrCoreNeon/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..9514ffc8e4a1192ef056394bdce77a1475d8bab3 --- /dev/null +++ b/mtklibs/libHdrCoreNeon/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libHdrCoreNeon +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libHdrCoreNeon.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libHdrCoreNeon +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libHdrCoreNeon.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libHdrCoreNeon/README b/mtklibs/libHdrCoreNeon/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libHdrCoreNeon/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libHdrCoreNeon/arm/libHdrCoreNeon.a b/mtklibs/libHdrCoreNeon/arm/libHdrCoreNeon.a new file mode 100755 index 0000000000000000000000000000000000000000..5c610d53d4bb1b89fa2f732c74cf830ba3454820 Binary files /dev/null and b/mtklibs/libHdrCoreNeon/arm/libHdrCoreNeon.a differ diff --git a/mtklibs/libHdrCoreNeon/libHdrCoreNeon.a b/mtklibs/libHdrCoreNeon/libHdrCoreNeon.a new file mode 100755 index 0000000000000000000000000000000000000000..132715883d5c7b248361f71da6e8132f48971f6d Binary files /dev/null and b/mtklibs/libHdrCoreNeon/libHdrCoreNeon.a differ diff --git a/mtklibs/libJpgDecDrv_plat/Android.mk_ b/mtklibs/libJpgDecDrv_plat/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..7d9e89d7a3f6f98b70335da1143571056848ab4c --- /dev/null +++ b/mtklibs/libJpgDecDrv_plat/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libJpgDecDrv_plat +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libJpgDecDrv_plat.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libJpgDecDrv_plat +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libJpgDecDrv_plat.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libJpgDecDrv_plat/NOTICE b/mtklibs/libJpgDecDrv_plat/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libJpgDecDrv_plat/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libJpgDecDrv_plat/README b/mtklibs/libJpgDecDrv_plat/README new file mode 100755 index 0000000000000000000000000000000000000000..3f0bc0a2fc5e00c2ebbb014dd379e3217808a232 --- /dev/null +++ b/mtklibs/libJpgDecDrv_plat/README @@ -0,0 +1,19 @@ +Library of MTK JPEG Encode feature. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libJpgEncDrv_plat.a controls MTK JPEG HW Encoder through kernel IOCTL interfaces to do the HW JPEG Encode tasks. + +HOW IT WAS BUILT? +================== +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== +Provide api for JPEG Encode feature called from libJpgEncPipe. +all api interfaces are at (vendor\mediatek\proprietary\hardware\jpeg\mt8163\hal) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libJpgDecDrv_plat/arm/libJpgDecDrv_plat.a b/mtklibs/libJpgDecDrv_plat/arm/libJpgDecDrv_plat.a new file mode 100755 index 0000000000000000000000000000000000000000..0018c4cd365df85666440238d209726a86dcb8db Binary files /dev/null and b/mtklibs/libJpgDecDrv_plat/arm/libJpgDecDrv_plat.a differ diff --git a/mtklibs/libJpgDecDrv_plat/libJpgDecDrv_plat.a b/mtklibs/libJpgDecDrv_plat/libJpgDecDrv_plat.a new file mode 100755 index 0000000000000000000000000000000000000000..37dad4d04663681e1067fa605e963b6af06cc886 Binary files /dev/null and b/mtklibs/libJpgDecDrv_plat/libJpgDecDrv_plat.a differ diff --git a/mtklibs/libJpgDecPipe/Android.mk_ b/mtklibs/libJpgDecPipe/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..7b80a93338857bc32418d6eea41f7d5ba205dd72 --- /dev/null +++ b/mtklibs/libJpgDecPipe/Android.mk_ @@ -0,0 +1,27 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libJpgDecPipe +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libion libion_mtk libm4u libSwJpgCodec libGdmaScalerPipe libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libJpgDecPipe.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libJpgDecPipe +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libion libion_mtk libm4u libSwJpgCodec libGdmaScalerPipe libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libJpgDecPipe.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libJpgDecPipe/NOTICE b/mtklibs/libJpgDecPipe/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..d1fd6e92d3bb8452b5bd07ce771d3101d1a5689d --- /dev/null +++ b/mtklibs/libJpgDecPipe/NOTICE @@ -0,0 +1,22 @@ + * Copyright (C) 2010 The Android Open Source Project: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/libJpgDecPipe/README b/mtklibs/libJpgDecPipe/README new file mode 100755 index 0000000000000000000000000000000000000000..33cd73489a5f719a192ea042a4895a89d5d2c50b --- /dev/null +++ b/mtklibs/libJpgDecPipe/README @@ -0,0 +1,33 @@ +Library of MTK JPEG Decode feature. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libJpgDecPipe.so controls the MTK JPEG Decode flow and dispatch the decode tasks and parameters +to either SW or HW encoder to do the JPEG Decode tasks. This library also controls MTK HW resizing, +rotating and Image quality tuning functions for Image postprocessing. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libutils.so +3. libcutils.so +4. libion.so + +and the following libs from MediaTek: +1. libion_mtk.so +2. libm4u.so +3. libSwJpgCodec.so +4. libGdmaScalerPipe.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== +Provide api for JPEG Decode feature called from libmHalImageCodec.so. +all api interfaces are at (vendor\mediatek\proprietary\platform\mt6752\hardware\jpeg\inc) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libJpgDecPipe/arm/libJpgDecPipe.so b/mtklibs/libJpgDecPipe/arm/libJpgDecPipe.so new file mode 100755 index 0000000000000000000000000000000000000000..4a83a4f292714a72181656ee5f6ec8ec1a3172cd Binary files /dev/null and b/mtklibs/libJpgDecPipe/arm/libJpgDecPipe.so differ diff --git a/mtklibs/libJpgDecPipe/include/enc/jpeg_hal.h b/mtklibs/libJpgDecPipe/include/enc/jpeg_hal.h new file mode 100755 index 0000000000000000000000000000000000000000..b470334e612fbe14d2f5955cc62499472bf759a1 --- /dev/null +++ b/mtklibs/libJpgDecPipe/include/enc/jpeg_hal.h @@ -0,0 +1,339 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + */ +/* MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + */ + +#ifndef __JPEG_HAL_H__ +#define __JPEG_HAL_H__ + +#include "m4u_lib.h" + +#if 0 //def JENC_LOCK_VIDEO +#include +#include +#endif +/******************************************************************************* +* +********************************************************************************/ +#ifndef JUINT32 +typedef unsigned int JUINT32; +#endif + +#ifndef JINT32 +typedef int JINT32; +#endif + +#define JPEG_MAX_ENC_SIZE (128*1024*1024) + + + + +/******************************************************************************* +* class JpgEncHal +********************************************************************************/ +class JpgEncHal { +public: + JpgEncHal(); + virtual ~JpgEncHal(); + + //enum SrcFormat { + // kRGB_565_Format, + // kRGB_888_Format, + // kARGB_8888_Format, + // kABGR_8888_Format, + // kYUY2_Pack_Format, // YUYV + // kUYVY_Pack_Format, // UYVY + // kYVU9_Planar_Format, // YUV411, 4x4 sub sample U/V plane + // kYV16_Planar_Format, // YUV422, 2x1 subsampled U/V planes + // kYV12_Planar_Format, // YUV420, 2x2 subsampled U/V planes + // kNV12_Format, // YUV420, 2x2 subsampled , interleaved U/V plane + // kNV21_Format, // YUV420, 2x2 subsampled , interleaved V/U plane + // + // kSrcFormatCount + //}; + + //enum JPEG_ENC_RESULT { + // JPEG_ENC_RST_CFG_ERR, + // JPEG_ENC_RST_DONE, + // JPEG_ENC_RST_ROW_DONE, + // JPEG_ENC_RST_HUFF_ERROR, + // JPEG_ENC_RST_DECODE_FAIL, + // JPEG_ENC_RST_BS_UNDERFLOW + // + //}; + + + enum EncFormat { + //kYUV_444_Format, + //kYUV_422_Format, + //kYUV_411_Format, + //kYUV_420_Format, + //kYUV_400_Format, + + kENC_YUY2_Format, // YUYV + kENC_UYVY_Format, // UYVY + kENC_NV12_Format, // YUV420, 2x2 subsampled , interleaved U/V plane + kENC_NV21_Format, // YUV420, 2x2 subsampled , interleaved V/U plane + kENC_YV12_Format, /// YUV420, 2x2 subsampled, 3 plan + + + kEncFormatCount + }; + + enum { + JPEG_ENC_MEM_PHY, + JPEG_ENC_MEM_PMEM, + JPEG_ENC_MEM_M4U, + JPEG_ENC_MEM_ION + + }; + + enum { + JPEG_ENC_HW, + JPEG_ENC_SW + }; + + enum EncLockType{ + JPEG_ENC_LOCK_HW_FIRST, + JPEG_ENC_LOCK_SW_ONLY, + JPEG_ENC_LOCK_HW_ONLY + }; + + + // lock with enum + bool LevelLock(EncLockType type); + + //lock hw first + bool lock(); + bool unlock(); + bool start(JUINT32 *encSize); + + /* set image actual width, height and encode format */ + bool setEncSize(JUINT32 width, JUINT32 height, EncFormat encformat, bool isSrcBufNeedFlush = true) ; + + /* get requirement of minimum source buffer size and stride after setEncSize */ + JUINT32 getSrcBufMinSize() { return fSrcMinBufferSize ; }; + JUINT32 getSrcCbCrBufMinSize() { return fSrcMinCbCrSize ; }; + JUINT32 getSrcBufMinStride() { return fSrcMinBufferStride ; }; + + /* Set source buffer virtual address. + The srcChromaAddr should be NULL in YUV422. + */ + bool setSrcAddr(void *srcAddr, void *srcChromaAddr); + + /* Set source buffer physical address. + The srcChromaAddr should be NULL in YUV422. + */ + bool setSrcPAddr(void *srcPAddr, void *srcChromaPAddr); + + /* Set source buffer virtual address. + The srcChromaAddr should be NULL in YUV422. + For YUV420(3P), the Y, U, V can be different plan and non-continuous physically + */ + bool setSrcAddr(void *srcAddr, void *srcCb, void *srcCr); + + /* Set source size of buffer1(srcSize) and buffer2(srcSize2) and stride. + The buffer size and stride should be at least minimum buffer size and stride. + The buffer1 and buffer2 share the buffer stride. + Stride should be align to 32(YUV422) or 16 (YUV420). + */ + bool setSrcBufSize(JUINT32 srcStride,JUINT32 srcSize, JUINT32 srcSize2); + + bool setSrcBufSize(JUINT32 srcStride,JUINT32 srcSize, JUINT32 srcSize2, JUINT32 srcSize3, JUINT32 srcUVStride = 0); + /* set encoding quality , range should be [100:1] */ + bool setQuality(JUINT32 quality) { if( quality > 100) return false ; else fQuality = quality; return true ;} + + /* set distination buffer virtual address and size */ + bool setDstAddr(void *dstAddr) { if(dstAddr == NULL) return false; + else fDstAddr = dstAddr; return true;} + + /* set distination buffer physical address and size */ + bool setDstPAddr(void *dstPAddr) { if(dstPAddr == NULL) return false; + else fDstM4uPA = fDstIonPA = ((unsigned long)dstPAddr & 0xFFFFFFFFL); return true;} + + /* set bitstream buffer size , should at least 624 bytes */ + bool setDstSize(JUINT32 size) { if(size<624)return false; + else fDstSize = size; return true ;} + + /* set Normal/Exif mode, 1:Normal,0:Exif, default is Normal mode */ + void enableSOI(bool b) { fIsAddSOI = b; } + + + void setIonMode(bool ionEn) { if( ionEn ) fMemType = JPEG_ENC_MEM_ION; + else fMemType = fMemTypeDefault ; } + + void setSrcFD( JINT32 srcFD, JINT32 srcFD2 ) { fSrcFD = srcFD; fSrcFD2 = srcFD2; } + + void setDstFD( JINT32 dstFD ) { fDstFD = dstFD ; } + + //bool setSrcAddrPA( JUINT32 srcAddrPA, JUINT32 srcChromaAddrPA); + + //bool setDstAddrPA( JUINT32 dstAddrPA){ if(dstAddrPA == NULL) return false; + // else fDstAddrPA = dstAddrPA; return true; + // } + void setDRI( JINT32 dri ) { fDRI = dri ; } + + + +private: + + bool allocPMEM(); + bool alloc_m4u(); + + bool free_m4u(); + + bool alloc_ion(); + bool free_ion(); + bool islock; + bool onSwEncode(JUINT32 *encSize); + + bool fEncoderType; /// to identify current HAL use HW or SW + + bool lockVideo() ; + bool unlockVideo(); + + + + MTKM4UDrv *pM4uDrv ; + M4U_MODULE_ID_ENUM fm4uJpegInputID ; + M4U_MODULE_ID_ENUM fm4uJpegOutputID ; + + JUINT32 fMemType ; + JUINT32 fMemTypeDefault ; + + JUINT32 fSrcWidth; + JUINT32 fSrcHeight; + JUINT32 fDstWidth; + JUINT32 fDstHeight; + JUINT32 fQuality; + JUINT32 fROIX; + JUINT32 fROIY; + JUINT32 fROIWidth; + JUINT32 fROIHeight; + + JUINT32 fSrcMinBufferSize ; + JUINT32 fSrcMinCbCrSize ; + JUINT32 fSrcMinBufferStride; + JUINT32 fSrcMinCbCrStride; + + JUINT32 fEncSrcBufSize ; + JUINT32 fSrcBufStride; + JUINT32 fSrcBufHeight; + + JUINT32 fEncCbCrBufSize ; + JUINT32 fSrcCbCrBufStride; + JUINT32 fSrcCbCrBufHeight; + + //SrcFormat fSrcFormat; + EncFormat fEncFormat; + + void *fSrcAddr; + void *fSrcChromaAddr; + + //JUINT32 fEncDstBufSize ; + + + void *fSrcCb; + void *fSrcCr; + void *fDstAddr; + int fDstSize; + bool fIsAddSOI; + + + + JUINT32 fSrcAddrPA ; + JUINT32 fSrcChromaAddrPA; + JUINT32 fDstAddrPA ; + + JUINT32 fDstM4uPA; + JUINT32 fSrcM4uPA; + JUINT32 fSrcChromaM4uPA; + JUINT32 fIsSrc2p; + JINT32 fSrcPlaneNumber; + + //ION + + bool fIonEn ; + //bool fSrcIonEn ; + //bool fDstIonEn ; + JINT32 fSrcFD; + JINT32 fSrcFD2; + JINT32 fDstFD ; + + JUINT32 fSrcIonPA ; + JUINT32 fSrcChromaIonPA ; + JUINT32 fDstIonPA ; + + void* fSrcIonVA ; + void* fSrcChromaIonVA ; + void* fDstIonVA ; + + JINT32 fSrcIonHdle ; + JINT32 fSrcChromaIonHdle ; + JINT32 fDstIonHdle ; + + + + JINT32 fIonDevFD ; + JUINT32 fDRI ; + bool fIsSelfAlloc; + bool fIsSrcBufNeedFlush; + + + +#if 1 //def JPEG_ENC_USE_PMEM + + unsigned char *fEncSrcPmemVA ; + unsigned char *fEncSrcCbCrPmemVA ; + unsigned char *fEncDstPmemVA ; + + JUINT32 fEncSrcPmemPA ; + JUINT32 fEncSrcCbCrPmemPA ; + JUINT32 fEncDstPmemPA ; + + int fEncSrcPmemFD ; + int fEncSrcCbCrPmemFD ; + int fEncDstPmemFD ; +#endif + int encID; + unsigned long fResTable; + +#if 0 //def JENC_LOCK_VIDEO + VAL_UINT32_T fVDriverType ; + VAL_HW_LOCK_T fVLock; +#endif + + +}; + +#endif diff --git a/mtklibs/libJpgDecPipe/include/mhal/MediaHal.h b/mtklibs/libJpgDecPipe/include/mhal/MediaHal.h new file mode 100755 index 0000000000000000000000000000000000000000..8a08a49e04848045274f7af968ab1e25ca289810 --- /dev/null +++ b/mtklibs/libJpgDecPipe/include/mhal/MediaHal.h @@ -0,0 +1,886 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + */ +/* MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + */ + +/******************************************************************************************** + * LEGAL DISCLAIMER + * + * (Header of MediaTek Software/Firmware Release or Documentation) + * + * BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") RECEIVED + * FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON AN "AS-IS" BASIS + * ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR + * A PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY + * WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, + * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK + * ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO + * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION + * OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. + * + * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE LIABILITY WITH + * RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, +TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE + * FEES OR SERVICE CHARGE PAID BY BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS + * OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF LAWS PRINCIPLES. + ************************************************************************************************/ + +/** + * @file + * MediaHal.h + * + * @par Project: + * Yusu + * + * @par Description:: + * MHAL definitions and function prototypes, this layer manager all multimedia module + * MHAL stands for Mediatek Hardware Abstract Layer + * + * @par Author: + * Wilson Lu (mtk01780) + * Tzu-Meng Chung (mtk02529) + * + * @par $Revision: #12 $ + * @par $Modtime:$ + * @par $Log:$ + * + */ + +#ifndef MEDIA_HAL_H +#define MEDIA_HAL_H + +#include "MediaTypes.h" + +/*============================================================================= + * Type definition + *===========================================================================*/ + + +/******************************************************************************* +* IO Control Mask +********************************************************************************/ +#define MHAL_IOCTL_CAMERA_GROUP_MASK 0x1000 ///< Camera group mask +#define MHAL_IOCTL_JPEG_GROUP_MASK 0x2000 ///< JPEG group mask +#define MHAL_IOCTL_VIDEO_GROUP_MASK 0x4000 ///< VIDEO group mask + +/******************************************************************************* +* IO Control Code +********************************************************************************/ +#define MHAL_IOCTL_LOCK_RESOURCE 0x0001 ///< To query and lock resource (IDP and DCT) +#define MHAL_IOCTL_UNLOCK_RESOURCE 0x0002 ///< To unlock resource (IDP and DCT) +// +#define MHAL_IOCTL_JPEG_ENC 0x2001 ///< To encode JPEG file +#define MHAL_IOCTL_JPEG_DEC_SET_READ_FUNC 0x2002 ///< To set the jpeg decode read functon +#define MHAL_IOCTL_JPEG_DEC_START 0x2003 ///< To start jpeg decode +#define MHAL_IOCTL_JPEG_DEC_GET_INFO 0x2004 ///< To get the jpeg file information +#define MHAL_IOCTL_JPEG_DEC_PARSER 0x2005 ///< To parser the jpeg file information +#define MHAL_IOCTL_JPEG_DEC_CANCEL 0x2006 ///< To cancel the jpeg decoder +#define MHAL_IOCTL_WEBP_DEC_START 0x2011 ///< To start webp decode +#define MHAL_IOCTL_WEBP_DEC_GET_INFO 0x2012 ///< To get the webp file information +#define MHAL_IOCTL_WEBP_DEC_PARSER 0x2013 ///< To parser the webp file information +#define MHAL_IOCTL_WEBP_DEC_CANCEL 0x2014 ///< To cancel the webp decoder +#define MHAL_IOCTL_MJPEG_DEC_PARSER 0x2021 ///< To parser the mjpeg file information +#define MHAL_IOCTL_MJPEG_DEC_GET_INFO 0x2022 ///< To get the mjpeg file information +#define MHAL_IOCTL_MJPEG_DEC_START 0x2023 ///< To start mjpeg decode +#define MHAL_IOCTL_MJPEG_DEC_CANCEL 0x2024 ///< To cancel the mjpeg decoder + + +#define MHAL_IOCTL_MP4_PLAYBACK_OPEN 0x4001 ///< To open MP4 decoder driver +#define MHAL_IOCTL_MP4_PLAYBACK_INIT 0x4002 ///< To init MP4 decoder driver +#define MHAL_IOCTL_MP4_PLAYBACK_RST 0x4003 ///< To reset MP4 decoder driver +#define MHAL_IOCTL_MP4_PLAYBACK_PARSE_H263_HEADER 0x4004 ///< To parse h263 header +#define MHAL_IOCTL_MP4_PLAYBACK_DECODE 0x4005 ///< To parse header and set HW configuration +#define MHAL_IOCTL_MP4_PLAYBACK_TRIGGER_HW_START 0x4006 ///< To trigger MP4 decoder driver start to decode +#define MHAL_IOCTL_MP4_PLAYBACK_CLOSE 0x4007 ///< To close MP4 decoder driver +#define MHAL_IOCTL_MP4_PLAYBACK_GET_PARAM 0x4008 ///< To get parameter +#define MHAL_IOCTL_MP4_PLAYBACK_SET_PARAM 0x4009 ///< To set parameter + +#define MHAL_IOCTL_MP4_RECORD_INIT 0x4101 ///< To initial MPEG4 record +#define MHAL_IOCTL_MP4_RECORD_ENCODE_ONE_FRAME 0x4102 ///< To encode MPEG4 frame +#define MHAL_IOCTL_MP4_RECORD_DEINIT 0x4103 ///< To deinitial MPEG4 record + +#define MHAL_IOCTL_H264_PLAYBACK_INIT 0x4201 ///< To initial H264 playback +#define MHAL_IOCTL_H264_PLAYBACK_DECODE_ONE_FRAME 0x4202 ///< To decode H264 frame +#define MHAL_IOCTL_H264_PLAYBACK_DEINIT 0x4203 ///< To deinitial H264 playback +#define MHAL_IOCTL_H264_PLAYBACK_GET_PARAM 0x4204 ///< To get parameter +#define MHAL_IOCTL_H264_PLAYBACK_SET_PARAM 0x4205 ///< To set parameter +#define MHAL_IOCTL_H264_PLAYBACK_INSERT_BUF 0x4206 ///< To insert buffer +#define MHAL_IOCTL_H264_PLAYBACK_RELEASE_BUF 0x4207 ///< To release buffer +#define MHAL_IOCTL_H264_PLAYBACK_CHECK_BUF 0x4208 ///< To check buffer +#define MHAL_IOCTL_H264_PLAYBACK_SHOW_BUF 0x4209 ///< To show buffer + +#define MHAL_IOCTL_BITBLT 0x8001 ///< To bitblt +#define MHAL_IOCTL_DIRECT_BITBLT_PREPARE 0x8002 ///< To direct link bitblt +#define MHAL_IOCTL_DIRECT_BITBLT_END 0x8003 ///< To release direct link resources + +#define MHAL_IOCTL_FACTORY 0x8100 ///< To run factory mode +#define MHAL_IOCTL_FB_CONFIG_IMEDIATE_UPDATE 0x8101 ///< To config fb immediate update + +/******************************************************************************* +* Lock Resource Mode +********************************************************************************/ +#define MHAL_MODE_JPEG_DECODE 0x0001 ///< Record now scenario of jpeg decode +#define MHAL_MODE_JPEG_ENCODE 0x0002 ///< Record now scenario of jpeg encode +#define MHAL_MODE_CAM_PREVIEW 0x0004 ///< Record now scenario of camera preview +#define MHAL_MODE_CAM_CAPTURE 0x0008 ///< Record now scenario of camera capture +#define MHAL_MODE_MP4_PLAYBACK 0x0010 ///< Record now scenario of MPEG4 playback +#define MHAL_MODE_H264_PLAYBACK 0x0010 ///< Record now scenario of H264 playback +#define MHAL_MODE_MP4_RECORD 0x0020 ///< Record now scenario of MPEG4 record +#define MHAL_MODE_BITBLT 0x0040 ///< Record now scenario of Bitblt + +#define MHAL_MODE_ALL 0x00FF + +/******************************************************************************* +* Query Memory Mode +********************************************************************************/ +#define MHAL_MEM_MODE_PREVIEW 0x0001 ///< The query memory mode of camera preview +#define MHAL_MEM_MODE_CAPTURE 0x0002 ///< The query memory mode of camera capture + +/******************************************************************************* +* Lock Resource Interface +********************************************************************************/ +typedef struct mHalLockParam_s +{ + MUINT32 mode; + MUINT32 waitMilliSec; + MUINT32 waitMode; +} MHalLockParam_t; + +/***************************************************************************** +* Video Encoder Interface +*****************************************************************************/ +typedef enum +{ + VDO_ENC_FORMAT_H263 = 0, + VDO_ENC_FORMAT_MPEG4, + VDO_ENC_FORMAT_AVC, + + VDO_ENC_FORMAT_MAX = 0xFFFFFFFF +}VDO_ENC_FORMAT; + + +/***************************************************************************** +* JPEG Decoder Interface +*****************************************************************************/ + +typedef unsigned int (*pfReadStreamCallback)(MUINT8* srcStream, MUINT32 size); + +typedef enum +{ + JPEG_ERROR_NONE = 0, + JPEG_ERROR_INVALID_DRIVER, + JPEG_ERROR_INVALID_CTRL_CODE, + JPEG_ERROR_INVALID_PARA, + JPEG_ERROR_INVALID_MEMORY, + JPEG_ERROR_INVALID_FORMAT, + + JPEG_ERROR_ALL = 0xFFFFFFFF +}MHAL_JPEG_ERROR_ENUM; + +typedef enum +{ + JPEG_RESULT_DONE = 0, + JPEG_RESULT_PAUSE, + JPEG_RESULT_OVERFLOW, + JPEG_RESULT_HALT, + + RESULT_ALL = 0xFFFFFFFF +}MHAL_JPEG_DEC_RESULT_ENUM; + +typedef enum { + JPEG_OUT_FORMAT_RGB565 = 0, + JPEG_OUT_FORMAT_RGB888, + JPEG_OUT_FORMAT_ARGB8888, + JPEG_OUT_FORMAT_YUY2, // YUYV + JPEG_OUT_FORMAT_UYVY, // UYVY + JPEG_OUT_FORMAT_I420, // YVU420 3 plane + JPEG_OUT_FORMAT_YV12, // YVU420 3 plane + JPEG_OUT_FORMAT_ALL = 0xFFFFFFFF +}JPEG_OUT_FORMAT_ENUM; + +typedef struct +{ + void *imageDCParam; + MUINT32 ISOSpeedRatings; +}MHAL_JPEG_POST_PROC_PARAM; + +typedef struct +{ + + MINT32 timeout; // time for wait IRQ, unit : millisecond + MUINT8 *srcBuffer; // avoid reset error, copy src file back + MUINT32 srcBufSize; + MUINT32 srcLength; + MINT32 srcFD; + + // destination information + MUINT8 *dstPhysAddr; // if set NULL, mhal will allocate memory + MUINT8 *dstVirAddr; + MUINT32 dstWidth; + MUINT32 dstHeight; + MUINT32 doDithering; // 1: do HW dithering + MUINT32 doPostProcessing; // 1: do HW PostProcessing + MHAL_JPEG_POST_PROC_PARAM *postProcessingParam; + MUINT32 PreferQualityOverSpeed; // 1: do SLOW_IDCT + + // Range Decode Infor + MUINT32 doRangeDecode; // 1: do Range Decode, 0: disable + MUINT32 rangeLeft; + MUINT32 rangeTop; + MUINT32 rangeRight; + MUINT32 rangeBottom; + + JPEG_OUT_FORMAT_ENUM dstFormat; + + void* jpgDecHandle ; + MUINT32 fCancelDecoderFlag; + +}MHAL_JPEG_DEC_START_IN; + +typedef struct +{ + MUINT8 *srcBuffer; + MUINT32 srcLength; + MINT32 srcFD; + void* jpgDecHandle ; + +}MHAL_JPEG_DEC_SRC_IN; + +typedef struct +{ + MUINT32 srcWidth; + MUINT32 srcHeight; + void* jpgDecHandle ; + +}MHAL_JPEG_DEC_INFO_OUT; + + +/***************************************************************************** +* JPEG Encoder Interface +*****************************************************************************/ +typedef enum { + JPEG_IN_FORMAT_RGB565 = 0, + JPEG_IN_FORMAT_RGB888, + JPEG_IN_FORMAT_ARGB8888, + + JPEG_IN_FORMAT_ALL = 0xFFFFFFFF +}JPEG_IN_FORMAT_ENUM; + +/** + * @par Enumeration + * JPEG_SAMPLING_FORMAT + * @par Description + * The JPEG sampling format you want to encode + */ +typedef enum { + JPEG_ENC_YUV444 = 444, + JPEG_ENC_YUV422 = 422, + JPEG_ENC_YUV411 = 411, + JPEG_ENC_YUV420 = 420, + JPEG_ENC_GRAYLEVEL = 400, + + JPEG_ENC_ALL = 0xFFFFFFFF + +} JPEG_ENC_FORMAT_ENUM; + +/** + * @par Enumeration + * JPEG_ENCODE_QUALITY_ENUM + * @par Description + * The JPEG quality you want to encode + */ + +typedef struct +{ + MINT32 timeout; // time for wait IRQ, unit : millisecond + + MUINT8 *srcAddr; + MUINT8 *dstAddr; + + MUINT32 srcWidth; + MUINT32 srcHeight; + + MUINT32 dstWidth; + MUINT32 dstHeight; + + MUINT32 quality; + MUINT32 dstSize; + MUINT32 *encSize; + + JPEG_IN_FORMAT_ENUM inFormat; + JPEG_ENC_FORMAT_ENUM outFormat; + +}MHAL_JPEG_ENC_START_IN; + +/******************************************************************************* +* Bitblt Interface +********************************************************************************/ +typedef enum +{ + MHAL_FORMAT_RGB_565 = 0, + MHAL_FORMAT_BGR_565, + MHAL_FORMAT_RGB_888, + MHAL_FORMAT_BGR_888, + MHAL_FORMAT_ARGB_8888, + MHAL_FORMAT_ABGR_8888, + MHAL_FORMAT_BGRA_8888, + MHAL_FORMAT_RGBA_8888, + MHAL_FORMAT_YUV_420, + MHAL_FORMAT_YUV_420_SP, + MHAL_FORMAT_MTK_YUV, + MHAL_FORMAT_YUY2, + MHAL_FORMAT_UYVY, + MHAL_FORMAT_Y800, + MHAL_FORMAT_YUV_422_PL, //422 Planar,i.e YV16 Planar + MHAL_FORMAT_ANDROID_YV12, //Androdi YV12.YVU stride all 16 pixel align + MHAL_FORMAT_IMG_YV12, //Imagination YV12.YVU stride all 32 pixel align + + + MHAL_FORMAT_ERROR, + + MHAL_FORMAT_ALL = 0xFFFFFFFF +} MHAL_BITBLT_FORMAT_ENUM; + +typedef enum +{ + MHAL_BITBLT_ROT_0 = 0, + MHAL_BITBLT_ROT_90 = 0x1, + MHAL_BITBLT_ROT_180 = 0x2, + MHAL_BITBLT_ROT_270 = 0x3,// (90 + 180) + MHAL_BITBLT_FLIP_H = 0x4, + + MHAL_BITBLT_ALL = 0xFFFFFFFF +} MHAL_BITBLT_ROT_ENUM; + +typedef struct mHalBltParam_s +{ + MUINT32 m4u_handle; //NULL imply VA exist in current process + + MUINT32 srcX; + MUINT32 srcY; + MUINT32 srcW; + MUINT32 srcWStride; + MUINT32 srcH; + MUINT32 srcHStride; + MUINT32 srcAddr; + MUINT32 srcFormat; + + MUINT32 dstW; + MUINT32 dstH; + MUINT32 dstAddr; + MUINT32 dstFormat; + MUINT32 pitch; + + MUINT32 orientation; + MUINT32 doImageProcess;// 0:disable, 0x1:color process+EE, 0x2:do color process only , 0x3:face beautify, bit[4]: 0-do bitblt if isp is N.A , 1-skip if isp is N.A. + MUINT32 favor_flags; /*Image Transform favor flags,this is a low level flags. default is 0*/ + + + MUINT32 u4SrcOffsetXFloat;//0x100 stands for 1, 0x40 stands for 0.25 , etc... + MUINT32 u4SrcOffsetYFloat;//0x100 stands for 1, 0x40 stands for 0.25 , etc... + + + /*Resizer coeff if can apply*/ + MUINT32 resz_up_scale_coeff; //0:linear interpolation 1:most blur 19:sharpest 8:recommeneded >12:undesirable + MUINT32 resz_dn_scale_coeff; //0:linear interpolation 1:most blur 19:sharpest 15:recommeneded + MUINT32 resz_ee_h_str; //down scale only/0~15 + MUINT32 resz_ee_v_str; //down scale only/0~15 +} mHalBltParam_t; + + +typedef struct mHalBltExParam_s +{ + /*Source*/ + MHAL_BITBLT_FORMAT_ENUM src_color_format; + + MUINT32 src_img_size_w; + MUINT32 src_img_size_h; + + MUINT32 src_img_roi_x; + MUINT32 src_img_roi_y; + MUINT32 src_img_roi_w; + MUINT32 src_img_roi_h; + + MUINT32 src_yuv_img_addr; + + + /*For HDMI : RGB*/ + MINT32 en_hdmi_port; //enable hdmi port + MHAL_BITBLT_FORMAT_ENUM hdmi_color_format; + + MUINT32 hdmi_img_size_w; + MUINT32 hdmi_img_size_h; + + + MUINT32 hdmi_img_roi_x; + MUINT32 hdmi_img_roi_y; + MUINT32 hdmi_img_roi_w; + MUINT32 hdmi_img_roi_h; + + MUINT32 hdmi_yuv_img_addr; + MUINT32 hdmi_rotate_angle; + + /*For Display : 422 Pack*/ + MINT32 en_disp_port; //enable disp port + MHAL_BITBLT_FORMAT_ENUM disp_color_format; + + MUINT32 disp_img_size_w; + MUINT32 disp_img_size_h; + + MUINT32 disp_img_roi_x; + MUINT32 disp_img_roi_y; + MUINT32 disp_img_roi_w; + MUINT32 disp_img_roi_h; + + MUINT32 disp_yuv_img_addr; + MUINT32 disp_rotate_angle; + + /*Resizer coeff if can apply*/ + MUINT32 resz_up_scale_coeff; //0:linear interpolation 1:most blur 19:sharpest 8:recommeneded >12:undesirable + MUINT32 resz_dn_scale_coeff; //0:linear interpolation 1:most blur 19:sharpest 15:recommeneded + MUINT32 resz_ee_h_str; //down scale only/0~15 + MUINT32 resz_ee_v_str; //down scale only/0~15 +} mHalBltParamEx_t; + + + +typedef enum +{ + MHAL_MLM_CLIENT_SFTEX, //Surface flinger Texture + MHAL_MLM_CLIENT_MTKOVERLAY, + MHAL_MLM_CLIENT_PV2ND, //Preview 2nd path + MHAL_MLM_CLIENT_ELEMENT, //MDP Element + MHAL_MLM_CLIENT_PVCPY, //Camera preview path extra-copy + MHAL_MLM_CLIENT_GRALLOC, //Graphic Buffer Allocator + + MHAL_MLM_CLIENT_MAX = 19, //MAX (for test) + +} mHalMVALOOPMEM_CLIENT; + +typedef enum +{ + MHAL_MEM_TYPE_INPUT, + MHAL_MEM_TYPE_OUTPUT + +} mHalREGLOOPMEM_TYPE; + + + +#ifdef __cplusplus + +class mHalMdpSize +{ +public: + unsigned long w; + unsigned long h; + +public: + mHalMdpSize(): + w(0),h(0) + {}; + + + mHalMdpSize(unsigned long _w, unsigned long _h ) + { + w = _w; h = _h; + }; + + + mHalMdpSize& operator=( const mHalMdpSize& rhs ) + { + w = rhs.w; h = rhs.h; + return *this; + } + + bool operator==(const mHalMdpSize& rhs) const + { + return ( ( w == rhs.w ) && ( h == rhs.h ) ); + } + + bool operator!=(const mHalMdpSize& rhs) const + { + return !( *this == rhs ); + } + +}; + +class mHalMdpRect +{ +public: + long x; + long y; + unsigned long w; + unsigned long h; + +public: + mHalMdpRect(): + x(0),y(0),w(0),h(0) + {}; + + mHalMdpRect(long _x, long _y, unsigned long _w, unsigned long _h ) + { + x = _x; y = _y; w = _w; h = _h; + }; + + mHalMdpRect(const mHalMdpSize& size ) + { + x = 0; y = 0; w = size.w; h = size.h; + }; + + mHalMdpRect& operator=( const mHalMdpRect& rhs ) + { + x = rhs.x; y = rhs.y; w = rhs.w; h = rhs.h; + return *this; + } + + bool operator==(const mHalMdpRect& rhs) const + { + return ( (x == rhs.x) && ( y == rhs.y) && ( w == rhs.w ) && ( h == rhs.h ) ); + } + + bool operator!=(const mHalMdpRect& rhs) const + { + return !( *this == rhs ); + } + + +}; + +class mHalMdpYuvAddr +{ +public: + unsigned long y; + unsigned long u; + unsigned long v; + + /*User need not fill in the data below!-----------------------------------------------------------*/ + /*Below data is auto fill by MDP driver calculation!----------------------------------------------*/ + + unsigned long y_buffer_size; + unsigned long u_buffer_size; + unsigned long v_buffer_size; + +public: + mHalMdpYuvAddr(): + y(0), u(0), v(0), + y_buffer_size(0), u_buffer_size(0), v_buffer_size(0) + {}; +}; + + + +class mHalRegisterLoopMemory_t +{ +public: + mHalREGLOOPMEM_TYPE mem_type; + unsigned long addr; + unsigned long buffer_size; + MHAL_BITBLT_FORMAT_ENUM mhal_color; + mHalMdpSize img_size; + mHalMdpRect img_roi; + unsigned long rotate; //0:0 1:90 2:180 3:270.rotate always 0 when used by RDMA(input memory) + +public: + mHalRegisterLoopMemory_t(): + mem_type(MHAL_MEM_TYPE_INPUT), + addr(0), + buffer_size(0), + mhal_color(MHAL_FORMAT_RGB_565), + rotate(0) //0:0 1:90 2:180 3:270.rotate always 0 when used by RDMA(input memory) + {}; + +}; + +class mHalRegisterLoopMemoryObj_t +{ +public: + unsigned long mdp_id; + mHalMdpYuvAddr calc_addr[1]; + mHalMdpYuvAddr adapt_addr[1]; + unsigned long adapt_m4u_flag_bit; + unsigned long alloc_mva_flag_bit; + +public: + mHalRegisterLoopMemoryObj_t(): + mdp_id(0), + adapt_m4u_flag_bit(0), + alloc_mva_flag_bit(0) + {}; +}; + +#else /*#ifdef __cplusplus*/ + +typedef struct mHalMdpSize_s +{ + unsigned long w; + unsigned long h; +} mHalMdpSize; + + +typedef struct mHalMdpRect_s +{ + long x; + long y; + unsigned long w; + unsigned long h; +} mHalMdpRect; + +typedef struct mHalMdpYuvAddr_s +{ + unsigned long y; + unsigned long u; + unsigned long v; + + /*User need not fill in the data below!-----------------------------------------------------------*/ + /*Below data is auto fill by MDP driver calculation!----------------------------------------------*/ + + unsigned long y_buffer_size; + unsigned long u_buffer_size; + unsigned long v_buffer_size; + +} mHalMdpYuvAddr; + +typedef struct mHalRegisterLoopMemory_s +{ + mHalREGLOOPMEM_TYPE mem_type; + unsigned long addr; + unsigned long buffer_size; + MHAL_BITBLT_FORMAT_ENUM mhal_color; + mHalMdpSize img_size; + mHalMdpRect img_roi; + unsigned long rotate; //0:0 1:90 2:180 3:270.rotate always 0 when used by RDMA(input memory) +} mHalRegisterLoopMemory_t; + +typedef struct mHalRegisterLoopMemoryObj_s +{ + unsigned long mdp_id; + mHalMdpYuvAddr calc_addr[1]; + mHalMdpYuvAddr adapt_addr[1]; + unsigned long adapt_m4u_flag_bit; + unsigned long alloc_mva_flag_bit; +} mHalRegisterLoopMemoryObj_t; + + +#endif /*#ifdef __cplusplus*/ + + + +/******************************************************************************* +* Camera Interface +********************************************************************************/ + +/** + * @par Structure + * mhalCamParam_t + * @par Description + * This is a structure which store camera configuration + */ +typedef struct mhalCamVdoParam_s { + MUINT32 u4YUVWidth; + MUINT32 u4YUVHeight; + MUINT32 u4VEncBitrate; // Video encode bitrate + VDO_ENC_FORMAT eVEncFormat; // Video encode format + MUINT32 u4PrvFps; +}mhalCamVdoParam_t; + +// +typedef struct priority_data { + MHAL_CHAR name[20]; + MHAL_INT32 policy; + MHAL_INT32 priority; +} mhalPriorityData_t; + +typedef struct mHalMp4VEncParam_s +{ + void *pObj; + void *pInputBuf; +}mHalMp4VEncParam_t; + +/*============================================================================= + * Function Declaration + *===========================================================================*/ + +/** + * @par Function + * mHalOpen + * @par Description + * Open a mHal instance + * @par Returns + * return a created instance. + */ +void* +mHalOpen(); + + +/** + * @par Function + * mHalClose + * @par Description + * Close a mHal instance + * @param + * fd [I] file descriptor returned from mHalOpen() + + * @par Returns + * none. + */ +void +mHalClose(void* fd); + + +/** + * @par Function + * mHalIoctl + * @par Description + * mHal ioctl function with fd + * @param + * uCtrlCode [I] The IO Control Code + * @param + * pvInBuf [I] The input parameter + * @param + * uInBufSize [I] The size of input parameter structure + * @param + * pvOutBuf [O] The output parameter + * @param + * uOutBufSize [I] The size of output parameter structure + * @param + * puBytesReturned [O] The number of bytes of return value + * @par Returns + * error code + */ +int +mHalIoctl( + void* fd, + unsigned int uCtrlCode, + void* pvInBuf, + unsigned int uInBufSize, + void* pvOutBuf, + unsigned int uOutBufSize, + unsigned int* puBytesReturned +); + + +/** + * @par Function + * mHalIoCtrl + * @par Description + * The MHAL ioctrl function + * @param + * a_u4CtrlCode [IN] The IO Control Code + * @param + * a_pInBuffer [IN] The input parameter + * @param + * a_u4InBufSize [IN] The size of input parameter structure + * @param + * a_pOutBuffer [OUT] The output parameter + * @param + * a_u4OutBufSize [IN] The size of output parameter structure + * @param + * pBytesReturned [OUT] The number of bytes of return value + * @par Returns + * MINT32 + */ +#ifdef __cplusplus +extern "C"{ +#endif + +MINT32 +mHalIoCtrl( + MUINT32 a_u4CtrlCode, + MVOID *a_pInBuffer, + MUINT32 a_u4InBufSize, + MVOID *a_pOutBuffer, + MUINT32 a_u4OutBufSize, + MUINT32 *pBytesReturned +); + +MINT32 +mHalJpeg( + MUINT32 a_u4CtrlCode, + MVOID *a_pInBuffer, + MUINT32 a_u4InBufSize, + MVOID *a_pOutBuffer, + MUINT32 a_u4OutBufSize, + MUINT32 *pBytesReturned +); + + +#ifdef __cplusplus +} +#endif + + +#ifdef __cplusplus +extern "C"{ +#endif +MINT32 +mtk_AdjustPrio( + MHAL_CHAR *name +); +#ifdef __cplusplus +} +#endif + + +/******************************************************************************* +* MDP mHal Interface +********************************************************************************/ +#ifdef __cplusplus +extern "C"{ +#endif + +signed int mHalMdp_BitBlt( void *a_pInBuffer ); +signed int mHalMdpIpc_BitBlt( mHalBltParam_t* bltParam ); +signed int mHalMdpLocal_BitBlt( mHalBltParam_t* bltParam ); + +signed int mHalMdp_BitBltEx( mHalBltParamEx_t* p_param ); +signed int mHalMdp_BitbltSlice( void *a_pInBuffer ); + + + + +int mHalMdp_RegisterLoopMemory( mHalMVALOOPMEM_CLIENT client_id, mHalRegisterLoopMemory_t* p_param, mHalRegisterLoopMemoryObj_t* p_out_obj ); +int mHalMdp_UnRegisterLoopMemory( mHalMVALOOPMEM_CLIENT client_id, mHalRegisterLoopMemoryObj_t* p_obj ); + + +#ifdef __cplusplus +} +#endif + + +#endif // MEDIA_HAL_H + + diff --git a/mtklibs/libJpgDecPipe/include/mhal/MediaTypes.h b/mtklibs/libJpgDecPipe/include/mhal/MediaTypes.h new file mode 100755 index 0000000000000000000000000000000000000000..90ac46a6a665c9119844a68896c00cb34a0b4d40 --- /dev/null +++ b/mtklibs/libJpgDecPipe/include/mhal/MediaTypes.h @@ -0,0 +1,176 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + */ +/* MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + */ + +/******************************************************************************************** + * LEGAL DISCLAIMER + * + * (Header of MediaTek Software/Firmware Release or Documentation) + * + * BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") RECEIVED + * FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON AN "AS-IS" BASIS + * ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR + * A PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY + * WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, + * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK + * ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO + * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION + * OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. + * + * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE LIABILITY WITH + * RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, +TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE + * FEES OR SERVICE CHARGE PAID BY BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS + * OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF LAWS PRINCIPLES. + ************************************************************************************************/ + +#ifndef _MEDIA_TYPES_H +#define _MEDIA_TYPES_H + +/******************************************************************************* +* +********************************************************************************/ +// +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +// +typedef void MHAL_VOID; +typedef char MHAL_BOOL; +typedef char MHAL_CHAR; +typedef signed char MHAL_INT8; +typedef signed short MHAL_INT16; +typedef signed int MHAL_INT32; +typedef unsigned char MHAL_UCHAR; +typedef unsigned char MHAL_UINT8; +typedef unsigned short MHAL_UINT16; +typedef unsigned int MHAL_UINT32; +#if __LP64__ +typedef unsigned long MHAL_UINT64; +#else +typedef unsigned long long MHAL_UINT64; +#endif + +// +typedef MHAL_VOID MVOID; +typedef MHAL_UINT8 MUINT8; +typedef MHAL_UINT16 MUINT16; +typedef MHAL_UINT32 MUINT32; +typedef MHAL_UINT64 MUINT64; +typedef MHAL_INT32 MINT32; + +/******************************************************************************* +* +********************************************************************************/ +#define READ32(addr) *(MUINT32 *) (addr) +#define WRITE32(addr, val) *(MUINT32 *) (addr) = (val) + +#define MHAL_TRUE 1 +#define MHAL_FALSE 0 + +/******************************************************************************* +* +********************************************************************************/ +//typedef signed char CHAR; +//typedef char UCHAR; +#define CHAR signed char +#define UCHAR char +typedef signed char INT8; +typedef unsigned char UINT8; +typedef unsigned short UINT16; +typedef signed short INT16; +//typedef signed int BOOL; +#define BOOL signed int +//typedef signed int INT32; +#define INT32 signed int +typedef unsigned int UINT32; +typedef long long INT64; + +#if !defined(UINT64) + +#ifndef VCODEC_INC +typedef unsigned long long UINT64; +#define VCODEC_INC +#endif + +#endif + +typedef float FLOAT; +typedef double DOUBLE; +typedef void VOID; + +typedef INT32 MRESULT; + +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef NULL +#define NULL 0 +#endif + +/******************************************************************************* +* +********************************************************************************/ + +/** + * @par Enumeration + * MHAL_ERROR_ENUM + * @par Description + * This is the return status of each MHAL function + */ +typedef enum +{ + MHAL_NO_ERROR = 0, ///< The function work successfully + MHAL_INVALID_DRIVER, ///< Error due to invalid driver + MHAL_INVALID_CTRL_CODE, ///< Error due to invalid control code + MHAL_INVALID_PARA, ///< Error due to invalid parameter + MHAL_INVALID_MEMORY, ///< Error due to invalid memory + MHAL_INVALID_FORMAT, ///< Error due to invalid file format + MHAL_INVALID_RESOURCE, ///< Error due to invalid resource, like IDP + + MHAL_UNKNOWN_ERROR = 0x80000000, ///< Unknown error + MHAL_ALL = 0xFFFFFFFF +} MHAL_ERROR_ENUM; + + +#endif // _MEDIA_TYPES_H + + diff --git a/mtklibs/libJpgDecPipe/include/mhal/mhal_jpeg.h b/mtklibs/libJpgDecPipe/include/mhal/mhal_jpeg.h new file mode 100755 index 0000000000000000000000000000000000000000..8c14678c9e69ae4aba5c20654809f6a44c71fa8f --- /dev/null +++ b/mtklibs/libJpgDecPipe/include/mhal/mhal_jpeg.h @@ -0,0 +1,75 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + * + * MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + */ + + +#ifndef _MHAL_JPEG_H_ +#define _MHAL_JPEG_H_ + +/***************************************************************************** +* Include Header File +*****************************************************************************/ + +#include "MediaHal.h" + +#define MHAL_IMAGE_TYPE_JPEG 0x0000 +#define MHAL_IMAGE_TYPE_WEBP 0x0001 + +/***************************************************************************** +* MHAL Jpeg Decoder API +*****************************************************************************/ + +int mHalJpgDecParser(unsigned char* srcAddr, unsigned int srcSize, int srcFD, unsigned int img_type); + +int mHalJpgDecGetInfo(MHAL_JPEG_DEC_INFO_OUT *decOutInfo); + +int mHalJpgDecStart(MHAL_JPEG_DEC_START_IN *decInParams, void* procHandler = NULL); + + +int mi_mHalJpgDecParser(MHAL_JPEG_DEC_SRC_IN *srcInParams,unsigned char* srcAddr, unsigned int srcSize, int srcFD, unsigned int img_type); + +int mi_mHalJpgDecGetInfo(MHAL_JPEG_DEC_INFO_OUT *decOutInfo); + +int mi_mHalJpgDecStart(MHAL_JPEG_DEC_START_IN *decInParams, void* procHandler = NULL); + +/***************************************************************************** +* MHAL Jpeg Encoder API +*****************************************************************************/ + +int mHalJpgEncStart(MHAL_JPEG_ENC_START_IN *encInParams); + +int mHalScaler_BitBlt( mHalBltParam_t* bltParam ); + +#endif + diff --git a/mtklibs/libJpgDecPipe/libJpgDecPipe.so b/mtklibs/libJpgDecPipe/libJpgDecPipe.so new file mode 100755 index 0000000000000000000000000000000000000000..862d35b34bbf23a2dadd2b51f2ba2de7891b84b4 Binary files /dev/null and b/mtklibs/libJpgDecPipe/libJpgDecPipe.so differ diff --git a/mtklibs/libJpgEncDrv_plat/Android.mk_ b/mtklibs/libJpgEncDrv_plat/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..b2299f20e03b2490b85ae8797c17305071d7cfe8 --- /dev/null +++ b/mtklibs/libJpgEncDrv_plat/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libJpgEncDrv_plat +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libJpgEncDrv_plat.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libJpgEncDrv_plat +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libJpgEncDrv_plat.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libJpgEncDrv_plat/NOTICE b/mtklibs/libJpgEncDrv_plat/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libJpgEncDrv_plat/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libJpgEncDrv_plat/README b/mtklibs/libJpgEncDrv_plat/README new file mode 100755 index 0000000000000000000000000000000000000000..3f0bc0a2fc5e00c2ebbb014dd379e3217808a232 --- /dev/null +++ b/mtklibs/libJpgEncDrv_plat/README @@ -0,0 +1,19 @@ +Library of MTK JPEG Encode feature. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libJpgEncDrv_plat.a controls MTK JPEG HW Encoder through kernel IOCTL interfaces to do the HW JPEG Encode tasks. + +HOW IT WAS BUILT? +================== +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== +Provide api for JPEG Encode feature called from libJpgEncPipe. +all api interfaces are at (vendor\mediatek\proprietary\hardware\jpeg\mt8163\hal) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libJpgEncDrv_plat/arm/libJpgEncDrv_plat.a b/mtklibs/libJpgEncDrv_plat/arm/libJpgEncDrv_plat.a new file mode 100755 index 0000000000000000000000000000000000000000..5cf6bd921d2a4f0b3531e522190d7446b3ddd7e3 Binary files /dev/null and b/mtklibs/libJpgEncDrv_plat/arm/libJpgEncDrv_plat.a differ diff --git a/mtklibs/libJpgEncDrv_plat/libJpgEncDrv_plat.a b/mtklibs/libJpgEncDrv_plat/libJpgEncDrv_plat.a new file mode 100755 index 0000000000000000000000000000000000000000..ecf126ec8ebf84ce4b6825035d18bc59652e0f30 Binary files /dev/null and b/mtklibs/libJpgEncDrv_plat/libJpgEncDrv_plat.a differ diff --git a/mtklibs/libJpgEncPipe/Android.mk_ b/mtklibs/libJpgEncPipe/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..f92de82e03a8e1835ebaba393162e5d454d5eaf1 --- /dev/null +++ b/mtklibs/libJpgEncPipe/Android.mk_ @@ -0,0 +1,27 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libJpgEncPipe +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libion libion_mtk libm4u libmtkjpeg libmtk_drvb libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libJpgEncPipe.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libJpgEncPipe +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libion libion_mtk libm4u libmtkjpeg libmtk_drvb libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libJpgEncPipe.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libJpgEncPipe/NOTICE b/mtklibs/libJpgEncPipe/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libJpgEncPipe/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libJpgEncPipe/README b/mtklibs/libJpgEncPipe/README new file mode 100755 index 0000000000000000000000000000000000000000..5c85691b4abcbcb86b9e13174fa50c1c8dbdf5c1 --- /dev/null +++ b/mtklibs/libJpgEncPipe/README @@ -0,0 +1,32 @@ +Library of MTK JPEG Encode feature. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libJpgEncPipe.so controls the MTK JPEG Encode flow and dispatch the encode tasks and parameters +to either SW or HW encoder to do the JPEG Encode tasks. This library also contains +MTK SW encoder for handling SW JPEG Encode tasks. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libutils.so +3. libcutils.so +4. libion.so + +and the following libs from MediaTek: +1. libion_mtk.so +2. libm4u.so +3. libmtkjpeg.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== +Provide api for JPEG Encode feature called from users under HAL directly. +all api interfaces are at (vendor\mediatek\proprietary\platform\mt6752\hardware\jpeg\inc) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libJpgEncPipe/arm/libJpgEncPipe.so b/mtklibs/libJpgEncPipe/arm/libJpgEncPipe.so new file mode 100755 index 0000000000000000000000000000000000000000..96e7f4f0b050f882fa7b88bcc36dbdca499d4dde Binary files /dev/null and b/mtklibs/libJpgEncPipe/arm/libJpgEncPipe.so differ diff --git a/mtklibs/libJpgEncPipe/include/enc/jpeg_hal.h b/mtklibs/libJpgEncPipe/include/enc/jpeg_hal.h new file mode 100755 index 0000000000000000000000000000000000000000..b470334e612fbe14d2f5955cc62499472bf759a1 --- /dev/null +++ b/mtklibs/libJpgEncPipe/include/enc/jpeg_hal.h @@ -0,0 +1,339 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + */ +/* MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + */ + +#ifndef __JPEG_HAL_H__ +#define __JPEG_HAL_H__ + +#include "m4u_lib.h" + +#if 0 //def JENC_LOCK_VIDEO +#include +#include +#endif +/******************************************************************************* +* +********************************************************************************/ +#ifndef JUINT32 +typedef unsigned int JUINT32; +#endif + +#ifndef JINT32 +typedef int JINT32; +#endif + +#define JPEG_MAX_ENC_SIZE (128*1024*1024) + + + + +/******************************************************************************* +* class JpgEncHal +********************************************************************************/ +class JpgEncHal { +public: + JpgEncHal(); + virtual ~JpgEncHal(); + + //enum SrcFormat { + // kRGB_565_Format, + // kRGB_888_Format, + // kARGB_8888_Format, + // kABGR_8888_Format, + // kYUY2_Pack_Format, // YUYV + // kUYVY_Pack_Format, // UYVY + // kYVU9_Planar_Format, // YUV411, 4x4 sub sample U/V plane + // kYV16_Planar_Format, // YUV422, 2x1 subsampled U/V planes + // kYV12_Planar_Format, // YUV420, 2x2 subsampled U/V planes + // kNV12_Format, // YUV420, 2x2 subsampled , interleaved U/V plane + // kNV21_Format, // YUV420, 2x2 subsampled , interleaved V/U plane + // + // kSrcFormatCount + //}; + + //enum JPEG_ENC_RESULT { + // JPEG_ENC_RST_CFG_ERR, + // JPEG_ENC_RST_DONE, + // JPEG_ENC_RST_ROW_DONE, + // JPEG_ENC_RST_HUFF_ERROR, + // JPEG_ENC_RST_DECODE_FAIL, + // JPEG_ENC_RST_BS_UNDERFLOW + // + //}; + + + enum EncFormat { + //kYUV_444_Format, + //kYUV_422_Format, + //kYUV_411_Format, + //kYUV_420_Format, + //kYUV_400_Format, + + kENC_YUY2_Format, // YUYV + kENC_UYVY_Format, // UYVY + kENC_NV12_Format, // YUV420, 2x2 subsampled , interleaved U/V plane + kENC_NV21_Format, // YUV420, 2x2 subsampled , interleaved V/U plane + kENC_YV12_Format, /// YUV420, 2x2 subsampled, 3 plan + + + kEncFormatCount + }; + + enum { + JPEG_ENC_MEM_PHY, + JPEG_ENC_MEM_PMEM, + JPEG_ENC_MEM_M4U, + JPEG_ENC_MEM_ION + + }; + + enum { + JPEG_ENC_HW, + JPEG_ENC_SW + }; + + enum EncLockType{ + JPEG_ENC_LOCK_HW_FIRST, + JPEG_ENC_LOCK_SW_ONLY, + JPEG_ENC_LOCK_HW_ONLY + }; + + + // lock with enum + bool LevelLock(EncLockType type); + + //lock hw first + bool lock(); + bool unlock(); + bool start(JUINT32 *encSize); + + /* set image actual width, height and encode format */ + bool setEncSize(JUINT32 width, JUINT32 height, EncFormat encformat, bool isSrcBufNeedFlush = true) ; + + /* get requirement of minimum source buffer size and stride after setEncSize */ + JUINT32 getSrcBufMinSize() { return fSrcMinBufferSize ; }; + JUINT32 getSrcCbCrBufMinSize() { return fSrcMinCbCrSize ; }; + JUINT32 getSrcBufMinStride() { return fSrcMinBufferStride ; }; + + /* Set source buffer virtual address. + The srcChromaAddr should be NULL in YUV422. + */ + bool setSrcAddr(void *srcAddr, void *srcChromaAddr); + + /* Set source buffer physical address. + The srcChromaAddr should be NULL in YUV422. + */ + bool setSrcPAddr(void *srcPAddr, void *srcChromaPAddr); + + /* Set source buffer virtual address. + The srcChromaAddr should be NULL in YUV422. + For YUV420(3P), the Y, U, V can be different plan and non-continuous physically + */ + bool setSrcAddr(void *srcAddr, void *srcCb, void *srcCr); + + /* Set source size of buffer1(srcSize) and buffer2(srcSize2) and stride. + The buffer size and stride should be at least minimum buffer size and stride. + The buffer1 and buffer2 share the buffer stride. + Stride should be align to 32(YUV422) or 16 (YUV420). + */ + bool setSrcBufSize(JUINT32 srcStride,JUINT32 srcSize, JUINT32 srcSize2); + + bool setSrcBufSize(JUINT32 srcStride,JUINT32 srcSize, JUINT32 srcSize2, JUINT32 srcSize3, JUINT32 srcUVStride = 0); + /* set encoding quality , range should be [100:1] */ + bool setQuality(JUINT32 quality) { if( quality > 100) return false ; else fQuality = quality; return true ;} + + /* set distination buffer virtual address and size */ + bool setDstAddr(void *dstAddr) { if(dstAddr == NULL) return false; + else fDstAddr = dstAddr; return true;} + + /* set distination buffer physical address and size */ + bool setDstPAddr(void *dstPAddr) { if(dstPAddr == NULL) return false; + else fDstM4uPA = fDstIonPA = ((unsigned long)dstPAddr & 0xFFFFFFFFL); return true;} + + /* set bitstream buffer size , should at least 624 bytes */ + bool setDstSize(JUINT32 size) { if(size<624)return false; + else fDstSize = size; return true ;} + + /* set Normal/Exif mode, 1:Normal,0:Exif, default is Normal mode */ + void enableSOI(bool b) { fIsAddSOI = b; } + + + void setIonMode(bool ionEn) { if( ionEn ) fMemType = JPEG_ENC_MEM_ION; + else fMemType = fMemTypeDefault ; } + + void setSrcFD( JINT32 srcFD, JINT32 srcFD2 ) { fSrcFD = srcFD; fSrcFD2 = srcFD2; } + + void setDstFD( JINT32 dstFD ) { fDstFD = dstFD ; } + + //bool setSrcAddrPA( JUINT32 srcAddrPA, JUINT32 srcChromaAddrPA); + + //bool setDstAddrPA( JUINT32 dstAddrPA){ if(dstAddrPA == NULL) return false; + // else fDstAddrPA = dstAddrPA; return true; + // } + void setDRI( JINT32 dri ) { fDRI = dri ; } + + + +private: + + bool allocPMEM(); + bool alloc_m4u(); + + bool free_m4u(); + + bool alloc_ion(); + bool free_ion(); + bool islock; + bool onSwEncode(JUINT32 *encSize); + + bool fEncoderType; /// to identify current HAL use HW or SW + + bool lockVideo() ; + bool unlockVideo(); + + + + MTKM4UDrv *pM4uDrv ; + M4U_MODULE_ID_ENUM fm4uJpegInputID ; + M4U_MODULE_ID_ENUM fm4uJpegOutputID ; + + JUINT32 fMemType ; + JUINT32 fMemTypeDefault ; + + JUINT32 fSrcWidth; + JUINT32 fSrcHeight; + JUINT32 fDstWidth; + JUINT32 fDstHeight; + JUINT32 fQuality; + JUINT32 fROIX; + JUINT32 fROIY; + JUINT32 fROIWidth; + JUINT32 fROIHeight; + + JUINT32 fSrcMinBufferSize ; + JUINT32 fSrcMinCbCrSize ; + JUINT32 fSrcMinBufferStride; + JUINT32 fSrcMinCbCrStride; + + JUINT32 fEncSrcBufSize ; + JUINT32 fSrcBufStride; + JUINT32 fSrcBufHeight; + + JUINT32 fEncCbCrBufSize ; + JUINT32 fSrcCbCrBufStride; + JUINT32 fSrcCbCrBufHeight; + + //SrcFormat fSrcFormat; + EncFormat fEncFormat; + + void *fSrcAddr; + void *fSrcChromaAddr; + + //JUINT32 fEncDstBufSize ; + + + void *fSrcCb; + void *fSrcCr; + void *fDstAddr; + int fDstSize; + bool fIsAddSOI; + + + + JUINT32 fSrcAddrPA ; + JUINT32 fSrcChromaAddrPA; + JUINT32 fDstAddrPA ; + + JUINT32 fDstM4uPA; + JUINT32 fSrcM4uPA; + JUINT32 fSrcChromaM4uPA; + JUINT32 fIsSrc2p; + JINT32 fSrcPlaneNumber; + + //ION + + bool fIonEn ; + //bool fSrcIonEn ; + //bool fDstIonEn ; + JINT32 fSrcFD; + JINT32 fSrcFD2; + JINT32 fDstFD ; + + JUINT32 fSrcIonPA ; + JUINT32 fSrcChromaIonPA ; + JUINT32 fDstIonPA ; + + void* fSrcIonVA ; + void* fSrcChromaIonVA ; + void* fDstIonVA ; + + JINT32 fSrcIonHdle ; + JINT32 fSrcChromaIonHdle ; + JINT32 fDstIonHdle ; + + + + JINT32 fIonDevFD ; + JUINT32 fDRI ; + bool fIsSelfAlloc; + bool fIsSrcBufNeedFlush; + + + +#if 1 //def JPEG_ENC_USE_PMEM + + unsigned char *fEncSrcPmemVA ; + unsigned char *fEncSrcCbCrPmemVA ; + unsigned char *fEncDstPmemVA ; + + JUINT32 fEncSrcPmemPA ; + JUINT32 fEncSrcCbCrPmemPA ; + JUINT32 fEncDstPmemPA ; + + int fEncSrcPmemFD ; + int fEncSrcCbCrPmemFD ; + int fEncDstPmemFD ; +#endif + int encID; + unsigned long fResTable; + +#if 0 //def JENC_LOCK_VIDEO + VAL_UINT32_T fVDriverType ; + VAL_HW_LOCK_T fVLock; +#endif + + +}; + +#endif diff --git a/mtklibs/libJpgEncPipe/include/mhal/MediaHal.h b/mtklibs/libJpgEncPipe/include/mhal/MediaHal.h new file mode 100755 index 0000000000000000000000000000000000000000..8a08a49e04848045274f7af968ab1e25ca289810 --- /dev/null +++ b/mtklibs/libJpgEncPipe/include/mhal/MediaHal.h @@ -0,0 +1,886 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + */ +/* MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + */ + +/******************************************************************************************** + * LEGAL DISCLAIMER + * + * (Header of MediaTek Software/Firmware Release or Documentation) + * + * BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") RECEIVED + * FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON AN "AS-IS" BASIS + * ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR + * A PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY + * WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, + * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK + * ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO + * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION + * OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. + * + * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE LIABILITY WITH + * RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, +TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE + * FEES OR SERVICE CHARGE PAID BY BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS + * OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF LAWS PRINCIPLES. + ************************************************************************************************/ + +/** + * @file + * MediaHal.h + * + * @par Project: + * Yusu + * + * @par Description:: + * MHAL definitions and function prototypes, this layer manager all multimedia module + * MHAL stands for Mediatek Hardware Abstract Layer + * + * @par Author: + * Wilson Lu (mtk01780) + * Tzu-Meng Chung (mtk02529) + * + * @par $Revision: #12 $ + * @par $Modtime:$ + * @par $Log:$ + * + */ + +#ifndef MEDIA_HAL_H +#define MEDIA_HAL_H + +#include "MediaTypes.h" + +/*============================================================================= + * Type definition + *===========================================================================*/ + + +/******************************************************************************* +* IO Control Mask +********************************************************************************/ +#define MHAL_IOCTL_CAMERA_GROUP_MASK 0x1000 ///< Camera group mask +#define MHAL_IOCTL_JPEG_GROUP_MASK 0x2000 ///< JPEG group mask +#define MHAL_IOCTL_VIDEO_GROUP_MASK 0x4000 ///< VIDEO group mask + +/******************************************************************************* +* IO Control Code +********************************************************************************/ +#define MHAL_IOCTL_LOCK_RESOURCE 0x0001 ///< To query and lock resource (IDP and DCT) +#define MHAL_IOCTL_UNLOCK_RESOURCE 0x0002 ///< To unlock resource (IDP and DCT) +// +#define MHAL_IOCTL_JPEG_ENC 0x2001 ///< To encode JPEG file +#define MHAL_IOCTL_JPEG_DEC_SET_READ_FUNC 0x2002 ///< To set the jpeg decode read functon +#define MHAL_IOCTL_JPEG_DEC_START 0x2003 ///< To start jpeg decode +#define MHAL_IOCTL_JPEG_DEC_GET_INFO 0x2004 ///< To get the jpeg file information +#define MHAL_IOCTL_JPEG_DEC_PARSER 0x2005 ///< To parser the jpeg file information +#define MHAL_IOCTL_JPEG_DEC_CANCEL 0x2006 ///< To cancel the jpeg decoder +#define MHAL_IOCTL_WEBP_DEC_START 0x2011 ///< To start webp decode +#define MHAL_IOCTL_WEBP_DEC_GET_INFO 0x2012 ///< To get the webp file information +#define MHAL_IOCTL_WEBP_DEC_PARSER 0x2013 ///< To parser the webp file information +#define MHAL_IOCTL_WEBP_DEC_CANCEL 0x2014 ///< To cancel the webp decoder +#define MHAL_IOCTL_MJPEG_DEC_PARSER 0x2021 ///< To parser the mjpeg file information +#define MHAL_IOCTL_MJPEG_DEC_GET_INFO 0x2022 ///< To get the mjpeg file information +#define MHAL_IOCTL_MJPEG_DEC_START 0x2023 ///< To start mjpeg decode +#define MHAL_IOCTL_MJPEG_DEC_CANCEL 0x2024 ///< To cancel the mjpeg decoder + + +#define MHAL_IOCTL_MP4_PLAYBACK_OPEN 0x4001 ///< To open MP4 decoder driver +#define MHAL_IOCTL_MP4_PLAYBACK_INIT 0x4002 ///< To init MP4 decoder driver +#define MHAL_IOCTL_MP4_PLAYBACK_RST 0x4003 ///< To reset MP4 decoder driver +#define MHAL_IOCTL_MP4_PLAYBACK_PARSE_H263_HEADER 0x4004 ///< To parse h263 header +#define MHAL_IOCTL_MP4_PLAYBACK_DECODE 0x4005 ///< To parse header and set HW configuration +#define MHAL_IOCTL_MP4_PLAYBACK_TRIGGER_HW_START 0x4006 ///< To trigger MP4 decoder driver start to decode +#define MHAL_IOCTL_MP4_PLAYBACK_CLOSE 0x4007 ///< To close MP4 decoder driver +#define MHAL_IOCTL_MP4_PLAYBACK_GET_PARAM 0x4008 ///< To get parameter +#define MHAL_IOCTL_MP4_PLAYBACK_SET_PARAM 0x4009 ///< To set parameter + +#define MHAL_IOCTL_MP4_RECORD_INIT 0x4101 ///< To initial MPEG4 record +#define MHAL_IOCTL_MP4_RECORD_ENCODE_ONE_FRAME 0x4102 ///< To encode MPEG4 frame +#define MHAL_IOCTL_MP4_RECORD_DEINIT 0x4103 ///< To deinitial MPEG4 record + +#define MHAL_IOCTL_H264_PLAYBACK_INIT 0x4201 ///< To initial H264 playback +#define MHAL_IOCTL_H264_PLAYBACK_DECODE_ONE_FRAME 0x4202 ///< To decode H264 frame +#define MHAL_IOCTL_H264_PLAYBACK_DEINIT 0x4203 ///< To deinitial H264 playback +#define MHAL_IOCTL_H264_PLAYBACK_GET_PARAM 0x4204 ///< To get parameter +#define MHAL_IOCTL_H264_PLAYBACK_SET_PARAM 0x4205 ///< To set parameter +#define MHAL_IOCTL_H264_PLAYBACK_INSERT_BUF 0x4206 ///< To insert buffer +#define MHAL_IOCTL_H264_PLAYBACK_RELEASE_BUF 0x4207 ///< To release buffer +#define MHAL_IOCTL_H264_PLAYBACK_CHECK_BUF 0x4208 ///< To check buffer +#define MHAL_IOCTL_H264_PLAYBACK_SHOW_BUF 0x4209 ///< To show buffer + +#define MHAL_IOCTL_BITBLT 0x8001 ///< To bitblt +#define MHAL_IOCTL_DIRECT_BITBLT_PREPARE 0x8002 ///< To direct link bitblt +#define MHAL_IOCTL_DIRECT_BITBLT_END 0x8003 ///< To release direct link resources + +#define MHAL_IOCTL_FACTORY 0x8100 ///< To run factory mode +#define MHAL_IOCTL_FB_CONFIG_IMEDIATE_UPDATE 0x8101 ///< To config fb immediate update + +/******************************************************************************* +* Lock Resource Mode +********************************************************************************/ +#define MHAL_MODE_JPEG_DECODE 0x0001 ///< Record now scenario of jpeg decode +#define MHAL_MODE_JPEG_ENCODE 0x0002 ///< Record now scenario of jpeg encode +#define MHAL_MODE_CAM_PREVIEW 0x0004 ///< Record now scenario of camera preview +#define MHAL_MODE_CAM_CAPTURE 0x0008 ///< Record now scenario of camera capture +#define MHAL_MODE_MP4_PLAYBACK 0x0010 ///< Record now scenario of MPEG4 playback +#define MHAL_MODE_H264_PLAYBACK 0x0010 ///< Record now scenario of H264 playback +#define MHAL_MODE_MP4_RECORD 0x0020 ///< Record now scenario of MPEG4 record +#define MHAL_MODE_BITBLT 0x0040 ///< Record now scenario of Bitblt + +#define MHAL_MODE_ALL 0x00FF + +/******************************************************************************* +* Query Memory Mode +********************************************************************************/ +#define MHAL_MEM_MODE_PREVIEW 0x0001 ///< The query memory mode of camera preview +#define MHAL_MEM_MODE_CAPTURE 0x0002 ///< The query memory mode of camera capture + +/******************************************************************************* +* Lock Resource Interface +********************************************************************************/ +typedef struct mHalLockParam_s +{ + MUINT32 mode; + MUINT32 waitMilliSec; + MUINT32 waitMode; +} MHalLockParam_t; + +/***************************************************************************** +* Video Encoder Interface +*****************************************************************************/ +typedef enum +{ + VDO_ENC_FORMAT_H263 = 0, + VDO_ENC_FORMAT_MPEG4, + VDO_ENC_FORMAT_AVC, + + VDO_ENC_FORMAT_MAX = 0xFFFFFFFF +}VDO_ENC_FORMAT; + + +/***************************************************************************** +* JPEG Decoder Interface +*****************************************************************************/ + +typedef unsigned int (*pfReadStreamCallback)(MUINT8* srcStream, MUINT32 size); + +typedef enum +{ + JPEG_ERROR_NONE = 0, + JPEG_ERROR_INVALID_DRIVER, + JPEG_ERROR_INVALID_CTRL_CODE, + JPEG_ERROR_INVALID_PARA, + JPEG_ERROR_INVALID_MEMORY, + JPEG_ERROR_INVALID_FORMAT, + + JPEG_ERROR_ALL = 0xFFFFFFFF +}MHAL_JPEG_ERROR_ENUM; + +typedef enum +{ + JPEG_RESULT_DONE = 0, + JPEG_RESULT_PAUSE, + JPEG_RESULT_OVERFLOW, + JPEG_RESULT_HALT, + + RESULT_ALL = 0xFFFFFFFF +}MHAL_JPEG_DEC_RESULT_ENUM; + +typedef enum { + JPEG_OUT_FORMAT_RGB565 = 0, + JPEG_OUT_FORMAT_RGB888, + JPEG_OUT_FORMAT_ARGB8888, + JPEG_OUT_FORMAT_YUY2, // YUYV + JPEG_OUT_FORMAT_UYVY, // UYVY + JPEG_OUT_FORMAT_I420, // YVU420 3 plane + JPEG_OUT_FORMAT_YV12, // YVU420 3 plane + JPEG_OUT_FORMAT_ALL = 0xFFFFFFFF +}JPEG_OUT_FORMAT_ENUM; + +typedef struct +{ + void *imageDCParam; + MUINT32 ISOSpeedRatings; +}MHAL_JPEG_POST_PROC_PARAM; + +typedef struct +{ + + MINT32 timeout; // time for wait IRQ, unit : millisecond + MUINT8 *srcBuffer; // avoid reset error, copy src file back + MUINT32 srcBufSize; + MUINT32 srcLength; + MINT32 srcFD; + + // destination information + MUINT8 *dstPhysAddr; // if set NULL, mhal will allocate memory + MUINT8 *dstVirAddr; + MUINT32 dstWidth; + MUINT32 dstHeight; + MUINT32 doDithering; // 1: do HW dithering + MUINT32 doPostProcessing; // 1: do HW PostProcessing + MHAL_JPEG_POST_PROC_PARAM *postProcessingParam; + MUINT32 PreferQualityOverSpeed; // 1: do SLOW_IDCT + + // Range Decode Infor + MUINT32 doRangeDecode; // 1: do Range Decode, 0: disable + MUINT32 rangeLeft; + MUINT32 rangeTop; + MUINT32 rangeRight; + MUINT32 rangeBottom; + + JPEG_OUT_FORMAT_ENUM dstFormat; + + void* jpgDecHandle ; + MUINT32 fCancelDecoderFlag; + +}MHAL_JPEG_DEC_START_IN; + +typedef struct +{ + MUINT8 *srcBuffer; + MUINT32 srcLength; + MINT32 srcFD; + void* jpgDecHandle ; + +}MHAL_JPEG_DEC_SRC_IN; + +typedef struct +{ + MUINT32 srcWidth; + MUINT32 srcHeight; + void* jpgDecHandle ; + +}MHAL_JPEG_DEC_INFO_OUT; + + +/***************************************************************************** +* JPEG Encoder Interface +*****************************************************************************/ +typedef enum { + JPEG_IN_FORMAT_RGB565 = 0, + JPEG_IN_FORMAT_RGB888, + JPEG_IN_FORMAT_ARGB8888, + + JPEG_IN_FORMAT_ALL = 0xFFFFFFFF +}JPEG_IN_FORMAT_ENUM; + +/** + * @par Enumeration + * JPEG_SAMPLING_FORMAT + * @par Description + * The JPEG sampling format you want to encode + */ +typedef enum { + JPEG_ENC_YUV444 = 444, + JPEG_ENC_YUV422 = 422, + JPEG_ENC_YUV411 = 411, + JPEG_ENC_YUV420 = 420, + JPEG_ENC_GRAYLEVEL = 400, + + JPEG_ENC_ALL = 0xFFFFFFFF + +} JPEG_ENC_FORMAT_ENUM; + +/** + * @par Enumeration + * JPEG_ENCODE_QUALITY_ENUM + * @par Description + * The JPEG quality you want to encode + */ + +typedef struct +{ + MINT32 timeout; // time for wait IRQ, unit : millisecond + + MUINT8 *srcAddr; + MUINT8 *dstAddr; + + MUINT32 srcWidth; + MUINT32 srcHeight; + + MUINT32 dstWidth; + MUINT32 dstHeight; + + MUINT32 quality; + MUINT32 dstSize; + MUINT32 *encSize; + + JPEG_IN_FORMAT_ENUM inFormat; + JPEG_ENC_FORMAT_ENUM outFormat; + +}MHAL_JPEG_ENC_START_IN; + +/******************************************************************************* +* Bitblt Interface +********************************************************************************/ +typedef enum +{ + MHAL_FORMAT_RGB_565 = 0, + MHAL_FORMAT_BGR_565, + MHAL_FORMAT_RGB_888, + MHAL_FORMAT_BGR_888, + MHAL_FORMAT_ARGB_8888, + MHAL_FORMAT_ABGR_8888, + MHAL_FORMAT_BGRA_8888, + MHAL_FORMAT_RGBA_8888, + MHAL_FORMAT_YUV_420, + MHAL_FORMAT_YUV_420_SP, + MHAL_FORMAT_MTK_YUV, + MHAL_FORMAT_YUY2, + MHAL_FORMAT_UYVY, + MHAL_FORMAT_Y800, + MHAL_FORMAT_YUV_422_PL, //422 Planar,i.e YV16 Planar + MHAL_FORMAT_ANDROID_YV12, //Androdi YV12.YVU stride all 16 pixel align + MHAL_FORMAT_IMG_YV12, //Imagination YV12.YVU stride all 32 pixel align + + + MHAL_FORMAT_ERROR, + + MHAL_FORMAT_ALL = 0xFFFFFFFF +} MHAL_BITBLT_FORMAT_ENUM; + +typedef enum +{ + MHAL_BITBLT_ROT_0 = 0, + MHAL_BITBLT_ROT_90 = 0x1, + MHAL_BITBLT_ROT_180 = 0x2, + MHAL_BITBLT_ROT_270 = 0x3,// (90 + 180) + MHAL_BITBLT_FLIP_H = 0x4, + + MHAL_BITBLT_ALL = 0xFFFFFFFF +} MHAL_BITBLT_ROT_ENUM; + +typedef struct mHalBltParam_s +{ + MUINT32 m4u_handle; //NULL imply VA exist in current process + + MUINT32 srcX; + MUINT32 srcY; + MUINT32 srcW; + MUINT32 srcWStride; + MUINT32 srcH; + MUINT32 srcHStride; + MUINT32 srcAddr; + MUINT32 srcFormat; + + MUINT32 dstW; + MUINT32 dstH; + MUINT32 dstAddr; + MUINT32 dstFormat; + MUINT32 pitch; + + MUINT32 orientation; + MUINT32 doImageProcess;// 0:disable, 0x1:color process+EE, 0x2:do color process only , 0x3:face beautify, bit[4]: 0-do bitblt if isp is N.A , 1-skip if isp is N.A. + MUINT32 favor_flags; /*Image Transform favor flags,this is a low level flags. default is 0*/ + + + MUINT32 u4SrcOffsetXFloat;//0x100 stands for 1, 0x40 stands for 0.25 , etc... + MUINT32 u4SrcOffsetYFloat;//0x100 stands for 1, 0x40 stands for 0.25 , etc... + + + /*Resizer coeff if can apply*/ + MUINT32 resz_up_scale_coeff; //0:linear interpolation 1:most blur 19:sharpest 8:recommeneded >12:undesirable + MUINT32 resz_dn_scale_coeff; //0:linear interpolation 1:most blur 19:sharpest 15:recommeneded + MUINT32 resz_ee_h_str; //down scale only/0~15 + MUINT32 resz_ee_v_str; //down scale only/0~15 +} mHalBltParam_t; + + +typedef struct mHalBltExParam_s +{ + /*Source*/ + MHAL_BITBLT_FORMAT_ENUM src_color_format; + + MUINT32 src_img_size_w; + MUINT32 src_img_size_h; + + MUINT32 src_img_roi_x; + MUINT32 src_img_roi_y; + MUINT32 src_img_roi_w; + MUINT32 src_img_roi_h; + + MUINT32 src_yuv_img_addr; + + + /*For HDMI : RGB*/ + MINT32 en_hdmi_port; //enable hdmi port + MHAL_BITBLT_FORMAT_ENUM hdmi_color_format; + + MUINT32 hdmi_img_size_w; + MUINT32 hdmi_img_size_h; + + + MUINT32 hdmi_img_roi_x; + MUINT32 hdmi_img_roi_y; + MUINT32 hdmi_img_roi_w; + MUINT32 hdmi_img_roi_h; + + MUINT32 hdmi_yuv_img_addr; + MUINT32 hdmi_rotate_angle; + + /*For Display : 422 Pack*/ + MINT32 en_disp_port; //enable disp port + MHAL_BITBLT_FORMAT_ENUM disp_color_format; + + MUINT32 disp_img_size_w; + MUINT32 disp_img_size_h; + + MUINT32 disp_img_roi_x; + MUINT32 disp_img_roi_y; + MUINT32 disp_img_roi_w; + MUINT32 disp_img_roi_h; + + MUINT32 disp_yuv_img_addr; + MUINT32 disp_rotate_angle; + + /*Resizer coeff if can apply*/ + MUINT32 resz_up_scale_coeff; //0:linear interpolation 1:most blur 19:sharpest 8:recommeneded >12:undesirable + MUINT32 resz_dn_scale_coeff; //0:linear interpolation 1:most blur 19:sharpest 15:recommeneded + MUINT32 resz_ee_h_str; //down scale only/0~15 + MUINT32 resz_ee_v_str; //down scale only/0~15 +} mHalBltParamEx_t; + + + +typedef enum +{ + MHAL_MLM_CLIENT_SFTEX, //Surface flinger Texture + MHAL_MLM_CLIENT_MTKOVERLAY, + MHAL_MLM_CLIENT_PV2ND, //Preview 2nd path + MHAL_MLM_CLIENT_ELEMENT, //MDP Element + MHAL_MLM_CLIENT_PVCPY, //Camera preview path extra-copy + MHAL_MLM_CLIENT_GRALLOC, //Graphic Buffer Allocator + + MHAL_MLM_CLIENT_MAX = 19, //MAX (for test) + +} mHalMVALOOPMEM_CLIENT; + +typedef enum +{ + MHAL_MEM_TYPE_INPUT, + MHAL_MEM_TYPE_OUTPUT + +} mHalREGLOOPMEM_TYPE; + + + +#ifdef __cplusplus + +class mHalMdpSize +{ +public: + unsigned long w; + unsigned long h; + +public: + mHalMdpSize(): + w(0),h(0) + {}; + + + mHalMdpSize(unsigned long _w, unsigned long _h ) + { + w = _w; h = _h; + }; + + + mHalMdpSize& operator=( const mHalMdpSize& rhs ) + { + w = rhs.w; h = rhs.h; + return *this; + } + + bool operator==(const mHalMdpSize& rhs) const + { + return ( ( w == rhs.w ) && ( h == rhs.h ) ); + } + + bool operator!=(const mHalMdpSize& rhs) const + { + return !( *this == rhs ); + } + +}; + +class mHalMdpRect +{ +public: + long x; + long y; + unsigned long w; + unsigned long h; + +public: + mHalMdpRect(): + x(0),y(0),w(0),h(0) + {}; + + mHalMdpRect(long _x, long _y, unsigned long _w, unsigned long _h ) + { + x = _x; y = _y; w = _w; h = _h; + }; + + mHalMdpRect(const mHalMdpSize& size ) + { + x = 0; y = 0; w = size.w; h = size.h; + }; + + mHalMdpRect& operator=( const mHalMdpRect& rhs ) + { + x = rhs.x; y = rhs.y; w = rhs.w; h = rhs.h; + return *this; + } + + bool operator==(const mHalMdpRect& rhs) const + { + return ( (x == rhs.x) && ( y == rhs.y) && ( w == rhs.w ) && ( h == rhs.h ) ); + } + + bool operator!=(const mHalMdpRect& rhs) const + { + return !( *this == rhs ); + } + + +}; + +class mHalMdpYuvAddr +{ +public: + unsigned long y; + unsigned long u; + unsigned long v; + + /*User need not fill in the data below!-----------------------------------------------------------*/ + /*Below data is auto fill by MDP driver calculation!----------------------------------------------*/ + + unsigned long y_buffer_size; + unsigned long u_buffer_size; + unsigned long v_buffer_size; + +public: + mHalMdpYuvAddr(): + y(0), u(0), v(0), + y_buffer_size(0), u_buffer_size(0), v_buffer_size(0) + {}; +}; + + + +class mHalRegisterLoopMemory_t +{ +public: + mHalREGLOOPMEM_TYPE mem_type; + unsigned long addr; + unsigned long buffer_size; + MHAL_BITBLT_FORMAT_ENUM mhal_color; + mHalMdpSize img_size; + mHalMdpRect img_roi; + unsigned long rotate; //0:0 1:90 2:180 3:270.rotate always 0 when used by RDMA(input memory) + +public: + mHalRegisterLoopMemory_t(): + mem_type(MHAL_MEM_TYPE_INPUT), + addr(0), + buffer_size(0), + mhal_color(MHAL_FORMAT_RGB_565), + rotate(0) //0:0 1:90 2:180 3:270.rotate always 0 when used by RDMA(input memory) + {}; + +}; + +class mHalRegisterLoopMemoryObj_t +{ +public: + unsigned long mdp_id; + mHalMdpYuvAddr calc_addr[1]; + mHalMdpYuvAddr adapt_addr[1]; + unsigned long adapt_m4u_flag_bit; + unsigned long alloc_mva_flag_bit; + +public: + mHalRegisterLoopMemoryObj_t(): + mdp_id(0), + adapt_m4u_flag_bit(0), + alloc_mva_flag_bit(0) + {}; +}; + +#else /*#ifdef __cplusplus*/ + +typedef struct mHalMdpSize_s +{ + unsigned long w; + unsigned long h; +} mHalMdpSize; + + +typedef struct mHalMdpRect_s +{ + long x; + long y; + unsigned long w; + unsigned long h; +} mHalMdpRect; + +typedef struct mHalMdpYuvAddr_s +{ + unsigned long y; + unsigned long u; + unsigned long v; + + /*User need not fill in the data below!-----------------------------------------------------------*/ + /*Below data is auto fill by MDP driver calculation!----------------------------------------------*/ + + unsigned long y_buffer_size; + unsigned long u_buffer_size; + unsigned long v_buffer_size; + +} mHalMdpYuvAddr; + +typedef struct mHalRegisterLoopMemory_s +{ + mHalREGLOOPMEM_TYPE mem_type; + unsigned long addr; + unsigned long buffer_size; + MHAL_BITBLT_FORMAT_ENUM mhal_color; + mHalMdpSize img_size; + mHalMdpRect img_roi; + unsigned long rotate; //0:0 1:90 2:180 3:270.rotate always 0 when used by RDMA(input memory) +} mHalRegisterLoopMemory_t; + +typedef struct mHalRegisterLoopMemoryObj_s +{ + unsigned long mdp_id; + mHalMdpYuvAddr calc_addr[1]; + mHalMdpYuvAddr adapt_addr[1]; + unsigned long adapt_m4u_flag_bit; + unsigned long alloc_mva_flag_bit; +} mHalRegisterLoopMemoryObj_t; + + +#endif /*#ifdef __cplusplus*/ + + + +/******************************************************************************* +* Camera Interface +********************************************************************************/ + +/** + * @par Structure + * mhalCamParam_t + * @par Description + * This is a structure which store camera configuration + */ +typedef struct mhalCamVdoParam_s { + MUINT32 u4YUVWidth; + MUINT32 u4YUVHeight; + MUINT32 u4VEncBitrate; // Video encode bitrate + VDO_ENC_FORMAT eVEncFormat; // Video encode format + MUINT32 u4PrvFps; +}mhalCamVdoParam_t; + +// +typedef struct priority_data { + MHAL_CHAR name[20]; + MHAL_INT32 policy; + MHAL_INT32 priority; +} mhalPriorityData_t; + +typedef struct mHalMp4VEncParam_s +{ + void *pObj; + void *pInputBuf; +}mHalMp4VEncParam_t; + +/*============================================================================= + * Function Declaration + *===========================================================================*/ + +/** + * @par Function + * mHalOpen + * @par Description + * Open a mHal instance + * @par Returns + * return a created instance. + */ +void* +mHalOpen(); + + +/** + * @par Function + * mHalClose + * @par Description + * Close a mHal instance + * @param + * fd [I] file descriptor returned from mHalOpen() + + * @par Returns + * none. + */ +void +mHalClose(void* fd); + + +/** + * @par Function + * mHalIoctl + * @par Description + * mHal ioctl function with fd + * @param + * uCtrlCode [I] The IO Control Code + * @param + * pvInBuf [I] The input parameter + * @param + * uInBufSize [I] The size of input parameter structure + * @param + * pvOutBuf [O] The output parameter + * @param + * uOutBufSize [I] The size of output parameter structure + * @param + * puBytesReturned [O] The number of bytes of return value + * @par Returns + * error code + */ +int +mHalIoctl( + void* fd, + unsigned int uCtrlCode, + void* pvInBuf, + unsigned int uInBufSize, + void* pvOutBuf, + unsigned int uOutBufSize, + unsigned int* puBytesReturned +); + + +/** + * @par Function + * mHalIoCtrl + * @par Description + * The MHAL ioctrl function + * @param + * a_u4CtrlCode [IN] The IO Control Code + * @param + * a_pInBuffer [IN] The input parameter + * @param + * a_u4InBufSize [IN] The size of input parameter structure + * @param + * a_pOutBuffer [OUT] The output parameter + * @param + * a_u4OutBufSize [IN] The size of output parameter structure + * @param + * pBytesReturned [OUT] The number of bytes of return value + * @par Returns + * MINT32 + */ +#ifdef __cplusplus +extern "C"{ +#endif + +MINT32 +mHalIoCtrl( + MUINT32 a_u4CtrlCode, + MVOID *a_pInBuffer, + MUINT32 a_u4InBufSize, + MVOID *a_pOutBuffer, + MUINT32 a_u4OutBufSize, + MUINT32 *pBytesReturned +); + +MINT32 +mHalJpeg( + MUINT32 a_u4CtrlCode, + MVOID *a_pInBuffer, + MUINT32 a_u4InBufSize, + MVOID *a_pOutBuffer, + MUINT32 a_u4OutBufSize, + MUINT32 *pBytesReturned +); + + +#ifdef __cplusplus +} +#endif + + +#ifdef __cplusplus +extern "C"{ +#endif +MINT32 +mtk_AdjustPrio( + MHAL_CHAR *name +); +#ifdef __cplusplus +} +#endif + + +/******************************************************************************* +* MDP mHal Interface +********************************************************************************/ +#ifdef __cplusplus +extern "C"{ +#endif + +signed int mHalMdp_BitBlt( void *a_pInBuffer ); +signed int mHalMdpIpc_BitBlt( mHalBltParam_t* bltParam ); +signed int mHalMdpLocal_BitBlt( mHalBltParam_t* bltParam ); + +signed int mHalMdp_BitBltEx( mHalBltParamEx_t* p_param ); +signed int mHalMdp_BitbltSlice( void *a_pInBuffer ); + + + + +int mHalMdp_RegisterLoopMemory( mHalMVALOOPMEM_CLIENT client_id, mHalRegisterLoopMemory_t* p_param, mHalRegisterLoopMemoryObj_t* p_out_obj ); +int mHalMdp_UnRegisterLoopMemory( mHalMVALOOPMEM_CLIENT client_id, mHalRegisterLoopMemoryObj_t* p_obj ); + + +#ifdef __cplusplus +} +#endif + + +#endif // MEDIA_HAL_H + + diff --git a/mtklibs/libJpgEncPipe/include/mhal/MediaTypes.h b/mtklibs/libJpgEncPipe/include/mhal/MediaTypes.h new file mode 100755 index 0000000000000000000000000000000000000000..90ac46a6a665c9119844a68896c00cb34a0b4d40 --- /dev/null +++ b/mtklibs/libJpgEncPipe/include/mhal/MediaTypes.h @@ -0,0 +1,176 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + */ +/* MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + */ + +/******************************************************************************************** + * LEGAL DISCLAIMER + * + * (Header of MediaTek Software/Firmware Release or Documentation) + * + * BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") RECEIVED + * FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON AN "AS-IS" BASIS + * ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR + * A PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY + * WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, + * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK + * ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO + * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION + * OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. + * + * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE LIABILITY WITH + * RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, +TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE + * FEES OR SERVICE CHARGE PAID BY BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS + * OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF LAWS PRINCIPLES. + ************************************************************************************************/ + +#ifndef _MEDIA_TYPES_H +#define _MEDIA_TYPES_H + +/******************************************************************************* +* +********************************************************************************/ +// +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +// +typedef void MHAL_VOID; +typedef char MHAL_BOOL; +typedef char MHAL_CHAR; +typedef signed char MHAL_INT8; +typedef signed short MHAL_INT16; +typedef signed int MHAL_INT32; +typedef unsigned char MHAL_UCHAR; +typedef unsigned char MHAL_UINT8; +typedef unsigned short MHAL_UINT16; +typedef unsigned int MHAL_UINT32; +#if __LP64__ +typedef unsigned long MHAL_UINT64; +#else +typedef unsigned long long MHAL_UINT64; +#endif + +// +typedef MHAL_VOID MVOID; +typedef MHAL_UINT8 MUINT8; +typedef MHAL_UINT16 MUINT16; +typedef MHAL_UINT32 MUINT32; +typedef MHAL_UINT64 MUINT64; +typedef MHAL_INT32 MINT32; + +/******************************************************************************* +* +********************************************************************************/ +#define READ32(addr) *(MUINT32 *) (addr) +#define WRITE32(addr, val) *(MUINT32 *) (addr) = (val) + +#define MHAL_TRUE 1 +#define MHAL_FALSE 0 + +/******************************************************************************* +* +********************************************************************************/ +//typedef signed char CHAR; +//typedef char UCHAR; +#define CHAR signed char +#define UCHAR char +typedef signed char INT8; +typedef unsigned char UINT8; +typedef unsigned short UINT16; +typedef signed short INT16; +//typedef signed int BOOL; +#define BOOL signed int +//typedef signed int INT32; +#define INT32 signed int +typedef unsigned int UINT32; +typedef long long INT64; + +#if !defined(UINT64) + +#ifndef VCODEC_INC +typedef unsigned long long UINT64; +#define VCODEC_INC +#endif + +#endif + +typedef float FLOAT; +typedef double DOUBLE; +typedef void VOID; + +typedef INT32 MRESULT; + +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef NULL +#define NULL 0 +#endif + +/******************************************************************************* +* +********************************************************************************/ + +/** + * @par Enumeration + * MHAL_ERROR_ENUM + * @par Description + * This is the return status of each MHAL function + */ +typedef enum +{ + MHAL_NO_ERROR = 0, ///< The function work successfully + MHAL_INVALID_DRIVER, ///< Error due to invalid driver + MHAL_INVALID_CTRL_CODE, ///< Error due to invalid control code + MHAL_INVALID_PARA, ///< Error due to invalid parameter + MHAL_INVALID_MEMORY, ///< Error due to invalid memory + MHAL_INVALID_FORMAT, ///< Error due to invalid file format + MHAL_INVALID_RESOURCE, ///< Error due to invalid resource, like IDP + + MHAL_UNKNOWN_ERROR = 0x80000000, ///< Unknown error + MHAL_ALL = 0xFFFFFFFF +} MHAL_ERROR_ENUM; + + +#endif // _MEDIA_TYPES_H + + diff --git a/mtklibs/libJpgEncPipe/include/mhal/mhal_jpeg.h b/mtklibs/libJpgEncPipe/include/mhal/mhal_jpeg.h new file mode 100755 index 0000000000000000000000000000000000000000..8c14678c9e69ae4aba5c20654809f6a44c71fa8f --- /dev/null +++ b/mtklibs/libJpgEncPipe/include/mhal/mhal_jpeg.h @@ -0,0 +1,75 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + * + * MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + */ + + +#ifndef _MHAL_JPEG_H_ +#define _MHAL_JPEG_H_ + +/***************************************************************************** +* Include Header File +*****************************************************************************/ + +#include "MediaHal.h" + +#define MHAL_IMAGE_TYPE_JPEG 0x0000 +#define MHAL_IMAGE_TYPE_WEBP 0x0001 + +/***************************************************************************** +* MHAL Jpeg Decoder API +*****************************************************************************/ + +int mHalJpgDecParser(unsigned char* srcAddr, unsigned int srcSize, int srcFD, unsigned int img_type); + +int mHalJpgDecGetInfo(MHAL_JPEG_DEC_INFO_OUT *decOutInfo); + +int mHalJpgDecStart(MHAL_JPEG_DEC_START_IN *decInParams, void* procHandler = NULL); + + +int mi_mHalJpgDecParser(MHAL_JPEG_DEC_SRC_IN *srcInParams,unsigned char* srcAddr, unsigned int srcSize, int srcFD, unsigned int img_type); + +int mi_mHalJpgDecGetInfo(MHAL_JPEG_DEC_INFO_OUT *decOutInfo); + +int mi_mHalJpgDecStart(MHAL_JPEG_DEC_START_IN *decInParams, void* procHandler = NULL); + +/***************************************************************************** +* MHAL Jpeg Encoder API +*****************************************************************************/ + +int mHalJpgEncStart(MHAL_JPEG_ENC_START_IN *encInParams); + +int mHalScaler_BitBlt( mHalBltParam_t* bltParam ); + +#endif + diff --git a/mtklibs/libJpgEncPipe/libJpgEncPipe.so b/mtklibs/libJpgEncPipe/libJpgEncPipe.so new file mode 100755 index 0000000000000000000000000000000000000000..ea68df6c772a29e59adae1af4049dc6a13db6f3e Binary files /dev/null and b/mtklibs/libJpgEncPipe/libJpgEncPipe.so differ diff --git a/mtklibs/libLLVMARMAsmParser_mali/Android.mk_ b/mtklibs/libLLVMARMAsmParser_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..bdcf8dd081b4543cb41d1f93947462e222c82951 --- /dev/null +++ b/mtklibs/libLLVMARMAsmParser_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMARMAsmParser_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMARMAsmParser_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMARMAsmParser_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMARMAsmParser_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMARMAsmParser_mali/NOTICE b/mtklibs/libLLVMARMAsmParser_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMARMAsmParser_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMARMAsmParser_mali/README b/mtklibs/libLLVMARMAsmParser_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMARMAsmParser_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMARMAsmParser_mali/arm/libLLVMARMAsmParser_mali.a b/mtklibs/libLLVMARMAsmParser_mali/arm/libLLVMARMAsmParser_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..71795a974a2f7e5ed1aad31f0c100c27a3955893 Binary files /dev/null and b/mtklibs/libLLVMARMAsmParser_mali/arm/libLLVMARMAsmParser_mali.a differ diff --git a/mtklibs/libLLVMARMAsmParser_mali/libLLVMARMAsmParser_mali.a b/mtklibs/libLLVMARMAsmParser_mali/libLLVMARMAsmParser_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..743bdec4f74d7eddcd152a1d68154df3fb93ae5c Binary files /dev/null and b/mtklibs/libLLVMARMAsmParser_mali/libLLVMARMAsmParser_mali.a differ diff --git a/mtklibs/libLLVMARMAsmPrinter_mali/Android.mk_ b/mtklibs/libLLVMARMAsmPrinter_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..4d71d3b041d2382530a675f00a547807a1342c63 --- /dev/null +++ b/mtklibs/libLLVMARMAsmPrinter_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMARMAsmPrinter_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMARMAsmPrinter_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMARMAsmPrinter_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMARMAsmPrinter_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMARMAsmPrinter_mali/NOTICE b/mtklibs/libLLVMARMAsmPrinter_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMARMAsmPrinter_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMARMAsmPrinter_mali/README b/mtklibs/libLLVMARMAsmPrinter_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMARMAsmPrinter_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMARMAsmPrinter_mali/arm/libLLVMARMAsmPrinter_mali.a b/mtklibs/libLLVMARMAsmPrinter_mali/arm/libLLVMARMAsmPrinter_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..c70aa1829d803fed5e09bb45e8548e977db2a99b Binary files /dev/null and b/mtklibs/libLLVMARMAsmPrinter_mali/arm/libLLVMARMAsmPrinter_mali.a differ diff --git a/mtklibs/libLLVMARMAsmPrinter_mali/libLLVMARMAsmPrinter_mali.a b/mtklibs/libLLVMARMAsmPrinter_mali/libLLVMARMAsmPrinter_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..1018a0bb7a5732e999890b6d45b6fe179c18d013 Binary files /dev/null and b/mtklibs/libLLVMARMAsmPrinter_mali/libLLVMARMAsmPrinter_mali.a differ diff --git a/mtklibs/libLLVMARMCodeGen_mali/Android.mk_ b/mtklibs/libLLVMARMCodeGen_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..ba9bff1a1bb133e0d9dc09287beb2dbf78bbb742 --- /dev/null +++ b/mtklibs/libLLVMARMCodeGen_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMARMCodeGen_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMARMCodeGen_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMARMCodeGen_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMARMCodeGen_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMARMCodeGen_mali/NOTICE b/mtklibs/libLLVMARMCodeGen_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMARMCodeGen_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMARMCodeGen_mali/README b/mtklibs/libLLVMARMCodeGen_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMARMCodeGen_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMARMCodeGen_mali/arm/libLLVMARMCodeGen_mali.a b/mtklibs/libLLVMARMCodeGen_mali/arm/libLLVMARMCodeGen_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..68c20c06fb0c922abc172da98d0bc31f77e1f6e4 Binary files /dev/null and b/mtklibs/libLLVMARMCodeGen_mali/arm/libLLVMARMCodeGen_mali.a differ diff --git a/mtklibs/libLLVMARMCodeGen_mali/libLLVMARMCodeGen_mali.a b/mtklibs/libLLVMARMCodeGen_mali/libLLVMARMCodeGen_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..552df3f1c34e5dcd20ed7d151d6c55dbbbb75e5a Binary files /dev/null and b/mtklibs/libLLVMARMCodeGen_mali/libLLVMARMCodeGen_mali.a differ diff --git a/mtklibs/libLLVMARMDesc_mali/Android.mk_ b/mtklibs/libLLVMARMDesc_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d9d3af3305d84f1cab5543f786004bef343d1cbe --- /dev/null +++ b/mtklibs/libLLVMARMDesc_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMARMDesc_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMARMDesc_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMARMDesc_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMARMDesc_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMARMDesc_mali/NOTICE b/mtklibs/libLLVMARMDesc_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMARMDesc_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMARMDesc_mali/README b/mtklibs/libLLVMARMDesc_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMARMDesc_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMARMDesc_mali/arm/libLLVMARMDesc_mali.a b/mtklibs/libLLVMARMDesc_mali/arm/libLLVMARMDesc_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..3cca1588518b0387d75c0a63bc8f6f237df71bf3 Binary files /dev/null and b/mtklibs/libLLVMARMDesc_mali/arm/libLLVMARMDesc_mali.a differ diff --git a/mtklibs/libLLVMARMDesc_mali/libLLVMARMDesc_mali.a b/mtklibs/libLLVMARMDesc_mali/libLLVMARMDesc_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..8955ed03c602ad9487f314cbdcf8c5083f99fed0 Binary files /dev/null and b/mtklibs/libLLVMARMDesc_mali/libLLVMARMDesc_mali.a differ diff --git a/mtklibs/libLLVMARMDisassembler_mali/Android.mk_ b/mtklibs/libLLVMARMDisassembler_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..6276dc4d2598502d389f64a485d1555bb4697410 --- /dev/null +++ b/mtklibs/libLLVMARMDisassembler_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMARMDisassembler_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMARMDisassembler_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMARMDisassembler_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMARMDisassembler_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMARMDisassembler_mali/NOTICE b/mtklibs/libLLVMARMDisassembler_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMARMDisassembler_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMARMDisassembler_mali/README b/mtklibs/libLLVMARMDisassembler_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMARMDisassembler_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMARMDisassembler_mali/arm/libLLVMARMDisassembler_mali.a b/mtklibs/libLLVMARMDisassembler_mali/arm/libLLVMARMDisassembler_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..ccc5c996df8f427d69a360a9fbf2dbfa12a3b088 Binary files /dev/null and b/mtklibs/libLLVMARMDisassembler_mali/arm/libLLVMARMDisassembler_mali.a differ diff --git a/mtklibs/libLLVMARMDisassembler_mali/libLLVMARMDisassembler_mali.a b/mtklibs/libLLVMARMDisassembler_mali/libLLVMARMDisassembler_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..712e1f2e4d76518adc81300a5937bd1068d3ed6e Binary files /dev/null and b/mtklibs/libLLVMARMDisassembler_mali/libLLVMARMDisassembler_mali.a differ diff --git a/mtklibs/libLLVMARMInfo_mali/Android.mk_ b/mtklibs/libLLVMARMInfo_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..1f7bdcf2300869bcd72a1aa2cf6d91a506e5bf7b --- /dev/null +++ b/mtklibs/libLLVMARMInfo_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMARMInfo_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMARMInfo_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMARMInfo_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMARMInfo_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMARMInfo_mali/NOTICE b/mtklibs/libLLVMARMInfo_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMARMInfo_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMARMInfo_mali/README b/mtklibs/libLLVMARMInfo_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMARMInfo_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMARMInfo_mali/arm/libLLVMARMInfo_mali.a b/mtklibs/libLLVMARMInfo_mali/arm/libLLVMARMInfo_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..30aef13226e527bb603de42b4952331654e0b665 Binary files /dev/null and b/mtklibs/libLLVMARMInfo_mali/arm/libLLVMARMInfo_mali.a differ diff --git a/mtklibs/libLLVMARMInfo_mali/libLLVMARMInfo_mali.a b/mtklibs/libLLVMARMInfo_mali/libLLVMARMInfo_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..aada2e36c061693c188f772f48d3c7b53bf29752 Binary files /dev/null and b/mtklibs/libLLVMARMInfo_mali/libLLVMARMInfo_mali.a differ diff --git a/mtklibs/libLLVMAnalysis_mali/Android.mk_ b/mtklibs/libLLVMAnalysis_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..0c60f59cde62bcb6b29997ed534191ecf7d2b1ee --- /dev/null +++ b/mtklibs/libLLVMAnalysis_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMAnalysis_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMAnalysis_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMAnalysis_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMAnalysis_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMAnalysis_mali/NOTICE b/mtklibs/libLLVMAnalysis_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMAnalysis_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMAnalysis_mali/README b/mtklibs/libLLVMAnalysis_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMAnalysis_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMAnalysis_mali/arm/libLLVMAnalysis_mali.a b/mtklibs/libLLVMAnalysis_mali/arm/libLLVMAnalysis_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..b5e13cb6b145e281be414481ad341b8546e0e8d5 Binary files /dev/null and b/mtklibs/libLLVMAnalysis_mali/arm/libLLVMAnalysis_mali.a differ diff --git a/mtklibs/libLLVMAnalysis_mali/libLLVMAnalysis_mali.a b/mtklibs/libLLVMAnalysis_mali/libLLVMAnalysis_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..4cfcb6dcb119761e4c59421eb5ffe23ceef90015 Binary files /dev/null and b/mtklibs/libLLVMAnalysis_mali/libLLVMAnalysis_mali.a differ diff --git a/mtklibs/libLLVMAsmParser_mali/Android.mk_ b/mtklibs/libLLVMAsmParser_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..1ddfc506f3805f409a723ffb2583809fd52773f8 --- /dev/null +++ b/mtklibs/libLLVMAsmParser_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMAsmParser_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMAsmParser_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMAsmParser_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMAsmParser_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMAsmParser_mali/NOTICE b/mtklibs/libLLVMAsmParser_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMAsmParser_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMAsmParser_mali/README b/mtklibs/libLLVMAsmParser_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMAsmParser_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMAsmParser_mali/arm/libLLVMAsmParser_mali.a b/mtklibs/libLLVMAsmParser_mali/arm/libLLVMAsmParser_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..f36daf7ca217267cdfd7dfd3853aea8a61485849 Binary files /dev/null and b/mtklibs/libLLVMAsmParser_mali/arm/libLLVMAsmParser_mali.a differ diff --git a/mtklibs/libLLVMAsmParser_mali/libLLVMAsmParser_mali.a b/mtklibs/libLLVMAsmParser_mali/libLLVMAsmParser_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..546ac253b8a1ffb30d001b94be1f00c984065263 Binary files /dev/null and b/mtklibs/libLLVMAsmParser_mali/libLLVMAsmParser_mali.a differ diff --git a/mtklibs/libLLVMAsmPrinter_mali/Android.mk_ b/mtklibs/libLLVMAsmPrinter_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..c206183890cd99878edc78a91432556ab84450d6 --- /dev/null +++ b/mtklibs/libLLVMAsmPrinter_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMAsmPrinter_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMAsmPrinter_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMAsmPrinter_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMAsmPrinter_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMAsmPrinter_mali/NOTICE b/mtklibs/libLLVMAsmPrinter_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMAsmPrinter_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMAsmPrinter_mali/README b/mtklibs/libLLVMAsmPrinter_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMAsmPrinter_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMAsmPrinter_mali/arm/libLLVMAsmPrinter_mali.a b/mtklibs/libLLVMAsmPrinter_mali/arm/libLLVMAsmPrinter_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..feb9d462644df74516903d70cfb5b001ebad9a49 Binary files /dev/null and b/mtklibs/libLLVMAsmPrinter_mali/arm/libLLVMAsmPrinter_mali.a differ diff --git a/mtklibs/libLLVMAsmPrinter_mali/libLLVMAsmPrinter_mali.a b/mtklibs/libLLVMAsmPrinter_mali/libLLVMAsmPrinter_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..6674fea2f57261465b5f04273eda2f2f1bce044b Binary files /dev/null and b/mtklibs/libLLVMAsmPrinter_mali/libLLVMAsmPrinter_mali.a differ diff --git a/mtklibs/libLLVMBitReader_mali/Android.mk_ b/mtklibs/libLLVMBitReader_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..0cecf1066452fe822b1ce317ec5c119f27f285e0 --- /dev/null +++ b/mtklibs/libLLVMBitReader_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMBitReader_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMBitReader_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMBitReader_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMBitReader_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMBitReader_mali/NOTICE b/mtklibs/libLLVMBitReader_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMBitReader_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMBitReader_mali/README b/mtklibs/libLLVMBitReader_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMBitReader_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMBitReader_mali/arm/libLLVMBitReader_mali.a b/mtklibs/libLLVMBitReader_mali/arm/libLLVMBitReader_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..f78eabb3a56cfcc1cf71a97eb4d28f7f95895c7d Binary files /dev/null and b/mtklibs/libLLVMBitReader_mali/arm/libLLVMBitReader_mali.a differ diff --git a/mtklibs/libLLVMBitReader_mali/libLLVMBitReader_mali.a b/mtklibs/libLLVMBitReader_mali/libLLVMBitReader_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..6c35ac88f00788bba02c017f80e5ef8e413ef111 Binary files /dev/null and b/mtklibs/libLLVMBitReader_mali/libLLVMBitReader_mali.a differ diff --git a/mtklibs/libLLVMBitWriter_mali/Android.mk_ b/mtklibs/libLLVMBitWriter_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..36cb7fc8b34cb1bf294fe0a5362041df11bcefde --- /dev/null +++ b/mtklibs/libLLVMBitWriter_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMBitWriter_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMBitWriter_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMBitWriter_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMBitWriter_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMBitWriter_mali/NOTICE b/mtklibs/libLLVMBitWriter_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMBitWriter_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMBitWriter_mali/README b/mtklibs/libLLVMBitWriter_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMBitWriter_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMBitWriter_mali/arm/libLLVMBitWriter_mali.a b/mtklibs/libLLVMBitWriter_mali/arm/libLLVMBitWriter_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..316006d1a76be2c6b00981e06d85664601577322 Binary files /dev/null and b/mtklibs/libLLVMBitWriter_mali/arm/libLLVMBitWriter_mali.a differ diff --git a/mtklibs/libLLVMBitWriter_mali/libLLVMBitWriter_mali.a b/mtklibs/libLLVMBitWriter_mali/libLLVMBitWriter_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..ed61eb99dd8e1a447cebc6967ee4cea50cf129ea Binary files /dev/null and b/mtklibs/libLLVMBitWriter_mali/libLLVMBitWriter_mali.a differ diff --git a/mtklibs/libLLVMCodeGen_mali/Android.mk_ b/mtklibs/libLLVMCodeGen_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..608daacb462495ce491658fb0125d3634c3b9251 --- /dev/null +++ b/mtklibs/libLLVMCodeGen_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMCodeGen_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMCodeGen_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMCodeGen_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMCodeGen_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMCodeGen_mali/NOTICE b/mtklibs/libLLVMCodeGen_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMCodeGen_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMCodeGen_mali/README b/mtklibs/libLLVMCodeGen_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMCodeGen_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMCodeGen_mali/arm/libLLVMCodeGen_mali.a b/mtklibs/libLLVMCodeGen_mali/arm/libLLVMCodeGen_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..d7039e1a6e038a69cb19ce80426c6297ed0312bc Binary files /dev/null and b/mtklibs/libLLVMCodeGen_mali/arm/libLLVMCodeGen_mali.a differ diff --git a/mtklibs/libLLVMCodeGen_mali/libLLVMCodeGen_mali.a b/mtklibs/libLLVMCodeGen_mali/libLLVMCodeGen_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..c82065e52ebe7e805675e35a6072e02157626a89 Binary files /dev/null and b/mtklibs/libLLVMCodeGen_mali/libLLVMCodeGen_mali.a differ diff --git a/mtklibs/libLLVMCore_mali/Android.mk_ b/mtklibs/libLLVMCore_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d20716af330f82785729347a1dc1114452f5b95c --- /dev/null +++ b/mtklibs/libLLVMCore_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMCore_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMCore_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMCore_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMCore_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMCore_mali/NOTICE b/mtklibs/libLLVMCore_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMCore_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMCore_mali/README b/mtklibs/libLLVMCore_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMCore_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMCore_mali/arm/libLLVMCore_mali.a b/mtklibs/libLLVMCore_mali/arm/libLLVMCore_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..ae00bf995f0ba42777a2070c1a47e3383d108c29 Binary files /dev/null and b/mtklibs/libLLVMCore_mali/arm/libLLVMCore_mali.a differ diff --git a/mtklibs/libLLVMCore_mali/libLLVMCore_mali.a b/mtklibs/libLLVMCore_mali/libLLVMCore_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..488ab91f2ddb1dfe64aefe18a1b8f059700c2ef4 Binary files /dev/null and b/mtklibs/libLLVMCore_mali/libLLVMCore_mali.a differ diff --git a/mtklibs/libLLVMDebugInfo_mali/Android.mk_ b/mtklibs/libLLVMDebugInfo_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..8f0c59e3f05c8e921d9c4e3ebeacecbfb31c5a18 --- /dev/null +++ b/mtklibs/libLLVMDebugInfo_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMDebugInfo_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMDebugInfo_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMDebugInfo_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMDebugInfo_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMDebugInfo_mali/NOTICE b/mtklibs/libLLVMDebugInfo_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMDebugInfo_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMDebugInfo_mali/README b/mtklibs/libLLVMDebugInfo_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMDebugInfo_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMDebugInfo_mali/arm/libLLVMDebugInfo_mali.a b/mtklibs/libLLVMDebugInfo_mali/arm/libLLVMDebugInfo_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..eb25eb0a45a57675729168cf14fba89de8129795 Binary files /dev/null and b/mtklibs/libLLVMDebugInfo_mali/arm/libLLVMDebugInfo_mali.a differ diff --git a/mtklibs/libLLVMDebugInfo_mali/libLLVMDebugInfo_mali.a b/mtklibs/libLLVMDebugInfo_mali/libLLVMDebugInfo_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..dc2b797ec98d24bae693d10c08faf2299b8bdb51 Binary files /dev/null and b/mtklibs/libLLVMDebugInfo_mali/libLLVMDebugInfo_mali.a differ diff --git a/mtklibs/libLLVMExecutionEngine_mali/Android.mk_ b/mtklibs/libLLVMExecutionEngine_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..2c98da467c882f8043bc757b5564ac2997c64f4d --- /dev/null +++ b/mtklibs/libLLVMExecutionEngine_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMExecutionEngine_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMExecutionEngine_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMExecutionEngine_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMExecutionEngine_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMExecutionEngine_mali/NOTICE b/mtklibs/libLLVMExecutionEngine_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMExecutionEngine_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMExecutionEngine_mali/README b/mtklibs/libLLVMExecutionEngine_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMExecutionEngine_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMExecutionEngine_mali/arm/libLLVMExecutionEngine_mali.a b/mtklibs/libLLVMExecutionEngine_mali/arm/libLLVMExecutionEngine_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..df195ac6b80f49c8166f5dd996ca973de0bbd46e Binary files /dev/null and b/mtklibs/libLLVMExecutionEngine_mali/arm/libLLVMExecutionEngine_mali.a differ diff --git a/mtklibs/libLLVMExecutionEngine_mali/libLLVMExecutionEngine_mali.a b/mtklibs/libLLVMExecutionEngine_mali/libLLVMExecutionEngine_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..13187ea69caf1aa262ede1ad97133a6e287f3911 Binary files /dev/null and b/mtklibs/libLLVMExecutionEngine_mali/libLLVMExecutionEngine_mali.a differ diff --git a/mtklibs/libLLVMIRReader_mali/Android.mk_ b/mtklibs/libLLVMIRReader_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..aa783388783228f8858ca7f6833434e35384792f --- /dev/null +++ b/mtklibs/libLLVMIRReader_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMIRReader_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMIRReader_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMIRReader_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMIRReader_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMIRReader_mali/NOTICE b/mtklibs/libLLVMIRReader_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMIRReader_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMIRReader_mali/README b/mtklibs/libLLVMIRReader_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMIRReader_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMIRReader_mali/arm/libLLVMIRReader_mali.a b/mtklibs/libLLVMIRReader_mali/arm/libLLVMIRReader_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..c3fa9aa37ddda8a47d46278301a27dcdb2601b08 Binary files /dev/null and b/mtklibs/libLLVMIRReader_mali/arm/libLLVMIRReader_mali.a differ diff --git a/mtklibs/libLLVMIRReader_mali/libLLVMIRReader_mali.a b/mtklibs/libLLVMIRReader_mali/libLLVMIRReader_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..6b52a8af006a95b8f7e6420453fad0ec2ab140f9 Binary files /dev/null and b/mtklibs/libLLVMIRReader_mali/libLLVMIRReader_mali.a differ diff --git a/mtklibs/libLLVMInstCombine_mali/Android.mk_ b/mtklibs/libLLVMInstCombine_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..fb0265436b342d75a4ad877039733e50acf94d65 --- /dev/null +++ b/mtklibs/libLLVMInstCombine_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMInstCombine_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMInstCombine_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMInstCombine_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMInstCombine_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMInstCombine_mali/NOTICE b/mtklibs/libLLVMInstCombine_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMInstCombine_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMInstCombine_mali/README b/mtklibs/libLLVMInstCombine_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMInstCombine_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMInstCombine_mali/arm/libLLVMInstCombine_mali.a b/mtklibs/libLLVMInstCombine_mali/arm/libLLVMInstCombine_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..c182f557eacd58f0bf0dbe81cadef4d0afc9fa31 Binary files /dev/null and b/mtklibs/libLLVMInstCombine_mali/arm/libLLVMInstCombine_mali.a differ diff --git a/mtklibs/libLLVMInstCombine_mali/libLLVMInstCombine_mali.a b/mtklibs/libLLVMInstCombine_mali/libLLVMInstCombine_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..679c3037fea0a87f12d1ac2b44ef1978b8cee80f Binary files /dev/null and b/mtklibs/libLLVMInstCombine_mali/libLLVMInstCombine_mali.a differ diff --git a/mtklibs/libLLVMInstrumentation_mali/Android.mk_ b/mtklibs/libLLVMInstrumentation_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..077c01e6efe65f3413de0bbee5cf9a2f2a0e82a5 --- /dev/null +++ b/mtklibs/libLLVMInstrumentation_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMInstrumentation_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMInstrumentation_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMInstrumentation_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMInstrumentation_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMInstrumentation_mali/NOTICE b/mtklibs/libLLVMInstrumentation_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMInstrumentation_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMInstrumentation_mali/README b/mtklibs/libLLVMInstrumentation_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMInstrumentation_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMInstrumentation_mali/arm/libLLVMInstrumentation_mali.a b/mtklibs/libLLVMInstrumentation_mali/arm/libLLVMInstrumentation_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..62104e656c94a26d21f54d2490db6a38a285e0cf Binary files /dev/null and b/mtklibs/libLLVMInstrumentation_mali/arm/libLLVMInstrumentation_mali.a differ diff --git a/mtklibs/libLLVMInstrumentation_mali/libLLVMInstrumentation_mali.a b/mtklibs/libLLVMInstrumentation_mali/libLLVMInstrumentation_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..549bcfed05d086ed80ac156d1828ce48a2481b2e Binary files /dev/null and b/mtklibs/libLLVMInstrumentation_mali/libLLVMInstrumentation_mali.a differ diff --git a/mtklibs/libLLVMInterpreter_mali/Android.mk_ b/mtklibs/libLLVMInterpreter_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..e00c6530ce4bcfc98572a7f7ad42d97d6e275b6b --- /dev/null +++ b/mtklibs/libLLVMInterpreter_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMInterpreter_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMInterpreter_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMInterpreter_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMInterpreter_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMInterpreter_mali/NOTICE b/mtklibs/libLLVMInterpreter_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMInterpreter_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMInterpreter_mali/README b/mtklibs/libLLVMInterpreter_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMInterpreter_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMInterpreter_mali/arm/libLLVMInterpreter_mali.a b/mtklibs/libLLVMInterpreter_mali/arm/libLLVMInterpreter_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..3078e7e55d9f3207b8bb87ee321d53e639cd6e57 Binary files /dev/null and b/mtklibs/libLLVMInterpreter_mali/arm/libLLVMInterpreter_mali.a differ diff --git a/mtklibs/libLLVMInterpreter_mali/libLLVMInterpreter_mali.a b/mtklibs/libLLVMInterpreter_mali/libLLVMInterpreter_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..e12e17e438f84f01bff832c99d628ea835285ed7 Binary files /dev/null and b/mtklibs/libLLVMInterpreter_mali/libLLVMInterpreter_mali.a differ diff --git a/mtklibs/libLLVMJIT_mali/Android.mk_ b/mtklibs/libLLVMJIT_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..b94e6e162b36ae5a94b9603456bd87088816836d --- /dev/null +++ b/mtklibs/libLLVMJIT_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMJIT_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMJIT_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMJIT_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMJIT_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMJIT_mali/NOTICE b/mtklibs/libLLVMJIT_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMJIT_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMJIT_mali/README b/mtklibs/libLLVMJIT_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMJIT_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMJIT_mali/arm/libLLVMJIT_mali.a b/mtklibs/libLLVMJIT_mali/arm/libLLVMJIT_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..a6517118ce4026911ce674f0781b27e1fcbfc9bf Binary files /dev/null and b/mtklibs/libLLVMJIT_mali/arm/libLLVMJIT_mali.a differ diff --git a/mtklibs/libLLVMJIT_mali/libLLVMJIT_mali.a b/mtklibs/libLLVMJIT_mali/libLLVMJIT_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..4aee79b56d2215641a19a545be4b67539686161b Binary files /dev/null and b/mtklibs/libLLVMJIT_mali/libLLVMJIT_mali.a differ diff --git a/mtklibs/libLLVMLinker_mali/Android.mk_ b/mtklibs/libLLVMLinker_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..48179c85a08e39206e4025baa5f649d760095fb8 --- /dev/null +++ b/mtklibs/libLLVMLinker_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMLinker_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMLinker_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMLinker_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMLinker_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMLinker_mali/NOTICE b/mtklibs/libLLVMLinker_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMLinker_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMLinker_mali/README b/mtklibs/libLLVMLinker_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMLinker_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMLinker_mali/arm/libLLVMLinker_mali.a b/mtklibs/libLLVMLinker_mali/arm/libLLVMLinker_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..07fb882d2031e462f0158c94de4dbad5568470a1 Binary files /dev/null and b/mtklibs/libLLVMLinker_mali/arm/libLLVMLinker_mali.a differ diff --git a/mtklibs/libLLVMLinker_mali/libLLVMLinker_mali.a b/mtklibs/libLLVMLinker_mali/libLLVMLinker_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..0922a9eda43017efc4ac7abb4a6a84c5c26ff9ce Binary files /dev/null and b/mtklibs/libLLVMLinker_mali/libLLVMLinker_mali.a differ diff --git a/mtklibs/libLLVMMCDisassembler_mali/Android.mk_ b/mtklibs/libLLVMMCDisassembler_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..bbd92191995b5f1e59a007bad999f09a0f73a2c7 --- /dev/null +++ b/mtklibs/libLLVMMCDisassembler_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMMCDisassembler_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMMCDisassembler_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMMCDisassembler_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMMCDisassembler_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMMCDisassembler_mali/NOTICE b/mtklibs/libLLVMMCDisassembler_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMMCDisassembler_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMMCDisassembler_mali/README b/mtklibs/libLLVMMCDisassembler_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMMCDisassembler_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMMCDisassembler_mali/arm/libLLVMMCDisassembler_mali.a b/mtklibs/libLLVMMCDisassembler_mali/arm/libLLVMMCDisassembler_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..4b453720f1ffbf4df68c197d85b8590e7de05905 Binary files /dev/null and b/mtklibs/libLLVMMCDisassembler_mali/arm/libLLVMMCDisassembler_mali.a differ diff --git a/mtklibs/libLLVMMCDisassembler_mali/libLLVMMCDisassembler_mali.a b/mtklibs/libLLVMMCDisassembler_mali/libLLVMMCDisassembler_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..297fa5c6d722a9e8462d7686cd471fd025518558 Binary files /dev/null and b/mtklibs/libLLVMMCDisassembler_mali/libLLVMMCDisassembler_mali.a differ diff --git a/mtklibs/libLLVMMCJIT_mali/Android.mk_ b/mtklibs/libLLVMMCJIT_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..45279e0eba58ec54439f36c2e013cef6ca72f068 --- /dev/null +++ b/mtklibs/libLLVMMCJIT_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMMCJIT_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMMCJIT_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMMCJIT_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMMCJIT_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMMCJIT_mali/NOTICE b/mtklibs/libLLVMMCJIT_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMMCJIT_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMMCJIT_mali/README b/mtklibs/libLLVMMCJIT_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMMCJIT_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMMCJIT_mali/arm/libLLVMMCJIT_mali.a b/mtklibs/libLLVMMCJIT_mali/arm/libLLVMMCJIT_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..7c22c7d926a370c5634bc80f90f2cbb2724076a5 Binary files /dev/null and b/mtklibs/libLLVMMCJIT_mali/arm/libLLVMMCJIT_mali.a differ diff --git a/mtklibs/libLLVMMCJIT_mali/libLLVMMCJIT_mali.a b/mtklibs/libLLVMMCJIT_mali/libLLVMMCJIT_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..8b8ee4fa83f119a02465d7e13115fae2cdffde82 Binary files /dev/null and b/mtklibs/libLLVMMCJIT_mali/libLLVMMCJIT_mali.a differ diff --git a/mtklibs/libLLVMMCParser_mali/Android.mk_ b/mtklibs/libLLVMMCParser_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..9288858a6a05777dbb8ce9368b85ab8e4ac2a13d --- /dev/null +++ b/mtklibs/libLLVMMCParser_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMMCParser_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMMCParser_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMMCParser_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMMCParser_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMMCParser_mali/NOTICE b/mtklibs/libLLVMMCParser_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMMCParser_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMMCParser_mali/README b/mtklibs/libLLVMMCParser_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMMCParser_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMMCParser_mali/arm/libLLVMMCParser_mali.a b/mtklibs/libLLVMMCParser_mali/arm/libLLVMMCParser_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..9a8b58e927120b0ffab6a85c1135dc880a615a89 Binary files /dev/null and b/mtklibs/libLLVMMCParser_mali/arm/libLLVMMCParser_mali.a differ diff --git a/mtklibs/libLLVMMCParser_mali/libLLVMMCParser_mali.a b/mtklibs/libLLVMMCParser_mali/libLLVMMCParser_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..6b8d3285801fdd026591ab4a8cbd90c8af5a717b Binary files /dev/null and b/mtklibs/libLLVMMCParser_mali/libLLVMMCParser_mali.a differ diff --git a/mtklibs/libLLVMMC_mali/Android.mk_ b/mtklibs/libLLVMMC_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..50a224ccb243ad2b7ab822ea7ae8aad4bf9742d9 --- /dev/null +++ b/mtklibs/libLLVMMC_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMMC_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMMC_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMMC_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMMC_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMMC_mali/NOTICE b/mtklibs/libLLVMMC_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMMC_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMMC_mali/README b/mtklibs/libLLVMMC_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMMC_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMMC_mali/arm/libLLVMMC_mali.a b/mtklibs/libLLVMMC_mali/arm/libLLVMMC_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..b797701f1217ac6b8a1e91056fb51c10753ca859 Binary files /dev/null and b/mtklibs/libLLVMMC_mali/arm/libLLVMMC_mali.a differ diff --git a/mtklibs/libLLVMMC_mali/libLLVMMC_mali.a b/mtklibs/libLLVMMC_mali/libLLVMMC_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..0e4b839af01d9458de275b49009f7d6224e3a48a Binary files /dev/null and b/mtklibs/libLLVMMC_mali/libLLVMMC_mali.a differ diff --git a/mtklibs/libLLVMObject_mali/Android.mk_ b/mtklibs/libLLVMObject_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..c0a315dacc0bc639b9f3362d7a427d006633d261 --- /dev/null +++ b/mtklibs/libLLVMObject_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMObject_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMObject_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMObject_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMObject_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMObject_mali/NOTICE b/mtklibs/libLLVMObject_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMObject_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMObject_mali/README b/mtklibs/libLLVMObject_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMObject_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMObject_mali/arm/libLLVMObject_mali.a b/mtklibs/libLLVMObject_mali/arm/libLLVMObject_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..c8cd20eb92fca5c1492de47fe0ad19b050e951c7 Binary files /dev/null and b/mtklibs/libLLVMObject_mali/arm/libLLVMObject_mali.a differ diff --git a/mtklibs/libLLVMObject_mali/libLLVMObject_mali.a b/mtklibs/libLLVMObject_mali/libLLVMObject_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..0445b747235130eba7b53d32b1d49e97d54000f6 Binary files /dev/null and b/mtklibs/libLLVMObject_mali/libLLVMObject_mali.a differ diff --git a/mtklibs/libLLVMProfileData_mali/Android.mk_ b/mtklibs/libLLVMProfileData_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d550a5711355a1d2a99e0fcedeee09a6caf083cc --- /dev/null +++ b/mtklibs/libLLVMProfileData_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMProfileData_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMProfileData_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMProfileData_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMProfileData_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMProfileData_mali/arm/libLLVMProfileData_mali.a b/mtklibs/libLLVMProfileData_mali/arm/libLLVMProfileData_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..46989703ca41853610c9e60763d49008d7c36454 Binary files /dev/null and b/mtklibs/libLLVMProfileData_mali/arm/libLLVMProfileData_mali.a differ diff --git a/mtklibs/libLLVMProfileData_mali/libLLVMProfileData_mali.a b/mtklibs/libLLVMProfileData_mali/libLLVMProfileData_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..d4b76ad62984ac94eb5e423c91eec32c12fdc8be Binary files /dev/null and b/mtklibs/libLLVMProfileData_mali/libLLVMProfileData_mali.a differ diff --git a/mtklibs/libLLVMRuntimeDyld_mali/Android.mk_ b/mtklibs/libLLVMRuntimeDyld_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..0c59efcf37757102e15f84c88f15096c85232162 --- /dev/null +++ b/mtklibs/libLLVMRuntimeDyld_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMRuntimeDyld_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMRuntimeDyld_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMRuntimeDyld_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMRuntimeDyld_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMRuntimeDyld_mali/NOTICE b/mtklibs/libLLVMRuntimeDyld_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMRuntimeDyld_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMRuntimeDyld_mali/README b/mtklibs/libLLVMRuntimeDyld_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMRuntimeDyld_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMRuntimeDyld_mali/arm/libLLVMRuntimeDyld_mali.a b/mtklibs/libLLVMRuntimeDyld_mali/arm/libLLVMRuntimeDyld_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..11a491d223b8090946f445271397e380379e0ce6 Binary files /dev/null and b/mtklibs/libLLVMRuntimeDyld_mali/arm/libLLVMRuntimeDyld_mali.a differ diff --git a/mtklibs/libLLVMRuntimeDyld_mali/libLLVMRuntimeDyld_mali.a b/mtklibs/libLLVMRuntimeDyld_mali/libLLVMRuntimeDyld_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..e9d1f38219072e7696a423f00ccdd1d12ec0cb24 Binary files /dev/null and b/mtklibs/libLLVMRuntimeDyld_mali/libLLVMRuntimeDyld_mali.a differ diff --git a/mtklibs/libLLVMScalarOpts_mali/Android.mk_ b/mtklibs/libLLVMScalarOpts_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..522ce0414d73f81a3a779a40747f862a78c22402 --- /dev/null +++ b/mtklibs/libLLVMScalarOpts_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMScalarOpts_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMScalarOpts_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMScalarOpts_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMScalarOpts_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMScalarOpts_mali/NOTICE b/mtklibs/libLLVMScalarOpts_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMScalarOpts_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMScalarOpts_mali/README b/mtklibs/libLLVMScalarOpts_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMScalarOpts_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMScalarOpts_mali/arm/libLLVMScalarOpts_mali.a b/mtklibs/libLLVMScalarOpts_mali/arm/libLLVMScalarOpts_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..6c59607aed8a887914f82e8e2098768c86504df8 Binary files /dev/null and b/mtklibs/libLLVMScalarOpts_mali/arm/libLLVMScalarOpts_mali.a differ diff --git a/mtklibs/libLLVMScalarOpts_mali/libLLVMScalarOpts_mali.a b/mtklibs/libLLVMScalarOpts_mali/libLLVMScalarOpts_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..e5c7b3b45e2671aa3987de15f4b03af878746d8b Binary files /dev/null and b/mtklibs/libLLVMScalarOpts_mali/libLLVMScalarOpts_mali.a differ diff --git a/mtklibs/libLLVMSelectionDAG_mali/Android.mk_ b/mtklibs/libLLVMSelectionDAG_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..e711c4332900732ede16bc9ac1921e1cbeb95547 --- /dev/null +++ b/mtklibs/libLLVMSelectionDAG_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMSelectionDAG_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMSelectionDAG_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMSelectionDAG_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMSelectionDAG_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMSelectionDAG_mali/NOTICE b/mtklibs/libLLVMSelectionDAG_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMSelectionDAG_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMSelectionDAG_mali/README b/mtklibs/libLLVMSelectionDAG_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMSelectionDAG_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMSelectionDAG_mali/arm/libLLVMSelectionDAG_mali.a b/mtklibs/libLLVMSelectionDAG_mali/arm/libLLVMSelectionDAG_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..a124cfc2861d74b8de0afe639b22b50185405471 Binary files /dev/null and b/mtklibs/libLLVMSelectionDAG_mali/arm/libLLVMSelectionDAG_mali.a differ diff --git a/mtklibs/libLLVMSelectionDAG_mali/libLLVMSelectionDAG_mali.a b/mtklibs/libLLVMSelectionDAG_mali/libLLVMSelectionDAG_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..6a2b0519e1094911a097c84a543b7f6de5395917 Binary files /dev/null and b/mtklibs/libLLVMSelectionDAG_mali/libLLVMSelectionDAG_mali.a differ diff --git a/mtklibs/libLLVMSupport_mali/Android.mk_ b/mtklibs/libLLVMSupport_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..6e2690f577ee5ce35032368368b345ed7b8ab2dd --- /dev/null +++ b/mtklibs/libLLVMSupport_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMSupport_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMSupport_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMSupport_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMSupport_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMSupport_mali/NOTICE b/mtklibs/libLLVMSupport_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..d40c9ba2f257acbaebc4a16e7cc332c13919652c --- /dev/null +++ b/mtklibs/libLLVMSupport_mali/NOTICE @@ -0,0 +1,43 @@ +$OpenBSD: COPYRIGHT,v 1.3 2003/06/02 20:18:36 millert Exp $: +Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved.: + * Copyright (c) 1994: + * @(#)COPYRIGHT 8.1 (Berkeley) 3/16/94: + * Copyright 2001-2004 Unicode, Inc.: + * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the: + * Copyright (c) 1992, 1993, 1994 Henry Spencer.: + * Copyright (c) 1992, 1993, 1994: + * Copyright (c) 1992 Henry Spencer.: + * Copyright (c) 1992, 1993: + * Copyright (c) 1998 Todd C. Miller : + + + +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMSupport_mali/README b/mtklibs/libLLVMSupport_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMSupport_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMSupport_mali/arm/libLLVMSupport_mali.a b/mtklibs/libLLVMSupport_mali/arm/libLLVMSupport_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..09146d3d1920eac2b452b520fe226a8ea7cdc422 Binary files /dev/null and b/mtklibs/libLLVMSupport_mali/arm/libLLVMSupport_mali.a differ diff --git a/mtklibs/libLLVMSupport_mali/libLLVMSupport_mali.a b/mtklibs/libLLVMSupport_mali/libLLVMSupport_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..04656579869b77df3b6afdeb16dc61f3004588d3 Binary files /dev/null and b/mtklibs/libLLVMSupport_mali/libLLVMSupport_mali.a differ diff --git a/mtklibs/libLLVMTableGen_mali/Android.mk_ b/mtklibs/libLLVMTableGen_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..106d358e1e9795235ed23149b2f920892c1d5095 --- /dev/null +++ b/mtklibs/libLLVMTableGen_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMTableGen_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMTableGen_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMTableGen_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMTableGen_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMTableGen_mali/NOTICE b/mtklibs/libLLVMTableGen_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMTableGen_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMTableGen_mali/README b/mtklibs/libLLVMTableGen_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMTableGen_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMTableGen_mali/arm/libLLVMTableGen_mali.a b/mtklibs/libLLVMTableGen_mali/arm/libLLVMTableGen_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..486035d41efdf645d35b68e746d891d1a5b85424 Binary files /dev/null and b/mtklibs/libLLVMTableGen_mali/arm/libLLVMTableGen_mali.a differ diff --git a/mtklibs/libLLVMTableGen_mali/libLLVMTableGen_mali.a b/mtklibs/libLLVMTableGen_mali/libLLVMTableGen_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..89edcab44bf4e03594351d0b8a5cd1a42dae31ac Binary files /dev/null and b/mtklibs/libLLVMTableGen_mali/libLLVMTableGen_mali.a differ diff --git a/mtklibs/libLLVMTarget_mali/Android.mk_ b/mtklibs/libLLVMTarget_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..1f787926381755b8fc473028421e5d050f1baa39 --- /dev/null +++ b/mtklibs/libLLVMTarget_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMTarget_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMTarget_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMTarget_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMTarget_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMTarget_mali/NOTICE b/mtklibs/libLLVMTarget_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMTarget_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMTarget_mali/README b/mtklibs/libLLVMTarget_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMTarget_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMTarget_mali/arm/libLLVMTarget_mali.a b/mtklibs/libLLVMTarget_mali/arm/libLLVMTarget_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..d945ef59bb6c9e87e8f97e3495aba2a20485b5b4 Binary files /dev/null and b/mtklibs/libLLVMTarget_mali/arm/libLLVMTarget_mali.a differ diff --git a/mtklibs/libLLVMTarget_mali/libLLVMTarget_mali.a b/mtklibs/libLLVMTarget_mali/libLLVMTarget_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..9c211969f7d39d7d3e1cf4e7436b00967b502b03 Binary files /dev/null and b/mtklibs/libLLVMTarget_mali/libLLVMTarget_mali.a differ diff --git a/mtklibs/libLLVMTransformUtils_mali/Android.mk_ b/mtklibs/libLLVMTransformUtils_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..94884fb9399cdf1ed494dde5b4e2bda80af8c1a1 --- /dev/null +++ b/mtklibs/libLLVMTransformUtils_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMTransformUtils_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMTransformUtils_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMTransformUtils_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMTransformUtils_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMTransformUtils_mali/NOTICE b/mtklibs/libLLVMTransformUtils_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMTransformUtils_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMTransformUtils_mali/README b/mtklibs/libLLVMTransformUtils_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMTransformUtils_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMTransformUtils_mali/arm/libLLVMTransformUtils_mali.a b/mtklibs/libLLVMTransformUtils_mali/arm/libLLVMTransformUtils_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..6c38ca8adc6cc5214573e5afe26ce42c539c297b Binary files /dev/null and b/mtklibs/libLLVMTransformUtils_mali/arm/libLLVMTransformUtils_mali.a differ diff --git a/mtklibs/libLLVMTransformUtils_mali/libLLVMTransformUtils_mali.a b/mtklibs/libLLVMTransformUtils_mali/libLLVMTransformUtils_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..528a17f6082591fed56d14d9d46832d6e2ec6ae1 Binary files /dev/null and b/mtklibs/libLLVMTransformUtils_mali/libLLVMTransformUtils_mali.a differ diff --git a/mtklibs/libLLVMVectorize_mali/Android.mk_ b/mtklibs/libLLVMVectorize_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..7a3d3e3859e39d6d1dfea73cbbccbf9447e4b75a --- /dev/null +++ b/mtklibs/libLLVMVectorize_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMVectorize_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMVectorize_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMVectorize_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMVectorize_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMVectorize_mali/NOTICE b/mtklibs/libLLVMVectorize_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMVectorize_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMVectorize_mali/README b/mtklibs/libLLVMVectorize_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMVectorize_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMVectorize_mali/arm/libLLVMVectorize_mali.a b/mtklibs/libLLVMVectorize_mali/arm/libLLVMVectorize_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..6b42c99918c84d88a1551162be8713b1a4def9fc Binary files /dev/null and b/mtklibs/libLLVMVectorize_mali/arm/libLLVMVectorize_mali.a differ diff --git a/mtklibs/libLLVMVectorize_mali/libLLVMVectorize_mali.a b/mtklibs/libLLVMVectorize_mali/libLLVMVectorize_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..a44ccdd28cd4087f64095f1637b2eb8a31044283 Binary files /dev/null and b/mtklibs/libLLVMVectorize_mali/libLLVMVectorize_mali.a differ diff --git a/mtklibs/libLLVMipa_mali/Android.mk_ b/mtklibs/libLLVMipa_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d2cf5738f85bbf92e5ce4d36fe8559c502127399 --- /dev/null +++ b/mtklibs/libLLVMipa_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMipa_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMipa_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMipa_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMipa_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMipa_mali/NOTICE b/mtklibs/libLLVMipa_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMipa_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMipa_mali/README b/mtklibs/libLLVMipa_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMipa_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMipa_mali/arm/libLLVMipa_mali.a b/mtklibs/libLLVMipa_mali/arm/libLLVMipa_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..10ed1108d4618b2cdb9e052d561d8e3053c03c01 Binary files /dev/null and b/mtklibs/libLLVMipa_mali/arm/libLLVMipa_mali.a differ diff --git a/mtklibs/libLLVMipa_mali/libLLVMipa_mali.a b/mtklibs/libLLVMipa_mali/libLLVMipa_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..1aa9bebd722d2b1e2ed83bd7ba195c544a257721 Binary files /dev/null and b/mtklibs/libLLVMipa_mali/libLLVMipa_mali.a differ diff --git a/mtklibs/libLLVMipo_mali/Android.mk_ b/mtklibs/libLLVMipo_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..ccfec84b88913fb182f7ba2632d4f7d075c30154 --- /dev/null +++ b/mtklibs/libLLVMipo_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMipo_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libLLVMipo_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libLLVMipo_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libLLVMipo_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libLLVMipo_mali/NOTICE b/mtklibs/libLLVMipo_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libLLVMipo_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libLLVMipo_mali/README b/mtklibs/libLLVMipo_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libLLVMipo_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libLLVMipo_mali/arm/libLLVMipo_mali.a b/mtklibs/libLLVMipo_mali/arm/libLLVMipo_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..b0d545564ca7ed76a9a55def436fc02b68cc33de Binary files /dev/null and b/mtklibs/libLLVMipo_mali/arm/libLLVMipo_mali.a differ diff --git a/mtklibs/libLLVMipo_mali/libLLVMipo_mali.a b/mtklibs/libLLVMipo_mali/libLLVMipo_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..6b826d0099a0fe4f908dc468b9738ded965631ff Binary files /dev/null and b/mtklibs/libLLVMipo_mali/libLLVMipo_mali.a differ diff --git a/mtklibs/libMemc/Android.mk_ b/mtklibs/libMemc/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a90873d1a13a891d232d8c73d48373989dcb4a5f --- /dev/null +++ b/mtklibs/libMemc/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMemc +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libMemc.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMemc +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMemc.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMemc/README b/mtklibs/libMemc/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libMemc/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libMemc/arm/libMemc.a b/mtklibs/libMemc/arm/libMemc.a new file mode 100755 index 0000000000000000000000000000000000000000..676b176bf3eee0383a550cf939c727c90bb2644b Binary files /dev/null and b/mtklibs/libMemc/arm/libMemc.a differ diff --git a/mtklibs/libMemc/libMemc.a b/mtklibs/libMemc/libMemc.a new file mode 100755 index 0000000000000000000000000000000000000000..75ae38c0aca99bbd85fb0b8e892e61894901af8f Binary files /dev/null and b/mtklibs/libMemc/libMemc.a differ diff --git a/mtklibs/libMtkOmxAdpcmDec/Android.mk_ b/mtklibs/libMtkOmxAdpcmDec/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..e6371bd7df69bc6b28d842493771d77b2f11505c --- /dev/null +++ b/mtklibs/libMtkOmxAdpcmDec/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxAdpcmDec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libui libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxAdpcmDec.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxAdpcmDec/NOTICE b/mtklibs/libMtkOmxAdpcmDec/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libMtkOmxAdpcmDec/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxAdpcmDec/README b/mtklibs/libMtkOmxAdpcmDec/README new file mode 100755 index 0000000000000000000000000000000000000000..f5de717c81f21a6cdf04c8bd44ae24c3d1bbbc58 --- /dev/null +++ b/mtklibs/libMtkOmxAdpcmDec/README @@ -0,0 +1,33 @@ +Library of MTK Adpcm decode omx component. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxAdpcmDec contains MediaTek developed Adpcm decode omx component. +Without it, Adpcm will not decode. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1.libutils +2.libcutils +3.libdl +4.libui +5.libbinder + +and the following libs from MediaTek: +1.libMtkOmxOsalUtils.a +2.libMtkOmxAudioDecBase.a +3.libadpcmdec_mtk.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxAdpcmDec' folder. + +HOW TO USE IT? +============== + +use openmax api. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxAdpcmDec/arm/libMtkOmxAdpcmDec.so b/mtklibs/libMtkOmxAdpcmDec/arm/libMtkOmxAdpcmDec.so new file mode 100755 index 0000000000000000000000000000000000000000..cc0fc95254dc5690ba2ffc1f2d9181b160b771b8 Binary files /dev/null and b/mtklibs/libMtkOmxAdpcmDec/arm/libMtkOmxAdpcmDec.so differ diff --git a/mtklibs/libMtkOmxAdpcmEnc/Android.mk_ b/mtklibs/libMtkOmxAdpcmEnc/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..53abdbc881f0d71ae3c311dd3270330746fc8586 --- /dev/null +++ b/mtklibs/libMtkOmxAdpcmEnc/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxAdpcmEnc +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libui libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxAdpcmEnc.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxAdpcmEnc/NOTICE b/mtklibs/libMtkOmxAdpcmEnc/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libMtkOmxAdpcmEnc/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxAdpcmEnc/README b/mtklibs/libMtkOmxAdpcmEnc/README new file mode 100755 index 0000000000000000000000000000000000000000..df5e2dd659904ca1768adb5ed94ede10f85bd29b --- /dev/null +++ b/mtklibs/libMtkOmxAdpcmEnc/README @@ -0,0 +1,33 @@ +Library of MTK Adpcm encode omx component. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxAdpcmEnc contains MediaTek developed Adpcm encode omx component. +Without it, Adpcm will not encode. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1.libutils +2.libcutils +3.libdl +4.libui +5.libbinder + +and the following libs from MediaTek: +1.libMtkOmxOsalUtils.a +2.libMtkOmxAudioEncBase.a +3.libadpcmenc_mtk.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxAdpcmEnc' folder. + +HOW TO USE IT? +============== + +use openmax api. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxAdpcmEnc/arm/libMtkOmxAdpcmEnc.so b/mtklibs/libMtkOmxAdpcmEnc/arm/libMtkOmxAdpcmEnc.so new file mode 100755 index 0000000000000000000000000000000000000000..7c3ed78e5931038940c621db3df3a9498bed1570 Binary files /dev/null and b/mtklibs/libMtkOmxAdpcmEnc/arm/libMtkOmxAdpcmEnc.so differ diff --git a/mtklibs/libMtkOmxAlacDec/Android.mk_ b/mtklibs/libMtkOmxAlacDec/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..f22e9b2eadbf7eaf23d06ca3d583a97611ad88e6 --- /dev/null +++ b/mtklibs/libMtkOmxAlacDec/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxAlacDec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libui libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxAlacDec.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxAlacDec/NOTICE b/mtklibs/libMtkOmxAlacDec/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libMtkOmxAlacDec/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxAlacDec/README b/mtklibs/libMtkOmxAlacDec/README new file mode 100755 index 0000000000000000000000000000000000000000..d42f9e91a0fb24f255181e5d7a85cf90fb45c4c3 --- /dev/null +++ b/mtklibs/libMtkOmxAlacDec/README @@ -0,0 +1,33 @@ +Library of MTK Alac decode omx component. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxAlacDec contains MediaTek developed Alac decode omx component. +Without it, Alac will not decode. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1.libutils +2.libcutils +3.libdl +4.libui +5.libbinder + +and the following libs from MediaTek: +1.libMtkOmxOsalUtils.a +2.libMtkOmxAudioDecBase.a +3.libalacdec_mtk.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxAlacDec' folder. + +HOW TO USE IT? +============== + +use openmax api. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxAlacDec/arm/libMtkOmxAlacDec.so b/mtklibs/libMtkOmxAlacDec/arm/libMtkOmxAlacDec.so new file mode 100755 index 0000000000000000000000000000000000000000..8b1bb8004b6361b3657a62b14450eb9045f572be Binary files /dev/null and b/mtklibs/libMtkOmxAlacDec/arm/libMtkOmxAlacDec.so differ diff --git a/mtklibs/libMtkOmxApeDec/Android.mk_ b/mtklibs/libMtkOmxApeDec/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..89ae35013e1f8df68a863561b93782150c56f005 --- /dev/null +++ b/mtklibs/libMtkOmxApeDec/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxApeDec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libui libstagefright_omx libstagefright_foundation libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxApeDec.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxApeDec/README b/mtklibs/libMtkOmxApeDec/README new file mode 100755 index 0000000000000000000000000000000000000000..2bd167998ea9170d6646b3c8afea6ebeb8ff7961 --- /dev/null +++ b/mtklibs/libMtkOmxApeDec/README @@ -0,0 +1,35 @@ +Library of MTK MtkOmxApeDec, including ape omx component related file. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxApeDec.so contains MediaTek developed ape omx component. +Without it, ape will not decode. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1.libbinder +2.libutils +3.libcutils +4.libdl +5.libui +6.libstagefright_omx +7.libstagefright_foundation + +and the following libs from MediaTek: +1.libMtkOmxAudioEncBase.a +2.libMtkOmxOsalUtils.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxApeDec' folder. + +HOW TO USE IT? +============== + +Provide ape omx componenet for ape swip + + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxApeDec/arm/libMtkOmxApeDec.so b/mtklibs/libMtkOmxApeDec/arm/libMtkOmxApeDec.so new file mode 100755 index 0000000000000000000000000000000000000000..facfc68f1df68effc4d12db8e1f7b6e12cd14f93 Binary files /dev/null and b/mtklibs/libMtkOmxApeDec/arm/libMtkOmxApeDec.so differ diff --git a/mtklibs/libMtkOmxAudUtil/Android.mk_ b/mtklibs/libMtkOmxAudUtil/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..ceaa6c01d0bfaee534f23adc8b2fb7bf07a300fe --- /dev/null +++ b/mtklibs/libMtkOmxAudUtil/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxAudUtil +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxAudUtil.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxAudUtil/NOTICE b/mtklibs/libMtkOmxAudUtil/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libMtkOmxAudUtil/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxAudUtil/README b/mtklibs/libMtkOmxAudUtil/README new file mode 100755 index 0000000000000000000000000000000000000000..972c8e6fb808355f5c04ad6576687275c8950823 --- /dev/null +++ b/mtklibs/libMtkOmxAudUtil/README @@ -0,0 +1,28 @@ +Library of MTK audio component feature. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxAudUtil.a contains MediaTek developed audio component feature. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libbinder.so +2. libcutils.so +3. libcutils.so +4. libdl.so +5. libui.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +Provide api for audio component feature. +all api interface are at (vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxAudUtil) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxAudUtil/arm/libMtkOmxAudUtil.a b/mtklibs/libMtkOmxAudUtil/arm/libMtkOmxAudUtil.a new file mode 100755 index 0000000000000000000000000000000000000000..b88d87541db17ad541b12cb4cf326670ec7b27bd Binary files /dev/null and b/mtklibs/libMtkOmxAudUtil/arm/libMtkOmxAudUtil.a differ diff --git a/mtklibs/libMtkOmxAudioDecBase/Android.mk_ b/mtklibs/libMtkOmxAudioDecBase/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..46c38f9ce01bb1c28df5b1489e1153daeced9d33 --- /dev/null +++ b/mtklibs/libMtkOmxAudioDecBase/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxAudioDecBase +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxAudioDecBase.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxAudioDecBase/NOTICE b/mtklibs/libMtkOmxAudioDecBase/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libMtkOmxAudioDecBase/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxAudioDecBase/README b/mtklibs/libMtkOmxAudioDecBase/README new file mode 100755 index 0000000000000000000000000000000000000000..ce7289cbc99c8e1c2c8d766af5b60d0ac36f162a --- /dev/null +++ b/mtklibs/libMtkOmxAudioDecBase/README @@ -0,0 +1,32 @@ +Library of MTK MtkOmxAudioDecBase, including audio omx component related file. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxAudioDecBase.a contains MediaTek developed audio omx component base class. +Without it, all audio format will not decode. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1.libutils +2.libcutils +3.libdl +4.libui + + +and the following libs from MediaTek: +1.libMtkOmxOsalUtils.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxAudioDecBase' folder. + +HOW TO USE IT? +============== + +Provide audio omx component base class for all audio component + + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxAudioDecBase/arm/libMtkOmxAudioDecBase.a b/mtklibs/libMtkOmxAudioDecBase/arm/libMtkOmxAudioDecBase.a new file mode 100755 index 0000000000000000000000000000000000000000..cfe5dbbd90cbaf08e4846c3cc652e92b28270b91 Binary files /dev/null and b/mtklibs/libMtkOmxAudioDecBase/arm/libMtkOmxAudioDecBase.a differ diff --git a/mtklibs/libMtkOmxAudioEncBase/Android.mk_ b/mtklibs/libMtkOmxAudioEncBase/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..415a2adab585d9db1bba68a3c67b6e7846be2e7a --- /dev/null +++ b/mtklibs/libMtkOmxAudioEncBase/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxAudioEncBase +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxAudioEncBase.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxAudioEncBase/NOTICE b/mtklibs/libMtkOmxAudioEncBase/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libMtkOmxAudioEncBase/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxAudioEncBase/README b/mtklibs/libMtkOmxAudioEncBase/README new file mode 100755 index 0000000000000000000000000000000000000000..9269800142971b451b1b92f05ee9f9a5dadb9562 --- /dev/null +++ b/mtklibs/libMtkOmxAudioEncBase/README @@ -0,0 +1,32 @@ +Library of MTK MtkOmxAudioEncBase, including audio omx component related file. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxAudioEncBase.a contains MediaTek developed audio omx component base class. +Without it, all audio format will not encode. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1.libutils +2.libcutils +3.libdl +4.libui + + +and the following libs from MediaTek: +1.libMtkOmxOsalUtils.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxAudioEncBase' folder. + +HOW TO USE IT? +============== + +Provide audio omx component base class for all audio component + + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxAudioEncBase/arm/libMtkOmxAudioEncBase.a b/mtklibs/libMtkOmxAudioEncBase/arm/libMtkOmxAudioEncBase.a new file mode 100755 index 0000000000000000000000000000000000000000..f5509fed57374f3b7bf360b9f4b1af6370a4e90f Binary files /dev/null and b/mtklibs/libMtkOmxAudioEncBase/arm/libMtkOmxAudioEncBase.a differ diff --git a/mtklibs/libMtkOmxFlacDec/Android.mk_ b/mtklibs/libMtkOmxFlacDec/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..220a3bb4ed39c65d14b4da6ce7198c59a0dcf9e4 --- /dev/null +++ b/mtklibs/libMtkOmxFlacDec/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxFlacDec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libui libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxFlacDec.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxFlacDec/NOTICE b/mtklibs/libMtkOmxFlacDec/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libMtkOmxFlacDec/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxFlacDec/README b/mtklibs/libMtkOmxFlacDec/README new file mode 100755 index 0000000000000000000000000000000000000000..b3885282c09ce7060cfe15f116411967517e7e9b --- /dev/null +++ b/mtklibs/libMtkOmxFlacDec/README @@ -0,0 +1,33 @@ +Library of MTK Flac decode omx component. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxFlacDec contains MediaTek developed flac decode omx component. +Without it, flac will not decode. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1.libutils +2.libcutils +3.libdl +4.libui +5.libbinder + +and the following libs from MediaTek: +1.libMtkOmxOsalUtils.a +2.libMtkOmxAudioDecBase.a +3.libflac_mtk.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxFlacDec' folder. + +HOW TO USE IT? +============== + +use openmax api. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxFlacDec/arm/libMtkOmxFlacDec.so b/mtklibs/libMtkOmxFlacDec/arm/libMtkOmxFlacDec.so new file mode 100755 index 0000000000000000000000000000000000000000..2db7e11cef59dca3558e14448af06add4c29942d Binary files /dev/null and b/mtklibs/libMtkOmxFlacDec/arm/libMtkOmxFlacDec.so differ diff --git a/mtklibs/libMtkOmxG711Dec/Android.mk_ b/mtklibs/libMtkOmxG711Dec/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..18d3cf1712df070e733e31fdff2e12a48d2b9b1f --- /dev/null +++ b/mtklibs/libMtkOmxG711Dec/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxG711Dec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libui libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxG711Dec.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxG711Dec/NOTICE b/mtklibs/libMtkOmxG711Dec/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libMtkOmxG711Dec/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxG711Dec/README b/mtklibs/libMtkOmxG711Dec/README new file mode 100755 index 0000000000000000000000000000000000000000..603ab0d7f6b4baac3389f611c4ea2edd2e04ac97 --- /dev/null +++ b/mtklibs/libMtkOmxG711Dec/README @@ -0,0 +1,32 @@ +Library of MTK Wav/G711 decode omx component. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxG711Dec contains MediaTek developed G711 decode omx component. +Without it, G711 will not decode. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1.libutils +2.libcutils +3.libdl +4.libui +5.libbinder + +and the following libs from MediaTek: +1.libMtkOmxOsalUtils.a +2.libMtkOmxAudioDecBase.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxG711Dec' folder. + +HOW TO USE IT? +============== + +use openmax api. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxG711Dec/arm/libMtkOmxG711Dec.so b/mtklibs/libMtkOmxG711Dec/arm/libMtkOmxG711Dec.so new file mode 100755 index 0000000000000000000000000000000000000000..11b7cccdf9fd2a799180c017e588695d41715679 Binary files /dev/null and b/mtklibs/libMtkOmxG711Dec/arm/libMtkOmxG711Dec.so differ diff --git a/mtklibs/libMtkOmxGsmDec/Android.mk_ b/mtklibs/libMtkOmxGsmDec/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..537d421e1defaaf5f2ca2c5c79aa45102138c854 --- /dev/null +++ b/mtklibs/libMtkOmxGsmDec/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxGsmDec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libui libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxGsmDec.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxGsmDec/NOTICE b/mtklibs/libMtkOmxGsmDec/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libMtkOmxGsmDec/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxGsmDec/README b/mtklibs/libMtkOmxGsmDec/README new file mode 100755 index 0000000000000000000000000000000000000000..412e359d33d5fb18fac4562d0a730b04363ae70b --- /dev/null +++ b/mtklibs/libMtkOmxGsmDec/README @@ -0,0 +1,32 @@ +Library of MTK Wav/GSM decode omx component. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxAudioDecBase.a contains MediaTek developed audio omx component base class. +Without it, all audio format will not decode. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1.libutils +2.libcutils +3.libdl +4.libui + + +and the following libs from MediaTek: +1.libMtkOmxOsalUtils.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxGsmDec' folder. + +HOW TO USE IT? +============== + +Use openmax api. + + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxGsmDec/arm/libMtkOmxGsmDec.so b/mtklibs/libMtkOmxGsmDec/arm/libMtkOmxGsmDec.so new file mode 100755 index 0000000000000000000000000000000000000000..5c3d7c3df857346b10d577c0b92785a80274577a Binary files /dev/null and b/mtklibs/libMtkOmxGsmDec/arm/libMtkOmxGsmDec.so differ diff --git a/mtklibs/libMtkOmxMp3Dec/Android.mk_ b/mtklibs/libMtkOmxMp3Dec/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..463813742dae5deac08a4b9605102dc203d464de --- /dev/null +++ b/mtklibs/libMtkOmxMp3Dec/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxMp3Dec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libui libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxMp3Dec.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxMp3Dec/NOTICE b/mtklibs/libMtkOmxMp3Dec/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libMtkOmxMp3Dec/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxMp3Dec/README b/mtklibs/libMtkOmxMp3Dec/README new file mode 100755 index 0000000000000000000000000000000000000000..9f2acd9374e2dc7a3c1605d0dfee17e6f731653b --- /dev/null +++ b/mtklibs/libMtkOmxMp3Dec/README @@ -0,0 +1,36 @@ +Library of MTK MtkOmxMp3Dec, including mp3 omx component related file. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxMp3Dec.so contains MediaTek developed mp3 omx component. +Without it, mp3 will not encode. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1.libbinder +2.libutils +3.libcutils +4.libdl +5.libui + + +and the following libs from MediaTek: +1.libMtkOmxAudioDecBase.a +2.libMtkOmxOsalUtils.a +3.libmp3dec_mtk.a +4.libdrvb.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxMp3Dec' folder. + +HOW TO USE IT? +============== + +Provide mp3 omx componenet for mp3 swip + + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxMp3Dec/arm/libMtkOmxMp3Dec.so b/mtklibs/libMtkOmxMp3Dec/arm/libMtkOmxMp3Dec.so new file mode 100755 index 0000000000000000000000000000000000000000..5b92ccdaea340b04702bc7d0225a4bee998374b1 Binary files /dev/null and b/mtklibs/libMtkOmxMp3Dec/arm/libMtkOmxMp3Dec.so differ diff --git a/mtklibs/libMtkOmxRawDec/Android.mk_ b/mtklibs/libMtkOmxRawDec/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..7ed8794430a40edd64eb8507b90cbdfa64202952 --- /dev/null +++ b/mtklibs/libMtkOmxRawDec/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxRawDec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libui libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxRawDec.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxRawDec/NOTICE b/mtklibs/libMtkOmxRawDec/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libMtkOmxRawDec/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxRawDec/README b/mtklibs/libMtkOmxRawDec/README new file mode 100755 index 0000000000000000000000000000000000000000..17049f2fd130804d9ced869509399a7e09072c07 --- /dev/null +++ b/mtklibs/libMtkOmxRawDec/README @@ -0,0 +1,32 @@ +Library of MTK Wav/Raw decode omx component. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxRawDec contains MediaTek developed Raw Pcm decode omx component. +Without it, Raw Pcm will not decode. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1.libutils +2.libcutils +3.libdl +4.libui +5.libbinder + +and the following libs from MediaTek: +1.libMtkOmxOsalUtils.a +2.libMtkOmxAudioDecBase.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxRawDec' folder. + +HOW TO USE IT? +============== + +use openmax api. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxRawDec/arm/libMtkOmxRawDec.so b/mtklibs/libMtkOmxRawDec/arm/libMtkOmxRawDec.so new file mode 100755 index 0000000000000000000000000000000000000000..ac90c0c7c2774e5ea4f732b1e4c208d93e4e21a5 Binary files /dev/null and b/mtklibs/libMtkOmxRawDec/arm/libMtkOmxRawDec.so differ diff --git a/mtklibs/libMtkOmxVdecEx/Android.mk_ b/mtklibs/libMtkOmxVdecEx/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..3e0e79099c01dbd23fb0a40c74a7c6f47ff25120 --- /dev/null +++ b/mtklibs/libMtkOmxVdecEx/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxVdecEx +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libui libgui_ext libion libion_mtk libdpframework libgralloc_extra libstagefright libvcodecdrv libvcodec_utility libhardware libmhalImageCodec libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxVdecEx.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxVdecEx/NOTICE b/mtklibs/libMtkOmxVdecEx/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0609698d9d72c9a0971544004408eb118a29420a --- /dev/null +++ b/mtklibs/libMtkOmxVdecEx/NOTICE @@ -0,0 +1,59 @@ +Copyright (c) , +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of the nor the names of its contributors may be used to endorse or promote +products derived from this software without specific prior written permission. + + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +: +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: +The MIT License +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxVdecEx/README b/mtklibs/libMtkOmxVdecEx/README new file mode 100755 index 0000000000000000000000000000000000000000..35b4a7b34b1c50ca110def6d669d40fa5fdd4520 --- /dev/null +++ b/mtklibs/libMtkOmxVdecEx/README @@ -0,0 +1,9 @@ +MTK OpenMAX IL video decoder component implementation + +WHAT IT DOES? +============= +MTK OpenMAX IL video decoder components + +HOW TO USE IT? +============== + diff --git a/mtklibs/libMtkOmxVdecEx/arm/libMtkOmxVdecEx.so b/mtklibs/libMtkOmxVdecEx/arm/libMtkOmxVdecEx.so new file mode 100755 index 0000000000000000000000000000000000000000..3a0eaf7b592f33fd25e6556047ffc0b2162e1037 Binary files /dev/null and b/mtklibs/libMtkOmxVdecEx/arm/libMtkOmxVdecEx.so differ diff --git a/mtklibs/libMtkOmxVenc/Android.mk_ b/mtklibs/libMtkOmxVenc/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..9ed31374a5801eb741c58eaf2a58e92e406b6dd8 --- /dev/null +++ b/mtklibs/libMtkOmxVenc/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxVenc +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libui libion libion_mtk libgralloc_extra libvcodecdrv libvcodec_utility libhardware libdpframework libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxVenc.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxVenc/NOTICE b/mtklibs/libMtkOmxVenc/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libMtkOmxVenc/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libMtkOmxVenc/README b/mtklibs/libMtkOmxVenc/README new file mode 100755 index 0000000000000000000000000000000000000000..5d33fc2409f7793e806af92e4840b9e983b652a1 --- /dev/null +++ b/mtklibs/libMtkOmxVenc/README @@ -0,0 +1,19 @@ +Library of MTK OpenMAX IL Component for video encoding. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxVenc.so can encode video in many video codecs by MTK solution. + +HOW IT WAS BUILT? +================== +It needs many libraries from AOSP and MTK. +e.g. libutils, libbinder, libdl, libcutils... + +HOW TO USE IT? +============== +It follows the OpenMAX IL spec. +We suggest that use MediaCodec instead of using it directly. + diff --git a/mtklibs/libMtkOmxVenc/arm/libMtkOmxVenc.so b/mtklibs/libMtkOmxVenc/arm/libMtkOmxVenc.so new file mode 100755 index 0000000000000000000000000000000000000000..38fdbc1da7f50f8377519e93a2d2a9996aee31e4 Binary files /dev/null and b/mtklibs/libMtkOmxVenc/arm/libMtkOmxVenc.so differ diff --git a/mtklibs/libMtkOmxVorbisEnc/Android.mk_ b/mtklibs/libMtkOmxVorbisEnc/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..29845c4cef2c81f65b526d602d1b6647ac96d7ae --- /dev/null +++ b/mtklibs/libMtkOmxVorbisEnc/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libMtkOmxVorbisEnc +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libMtkOmxVorbisEnc.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libMtkOmxVorbisEnc/NOTICE b/mtklibs/libMtkOmxVorbisEnc/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libMtkOmxVorbisEnc/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libMtkOmxVorbisEnc/README b/mtklibs/libMtkOmxVorbisEnc/README new file mode 100755 index 0000000000000000000000000000000000000000..5ff55cc46874a0dea1046203c62ce5a622f46843 --- /dev/null +++ b/mtklibs/libMtkOmxVorbisEnc/README @@ -0,0 +1,33 @@ +Library of MTK Vorbis encode omx component. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libMtkOmxVorbisEnc contains MediaTek developed vorbis encode omx component. +Without it, vorbis will not encode. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1.libutils +2.libcutils +3.libdl +4.libui +5.libbinder + +and the following libs from MediaTek: +1.libMtkOmxOsalUtils.a +2.libMtkOmxAudioDecBase.a +3.libvorbisenc_mtk.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/proprietary/hardware/libomx/audio/MtkOmxVorbisEnc' folder. + +HOW TO USE IT? +============== + +use openmax api. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libMtkOmxVorbisEnc/arm/libMtkOmxVorbisEnc.so b/mtklibs/libMtkOmxVorbisEnc/arm/libMtkOmxVorbisEnc.so new file mode 100755 index 0000000000000000000000000000000000000000..d3ac691ac0c2e70259e33dd47b3a3a62983ab3c3 Binary files /dev/null and b/mtklibs/libMtkOmxVorbisEnc/arm/libMtkOmxVorbisEnc.so differ diff --git a/mtklibs/libPano3D/Android.mk_ b/mtklibs/libPano3D/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..04aa3ffd6b01c65d087d576b65af9a116eaaaf85 --- /dev/null +++ b/mtklibs/libPano3D/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libPano3D +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libPano3D.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libPano3D +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libPano3D.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libPano3D/README b/mtklibs/libPano3D/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libPano3D/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libPano3D/arm/libPano3D.a b/mtklibs/libPano3D/arm/libPano3D.a new file mode 100755 index 0000000000000000000000000000000000000000..e01437a4f7b13e70fbb082cdc9be0389e873808f Binary files /dev/null and b/mtklibs/libPano3D/arm/libPano3D.a differ diff --git a/mtklibs/libPano3D/libPano3D.a b/mtklibs/libPano3D/libPano3D.a new file mode 100755 index 0000000000000000000000000000000000000000..06c42f244c6f65e48ce81bf3efc7081a46b8c181 Binary files /dev/null and b/mtklibs/libPano3D/libPano3D.a differ diff --git a/mtklibs/libSwJpgCodec/Android.mk_ b/mtklibs/libSwJpgCodec/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..4f70e02ddd8e25f84618c3d59c7d21759ba045a9 --- /dev/null +++ b/mtklibs/libSwJpgCodec/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libSwJpgCodec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libmtkjpeg libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libSwJpgCodec.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libSwJpgCodec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmtkjpeg libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libSwJpgCodec.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libSwJpgCodec/NOTICE b/mtklibs/libSwJpgCodec/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..d1fd6e92d3bb8452b5bd07ce771d3101d1a5689d --- /dev/null +++ b/mtklibs/libSwJpgCodec/NOTICE @@ -0,0 +1,22 @@ + * Copyright (C) 2010 The Android Open Source Project: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/libSwJpgCodec/README b/mtklibs/libSwJpgCodec/README new file mode 100755 index 0000000000000000000000000000000000000000..1423e6f01655fd361e39488bdb86d3f09965c529 --- /dev/null +++ b/mtklibs/libSwJpgCodec/README @@ -0,0 +1,27 @@ +Library of MTK JPEG Decode feature. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libSwJpgCodec.so Implements the MTK SW JPEG Decoder to do the SW JPEG Decode tasks. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libutils.so +3. libcutils.so + +and the following libs from MediaTek: +1. libmtkjpeg.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== +Provide api for JPEG Decode feature called from libJpgDecPipe. +all api interfaces are at (vendor\mediatek\proprietary\hardware\jpeg\mt8163\inc) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libSwJpgCodec/arm/libSwJpgCodec.so b/mtklibs/libSwJpgCodec/arm/libSwJpgCodec.so new file mode 100755 index 0000000000000000000000000000000000000000..d8298f125750cac237da813cb853e2e7a5b48a9b Binary files /dev/null and b/mtklibs/libSwJpgCodec/arm/libSwJpgCodec.so differ diff --git a/mtklibs/libSwJpgCodec/libSwJpgCodec.so b/mtklibs/libSwJpgCodec/libSwJpgCodec.so new file mode 100755 index 0000000000000000000000000000000000000000..9db98ee051a4b203f82533eefe46e1415ab6950e Binary files /dev/null and b/mtklibs/libSwJpgCodec/libSwJpgCodec.so differ diff --git a/mtklibs/libacdapi_azi/Android.mk_ b/mtklibs/libacdapi_azi/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..625841666c15b90a1c32b305a66dd9fc0e3ad0d6 --- /dev/null +++ b/mtklibs/libacdapi_azi/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libacdapi_azi +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libacdapi_azi.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libacdapi_azi/README b/mtklibs/libacdapi_azi/README new file mode 100755 index 0000000000000000000000000000000000000000..68b3aed7c1c1ed4a2e2f9b4563936c771ebca5fe --- /dev/null +++ b/mtklibs/libacdapi_azi/README @@ -0,0 +1,19 @@ +AcdApiDaemon daemon + +WHAT IT DOES? +============= +AcdApiDaemon daemon + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +liblog libcutils libutils libui libbinder + +and the following libs from MediaTek: +1. N/A + +HOW TO USE IT? +============== +Start AcdApiDaemon service + +All the source code of this library were written by ALPS ELECTRIC co.. diff --git a/mtklibs/libacdapi_azi/arm/libacdapi_azi.a b/mtklibs/libacdapi_azi/arm/libacdapi_azi.a new file mode 100755 index 0000000000000000000000000000000000000000..5109d9e148fd1c3b3e5ce4756874ff41ce6c7761 Binary files /dev/null and b/mtklibs/libacdapi_azi/arm/libacdapi_azi.a differ diff --git a/mtklibs/libamr_wrap/Android.mk_ b/mtklibs/libamr_wrap/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d36159001146ffa0572106cfc27ed7e1b8f9b7c5 --- /dev/null +++ b/mtklibs/libamr_wrap/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libamr_wrap +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libui libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libamr_wrap.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libamr_wrap/README b/mtklibs/libamr_wrap/README new file mode 100755 index 0000000000000000000000000000000000000000..b7b9c0fbe4022b63e6b9634d30f9f3731650f276 --- /dev/null +++ b/mtklibs/libamr_wrap/README @@ -0,0 +1,31 @@ +Library of MTK ape related codec modules. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libawb_wwrap.so contains MediaTek developed ape related codec modules. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libdl.so +2. libcutils.so +3. libui.so +4. libdrvb.a + +and the following libs from MediaTek: +1. libmtk_drvb.so +2. libarm_mtk.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +Provide api for ape codec features. +all api interface are at (vendor/mediatek/proprietary/external/audio_codec_wrap) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libamr_wrap/arm/libamr_wrap.so b/mtklibs/libamr_wrap/arm/libamr_wrap.so new file mode 100755 index 0000000000000000000000000000000000000000..e625acb239f0417726fb0ad08fb695606dfb5526 Binary files /dev/null and b/mtklibs/libamr_wrap/arm/libamr_wrap.so differ diff --git a/mtklibs/libasdsw/Android.mk_ b/mtklibs/libasdsw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..4c34d8eb5127283832627952a24cd17db5ff6be3 --- /dev/null +++ b/mtklibs/libasdsw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libasdsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libasdsw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libasdsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libasdsw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libasdsw/README b/mtklibs/libasdsw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libasdsw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libasdsw/arm/libasdsw.a b/mtklibs/libasdsw/arm/libasdsw.a new file mode 100755 index 0000000000000000000000000000000000000000..e137853fef42e41def522c99b692a6a82f82bff0 Binary files /dev/null and b/mtklibs/libasdsw/arm/libasdsw.a differ diff --git a/mtklibs/libasdsw/libasdsw.a b/mtklibs/libasdsw/libasdsw.a new file mode 100755 index 0000000000000000000000000000000000000000..7270e8ddc26d1053c11c1a08cd913b3d0651f4e4 Binary files /dev/null and b/mtklibs/libasdsw/libasdsw.a differ diff --git a/mtklibs/libaudiostream/Android.mk_ b/mtklibs/libaudiostream/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..e82903ad1cb6d00a91501cb0a8d62079339308dc --- /dev/null +++ b/mtklibs/libaudiostream/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libaudiostream +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libaudiostream.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libaudiostream/README b/mtklibs/libaudiostream/README new file mode 100755 index 0000000000000000000000000000000000000000..a9f8d7b7943d47778c354277ee19f4f369fc1081 --- /dev/null +++ b/mtklibs/libaudiostream/README @@ -0,0 +1,22 @@ +This module creates the libaudiostream.a libary file. + +WHAT IT DOES? +============= +libaudiostream is common module, is used by all voice features. +it can be seen as recorder, it can record the PCM of different sample rate, different channel from mic. +it can read down link data from speaker and sync with uplink data from mic + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +libutils, libcutils + +and the following libs from MediaTek: + + libstagefright, libmedia + +HOW TO USE IT? +============== + +user can call the fuctions in this library to control record and read uplink data/downlink data. diff --git a/mtklibs/libaudiostream/arm/libaudiostream.a b/mtklibs/libaudiostream/arm/libaudiostream.a new file mode 100755 index 0000000000000000000000000000000000000000..f8466c0cdf5e5070fe277fad484ac3b9ed35bff3 Binary files /dev/null and b/mtklibs/libaudiostream/arm/libaudiostream.a differ diff --git a/mtklibs/libautoramasw/Android.mk_ b/mtklibs/libautoramasw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..3b7b165fd77b42de14cc7323f72997ee8e57a34b --- /dev/null +++ b/mtklibs/libautoramasw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libautoramasw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libautoramasw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libautoramasw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libautoramasw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libautoramasw/README b/mtklibs/libautoramasw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libautoramasw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libautoramasw/arm/libautoramasw.a b/mtklibs/libautoramasw/arm/libautoramasw.a new file mode 100755 index 0000000000000000000000000000000000000000..c9bacb4911521770e1b19422aeed2308e1ed5094 Binary files /dev/null and b/mtklibs/libautoramasw/arm/libautoramasw.a differ diff --git a/mtklibs/libautoramasw/libautoramasw.a b/mtklibs/libautoramasw/libautoramasw.a new file mode 100755 index 0000000000000000000000000000000000000000..b79ed21aca83e5c5b15dc70f4ad4da3251ee8bf0 Binary files /dev/null and b/mtklibs/libautoramasw/libautoramasw.a differ diff --git a/mtklibs/libawb_wrap/Android.mk_ b/mtklibs/libawb_wrap/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..8bc26442458839ff83f55c7dc247d024b7ea5cde --- /dev/null +++ b/mtklibs/libawb_wrap/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libawb_wrap +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libui libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libawb_wrap.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libawb_wrap/README b/mtklibs/libawb_wrap/README new file mode 100755 index 0000000000000000000000000000000000000000..b7b9c0fbe4022b63e6b9634d30f9f3731650f276 --- /dev/null +++ b/mtklibs/libawb_wrap/README @@ -0,0 +1,31 @@ +Library of MTK ape related codec modules. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libawb_wwrap.so contains MediaTek developed ape related codec modules. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libdl.so +2. libcutils.so +3. libui.so +4. libdrvb.a + +and the following libs from MediaTek: +1. libmtk_drvb.so +2. libarm_mtk.a + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +Provide api for ape codec features. +all api interface are at (vendor/mediatek/proprietary/external/audio_codec_wrap) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libawb_wrap/arm/libawb_wrap.so b/mtklibs/libawb_wrap/arm/libawb_wrap.so new file mode 100755 index 0000000000000000000000000000000000000000..d7105c7dfca1b12a441851c8b82301e0c06ef034 Binary files /dev/null and b/mtklibs/libawb_wrap/arm/libawb_wrap.so differ diff --git a/mtklibs/libbackup_restore/Android.mk_ b/mtklibs/libbackup_restore/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..01e5f5b7e3094d93497926568988e7da629b8674 --- /dev/null +++ b/mtklibs/libbackup_restore/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libbackup_restore +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libbackup_restore.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libbackup_restore/README b/mtklibs/libbackup_restore/README new file mode 100755 index 0000000000000000000000000000000000000000..77bbe9122345210f107247eec18528bb658ead93 --- /dev/null +++ b/mtklibs/libbackup_restore/README @@ -0,0 +1,29 @@ +Library of MTK recovery features, icluding partition size changed upgrade and special factory reset, +backup and restore user data. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libbackup_restore.a contains MediaTek developed recovery modules. +Without this, proprietary functionalities will not work¡¨ + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libcrypto_static.a +2. libselinux.a +3. libsepol.a + + +All source/dependency modules of this module are already put in +'vendor/mediatek/' and 'alps' folder. + +HOW TO USE IT? +============== + +Provide API for recovery to linking. +all api interface are at (vendor/mediatek/proprietary/protect/bootable/recovery/backup_restore.h) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libbackup_restore/libbackup_restore.a b/mtklibs/libbackup_restore/libbackup_restore.a new file mode 100755 index 0000000000000000000000000000000000000000..700c20124a001012fdde75fcc21c3fab042eaa2f Binary files /dev/null and b/mtklibs/libbackup_restore/libbackup_restore.a differ diff --git a/mtklibs/libc_malloc_debug_mtk/Android.mk_ b/mtklibs/libc_malloc_debug_mtk/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..e1c0302053d9461d9cceb3b1a312e25b56553b80 --- /dev/null +++ b/mtklibs/libc_malloc_debug_mtk/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libc_malloc_debug_mtk +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libc_malloc_debug_mtk.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libc_malloc_debug_mtk +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libc_malloc_debug_mtk.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libc_malloc_debug_mtk/NOTICE b/mtklibs/libc_malloc_debug_mtk/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..ae0747bdea50a6c33eac5734ecc3014b524be76e --- /dev/null +++ b/mtklibs/libc_malloc_debug_mtk/NOTICE @@ -0,0 +1,15 @@ +The MIT License +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/mtklibs/libc_malloc_debug_mtk/README b/mtklibs/libc_malloc_debug_mtk/README new file mode 100755 index 0000000000000000000000000000000000000000..7da9b2810597400eb1c4425687f5987b692385da --- /dev/null +++ b/mtklibs/libc_malloc_debug_mtk/README @@ -0,0 +1,35 @@ +libudf description: +user space debug framework library which includes MTK debug15/fdleak/ubrd debug feature, +it load through LD_PRELOAD mechanism, and rehook libc system call for add intermediate debug; + +libudf build and release: +source code maintain in alps performance in MTK, binary release to customer; + +libudf usage: +debug15/fdleak debug in libudf "default on" on MTK eng load, and MTK user/userdebug buildin/default off; +customer eng/user/userdebug buildin/default off; +For MTK eng load related issue please reference debug15/fdleak debug guide for analyze. + + +Notes: +if want to enable it on MTK user/userdebug or customer load step by step: +1. add libudf.so to init.environ.rc.in +file path: +system/core/rootdir/init.environ.rc.in + +need modify: + on init + export LD_PRELOAD libsigchain.so:libudf.so + +2.build load and down load again, check libudf.so in LD_PRELOAD list, you can reproduce issue +adb shell "echo $LD_PRELOAD" + +if libudf.so not preload, contact MTK for support; + + +Terminology: +udf - user space debug framework +ubrd - user space backtrace record +debug15 - memory debug feature, cover Android memory debug 5/10 + +20141107 diff --git a/mtklibs/libc_malloc_debug_mtk/arm/libc_malloc_debug_mtk.a b/mtklibs/libc_malloc_debug_mtk/arm/libc_malloc_debug_mtk.a new file mode 100755 index 0000000000000000000000000000000000000000..d1461c7fd2a4b80bbb7d0457b8d1a771d0ba0b4b Binary files /dev/null and b/mtklibs/libc_malloc_debug_mtk/arm/libc_malloc_debug_mtk.a differ diff --git a/mtklibs/libc_malloc_debug_mtk/libc_malloc_debug_mtk.a b/mtklibs/libc_malloc_debug_mtk/libc_malloc_debug_mtk.a new file mode 100755 index 0000000000000000000000000000000000000000..e17eb954b09285f34026a6d2890c559373f0a12e Binary files /dev/null and b/mtklibs/libc_malloc_debug_mtk/libc_malloc_debug_mtk.a differ diff --git a/mtklibs/libcamalgo/Android.mk_ b/mtklibs/libcamalgo/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d8ec20c6a47b409d91b0594aebbd79458a8ee252 --- /dev/null +++ b/mtklibs/libcamalgo/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcamalgo +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libEGL libGLESv2 libgui libbinder libui libmtk_drvb libcamdrv libperfservicenative libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libcamalgo.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcamalgo +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libEGL libGLESv2 libgui libbinder libui libmtk_drvb libcamdrv libperfservicenative libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libcamalgo.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libcamalgo/README b/mtklibs/libcamalgo/README new file mode 100755 index 0000000000000000000000000000000000000000..ceeecfc339e28d7b4347fe4ea43cd439d895c921 --- /dev/null +++ b/mtklibs/libcamalgo/README @@ -0,0 +1,26 @@ +WHAT IT DOES? +============= +libcamalgo.so contains MediaTek developed camera related pre- and post-processing modules. +Without them, camera functionalities will not work¡¨ + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libcutils.so + +and the following libs from MediaTek: +1. libmtk_drvb.so +2. libmet-tag.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +Provide api for camera HAL to control the camera features. +all api interface are at (vendor/mediatek/proprietary/hardware/mtkcam) + +All the source code of this library were written by MediaTek co.. + diff --git a/mtklibs/libcamalgo/arm/libcamalgo.so b/mtklibs/libcamalgo/arm/libcamalgo.so new file mode 100755 index 0000000000000000000000000000000000000000..a37d610efbe512a3a58371d7c2a97faf36e0cfc1 Binary files /dev/null and b/mtklibs/libcamalgo/arm/libcamalgo.so differ diff --git a/mtklibs/libcamalgo/libcamalgo.so b/mtklibs/libcamalgo/libcamalgo.so new file mode 100755 index 0000000000000000000000000000000000000000..e03e837a509d37a985d16be5838e31cddea579b2 Binary files /dev/null and b/mtklibs/libcamalgo/libcamalgo.so differ diff --git a/mtklibs/libcdm/Android.mk_ b/mtklibs/libcdm/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..3b331db0ada77bf7725de89afd1822ba7a7855e2 --- /dev/null +++ b/mtklibs/libcdm/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcdm +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libcdm.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libcdm/NOTICE b/mtklibs/libcdm/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..ae2367ab0474da34e703e9e7b4a2bd07ea51058f --- /dev/null +++ b/mtklibs/libcdm/NOTICE @@ -0,0 +1,29 @@ +// Copyright 2012 Google Inc. All Rights Reserved.: + + + +Copyright (c) , +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of the nor the names of its contributors may be used to endorse or promote +products derived from this software without specific prior written permission. + + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + + \ No newline at end of file diff --git a/mtklibs/libcdm/README b/mtklibs/libcdm/README new file mode 100755 index 0000000000000000000000000000000000000000..a064867e94bce823081a16c31dbf0750c5b1bae3 --- /dev/null +++ b/mtklibs/libcdm/README @@ -0,0 +1,21 @@ +Library of Drm features, including cdm functions. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libcdm will be used by drm, it implement basic functions. +Without them, widevine drm will not work. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libcdm provides interface of drm basic functions, it is built library. diff --git a/mtklibs/libcdm/arm/libcdm.a b/mtklibs/libcdm/arm/libcdm.a new file mode 100755 index 0000000000000000000000000000000000000000..803c48b4018a9b8f8bce81883fa18d66b1b089c9 Binary files /dev/null and b/mtklibs/libcdm/arm/libcdm.a differ diff --git a/mtklibs/libcdm_protos/Android.mk_ b/mtklibs/libcdm_protos/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..38da912e78154e6a82f165ccc585179599b8095f --- /dev/null +++ b/mtklibs/libcdm_protos/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcdm_protos +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libcdm_protos.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libcdm_protos/NOTICE b/mtklibs/libcdm_protos/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..3071ad5c785dc1506008d98615f922d7377c735d --- /dev/null +++ b/mtklibs/libcdm_protos/NOTICE @@ -0,0 +1,38 @@ +This software contains software licensed under the BSD license: + +MODP_B64 - High performance base64 encoder/decoder +http://code.google.com/p/stringencoders/ + +Copyright © 2005, 2006, 2007 Nick Galbreath -- nickg [at] modp [dot] com +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + Neither the name of the modp.com nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This is the standard "new" BSD license: +http://www.opensource.org/licenses/bsd-license.php + diff --git a/mtklibs/libcdm_protos/README b/mtklibs/libcdm_protos/README new file mode 100755 index 0000000000000000000000000000000000000000..184c40db2c3b7c105b0cadc3c3d7a6c1ffdb3676 --- /dev/null +++ b/mtklibs/libcdm_protos/README @@ -0,0 +1,28 @@ +Library of Drm features, including cdm, media drm,crypto related functions. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libwvdrmengine will be used by drm, it implement basic functions. +Without them, widevine drm will not work. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libcrypto.so +2. libcutils.so +3. libdl.so +4. liblog.so +5. libstlport.so +6. libutils.so +7. libstagefright_foundation.so + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libwvdrmengine provides interface of drm basic functions, it is built library. diff --git a/mtklibs/libcdm_protos/arm/libcdm_protos.a b/mtklibs/libcdm_protos/arm/libcdm_protos.a new file mode 100755 index 0000000000000000000000000000000000000000..c81021e3a9ee68792f971270d09b16d0559fb82a Binary files /dev/null and b/mtklibs/libcdm_protos/arm/libcdm_protos.a differ diff --git a/mtklibs/libcdm_protos/include/WVCDMSingleton.h b/mtklibs/libcdm_protos/include/WVCDMSingleton.h new file mode 100755 index 0000000000000000000000000000000000000000..ecb49dabee701cc706c51454af12156a749131c9 --- /dev/null +++ b/mtklibs/libcdm_protos/include/WVCDMSingleton.h @@ -0,0 +1,18 @@ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// + +#ifndef WV_CDM_SINGLETON_H_ +#define WV_CDM_SINGLETON_H_ + +#include "utils/StrongPointer.h" + +#include "wv_content_decryption_module.h" + +namespace wvdrm { + +android::sp getCDM(); + +} // namespace wvdrm + +#endif // WV_CDM_SINGLETON_H_ diff --git a/mtklibs/libcdm_protos/include/WVCreatePluginFactories.h b/mtklibs/libcdm_protos/include/WVCreatePluginFactories.h new file mode 100755 index 0000000000000000000000000000000000000000..2d36336616f448af52c5216cc6b42feb1b2e7eae --- /dev/null +++ b/mtklibs/libcdm_protos/include/WVCreatePluginFactories.h @@ -0,0 +1,16 @@ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// + +#ifndef WV_CREATE_PLUGIN_FACTORIES_H_ +#define WV_CREATE_PLUGIN_FACTORIES_H_ + +#include "media/drm/DrmAPI.h" +#include "media/hardware/CryptoAPI.h" + +extern "C" { + android::DrmFactory* createDrmFactory(); + android::CryptoFactory* createCryptoFactory(); +} + +#endif // WV_CREATE_PLUGIN_FACTORIES_H_ diff --git a/mtklibs/libcdm_protos/include/WVCryptoFactory.h b/mtklibs/libcdm_protos/include/WVCryptoFactory.h new file mode 100755 index 0000000000000000000000000000000000000000..7410f1cf0edcd576e69763e18e4aeac61c264b2c --- /dev/null +++ b/mtklibs/libcdm_protos/include/WVCryptoFactory.h @@ -0,0 +1,31 @@ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// + +#ifndef WV_CRYPTO_FACTORY_H_ +#define WV_CRYPTO_FACTORY_H_ + +#include "media/hardware/CryptoAPI.h" +#include "media/stagefright/foundation/ABase.h" +#include "utils/Errors.h" + +namespace wvdrm { + +class WVCryptoFactory : public android::CryptoFactory { + public: + WVCryptoFactory() {} + virtual ~WVCryptoFactory() {} + + virtual bool isCryptoSchemeSupported(const uint8_t uuid[16]) const; + + virtual android::status_t createPlugin(const uint8_t uuid[16], + const void* data, size_t size, + android::CryptoPlugin** plugin); + + private: + DISALLOW_EVIL_CONSTRUCTORS(WVCryptoFactory); +}; + +} // namespace wvdrm + +#endif // WV_CRYPTO_FACTORY_H_ diff --git a/mtklibs/libcdm_protos/include/WVDrmFactory.h b/mtklibs/libcdm_protos/include/WVDrmFactory.h new file mode 100755 index 0000000000000000000000000000000000000000..37c17d2cabc98ae9c71edc55799cfa1234bc0638 --- /dev/null +++ b/mtklibs/libcdm_protos/include/WVDrmFactory.h @@ -0,0 +1,35 @@ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// + +#ifndef WV_DRM_FACTORY_H_ +#define WV_DRM_FACTORY_H_ + +#include "media/drm/DrmAPI.h" +#include "media/stagefright/foundation/ABase.h" +#include "utils/Errors.h" +#include "WVGenericCryptoInterface.h" + +namespace wvdrm { + +class WVDrmFactory : public android::DrmFactory { + public: + WVDrmFactory() {} + virtual ~WVDrmFactory() {} + + virtual bool isCryptoSchemeSupported(const uint8_t uuid[16]); + + virtual bool isContentTypeSupported(const android::String8 &initDataType); + + virtual android::status_t createDrmPlugin(const uint8_t uuid[16], + android::DrmPlugin** plugin); + + private: + DISALLOW_EVIL_CONSTRUCTORS(WVDrmFactory); + + static WVGenericCryptoInterface sOemCryptoInterface; +}; + +} // namespace wvdrm + +#endif // WV_DRM_FACTORY_H_ diff --git a/mtklibs/libcdm_protos/include/WVErrors.h b/mtklibs/libcdm_protos/include/WVErrors.h new file mode 100755 index 0000000000000000000000000000000000000000..fd22020b2968b8adf6c0038135418272c8e98283 --- /dev/null +++ b/mtklibs/libcdm_protos/include/WVErrors.h @@ -0,0 +1,191 @@ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// + +#ifndef WV_ERRORS_H_ +#define WV_ERRORS_H_ + +#include "media/stagefright/MediaErrors.h" + +namespace wvdrm { + +using android::ERROR_DRM_VENDOR_MIN; +using android::ERROR_DRM_VENDOR_MAX; + +enum { + kErrorIncorrectBufferSize = ERROR_DRM_VENDOR_MIN, + kErrorCDMGeneric = ERROR_DRM_VENDOR_MIN + 1, + kErrorUnsupportedCrypto = ERROR_DRM_VENDOR_MIN + 2, + kErrorExpectedUnencrypted = ERROR_DRM_VENDOR_MIN + 3, + kErrorSessionIsOpen = ERROR_DRM_VENDOR_MIN + 4, + kErrorTooManySessions = ERROR_DRM_VENDOR_MIN + 5, + kErrorInvalidKey = ERROR_DRM_VENDOR_MIN + 6, + kErrorNoOriginSpecified = ERROR_DRM_VENDOR_MIN + 7, + kAddKeyError = ERROR_DRM_VENDOR_MIN + 8, + kCertProvisioningGetKeyboxError1 = ERROR_DRM_VENDOR_MIN + 9, + kCertProvisioningGetKeyboxError2 = ERROR_DRM_VENDOR_MIN + 10, + kCertProvisioningInvalidCertType = ERROR_DRM_VENDOR_MIN + 11, + kCertProvisioningRequestError1 = ERROR_DRM_VENDOR_MIN + 12, + kCertProvisioningRequestError2 = ERROR_DRM_VENDOR_MIN + 13, + kCertProvisioningRequestError3 = ERROR_DRM_VENDOR_MIN + 14, + kCertProvisioningRequestError4 = ERROR_DRM_VENDOR_MIN + 15, + kCertProvisioningResponseError1 = ERROR_DRM_VENDOR_MIN + 16, + kCertProvisioningResponseError2 = ERROR_DRM_VENDOR_MIN + 17, + kCertProvisioningResponseError3 = ERROR_DRM_VENDOR_MIN + 18, + kCertProvisioningResponseError4 = ERROR_DRM_VENDOR_MIN + 19, + kCertProvisioningResponseError5 = ERROR_DRM_VENDOR_MIN + 20, + kCertProvisioningResponseError6 = ERROR_DRM_VENDOR_MIN + 21, + kCertProvisioningResponseError7 = ERROR_DRM_VENDOR_MIN + 22, + kCertProvisioningResponseError8 = ERROR_DRM_VENDOR_MIN + 23, + kCryptoSessionOpenError1 = ERROR_DRM_VENDOR_MIN + 24, + kCryptoSessionOpenError2 = ERROR_DRM_VENDOR_MIN + 25, + kCryptoSessionOpenError3 = ERROR_DRM_VENDOR_MIN + 26, + kCryptoSessionOpenError4 = ERROR_DRM_VENDOR_MIN + 27, + kCryptoSessionOpenError5 = ERROR_DRM_VENDOR_MIN + 28, + kDecyrptNotReady = ERROR_DRM_VENDOR_MIN + 29, + kDeviceCertificateError1 = ERROR_DRM_VENDOR_MIN + 30, + kDeviceCertificateError2 = ERROR_DRM_VENDOR_MIN + 31, + kDeviceCertificateError3 = ERROR_DRM_VENDOR_MIN + 32, + kDeviceCertificateError4 = ERROR_DRM_VENDOR_MIN + 33, + kEmptyKeyData1 = ERROR_DRM_VENDOR_MIN + 34, + kEmptyKeyData2 = ERROR_DRM_VENDOR_MIN + 35, + kEmptyKeySetId = ERROR_DRM_VENDOR_MIN + 36, + kEmptyKeySetIdEng1 = ERROR_DRM_VENDOR_MIN + 37, + kEmptyKeySetIdEng2 = ERROR_DRM_VENDOR_MIN + 38, + kEmptyKeySetIdEng3 = ERROR_DRM_VENDOR_MIN + 39, + kEmptyKeySetIdEng4 = ERROR_DRM_VENDOR_MIN + 40, + kEmptyLicenseRenewal = ERROR_DRM_VENDOR_MIN + 41, + kEmptyLicenseResponse1 = ERROR_DRM_VENDOR_MIN + 42, + kEmptyLicenseResponse2 = ERROR_DRM_VENDOR_MIN + 43, + kEmptyProvisioningCertificate1 = ERROR_DRM_VENDOR_MIN + 44, + kEmptyProvisioningResponse = ERROR_DRM_VENDOR_MIN + 45, + kEmptySessionId = ERROR_DRM_VENDOR_MIN + 46, + kGenerateDerivedKeysError = ERROR_DRM_VENDOR_MIN + 47, + kLicenseRenewalNonceGenerationError = ERROR_DRM_VENDOR_MIN + 48, + kGenerateUsageReportError = ERROR_DRM_VENDOR_MIN + 49, + kGetLicenseError = ERROR_DRM_VENDOR_MIN + 50, + kGetReleasedLicenseError = ERROR_DRM_VENDOR_MIN + 51, + kGetUsageInfoError1 = ERROR_DRM_VENDOR_MIN + 52, + kGetUsageInfoError2 = ERROR_DRM_VENDOR_MIN + 53, + kGetUsageInfoError3 = ERROR_DRM_VENDOR_MIN + 54, + kGetUsageInfoError4 = ERROR_DRM_VENDOR_MIN + 55, + kInitDataNotFound = ERROR_DRM_VENDOR_MIN + 56, + kInvalidCryptoSession1 = ERROR_DRM_VENDOR_MIN + 57, + kInvalidCryptoSession2 = ERROR_DRM_VENDOR_MIN + 58, + kInvalidCryptoSession3 = ERROR_DRM_VENDOR_MIN + 59, + kInvalidCryptoSession4 = ERROR_DRM_VENDOR_MIN + 60, + kInvalidCryptoSession5 = ERROR_DRM_VENDOR_MIN + 61, + kInvalidDecryptParametersEng1 = ERROR_DRM_VENDOR_MIN + 62, + kInvalidDecryptParametersEng2 = ERROR_DRM_VENDOR_MIN + 63, + kInvalidDecryptParametersEng3 = ERROR_DRM_VENDOR_MIN + 64, + kInvalidDecryptParametersEng4 = ERROR_DRM_VENDOR_MIN + 65, + kInvalidDeviceCertificateType = ERROR_DRM_VENDOR_MIN + 66, + kInvalidKeySystem = ERROR_DRM_VENDOR_MIN + 67, + kInvalidLicenseResponse = ERROR_DRM_VENDOR_MIN + 68, + kInvalidLicenseType = ERROR_DRM_VENDOR_MIN + 69, + kInvalidParametersEng1 = ERROR_DRM_VENDOR_MIN + 70, + kInvalidParametersEng2 = ERROR_DRM_VENDOR_MIN + 71, + kInvalidParametersEng3 = ERROR_DRM_VENDOR_MIN + 72, + kInvalidParametersEng4 = ERROR_DRM_VENDOR_MIN + 73, + kInvalidParametersLic1 = ERROR_DRM_VENDOR_MIN + 74, + kInvalidParametersLic2 = ERROR_DRM_VENDOR_MIN + 75, + kInvalidProvisioningParam1 = ERROR_DRM_VENDOR_MIN + 76, + kInvalidProvisioningParam2 = ERROR_DRM_VENDOR_MIN + 77, + kInvalidProvisioningReqParam1 = ERROR_DRM_VENDOR_MIN + 78, + kInvalidProvisioningReqParam2 = ERROR_DRM_VENDOR_MIN + 79, + kInvalidQueryKey = ERROR_DRM_VENDOR_MIN + 80, + kInvalidSessionId = ERROR_DRM_VENDOR_MIN + 81, + kKeyRequestError1 = ERROR_DRM_VENDOR_MIN + 82, + kKeySizeError = ERROR_DRM_VENDOR_MIN + 84, + kKeySetIdNotFound1 = ERROR_DRM_VENDOR_MIN + 85, + kKeySetIdNotFound2 = ERROR_DRM_VENDOR_MIN + 86, + kKeySetIdNotFound3 = ERROR_DRM_VENDOR_MIN + 87, + kLicenseIdNotFound = ERROR_DRM_VENDOR_MIN + 88, + kLicenseParserInitError = ERROR_DRM_VENDOR_MIN + 89, + kLicenseParserNotInitialized1 = ERROR_DRM_VENDOR_MIN + 90, + kLicenseParserNotInitialized2 = ERROR_DRM_VENDOR_MIN + 91, + kLicenseParserNotInitialized3 = ERROR_DRM_VENDOR_MIN + 92, + kLicenseResponseNotSigned = ERROR_DRM_VENDOR_MIN + 93, + kLicenseResponseParseError1 = ERROR_DRM_VENDOR_MIN + 94, + kLicenseResponseParseError2 = ERROR_DRM_VENDOR_MIN + 95, + kLicenseResponseParseError3 = ERROR_DRM_VENDOR_MIN + 96, + kLoadKeyError = ERROR_DRM_VENDOR_MIN + 97, + kNoContentKey = ERROR_DRM_VENDOR_MIN + 98, + kProvisioningGetKeyboxError = ERROR_DRM_VENDOR_MIN + 99, + kRefreshKeysError = ERROR_DRM_VENDOR_MIN + 100, + kReleaseAllUsageInfoError1 = ERROR_DRM_VENDOR_MIN + 101, + kReleaseAllUsageInfoError2 = ERROR_DRM_VENDOR_MIN + 102, + kReleaseKeyError = ERROR_DRM_VENDOR_MIN + 103, + kReleaseKeyRequestError = ERROR_DRM_VENDOR_MIN + 104, + kReleaseLicenseError1 = ERROR_DRM_VENDOR_MIN + 105, + kReleaseLicenseError2 = ERROR_DRM_VENDOR_MIN + 106, + kReleaseUsageInfoError = ERROR_DRM_VENDOR_MIN + 107, + kRenewKeyError1 = ERROR_DRM_VENDOR_MIN + 108, + kRenewKeyError2 = ERROR_DRM_VENDOR_MIN + 109, + kLicenseRenewalSigningError = ERROR_DRM_VENDOR_MIN + 110, + kRestoreOfflineLicenseError1 = ERROR_DRM_VENDOR_MIN + 111, + kRestoreOfflineLicenseError2 = ERROR_DRM_VENDOR_MIN + 112, + kSessionInitError1 = ERROR_DRM_VENDOR_MIN + 113, + kSessionInitError2 = ERROR_DRM_VENDOR_MIN + 114, + kSessionInitGetKeyboxError = ERROR_DRM_VENDOR_MIN + 115, + kSessionNotFound1 = ERROR_DRM_VENDOR_MIN + 116, + kSessionNotFound2 = ERROR_DRM_VENDOR_MIN + 117, + kSessionNotFound3 = ERROR_DRM_VENDOR_MIN + 118, + kSessionNotFound4 = ERROR_DRM_VENDOR_MIN + 119, + kSessionNotFound5 = ERROR_DRM_VENDOR_MIN + 120, + kSessionNotFound6 = ERROR_DRM_VENDOR_MIN + 121, + kSessionNotFound7 = ERROR_DRM_VENDOR_MIN + 122, + kSessionNotFound8 = ERROR_DRM_VENDOR_MIN + 123, + kSessionNotFound9 = ERROR_DRM_VENDOR_MIN + 124, + kSessionNotFound10 = ERROR_DRM_VENDOR_MIN + 125, + kSessionKeysNotFound = ERROR_DRM_VENDOR_MIN + 126, + kSessionNotFoundForDecrypt = ERROR_DRM_VENDOR_MIN + 127, + kSignatureNotFound = ERROR_DRM_VENDOR_MIN + 128, + kStoreLicenseError1 = ERROR_DRM_VENDOR_MIN + 129, + kStoreLicenseError2 = ERROR_DRM_VENDOR_MIN + 130, + kStoreLicenseError3 = ERROR_DRM_VENDOR_MIN + 131, + kStoreUsageInfoError = ERROR_DRM_VENDOR_MIN + 132, + kUnprovisioningError1 = ERROR_DRM_VENDOR_MIN + 133, + kUnprovisioningError2 = ERROR_DRM_VENDOR_MIN + 134, + kUnprovisioningError3 = ERROR_DRM_VENDOR_MIN + 135, + kUnprovisioningError4 = ERROR_DRM_VENDOR_MIN + 136, + kUnsupportedInitData = ERROR_DRM_VENDOR_MIN + 137, + kUsageInfoNotFound = ERROR_DRM_VENDOR_MIN + 138, + kLicenseRenewalServiceCertificateGenerationError = ERROR_DRM_VENDOR_MIN + 139, + kParseServiceCertificateError = ERROR_DRM_VENDOR_MIN + 140, + kServiceCertificateTypeError = ERROR_DRM_VENDOR_MIN + 141, + kClientIdGenerateRandomError = ERROR_DRM_VENDOR_MIN + 142, + kClientIdAesInitError = ERROR_DRM_VENDOR_MIN + 143, + kClientIdAesEncryptError = ERROR_DRM_VENDOR_MIN + 144, + kClientIdRsaInitError = ERROR_DRM_VENDOR_MIN + 145, + kClientIdRsaEncryptError = ERROR_DRM_VENDOR_MIN + 146, + kInvalidQueryStatus = ERROR_DRM_VENDOR_MIN + 147, + kEmptyProvisioningCertificate2 = ERROR_DRM_VENDOR_MIN + 148, + kLicenseParserNotInitialized4 = ERROR_DRM_VENDOR_MIN + 149, + kInvalidParametersLic3 = ERROR_DRM_VENDOR_MIN + 150, + kInvalidParametersLic4 = ERROR_DRM_VENDOR_MIN + 151, + kInvalidParametersLic5 = ERROR_DRM_VENDOR_MIN + 152, + kInvalidParametersLic6 = ERROR_DRM_VENDOR_MIN + 153, + kInvalidParametersLic7 = ERROR_DRM_VENDOR_MIN + 154, + kLicenseRequestServiceCertificateGenerationError = ERROR_DRM_VENDOR_MIN + 155, + kCencInitDataUnavailable = ERROR_DRM_VENDOR_MIN + 156, + kPrepareCencContentIdFailed = ERROR_DRM_VENDOR_MIN + 157, + kWebmInitDataUnavailable = ERROR_DRM_VENDOR_MIN + 158, + kPrepareWebmContentIdFailed = ERROR_DRM_VENDOR_MIN + 159, + kUnsupportedInitDataFormat = ERROR_DRM_VENDOR_MIN + 160, + kLicenseRequestNonceGenerationError = ERROR_DRM_VENDOR_MIN + 161, + kLicenseRequestSigningError = ERROR_DRM_VENDOR_MIN + 162, + kEmptyLicenseRequest = ERROR_DRM_VENDOR_MIN + 163, + kErrorWVDrmMaxErrorUsed = ERROR_DRM_VENDOR_MIN + 163, + + // Used by crypto test mode + kErrorTestMode = ERROR_DRM_VENDOR_MAX, +}; + +static_assert(static_cast(kErrorWVDrmMaxErrorUsed) <= + static_cast(ERROR_DRM_VENDOR_MAX), + ""); + +} // namespace wvdrm + +#endif // WV_ERRORS_H_ diff --git a/mtklibs/libcdm_protos/include/WVUUID.h b/mtklibs/libcdm_protos/include/WVUUID.h new file mode 100755 index 0000000000000000000000000000000000000000..320101cf6f43011b5b512d2e68f00889e6c4f675 --- /dev/null +++ b/mtklibs/libcdm_protos/include/WVUUID.h @@ -0,0 +1,16 @@ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// + +#ifndef WV_UUID_H_ +#define WV_UUID_H_ + +#include + +namespace wvdrm { + +bool isWidevineUUID(const uint8_t uuid[16]); + +} // namespace wvdrm + +#endif // WV_UUID_H_ diff --git a/mtklibs/libcdm_protos/include/mapErrors-inl.h b/mtklibs/libcdm_protos/include/mapErrors-inl.h new file mode 100755 index 0000000000000000000000000000000000000000..f51e18ac07f47bac20902c099443368dcd5af00c --- /dev/null +++ b/mtklibs/libcdm_protos/include/mapErrors-inl.h @@ -0,0 +1,363 @@ +// +// Copyright 2013 Google Inc. All Rights Reserved. +// + +#ifndef WV_MAP_ERRORS_H_ +#define WV_MAP_ERRORS_H_ + +#include "media/stagefright/MediaErrors.h" +#include "utils/Errors.h" +#include "wv_cdm_types.h" +#include "WVErrors.h" + +namespace wvdrm { + +static android::status_t mapCdmResponseType(wvcdm::CdmResponseType res) { + switch (res) { + case wvcdm::NO_ERROR: + case wvcdm::KEY_ADDED: + case wvcdm::KEY_MESSAGE: + case wvcdm::KEY_CANCELED: + // KEY_ADDED, KEY_MESSAGE, and KEY_CANCELLED are all alternative + // success messages for certain CDM methods instead of NO_ERROR. + return android::OK; + case wvcdm::NEED_KEY: + return android::ERROR_DRM_NO_LICENSE; + case wvcdm::NEED_PROVISIONING: + return android::ERROR_DRM_NOT_PROVISIONED; + case wvcdm::DEVICE_REVOKED: + return android::ERROR_DRM_DEVICE_REVOKED; + case wvcdm::INSUFFICIENT_CRYPTO_RESOURCES: + return android::ERROR_DRM_RESOURCE_BUSY; + case wvcdm::ADD_KEY_ERROR: + return kAddKeyError; + case wvcdm::CERT_PROVISIONING_GET_KEYBOX_ERROR_1: + return kCertProvisioningGetKeyboxError1; + case wvcdm::CERT_PROVISIONING_GET_KEYBOX_ERROR_2: + return kCertProvisioningGetKeyboxError2; + case wvcdm::CERT_PROVISIONING_INVALID_CERT_TYPE: + return kCertProvisioningInvalidCertType; + case wvcdm::CERT_PROVISIONING_REQUEST_ERROR_1: + return kCertProvisioningRequestError1; + case wvcdm::CERT_PROVISIONING_REQUEST_ERROR_2: + return kCertProvisioningRequestError2; + case wvcdm::CERT_PROVISIONING_REQUEST_ERROR_3: + return kCertProvisioningRequestError3; + case wvcdm::CERT_PROVISIONING_REQUEST_ERROR_4: + return kCertProvisioningRequestError4; + case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_1: + return kCertProvisioningResponseError1; + case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_2: + return kCertProvisioningResponseError2; + case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_3: + return kCertProvisioningResponseError3; + case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_4: + return kCertProvisioningResponseError4; + case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_5: + return kCertProvisioningResponseError5; + case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_6: + return kCertProvisioningResponseError6; + case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_7: + return kCertProvisioningResponseError7; + case wvcdm::CERT_PROVISIONING_RESPONSE_ERROR_8: + return kCertProvisioningResponseError8; + case wvcdm::CRYPTO_SESSION_OPEN_ERROR_1: + return kCryptoSessionOpenError1; + case wvcdm::CRYPTO_SESSION_OPEN_ERROR_2: + return kCryptoSessionOpenError2; + case wvcdm::CRYPTO_SESSION_OPEN_ERROR_3: + return kCryptoSessionOpenError3; + case wvcdm::CRYPTO_SESSION_OPEN_ERROR_4: + return kCryptoSessionOpenError4; + case wvcdm::CRYPTO_SESSION_OPEN_ERROR_5: + return kCryptoSessionOpenError5; + case wvcdm::DECRYPT_NOT_READY: + return kDecyrptNotReady; + case wvcdm::DEVICE_CERTIFICATE_ERROR_1: + return kDeviceCertificateError1; + case wvcdm::DEVICE_CERTIFICATE_ERROR_2: + return kDeviceCertificateError2; + case wvcdm::DEVICE_CERTIFICATE_ERROR_3: + return kDeviceCertificateError3; + case wvcdm::DEVICE_CERTIFICATE_ERROR_4: + return kDeviceCertificateError4; + case wvcdm::EMPTY_KEY_DATA_1: + return kEmptyKeyData1; + case wvcdm::EMPTY_KEY_DATA_2: + return kEmptyKeyData2; + case wvcdm::EMPTY_KEYSET_ID: + return kEmptyKeySetId; + case wvcdm::EMPTY_KEYSET_ID_ENG_1: + return kEmptyKeySetIdEng1; + case wvcdm::EMPTY_KEYSET_ID_ENG_2: + return kEmptyKeySetIdEng2; + case wvcdm::EMPTY_KEYSET_ID_ENG_3: + return kEmptyKeySetIdEng3; + case wvcdm::EMPTY_KEYSET_ID_ENG_4: + return kEmptyKeySetIdEng4; + case wvcdm::EMPTY_LICENSE_RENEWAL: + return kEmptyLicenseRenewal; + case wvcdm::EMPTY_LICENSE_RESPONSE_1: + return kEmptyLicenseResponse1; + case wvcdm::EMPTY_LICENSE_RESPONSE_2: + return kEmptyLicenseResponse2; + case wvcdm::EMPTY_PROVISIONING_CERTIFICATE_1: + return kEmptyProvisioningCertificate1; + case wvcdm::EMPTY_PROVISIONING_RESPONSE: + return kEmptyProvisioningResponse; + case wvcdm::EMPTY_SESSION_ID: + return kEmptySessionId; + case wvcdm::GENERATE_DERIVED_KEYS_ERROR: + return kGenerateDerivedKeysError; + case wvcdm::LICENSE_RENEWAL_NONCE_GENERATION_ERROR: + return kLicenseRenewalNonceGenerationError; + case wvcdm::GENERATE_USAGE_REPORT_ERROR: + return kGenerateUsageReportError; + case wvcdm::GET_LICENSE_ERROR: + return kGetLicenseError; + case wvcdm::GET_RELEASED_LICENSE_ERROR: + return kGetReleasedLicenseError; + case wvcdm::GET_USAGE_INFO_ERROR_1: + return kGetUsageInfoError1; + case wvcdm::GET_USAGE_INFO_ERROR_2: + return kGetUsageInfoError2; + case wvcdm::GET_USAGE_INFO_ERROR_3: + return kGetUsageInfoError3; + case wvcdm::GET_USAGE_INFO_ERROR_4: + return kGetUsageInfoError4; + case wvcdm::INIT_DATA_NOT_FOUND: + return kInitDataNotFound; + case wvcdm::INVALID_CRYPTO_SESSION_1: + return kInvalidCryptoSession1; + case wvcdm::INVALID_CRYPTO_SESSION_2: + return kInvalidCryptoSession2; + case wvcdm::INVALID_CRYPTO_SESSION_3: + return kInvalidCryptoSession3; + case wvcdm::INVALID_CRYPTO_SESSION_4: + return kInvalidCryptoSession4; + case wvcdm::INVALID_CRYPTO_SESSION_5: + return kInvalidCryptoSession5; + case wvcdm::INVALID_DECRYPT_PARAMETERS_ENG_1: + return kInvalidDecryptParametersEng1; + case wvcdm::INVALID_DECRYPT_PARAMETERS_ENG_2: + return kInvalidDecryptParametersEng2; + case wvcdm::INVALID_DECRYPT_PARAMETERS_ENG_3: + return kInvalidDecryptParametersEng3; + case wvcdm::INVALID_DECRYPT_PARAMETERS_ENG_4: + return kInvalidDecryptParametersEng4; + case wvcdm::SESSION_NOT_FOUND_FOR_DECRYPT: + return kSessionNotFoundForDecrypt; + case wvcdm::INVALID_DEVICE_CERTIFICATE_TYPE: + return kInvalidDeviceCertificateType; + case wvcdm::INVALID_KEY_SYSTEM: + return kInvalidKeySystem; + case wvcdm::INVALID_LICENSE_RESPONSE: + return kInvalidLicenseResponse; + case wvcdm::INVALID_LICENSE_TYPE: + return kInvalidLicenseType; + case wvcdm::INVALID_PARAMETERS_ENG_1: + return kInvalidParametersEng1; + case wvcdm::INVALID_PARAMETERS_ENG_2: + return kInvalidParametersEng2; + case wvcdm::INVALID_PARAMETERS_ENG_3: + return kInvalidParametersEng3; + case wvcdm::INVALID_PARAMETERS_ENG_4: + return kInvalidParametersEng4; + case wvcdm::INVALID_PARAMETERS_LIC_1: + return kInvalidParametersLic1; + case wvcdm::INVALID_PARAMETERS_LIC_2: + return kInvalidParametersLic2; + case wvcdm::INVALID_PROVISIONING_PARAMETERS_1: + return kInvalidProvisioningParam1; + case wvcdm::INVALID_PROVISIONING_PARAMETERS_2: + return kInvalidProvisioningParam2; + case wvcdm::INVALID_PROVISIONING_REQUEST_PARAM_1: + return kInvalidProvisioningReqParam1; + case wvcdm::INVALID_PROVISIONING_REQUEST_PARAM_2: + return kInvalidProvisioningReqParam2; + case wvcdm::INVALID_QUERY_KEY: + return kInvalidQueryKey; + case wvcdm::INVALID_SESSION_ID: + return kInvalidSessionId; + case wvcdm::KEY_REQUEST_ERROR_1: + return kKeyRequestError1; + case wvcdm::KEY_SIZE_ERROR: + return kKeySizeError; + case wvcdm::KEYSET_ID_NOT_FOUND_1: + return kKeySetIdNotFound1; + case wvcdm::KEYSET_ID_NOT_FOUND_2: + return kKeySetIdNotFound2; + case wvcdm::KEYSET_ID_NOT_FOUND_3: + return kKeySetIdNotFound3; + case wvcdm::LICENSE_ID_NOT_FOUND: + return kLicenseIdNotFound; + case wvcdm::LICENSE_PARSER_INIT_ERROR: + return kLicenseParserInitError; + case wvcdm::LICENSE_PARSER_NOT_INITIALIZED_1: + return kLicenseParserNotInitialized1; + case wvcdm::LICENSE_PARSER_NOT_INITIALIZED_2: + return kLicenseParserNotInitialized2; + case wvcdm::LICENSE_PARSER_NOT_INITIALIZED_3: + return kLicenseParserNotInitialized3; + case wvcdm::LICENSE_RESPONSE_NOT_SIGNED: + return kLicenseResponseNotSigned; + case wvcdm::LICENSE_RESPONSE_PARSE_ERROR_1: + return kLicenseResponseParseError1; + case wvcdm::LICENSE_RESPONSE_PARSE_ERROR_2: + return kLicenseResponseParseError2; + case wvcdm::LICENSE_RESPONSE_PARSE_ERROR_3: + return kLicenseResponseParseError3; + case wvcdm::LOAD_KEY_ERROR: + return kLoadKeyError; + case wvcdm::NO_CONTENT_KEY: + return kNoContentKey; + case wvcdm::REFRESH_KEYS_ERROR: + return kRefreshKeysError; + case wvcdm::RELEASE_ALL_USAGE_INFO_ERROR_1: + return kReleaseAllUsageInfoError1; + case wvcdm::RELEASE_ALL_USAGE_INFO_ERROR_2: + return kReleaseAllUsageInfoError2; + case wvcdm::RELEASE_KEY_ERROR: + return kReleaseKeyError; + case wvcdm::RELEASE_KEY_REQUEST_ERROR: + return kReleaseKeyRequestError; + case wvcdm::RELEASE_LICENSE_ERROR_1: + return kReleaseLicenseError1; + case wvcdm::RELEASE_LICENSE_ERROR_2: + return kReleaseLicenseError2; + case wvcdm::RELEASE_USAGE_INFO_ERROR: + return kReleaseUsageInfoError; + case wvcdm::RENEW_KEY_ERROR_1: + return kRenewKeyError1; + case wvcdm::RENEW_KEY_ERROR_2: + return kRenewKeyError2; + case wvcdm::LICENSE_RENEWAL_SIGNING_ERROR: + return kLicenseRenewalSigningError; + case wvcdm::RESTORE_OFFLINE_LICENSE_ERROR_1: + return kRestoreOfflineLicenseError1; + case wvcdm::RESTORE_OFFLINE_LICENSE_ERROR_2: + return kRestoreOfflineLicenseError2; + case wvcdm::SESSION_INIT_ERROR_1: + return kSessionInitError1; + case wvcdm::SESSION_INIT_ERROR_2: + return kSessionInitError2; + case wvcdm::SESSION_INIT_GET_KEYBOX_ERROR: + return kSessionInitGetKeyboxError; + case wvcdm::SESSION_NOT_FOUND_1: + return kSessionNotFound1; + case wvcdm::SESSION_NOT_FOUND_2: + return kSessionNotFound2; + case wvcdm::SESSION_NOT_FOUND_3: + return kSessionNotFound3; + case wvcdm::SESSION_NOT_FOUND_4: + return kSessionNotFound4; + case wvcdm::SESSION_NOT_FOUND_5: + return kSessionNotFound5; + case wvcdm::SESSION_NOT_FOUND_6: + return kSessionNotFound6; + case wvcdm::SESSION_NOT_FOUND_7: + return kSessionNotFound7; + case wvcdm::SESSION_NOT_FOUND_8: + return kSessionNotFound8; + case wvcdm::SESSION_NOT_FOUND_9: + return kSessionNotFound9; + case wvcdm::SESSION_NOT_FOUND_10: + return kSessionNotFound10; + case wvcdm::SESSION_KEYS_NOT_FOUND: + return kSessionKeysNotFound; + case wvcdm::SIGNATURE_NOT_FOUND: + return kSignatureNotFound; + case wvcdm::STORE_LICENSE_ERROR_1: + return kStoreLicenseError1; + case wvcdm::STORE_LICENSE_ERROR_2: + return kStoreLicenseError2; + case wvcdm::STORE_LICENSE_ERROR_3: + return kStoreLicenseError3; + case wvcdm::STORE_USAGE_INFO_ERROR: + return kStoreUsageInfoError; + case wvcdm::UNPROVISION_ERROR_1: + return kUnprovisioningError1; + case wvcdm::UNPROVISION_ERROR_2: + return kUnprovisioningError2; + case wvcdm::UNPROVISION_ERROR_3: + return kUnprovisioningError3; + case wvcdm::UNPROVISION_ERROR_4: + return kUnprovisioningError4; + case wvcdm::UNSUPPORTED_INIT_DATA: + return kUnsupportedInitData; + case wvcdm::USAGE_INFO_NOT_FOUND: + return kUsageInfoNotFound; + case wvcdm::LICENSE_RENEWAL_SERVICE_CERTIFICATE_GENERATION_ERROR: + return kLicenseRenewalServiceCertificateGenerationError; + case wvcdm::PARSE_SERVICE_CERTIFICATE_ERROR: + return kParseServiceCertificateError; + case wvcdm::SERVICE_CERTIFICATE_TYPE_ERROR: + return kServiceCertificateTypeError; + case wvcdm::CLIENT_ID_GENERATE_RANDOM_ERROR: + return kClientIdGenerateRandomError; + case wvcdm::CLIENT_ID_AES_INIT_ERROR: + return kClientIdAesInitError; + case wvcdm::CLIENT_ID_AES_ENCRYPT_ERROR: + return kClientIdAesEncryptError; + case wvcdm::CLIENT_ID_RSA_INIT_ERROR: + return kClientIdRsaInitError; + case wvcdm::CLIENT_ID_RSA_ENCRYPT_ERROR: + return kClientIdRsaEncryptError; + case wvcdm::KEY_ERROR: + // KEY_ERROR is used by the CDM to mean just about any kind of error, not + // just license errors, so it is mapped to the generic response. + return kErrorCDMGeneric; + case wvcdm::INVALID_QUERY_STATUS: + return kInvalidQueryStatus; + case wvcdm::EMPTY_PROVISIONING_CERTIFICATE_2: + return kEmptyProvisioningCertificate2; + case wvcdm::LICENSE_PARSER_NOT_INITIALIZED_4: + return kLicenseParserNotInitialized4; + case wvcdm::INVALID_PARAMETERS_LIC_3: + return kInvalidParametersLic3; + case wvcdm::INVALID_PARAMETERS_LIC_4: + return kInvalidParametersLic4; + case wvcdm::INVALID_PARAMETERS_LIC_5: + return kInvalidParametersLic5; + case wvcdm::INVALID_PARAMETERS_LIC_6: + return kInvalidParametersLic6; + case wvcdm::INVALID_PARAMETERS_LIC_7: + return kInvalidParametersLic7; + case wvcdm::LICENSE_REQUEST_SERVICE_CERTIFICATE_GENERATION_ERROR: + return kLicenseRequestServiceCertificateGenerationError; + case wvcdm::CENC_INIT_DATA_UNAVAILABLE: + return kCencInitDataUnavailable; + case wvcdm::PREPARE_CENC_CONTENT_ID_FAILED: + return kPrepareCencContentIdFailed; + case wvcdm::WEBM_INIT_DATA_UNAVAILABLE: + return kWebmInitDataUnavailable; + case wvcdm::PREPARE_WEBM_CONTENT_ID_FAILED: + return kPrepareWebmContentIdFailed; + case wvcdm::UNSUPPORTED_INIT_DATA_FORMAT: + return kUnsupportedInitDataFormat; + case wvcdm::LICENSE_REQUEST_NONCE_GENERATION_ERROR: + return kLicenseRequestNonceGenerationError; + case wvcdm::LICENSE_REQUEST_SIGNING_ERROR: + return kLicenseRequestSigningError; + case wvcdm::EMPTY_LICENSE_REQUEST: + return kEmptyLicenseRequest; + case wvcdm::UNKNOWN_ERROR: + return android::ERROR_DRM_UNKNOWN; + case wvcdm::UNUSED_1: + return android::UNKNOWN_ERROR; + case wvcdm::SECURE_BUFFER_REQUIRED: + return android::ERROR_DRM_CANNOT_HANDLE; + } + + // Return here instead of as a default case so that the compiler will warn + // us if we forget to include an enum member in the switch statement. + return android::UNKNOWN_ERROR; +} + +static inline bool isCdmResponseTypeSuccess(wvcdm::CdmResponseType res) { + return mapCdmResponseType(res) == android::OK; +} + +} // namespace wvdrm + +#endif // WV_MAP_ERRORS_H_ diff --git a/mtklibs/libcdm_utils/Android.mk_ b/mtklibs/libcdm_utils/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..2f9792a7288764b9bbec0cc16995e33ddf2786d6 --- /dev/null +++ b/mtklibs/libcdm_utils/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcdm_utils +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libcdm_utils.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libcdm_utils/NOTICE b/mtklibs/libcdm_utils/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..3071ad5c785dc1506008d98615f922d7377c735d --- /dev/null +++ b/mtklibs/libcdm_utils/NOTICE @@ -0,0 +1,38 @@ +This software contains software licensed under the BSD license: + +MODP_B64 - High performance base64 encoder/decoder +http://code.google.com/p/stringencoders/ + +Copyright © 2005, 2006, 2007 Nick Galbreath -- nickg [at] modp [dot] com +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + Neither the name of the modp.com nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This is the standard "new" BSD license: +http://www.opensource.org/licenses/bsd-license.php + diff --git a/mtklibs/libcdm_utils/README b/mtklibs/libcdm_utils/README new file mode 100755 index 0000000000000000000000000000000000000000..184c40db2c3b7c105b0cadc3c3d7a6c1ffdb3676 --- /dev/null +++ b/mtklibs/libcdm_utils/README @@ -0,0 +1,28 @@ +Library of Drm features, including cdm, media drm,crypto related functions. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libwvdrmengine will be used by drm, it implement basic functions. +Without them, widevine drm will not work. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libcrypto.so +2. libcutils.so +3. libdl.so +4. liblog.so +5. libstlport.so +6. libutils.so +7. libstagefright_foundation.so + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libwvdrmengine provides interface of drm basic functions, it is built library. diff --git a/mtklibs/libcdm_utils/arm/libcdm_utils.a b/mtklibs/libcdm_utils/arm/libcdm_utils.a new file mode 100755 index 0000000000000000000000000000000000000000..b9334c1d3543d1932a8e06cbcd934e4d1d874a67 Binary files /dev/null and b/mtklibs/libcdm_utils/arm/libcdm_utils.a differ diff --git a/mtklibs/libclangAST_mali/Android.mk_ b/mtklibs/libclangAST_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..66850719defa9dbeae99cd838c8b58ad85d18101 --- /dev/null +++ b/mtklibs/libclangAST_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangAST_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libclangAST_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangAST_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libclangAST_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libclangAST_mali/NOTICE b/mtklibs/libclangAST_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libclangAST_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libclangAST_mali/README b/mtklibs/libclangAST_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libclangAST_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libclangAST_mali/arm/libclangAST_mali.a b/mtklibs/libclangAST_mali/arm/libclangAST_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..5b57dac2c8f611d2df2956cc34390ad8c9c8f989 Binary files /dev/null and b/mtklibs/libclangAST_mali/arm/libclangAST_mali.a differ diff --git a/mtklibs/libclangAST_mali/libclangAST_mali.a b/mtklibs/libclangAST_mali/libclangAST_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..dd5bc0d8e3e8f676bc470e5ee49e277614c9a33e Binary files /dev/null and b/mtklibs/libclangAST_mali/libclangAST_mali.a differ diff --git a/mtklibs/libclangAnalysis_mali/Android.mk_ b/mtklibs/libclangAnalysis_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..558e98baf0f9ab4e3efb274fb26c2a9f15d8d19a --- /dev/null +++ b/mtklibs/libclangAnalysis_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangAnalysis_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libclangAnalysis_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangAnalysis_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libclangAnalysis_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libclangAnalysis_mali/NOTICE b/mtklibs/libclangAnalysis_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libclangAnalysis_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libclangAnalysis_mali/README b/mtklibs/libclangAnalysis_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libclangAnalysis_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libclangAnalysis_mali/arm/libclangAnalysis_mali.a b/mtklibs/libclangAnalysis_mali/arm/libclangAnalysis_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..41cc8d0ac6c29cd279d7346ecac1d3fcd2229d3f Binary files /dev/null and b/mtklibs/libclangAnalysis_mali/arm/libclangAnalysis_mali.a differ diff --git a/mtklibs/libclangAnalysis_mali/libclangAnalysis_mali.a b/mtklibs/libclangAnalysis_mali/libclangAnalysis_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..f250e164914c0d0b101eab1da971b953a3bc4457 Binary files /dev/null and b/mtklibs/libclangAnalysis_mali/libclangAnalysis_mali.a differ diff --git a/mtklibs/libclangBasic_mali/Android.mk_ b/mtklibs/libclangBasic_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..2a5a20a55b2643325287e9f74140912d8a4d1b32 --- /dev/null +++ b/mtklibs/libclangBasic_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangBasic_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libclangBasic_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangBasic_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libclangBasic_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libclangBasic_mali/NOTICE b/mtklibs/libclangBasic_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libclangBasic_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libclangBasic_mali/README b/mtklibs/libclangBasic_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libclangBasic_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libclangBasic_mali/arm/libclangBasic_mali.a b/mtklibs/libclangBasic_mali/arm/libclangBasic_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..e30f689df6c45aa33410d70ba6e25d45678b9f0d Binary files /dev/null and b/mtklibs/libclangBasic_mali/arm/libclangBasic_mali.a differ diff --git a/mtklibs/libclangBasic_mali/libclangBasic_mali.a b/mtklibs/libclangBasic_mali/libclangBasic_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..eb9d5a479a8de09622e8c85263569569184af102 Binary files /dev/null and b/mtklibs/libclangBasic_mali/libclangBasic_mali.a differ diff --git a/mtklibs/libclangCodeGen_mali/Android.mk_ b/mtklibs/libclangCodeGen_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..1c736e77f171dd14dd61c1ddbe2fc35084545bc8 --- /dev/null +++ b/mtklibs/libclangCodeGen_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangCodeGen_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libclangCodeGen_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangCodeGen_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libclangCodeGen_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libclangCodeGen_mali/NOTICE b/mtklibs/libclangCodeGen_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libclangCodeGen_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libclangCodeGen_mali/README b/mtklibs/libclangCodeGen_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libclangCodeGen_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libclangCodeGen_mali/arm/libclangCodeGen_mali.a b/mtklibs/libclangCodeGen_mali/arm/libclangCodeGen_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..f6602779ac280fe425c830722c9f1222f8c5ed90 Binary files /dev/null and b/mtklibs/libclangCodeGen_mali/arm/libclangCodeGen_mali.a differ diff --git a/mtklibs/libclangCodeGen_mali/libclangCodeGen_mali.a b/mtklibs/libclangCodeGen_mali/libclangCodeGen_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..6a3db8a8aa781a00582991ee9783a06ead91200c Binary files /dev/null and b/mtklibs/libclangCodeGen_mali/libclangCodeGen_mali.a differ diff --git a/mtklibs/libclangEdit_mali/Android.mk_ b/mtklibs/libclangEdit_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..68127c69a6588a36dbcb52bfde9aa1ae23cc08f8 --- /dev/null +++ b/mtklibs/libclangEdit_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangEdit_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libclangEdit_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangEdit_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libclangEdit_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libclangEdit_mali/NOTICE b/mtklibs/libclangEdit_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libclangEdit_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libclangEdit_mali/README b/mtklibs/libclangEdit_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libclangEdit_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libclangEdit_mali/arm/libclangEdit_mali.a b/mtklibs/libclangEdit_mali/arm/libclangEdit_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..900dd890b65c64ab051678a7eb06f65042e1b959 Binary files /dev/null and b/mtklibs/libclangEdit_mali/arm/libclangEdit_mali.a differ diff --git a/mtklibs/libclangEdit_mali/libclangEdit_mali.a b/mtklibs/libclangEdit_mali/libclangEdit_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..f125d8970fb5fdcd3365a7f63ae8fe7a1bbe0c30 Binary files /dev/null and b/mtklibs/libclangEdit_mali/libclangEdit_mali.a differ diff --git a/mtklibs/libclangFrontend_mali/Android.mk_ b/mtklibs/libclangFrontend_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..8d1b0e912d52a4d9e28ea98e85adb8513a51fc8e --- /dev/null +++ b/mtklibs/libclangFrontend_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangFrontend_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libclangFrontend_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangFrontend_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libclangFrontend_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libclangFrontend_mali/NOTICE b/mtklibs/libclangFrontend_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libclangFrontend_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libclangFrontend_mali/README b/mtklibs/libclangFrontend_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libclangFrontend_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libclangFrontend_mali/arm/libclangFrontend_mali.a b/mtklibs/libclangFrontend_mali/arm/libclangFrontend_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..a22c1af61ce8183a1a4a9c3902755f61502ac52f Binary files /dev/null and b/mtklibs/libclangFrontend_mali/arm/libclangFrontend_mali.a differ diff --git a/mtklibs/libclangFrontend_mali/libclangFrontend_mali.a b/mtklibs/libclangFrontend_mali/libclangFrontend_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..b71ab316d698d7f65aebc632e5829e5e713e9161 Binary files /dev/null and b/mtklibs/libclangFrontend_mali/libclangFrontend_mali.a differ diff --git a/mtklibs/libclangLex_mali/Android.mk_ b/mtklibs/libclangLex_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..0329147680401b35b3bec401ddd62990ef2847ab --- /dev/null +++ b/mtklibs/libclangLex_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangLex_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libclangLex_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangLex_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libclangLex_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libclangLex_mali/NOTICE b/mtklibs/libclangLex_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libclangLex_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libclangLex_mali/README b/mtklibs/libclangLex_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libclangLex_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libclangLex_mali/arm/libclangLex_mali.a b/mtklibs/libclangLex_mali/arm/libclangLex_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..5f017978abcceb2d85250d85933157ed69f3aeb5 Binary files /dev/null and b/mtklibs/libclangLex_mali/arm/libclangLex_mali.a differ diff --git a/mtklibs/libclangLex_mali/libclangLex_mali.a b/mtklibs/libclangLex_mali/libclangLex_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..7e225cf3c037e8118a66f5be3bdf6d4df184a728 Binary files /dev/null and b/mtklibs/libclangLex_mali/libclangLex_mali.a differ diff --git a/mtklibs/libclangParse_mali/Android.mk_ b/mtklibs/libclangParse_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..63eab482a72376ad23c226bb3140b482d4333789 --- /dev/null +++ b/mtklibs/libclangParse_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangParse_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libclangParse_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangParse_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libclangParse_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libclangParse_mali/NOTICE b/mtklibs/libclangParse_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libclangParse_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libclangParse_mali/README b/mtklibs/libclangParse_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libclangParse_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libclangParse_mali/arm/libclangParse_mali.a b/mtklibs/libclangParse_mali/arm/libclangParse_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..05b724d358fecde61bf556edcd0c2a84d783c4b7 Binary files /dev/null and b/mtklibs/libclangParse_mali/arm/libclangParse_mali.a differ diff --git a/mtklibs/libclangParse_mali/libclangParse_mali.a b/mtklibs/libclangParse_mali/libclangParse_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..bbacd25f9db75b458d484541d4c87863b966a680 Binary files /dev/null and b/mtklibs/libclangParse_mali/libclangParse_mali.a differ diff --git a/mtklibs/libclangSema_mali/Android.mk_ b/mtklibs/libclangSema_mali/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..cdd677f0bdb502638ff259fa4d08e2776f0214e4 --- /dev/null +++ b/mtklibs/libclangSema_mali/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangSema_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libclangSema_mali.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libclangSema_mali +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libclangSema_mali.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libclangSema_mali/NOTICE b/mtklibs/libclangSema_mali/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0570153211f51215bcea3059d03a1f7e699e2ccf --- /dev/null +++ b/mtklibs/libclangSema_mali/NOTICE @@ -0,0 +1,29 @@ +University of Illinois/NCSA Open Source License +Copyright (c) All rights reserved. + +Developed by: + + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal with the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimers. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimers in the documentation and/or other materials provided with the distribution. + * Neither the names of , nor the names of its contributors may be +used to endorse or promote products derived from this Software without specific prior written permission. + + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. + + + + \ No newline at end of file diff --git a/mtklibs/libclangSema_mali/README b/mtklibs/libclangSema_mali/README new file mode 100755 index 0000000000000000000000000000000000000000..ee32e43c5c3ba8c60cb505ff62158a45ab21ba81 --- /dev/null +++ b/mtklibs/libclangSema_mali/README @@ -0,0 +1,32 @@ +This is used for Mali 3D GPU driver implementation. + +WHAT IT DOES? +============= +The core 3D driver implementation used to process EGL/GLES commands submmited from +framework or 3D games. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils +2. libcutils +3. libbinder +4. libc +5. libdl +6. libui +7. libhardware +8. liblog +9. libstlport +10. libsync + +and the following libs from MediaTek: +1. libmtk_mali_user.a +2. libgralloc_extra.so +3. libgpu_aux.so +4. libdpframework.so + +HOW TO USE IT? +============== +Android framework EGL/GL wrapper will load the 3D user space driver through egl.cfg. +EGL/GLES related APIs will pass to the wrapper and go through this user space driver. +This module is responsible for preparing HW jobs to GPU. diff --git a/mtklibs/libclangSema_mali/arm/libclangSema_mali.a b/mtklibs/libclangSema_mali/arm/libclangSema_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..b781052ff6369984b64fbc3b4c4306a4ff748d85 Binary files /dev/null and b/mtklibs/libclangSema_mali/arm/libclangSema_mali.a differ diff --git a/mtklibs/libclangSema_mali/libclangSema_mali.a b/mtklibs/libclangSema_mali/libclangSema_mali.a new file mode 100755 index 0000000000000000000000000000000000000000..df8e8804a820e098e80de7d13acccfc5c8cd5cc3 Binary files /dev/null and b/mtklibs/libclangSema_mali/libclangSema_mali.a differ diff --git a/mtklibs/libcomutils/Android.mk_ b/mtklibs/libcomutils/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..20d96951de6118d0f767106bb9ca2c1b4490a521 --- /dev/null +++ b/mtklibs/libcomutils/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcomutils +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libstagefright_foundation libstagefright libdpframework libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libcomutils.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcomutils +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libstagefright_foundation libstagefright libdpframework libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libcomutils.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libcomutils/NOTICE b/mtklibs/libcomutils/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..090fb862dcee02e8e85ffec7413c818b98d38691 --- /dev/null +++ b/mtklibs/libcomutils/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/libcomutils/README b/mtklibs/libcomutils/README new file mode 100755 index 0000000000000000000000000000000000000000..d427806064871502358f9483c67a766f4a6dc113 --- /dev/null +++ b/mtklibs/libcomutils/README @@ -0,0 +1,25 @@ +Library of MTK ViLTE features, controlling rotation function + +WHAT IT DOES? +============= +libcomutils.so control the rotation for uplink + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +libcutils.so +libstagefright_foundation.so +libutils.so +libstagefright.so + +and the following libs from MediaTek: + +libdpframework.so + + +HOW TO USE IT? +============== +used by the libimsma/source module to do the rotation + + + diff --git a/mtklibs/libcomutils/arm/libcomutils.so b/mtklibs/libcomutils/arm/libcomutils.so new file mode 100755 index 0000000000000000000000000000000000000000..c12235fc0d3f346b63159e1c18e2bac7cf8604ad Binary files /dev/null and b/mtklibs/libcomutils/arm/libcomutils.so differ diff --git a/mtklibs/libcomutils/libcomutils.so b/mtklibs/libcomutils/libcomutils.so new file mode 100755 index 0000000000000000000000000000000000000000..b823b8c40ea9c8bd9475eb522997511eb47e855a Binary files /dev/null and b/mtklibs/libcomutils/libcomutils.so differ diff --git a/mtklibs/libcorecpuwarp/Android.mk_ b/mtklibs/libcorecpuwarp/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..cc9ac3f61de196298143d841fb84e95438659a0a --- /dev/null +++ b/mtklibs/libcorecpuwarp/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcorecpuwarp +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libcorecpuwarp.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcorecpuwarp +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libcorecpuwarp.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libcorecpuwarp/README b/mtklibs/libcorecpuwarp/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libcorecpuwarp/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libcorecpuwarp/arm/libcorecpuwarp.a b/mtklibs/libcorecpuwarp/arm/libcorecpuwarp.a new file mode 100755 index 0000000000000000000000000000000000000000..e57228fd0fee321ea98b8a18773266cc344a2063 Binary files /dev/null and b/mtklibs/libcorecpuwarp/arm/libcorecpuwarp.a differ diff --git a/mtklibs/libcorecpuwarp/libcorecpuwarp.a b/mtklibs/libcorecpuwarp/libcorecpuwarp.a new file mode 100755 index 0000000000000000000000000000000000000000..62ba2b91a855b78eb6bf839bf7775088fe828b30 Binary files /dev/null and b/mtklibs/libcorecpuwarp/libcorecpuwarp.a differ diff --git a/mtklibs/libcorecylindproj/Android.mk_ b/mtklibs/libcorecylindproj/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..8b742ea0253657bc06f34d3256801531c583f184 --- /dev/null +++ b/mtklibs/libcorecylindproj/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcorecylindproj +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libcorecylindproj.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcorecylindproj +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libcorecylindproj.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libcorecylindproj/README b/mtklibs/libcorecylindproj/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libcorecylindproj/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libcorecylindproj/arm/libcorecylindproj.a b/mtklibs/libcorecylindproj/arm/libcorecylindproj.a new file mode 100755 index 0000000000000000000000000000000000000000..88113d4753b38514a2a42a6b5a9acba120cd9b5d Binary files /dev/null and b/mtklibs/libcorecylindproj/arm/libcorecylindproj.a differ diff --git a/mtklibs/libcorecylindproj/libcorecylindproj.a b/mtklibs/libcorecylindproj/libcorecylindproj.a new file mode 100755 index 0000000000000000000000000000000000000000..e985a46a47dcd5ade46891d149722367e643aef4 Binary files /dev/null and b/mtklibs/libcorecylindproj/libcorecylindproj.a differ diff --git a/mtklibs/libcorefefm/Android.mk_ b/mtklibs/libcorefefm/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..b5b97ca31c8fa2e3347fdf69b4aeb8f6a3a8c380 --- /dev/null +++ b/mtklibs/libcorefefm/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcorefefm +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libcorefefm.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcorefefm +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libcorefefm.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libcorefefm/README b/mtklibs/libcorefefm/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libcorefefm/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libcorefefm/arm/libcorefefm.a b/mtklibs/libcorefefm/arm/libcorefefm.a new file mode 100755 index 0000000000000000000000000000000000000000..90588df09227179472ba8558d98dc8bd1ce6ece2 Binary files /dev/null and b/mtklibs/libcorefefm/arm/libcorefefm.a differ diff --git a/mtklibs/libcorefefm/libcorefefm.a b/mtklibs/libcorefefm/libcorefefm.a new file mode 100755 index 0000000000000000000000000000000000000000..55e207918c15f4c601350e366ab9e9042f1bf8ec Binary files /dev/null and b/mtklibs/libcorefefm/libcorefefm.a differ diff --git a/mtklibs/libcoregleswarp/Android.mk_ b/mtklibs/libcoregleswarp/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..98000a3e77106c2ad60103d9e4d637e7a9d01c14 --- /dev/null +++ b/mtklibs/libcoregleswarp/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcoregleswarp +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libcoregleswarp.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcoregleswarp +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libcoregleswarp.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libcoregleswarp/README b/mtklibs/libcoregleswarp/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libcoregleswarp/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libcoregleswarp/arm/libcoregleswarp.a b/mtklibs/libcoregleswarp/arm/libcoregleswarp.a new file mode 100755 index 0000000000000000000000000000000000000000..2fd218b8fd2ac002c72aebf52fd1d6c99bc8c60b Binary files /dev/null and b/mtklibs/libcoregleswarp/arm/libcoregleswarp.a differ diff --git a/mtklibs/libcoregleswarp/libcoregleswarp.a b/mtklibs/libcoregleswarp/libcoregleswarp.a new file mode 100755 index 0000000000000000000000000000000000000000..0711d5d17ba42f7938b8f6b36e65c04d7ee5d539 Binary files /dev/null and b/mtklibs/libcoregleswarp/libcoregleswarp.a differ diff --git a/mtklibs/libcorememc/Android.mk_ b/mtklibs/libcorememc/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..8cc7084f618057715058c3b73b868aaaf0d8d8bf --- /dev/null +++ b/mtklibs/libcorememc/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcorememc +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libcorememc.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcorememc +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libcorememc.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libcorememc/README b/mtklibs/libcorememc/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libcorememc/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libcorememc/arm/libcorememc.a b/mtklibs/libcorememc/arm/libcorememc.a new file mode 100755 index 0000000000000000000000000000000000000000..57ab04d6f88ac1fa2b9ccfd14358718a574901a7 Binary files /dev/null and b/mtklibs/libcorememc/arm/libcorememc.a differ diff --git a/mtklibs/libcorememc/libcorememc.a b/mtklibs/libcorememc/libcorememc.a new file mode 100755 index 0000000000000000000000000000000000000000..72c040ad5ed8cab5f7e0f23de0e3be52a7ab7cfd Binary files /dev/null and b/mtklibs/libcorememc/libcorememc.a differ diff --git a/mtklibs/libcoremotion/Android.mk_ b/mtklibs/libcoremotion/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..78ce52248c6d87ba51dd5be31352bc9249346812 --- /dev/null +++ b/mtklibs/libcoremotion/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcoremotion +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libcoremotion.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcoremotion +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libcoremotion.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libcoremotion/README b/mtklibs/libcoremotion/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libcoremotion/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libcoremotion/arm/libcoremotion.a b/mtklibs/libcoremotion/arm/libcoremotion.a new file mode 100755 index 0000000000000000000000000000000000000000..e5655d07cd7a4cfb484ce5693fa7ee26f706fa56 Binary files /dev/null and b/mtklibs/libcoremotion/arm/libcoremotion.a differ diff --git a/mtklibs/libcoremotion/libcoremotion.a b/mtklibs/libcoremotion/libcoremotion.a new file mode 100755 index 0000000000000000000000000000000000000000..da2ef430874047c92a804e3ed1e8c280d6779e82 Binary files /dev/null and b/mtklibs/libcoremotion/libcoremotion.a differ diff --git a/mtklibs/libcorewarp/Android.mk_ b/mtklibs/libcorewarp/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..5d5a41cfd772a5ea606513c24ad552e9e12203d3 --- /dev/null +++ b/mtklibs/libcorewarp/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcorewarp +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libcorewarp.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libcorewarp +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libcorewarp.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libcorewarp/README b/mtklibs/libcorewarp/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libcorewarp/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libcorewarp/arm/libcorewarp.a b/mtklibs/libcorewarp/arm/libcorewarp.a new file mode 100755 index 0000000000000000000000000000000000000000..c9823a0414b95d167dbf022e6ed87f3c09c4c39f Binary files /dev/null and b/mtklibs/libcorewarp/arm/libcorewarp.a differ diff --git a/mtklibs/libcorewarp/libcorewarp.a b/mtklibs/libcorewarp/libcorewarp.a new file mode 100755 index 0000000000000000000000000000000000000000..581dd339c39838ae6b9792863f96bbc8d75e8a16 Binary files /dev/null and b/mtklibs/libcorewarp/libcorewarp.a differ diff --git a/mtklibs/libdpframework/Android.mk_ b/mtklibs/libdpframework/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..6e3165b27e51a788ede6bd1aac55e7852522da7b --- /dev/null +++ b/mtklibs/libdpframework/Android.mk_ @@ -0,0 +1,27 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libdpframework +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libtz_uree libion libm4u libion_mtk libpq_prot libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libdpframework.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libdpframework +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libtz_uree libion libm4u libion_mtk libpq_prot libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libdpframework.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libdpframework/README b/mtklibs/libdpframework/README new file mode 100755 index 0000000000000000000000000000000000000000..550c792251590360b8492bdc0652aacf6a57f26c --- /dev/null +++ b/mtklibs/libdpframework/README @@ -0,0 +1,10 @@ +API interface of MTK hardware accelerator for image resize, +rotate,color space transform for this device + + +HOW TO USE IT? +============== + +Provide api for every module which needs to do image related functions. +(i.e. surfaceflinger/gpu/venc/camera ... ) +Those caller modules are all under HAL layer. diff --git a/mtklibs/libdpframework/arm/libdpframework.so b/mtklibs/libdpframework/arm/libdpframework.so new file mode 100755 index 0000000000000000000000000000000000000000..fca37f7d4dda67b28f18c46a610a5e87030b9f57 Binary files /dev/null and b/mtklibs/libdpframework/arm/libdpframework.so differ diff --git a/mtklibs/libdpframework/include/DpAsyncBlitStream.h b/mtklibs/libdpframework/include/DpAsyncBlitStream.h new file mode 100755 index 0000000000000000000000000000000000000000..212ad8d19c0c5f94aeb5dff07653e09571e09a10 --- /dev/null +++ b/mtklibs/libdpframework/include/DpAsyncBlitStream.h @@ -0,0 +1,271 @@ +#ifndef __DP_ASYNC_BLIT_STREAM_H__ +#define __DP_ASYNC_BLIT_STREAM_H__ + +#include "DpDataType.h" +#include + +using namespace std; + +class DpMutex; +class DpCondition; +class DpSync; + + +class DpAsyncBlitStream +{ +public: + static bool queryHWSupport(uint32_t srcWidth, + uint32_t srcHeight, + uint32_t dstWidth, + uint32_t dstHeight, + int32_t Orientation = 0, + DpColorFormat srcFormat = DP_COLOR_UNKNOWN, + DpColorFormat dstFormat = DP_COLOR_UNKNOWN); + + DpAsyncBlitStream(); + + ~DpAsyncBlitStream(); + + enum DpOrientation + { + ROT_0 = 0x00000000, + FLIP_H = 0x00000001, + FLIP_V = 0x00000002, + ROT_90 = 0x00000004, + ROT_180 = FLIP_H|FLIP_V, + ROT_270 = ROT_180|ROT_90, + ROT_INVALID = 0x80 + }; + + DP_STATUS_ENUM setConfigBegin(int32_t &fd); + + DP_STATUS_ENUM setSrcBuffer(void *pVABase, + uint32_t size); + + DP_STATUS_ENUM setSrcBuffer(void **pVAList, + uint32_t *pSizeList, + uint32_t planeNumber); + + // VA + MVA address interface + DP_STATUS_ENUM setSrcBuffer(void** pVAddrList, + void** pMVAddrList, + uint32_t *pSizeList, + uint32_t planeNumber); + + // for ION file descriptor + DP_STATUS_ENUM setSrcBuffer(int32_t fileDesc, + uint32_t *sizeList, + uint32_t planeNumber); + + DP_STATUS_ENUM setSrcConfig(int32_t width, + int32_t height, + DpColorFormat format, + DpInterlaceFormat field = eInterlace_None, + DpRect *pROI = 0); + + DP_STATUS_ENUM setSrcConfig(int32_t width, + int32_t height, + int32_t yPitch, + int32_t uvPitch, + DpColorFormat format, + DP_PROFILE_ENUM profile = DP_PROFILE_BT601, + DpInterlaceFormat field = eInterlace_None, + DpRect *pROI = 0, + DpSecure secure = DP_SECURE_NONE, + bool doFlush = true); + + DP_STATUS_ENUM setDstBuffer(void *pVABase, + uint32_t size); + + DP_STATUS_ENUM setDstBuffer(void **pVABaseList, + uint32_t *pSizeList, + uint32_t planeNumber); + + // VA + MVA address interface + DP_STATUS_ENUM setDstBuffer(void** pVABaseList, + void** pMVABaseList, + uint32_t *pSizeList, + uint32_t planeNumber); + + // for ION file descriptor + DP_STATUS_ENUM setDstBuffer(int32_t fileDesc, + uint32_t *pSizeList, + uint32_t planeNumber); + + DP_STATUS_ENUM setDstConfig(int32_t width, + int32_t height, + DpColorFormat format, + DpInterlaceFormat field = eInterlace_None, + DpRect *pROI = 0); + + DP_STATUS_ENUM setDstConfig(int32_t width, + int32_t height, + int32_t yPitch, + int32_t uvPitch, + DpColorFormat format, + DP_PROFILE_ENUM profile = DP_PROFILE_BT601, + DpInterlaceFormat field = eInterlace_None, + DpRect *pROI = 0, + DpSecure secure = DP_SECURE_NONE, + bool doFlush = true); + + DP_STATUS_ENUM setConfigEnd(); + + DP_STATUS_ENUM setRotate(int32_t rotation); + + //Compatible to 89 + DP_STATUS_ENUM setFlip(int flip); + + DP_STATUS_ENUM setOrientation(uint32_t transform); + + uint32_t getPqID(); + + DP_STATUS_ENUM setPQParameter(const DpPqParam &pqParam); + + DP_STATUS_ENUM setDither(bool enDither); + + DP_STATUS_ENUM setUser(uint32_t eID = 0); + + DP_STATUS_ENUM invalidate(); + +#if 0 + DP_STATUS_ENUM pq_process(); +#endif + +private: + typedef struct BlitConfig + { + // src + int32_t srcBuffer; + int32_t srcWidth; + int32_t srcHeight; + int32_t srcYPitch; + int32_t srcUVPitch; + DpColorFormat srcFormat; + DP_PROFILE_ENUM srcProfile; + DpSecure srcSecure; + bool srcFlush; + + // dst + int32_t dstBuffer; + int32_t dstWidth; + int32_t dstHeight; + int32_t dstYPitch; + int32_t dstUVPitch; + DpColorFormat dstFormat; + DP_PROFILE_ENUM dstProfile; + DpSecure dstSecure; + bool dstFlush; + + // crop + int32_t cropXStart; + int32_t cropYStart; + int32_t cropWidth; + int32_t cropHeight; + int32_t cropSubPixelX; + int32_t cropSubPixelY; + + // target offset + int32_t targetXStart; + int32_t targetYStart; + + int32_t rotation; + bool flipStatus; + bool ditherStatus; + DpPqConfig PqConfig; + + bool frameChange; + + BlitConfig(); + } BlitConfig; + + typedef enum JOB_CONFIG_STATE_ENUM + { + JOB_CONFIGING, + JOB_CONFIG_DONE, + JOB_INVALIDATE + } JOB_CONFIG_STATE_ENUM; + + typedef struct AsyncBlitJob + { + uint32_t jobID; // job id used as timeline value + int32_t fenceFD; // fence fd for signal user + DpJobID cmdTaskID; // cmdq task id for wait complete + BlitConfig config; // job config + JOB_CONFIG_STATE_ENUM state; // job state; thread safe + } AsyncBlitJob; + + typedef std::vector JobList; + + // called by constructor + void createThread(); + + // called by invalidate + DP_STATUS_ENUM waitSubmit(); + + static void* waitComplete(void* para); + + DpStream *m_pStream; + DpChannel *m_pChannel; + int32_t m_channelID; + DpBasicBufferPool *m_pSrcPool; + DpBasicBufferPool *m_pDstPool; +#if 0 + int32_t m_srcBuffer; + int32_t m_srcWidth; + int32_t m_srcHeight; + int32_t m_srcYPitch; + int32_t m_srcUVPitch; + DpColorFormat m_srcFormat; + DP_PROFILE_ENUM m_srcProfile; + DpSecure m_srcSecure; + bool m_srcFlush; + int32_t m_dstBuffer; + int32_t m_dstWidth; + int32_t m_dstHeight; + int32_t m_dstYPitch; + int32_t m_dstUVPitch; + DpColorFormat m_dstFormat; + DP_PROFILE_ENUM m_dstProfile; + DpSecure m_dstSecure; + bool m_dstFlush; + DpStream *m_pPqStream; + DpChannel *m_pPqChannel; + DpAutoBufferPool *m_pPqPool; + int32_t m_pqBuffer; + int32_t m_cropXStart; + int32_t m_cropYStart; + int32_t m_cropWidth; + int32_t m_cropHeight; + int32_t m_cropSubPixelX; + int32_t m_cropSubPixelY; + int32_t m_targetXStart; + int32_t m_targetYStart; + int32_t m_rotation; + bool m_frameChange; + bool m_flipStatus; + bool m_ditherStatus; + DpPqConfig m_PqConfig; +#endif + + DpBlitUser m_userID; + uint32_t m_PqID; + int32_t m_pqSupport; + + uint32_t m_jobNum; + DpMutex *m_pJobMutex; + DpCondition *m_pJobCond; + JobList m_jobList; + JobList m_waitJobList; + bool m_abortJobs; + + // *NOT* thread safe + AsyncBlitJob *m_pCurJob; + BlitConfig m_prevConfig; + + pthread_t m_thread; + + DpSync* m_pSync; +}; + +#endif // __DP_ASYNC_BLIT_STREAM_H__ diff --git a/mtklibs/libdpframework/include/DpBlitStream.h b/mtklibs/libdpframework/include/DpBlitStream.h new file mode 100755 index 0000000000000000000000000000000000000000..cad8f5b4b9cf89bf32c03389678e5d17ac62e098 --- /dev/null +++ b/mtklibs/libdpframework/include/DpBlitStream.h @@ -0,0 +1,209 @@ +#ifndef __DP_BLIT_STREAM_H__ +#define __DP_BLIT_STREAM_H__ + +#include "DpDataType.h" + + +class DpBlitStream +{ +public: + static bool queryHWSupport(uint32_t srcWidth, + uint32_t srcHeight, + uint32_t dstWidth, + uint32_t dstHeight, + int32_t Orientation = 0, + DpColorFormat srcFormat = DP_COLOR_UNKNOWN, + DpColorFormat dstFormat = DP_COLOR_UNKNOWN); + + DpBlitStream(); + + ~DpBlitStream(); + + enum DpOrientation + { + ROT_0 = 0x00000000, + FLIP_H = 0x00000001, + FLIP_V = 0x00000002, + ROT_90 = 0x00000004, + ROT_180 = FLIP_H|FLIP_V, + ROT_270 = ROT_180|ROT_90, + ROT_INVALID = 0x80 + }; + + DP_STATUS_ENUM setSrcBuffer(void *pVABase, + uint32_t size); + + DP_STATUS_ENUM setSrcBuffer(void **pVAList, + uint32_t *pSizeList, + uint32_t planeNumber); + + // VA + MVA address interface + DP_STATUS_ENUM setSrcBuffer(void** pVAddrList, + void** pMVAddrList, + uint32_t *pSizeList, + uint32_t planeNumber); + + // for ION file descriptor + DP_STATUS_ENUM setSrcBuffer(int32_t fileDesc, + uint32_t *sizeList, + uint32_t planeNumber); + + DP_STATUS_ENUM setSrcConfig(int32_t width, + int32_t height, + DpColorFormat format, + DpInterlaceFormat field = eInterlace_None, + DpRect *pROI = 0); + + DP_STATUS_ENUM setSrcConfig(int32_t width, + int32_t height, + int32_t yPitch, + int32_t uvPitch, + DpColorFormat format, + DP_PROFILE_ENUM profile = DP_PROFILE_BT601, + DpInterlaceFormat field = eInterlace_None, + DpRect *pROI = 0, + DpSecure secure = DP_SECURE_NONE, + bool doFlush = true); + + DP_STATUS_ENUM setDstBuffer(void *pVABase, + uint32_t size); + + DP_STATUS_ENUM setDstBuffer(void **pVABaseList, + uint32_t *pSizeList, + uint32_t planeNumber); + + // VA + MVA address interface + DP_STATUS_ENUM setDstBuffer(void** pVABaseList, + void** pMVABaseList, + uint32_t *pSizeList, + uint32_t planeNumber); + + // for ION file descriptor + DP_STATUS_ENUM setDstBuffer(int32_t fileDesc, + uint32_t *pSizeList, + uint32_t planeNumber); + + DP_STATUS_ENUM setDstConfig(int32_t width, + int32_t height, + DpColorFormat format, + DpInterlaceFormat field = eInterlace_None, + DpRect *pROI = 0); + + DP_STATUS_ENUM setDstConfig(int32_t width, + int32_t height, + int32_t yPitch, + int32_t uvPitch, + DpColorFormat format, + DP_PROFILE_ENUM profile = DP_PROFILE_BT601, + DpInterlaceFormat field = eInterlace_None, + DpRect *pROI = 0, + DpSecure secure = DP_SECURE_NONE, + bool doFlush = true); + + DP_STATUS_ENUM setRotate(int32_t rotation) + { + if (m_rotation != rotation) + { + m_rotation = rotation; + m_frameChange = true; + } + + return DP_STATUS_RETURN_SUCCESS; + } + + //Compatible to 89 + DP_STATUS_ENUM setFlip(int flip) + { + if (m_flipStatus != flip) + { + m_flipStatus = flip ? true : false; + m_frameChange = true; + } + + return DP_STATUS_RETURN_SUCCESS; + } + + DP_STATUS_ENUM setOrientation(uint32_t transform); + + DP_STATUS_ENUM setTdshp(int gain) + { + if (mTdshp != gain) + { + mTdshp = gain; + m_frameChange = true; + } + + return DP_STATUS_RETURN_SUCCESS; + } + + uint32_t getPqID(); + + DP_STATUS_ENUM setPQParameter(const DpPqParam &pParam); + + DP_STATUS_ENUM setDither(bool enDither) + { + if (m_ditherStatus != enDither) + { + m_ditherStatus = enDither; + m_frameChange = true; + } + + return DP_STATUS_RETURN_SUCCESS; + } + + DP_STATUS_ENUM setUser(uint32_t eID = 0); + + DP_STATUS_ENUM invalidate(); + + DP_STATUS_ENUM pq_process(); + +private: + DpStream *m_pStream; + DpChannel *m_pChannel; + int32_t m_channelID; + DpBasicBufferPool *m_pSrcPool; + DpBasicBufferPool *m_pDstPool; + int32_t m_srcBuffer; + int32_t m_srcWidth; + int32_t m_srcHeight; + int32_t m_srcYPitch; + int32_t m_srcUVPitch; + DpColorFormat m_srcFormat; + DP_PROFILE_ENUM m_srcProfile; + DpSecure m_srcSecure; + bool m_srcFlush; + int32_t m_dstBuffer; + int32_t m_dstWidth; + int32_t m_dstHeight; + int32_t m_dstYPitch; + int32_t m_dstUVPitch; + DpColorFormat m_dstFormat; + DP_PROFILE_ENUM m_dstProfile; + DpSecure m_dstSecure; + bool m_dstFlush; + DpStream *m_pPqStream; + DpChannel *m_pPqChannel; + DpAutoBufferPool *m_pPqPool; + int32_t m_pqBuffer; + int32_t m_cropXStart; + int32_t m_cropYStart; + int32_t m_cropWidth; + int32_t m_cropHeight; + int32_t m_cropSubPixelX; + int32_t m_cropSubPixelY; + int32_t m_targetXStart; + int32_t m_targetYStart; + int32_t m_rotation; + bool m_frameChange; + bool m_flipStatus; + bool m_ditherStatus; + DpBlitUser m_userID; + DpPqConfig m_PqConfig; + uint32_t m_PqID; + int32_t m_pqSupport; + uint32_t m_engFlag; + //Compatible to 89 + int mTdshp; +}; + +#endif // __DP_BLIT_STREAM_H__ diff --git a/mtklibs/libdpframework/include/DpConfig.h b/mtklibs/libdpframework/include/DpConfig.h new file mode 100755 index 0000000000000000000000000000000000000000..f41078509c4e5626350ca92547a98a4abe64dece --- /dev/null +++ b/mtklibs/libdpframework/include/DpConfig.h @@ -0,0 +1,24 @@ +#ifndef __DP_CONFIG_H__ +#define __DP_CONFIG_H__ + +#define CONFIG_FOR_OS_WINDOWS 0 + +#define CONFIG_FOR_OS_ANDROID 1 + +#if !(CONFIG_FOR_OS_WINDOWS ^ CONFIG_FOR_OS_ANDROID) + #error "Please specify the correct platform" +#endif + +#define CONFIG_FOR_TPIPE_FINFO 0 + +#define CONFIG_FOR_PROFILE_INFO 0 + +#define CONFIG_FOR_DUMP_COMMAND 0 + +#define CONFIG_FOR_FLUSH_RANGE 0 + +#define CONFIG_FOR_VERIFY_FPGA 0 + +#define CONFIG_FOR_SYSTRACE 0 + +#endif // __DP_CONFIG_H__ diff --git a/mtklibs/libdpframework/include/DpDataType.h b/mtklibs/libdpframework/include/DpDataType.h new file mode 100755 index 0000000000000000000000000000000000000000..df36bbf9532502a3b93273fc448ac943cddf5d22 --- /dev/null +++ b/mtklibs/libdpframework/include/DpDataType.h @@ -0,0 +1,628 @@ +#ifndef __DP_DATA_TYPE_H__ +#define __DP_DATA_TYPE_H__ + +#ifndef __KERNEL__ +#include "DpConfig.h" + +#include +#include +#include +#include +#include +#endif +#if CONFIG_FOR_OS_WINDOWS + #include + typedef signed char int8_t; + typedef unsigned char uint8_t; + typedef signed short int16_t; + typedef unsigned short uint16_t; + typedef signed int int32_t; + typedef unsigned int uint32_t; + typedef signed long long int64_t; + typedef unsigned long long uint64_t; +#ifndef __unused + #define __unused +#endif + +inline float roundf(float x) +{ + float t; + + if (x >= 0.0) { + t = floorf(x); + if (t - x <= -0.5) + t += 1.0; + return (t); + } else { + t = floorf(-x); + if (t + x <= -0.5) + t += 1.0; + return (-t); + } +} +#endif // CONFIG_FOR_OS_WINDOWS + +#ifndef MAX + #define MAX(x, y) ((x) >= (y))? (x): (y) +#endif // MAX + +#ifndef MIN + #define MIN(x, y) ((x) <= (y))? (x): (y) +#endif // MIN + +#ifndef __KERNEL__ +class DpStream; +class DpChannel; + +class DpBasicBufferPool; +class DpAutoBufferPool; +class DpCommand; +#endif + +typedef unsigned long long DpJobID; +typedef int DpEngineType; + +typedef enum DP_STATUS_ENUM +{ + DP_STATUS_ABORTED_BY_USER = 4, + DP_STATUS_ALL_TEST_DONE = 3, + DP_STATUS_ALL_TPIPE_DONE = 2, + DP_STATUS_BUFFER_DONE = 1, + DP_STATUS_RETURN_SUCCESS = 0, + DP_STATUS_INVALID_PARAX = -1, + DP_STATUS_INVALID_PORT = -2, + DP_STATUS_INVALID_PATH = -3, + DP_STATUS_INVALID_FILE = -4, + DP_STATUS_INVALID_CHANNEL = -5, + DP_STATUS_INVALID_BUFFER = -6, + DP_STATUS_INVALID_STATE = -7, + DP_STATUS_INVALID_ENGINE = -8, + DP_STATUS_INVALID_FORMAT = -9, + DP_STATUS_INVALID_X_INPUT = -10, + DP_STATUS_INVALID_Y_INPUT = -11, + DP_STATUS_INVALID_X_OUTPUT = -12, + DP_STATUS_INVALID_Y_OUTPUT = -13, + DP_STATUS_INVALID_X_ALIGN = -14, + DP_STATUS_INVALID_Y_ALIGN = -15, + DP_STATUS_INVALID_WIDTH = -16, + DP_STATUS_INVALID_HEIGHT = -17, + DP_STATUS_INVALID_CROP = -18, + DP_STATUS_INVALID_ANGLE = -19, + DP_STATUS_INVALID_EVENT = -20, + DP_STATUS_INVALID_OPCODE = -21, + DP_STATUS_CAN_NOT_MERGE = -22, + DP_STATUS_OUT_OF_MEMORY = -23, + DP_STATUS_BUFFER_FULL = -24, + DP_STATUS_BUFFER_EMPTY = -25, + DP_STATUS_OPERATION_FAILED = -26, + DP_STATUS_OVER_MAX_BRANCH = -27, + DP_STATUS_OVER_MAX_ENGINE = -28, + DP_STATUS_OVER_MAX_BACKUP = -29, + DP_STATUS_SCHEDULE_ERROR = -30, + DP_STATUS_OVER_MAX_WIDTH = -31, + DP_STATUS_OVER_MAX_HEIGHT = -32, + DP_STATUS_LEFT_EDGE_ERROR = -33, + DP_STATUS_RIGHT_EDGE_ERROR = -34, + DP_STATUS_TOP_EDGE_ERROR = -35, + DP_STATUS_BOTTOM_EDGE_ERROR = -36, + DP_STATUS_X_LESS_THAN_LAST = -37, + DP_STATUS_Y_LESS_THAN_LAST = -38, + DP_STATUS_UNWANTED_X_CAL = -39, + DP_STATUS_LOSS_OVER_WIDTH = -40, + DP_STATUS_LOSS_OVER_HEIGHT = -41, + DP_STATUS_X_ALIGN_ERROR = -42, + DP_STATUS_Y_ALIGN_ERROR = -43, + DP_STATUS_X_OUT_OVERLAP = -44, + DP_STATUS_Y_OUT_OVERLAP = -45, + DP_STATUS_BACK_LE_FORWARD = -46, + DP_STATUS_UNKNOWN_ERROR = -47, +} DP_STATUS_ENUM; + + +typedef enum DP_MEMORY_ENUM +{ + DP_MEMORY_VA, + DP_MEMORY_ION, + DP_MEMORY_PHY, + DP_MEMORY_MVA +} DP_MEMORY_ENUM; + +typedef struct DpJPEGEnc_Config_st // for JPEG port only +{ + int32_t fileDesc; + uint32_t size; + uint32_t fQuality; + uint32_t soi_en; + void *memSWAddr[3]; +} DpJPEGEnc_Config; + +typedef struct DpVEnc_Config // for VENC port only +{ + /* Venc Modify + */ + unsigned long rVencDrvHandle; + /* Venc Modify - */ + uint32_t memYUVMVAAddr[3]; + uint32_t memYUVMVASize[3]; + void *memYUVSWAddr[3]; + void *memOutputSWAddr[3]; + + uint32_t* pNumPABuffer; + uint32_t* pPABuffer; + uint64_t* pConfigFrameCount; + uint64_t* pDequeueFrameCount; + DpCommand* pVEncCommander; +} DpVEnc_Config; + + +#ifndef __KERNEL__ +class DpRect +{ +public: + + enum + { + eINVALID_VALUE = -1, + eINITIAL_VALUE = 0 //TBD, why to set as "0"? + }; + + inline DpRect(void) + : x(eINITIAL_VALUE), sub_x(eINITIAL_VALUE), + y(eINITIAL_VALUE), sub_y(eINITIAL_VALUE), + w(eINITIAL_VALUE), h(eINITIAL_VALUE) + {} + + inline DpRect(int32_t in_x, int32_t in_y, int32_t in_w, int32_t in_h, + int32_t in_sub_x = 0, int32_t in_sub_y = 0) + : x(in_x), + sub_x(in_sub_x), + y(in_y), + sub_y(in_sub_y), + w(in_w), + h(in_h) + {} + + inline DpRect(const DpRect& rt) + : x(rt.x), + sub_x(rt.sub_x), + y(rt.y), + sub_y(rt.sub_y), + w(rt.w), + h(rt.h) + {} + + ~DpRect(void) {} + + inline DpRect& operator= (const DpRect& rval) + { + if (this != &rval) + { + x = rval.x; + sub_x = rval.sub_x; + y = rval.y; + sub_y = rval.sub_y; + w = rval.w; + h = rval.h; + } + + return *this; + } + + int32_t x; + int32_t sub_x; + int32_t y; + int32_t sub_y; + int32_t w; + int32_t h; +}; +#endif + +class DpColorMatrix +{ + /* Define the color matrix. + * + * Color matrix would be used in the following transforms: + * YUV2RGB + * / R \ / c00 c01 c02 \ / Y - i0 \ + * | G | = | c10 c11 c12 | * | U - i1 | + * \ B / \ c20 c21 c22 / \ V - i2 / + * YUV2YUV + * / Y \ / c00 c01 c02 \ / Y - i0 \ / o0 \ + * | U | = | c10 c11 c12 | * | U - i1 | + | o1 | + * \ V / \ c20 c21 c22 / \ V - i2 / \ o2 / + * + * Coefficient value range: -4.00 ~ 3.99 + */ + +public: + bool enable; + float c00; float c01; float c02; + float c10; float c11; float c12; + float c20; float c21; float c22; + + inline DpColorMatrix(void) + : enable(false), + c00(1.0), c01(0.0), c02(0.0), + c10(0.0), c11(1.0), c12(0.0), + c20(0.0), c21(0.0), c22(1.0) + {} + + inline DpColorMatrix(float in_c00, float in_c01, float in_c02, + float in_c10, float in_c11, float in_c12, + float in_c20, float in_c21, float in_c22, + bool in_enable = true) + : enable(in_enable), + c00(in_c00), c01(in_c01), c02(in_c02), + c10(in_c10), c11(in_c11), c12(in_c12), + c20(in_c20), c21(in_c21), c22(in_c22) + {} + + inline DpColorMatrix(const DpColorMatrix& m) + : enable(m.enable), + c00(m.c00), c01(m.c01), c02(m.c02), + c10(m.c10), c11(m.c11), c12(m.c12), + c20(m.c20), c21(m.c21), c22(m.c22) + {} + + ~DpColorMatrix(void) {} + + inline DpColorMatrix& operator= (const DpColorMatrix& r) + { + if (this != &r) + { + enable = r.enable; + c00 = r.c00; c01 = r.c01; c02 = r.c02; + c10 = r.c10; c11 = r.c11; c12 = r.c12; + c20 = r.c20; c21 = r.c21; c22 = r.c22; + } + + return *this; + } + + inline DpColorMatrix operator* (const DpColorMatrix& r) + { + if (!enable) + { + if (!r.enable) + { + return DpColorMatrix(); + } + return DpColorMatrix(r); + } + if (!r.enable) + { + return DpColorMatrix(*this); + } + + return DpColorMatrix( + c00 * r.c00 + c01 * r.c10 + c02 * r.c20, c00 * r.c01 + c01 * r.c11 + c02 * r.c21, c00 * r.c02 + c01 * r.c12 + c02 * r.c22, + c10 * r.c00 + c11 * r.c10 + c12 * r.c20, c10 * r.c01 + c11 * r.c11 + c12 * r.c21, c10 * r.c02 + c11 * r.c12 + c12 * r.c22, + c20 * r.c00 + c21 * r.c10 + c22 * r.c20, c20 * r.c01 + c21 * r.c11 + c22 * r.c21, c20 * r.c02 + c21 * r.c12 + c22 * r.c22); + } + + inline bool operator== (const DpColorMatrix& r) + { + if (this == &r) + { + return true; + } + if (!enable && !r.enable) + { + return true; + } + return (enable == r.enable) && + (c00 == r.c00) && (c01 == r.c01) && (c02 == r.c02) && + (c10 == r.c10) && (c11 == r.c11) && (c12 == r.c12) && + (c20 == r.c20) && (c21 == r.c21) && (c22 == r.c22); + } + + inline bool operator!= (const DpColorMatrix& r) + { + return !(*this == r); + } +}; + +inline DpColorMatrix operator* (const float l, const DpColorMatrix& r) +{ + return DpColorMatrix( + l * r.c00, l * r.c01, l * r.c02, + l * r.c10, l * r.c11, l * r.c12, + l * r.c20, l * r.c21, l * r.c22, + r.enable); +} + + +typedef enum DP_PROFILE_ENUM +{ + DP_PROFILE_BT601, //Limited range + DP_PROFILE_BT709, + DP_PROFILE_JPEG, + DP_PROFILE_FULL_BT601 = DP_PROFILE_JPEG +} DP_PROFILE_ENUM; + + +typedef enum DP_STREAM_ID_ENUM +{ + DP_BLITSTREAM = 0x10000000, + DP_FRAGSTREAM = 0x20000000, + DP_ISPSTREAM = 0x30000000, + DP_ASYNCBLITSTREAM = 0x40000000, + DP_VENCSTREAM = 0x50000000, + DP_UNKNOWN_STREAM = 0xF0000000, +} DP_STREAM_ID_ENUM; + +typedef enum DP_MEDIA_TYPE_ENUM +{ + MEDIA_UNKNOWN, + MEDIA_VIDEO, + MEDIA_PICTURE, + MEDIA_ISP_PREVIEW +} DP_MEDIA_TYPE_ENUM; + +typedef struct +{ + uint32_t id; + uint32_t timeStamp; + uint32_t reserved[28]; // padding and reserved +} DpVideoParam; + +typedef struct +{ + bool withHist; + uint32_t info[20]; + uint32_t iso; + uint32_t reserved[8]; // padding and reserved +} DpImageParam; + +typedef struct +{ + uint32_t iso; + uint32_t reserved[29]; +} DpIspParam; + + +struct DpPqParam { + bool enable; + DP_MEDIA_TYPE_ENUM scenario; + + union { + DpVideoParam video; + DpImageParam image; + DpIspParam isp; + } u; +}; + +struct DpPqConfig { + uint32_t enSharp; + uint32_t enDC; + uint32_t enColor; +}; + + +// Format group: 0-RGB, 1-YUV, 2-Bayer raw, 3-compressed format +#define DP_COLORFMT_PACK(PACKED, LOOSE, VIDEO, PLANE, COPLANE, HFACTOR, VFACTOR, BITS, GROUP ,SWAP_ENABLE, UNIQUEID) \ + ((PACKED << 31) | \ + (LOOSE << 30) | \ + (VIDEO << 27) | \ + (PLANE << 24) | \ + (COPLANE << 22) | \ + (HFACTOR << 20) | \ + (VFACTOR << 18) | \ + (BITS << 8) | \ + (GROUP << 6) | \ + (SWAP_ENABLE << 5) | \ + (UNIQUEID << 0)) + +#define DP_COLOR_GET_10BIT_PACKED(color) ((0x80000000 & color) >> 31) +#define DP_COLOR_GET_10BIT_LOOSE(color) (((0xC0000000 & color) >> 30) == 1) +#define DP_COLOR_GET_10BIT_TILE_MODE(color) (((0xC0000000 & color) >> 30) == 3) +#define DP_COLOR_GET_UFP_ENABLE(color) ((0x20000000 & color) >> 29) +#define DP_COLOR_GET_INTERLACED_MODE(color) ((0x10000000 & color) >> 28) +#define DP_COLOR_GET_BLOCK_MODE(color) ((0x08000000 & color) >> 27) +#define DP_COLOR_GET_PLANE_COUNT(color) ((0x07000000 & color) >> 24) +#define DP_COLOR_IS_UV_COPLANE(color) ((0x00C00000 & color) >> 22) +#define DP_COLOR_GET_H_SUBSAMPLE(color) ((0x00300000 & color) >> 20) +#define DP_COLOR_GET_V_SUBSAMPLE(color) ((0x000C0000 & color) >> 18) +#define DP_COLOR_BITS_PER_PIXEL(color) ((0x0003FF00 & color) >> 8) +#define DP_COLOR_GET_COLOR_GROUP(color) ((0x000000C0 & color) >> 6) +#define DP_COLOR_GET_SWAP_ENABLE(color) ((0x00000020 & color) >> 5) +#define DP_COLOR_GET_UNIQUE_ID(color) ((0x0000001F & color) >> 0) +#define DP_COLOR_GET_HW_FORMAT(color) ((0x0000001F & color) >> 0) + +typedef enum DP_COLOR_ENUM +{ + DP_COLOR_UNKNOWN = 0, + DP_COLOR_FULLG8 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 8, 3, 0, 20), + DP_COLOR_FULLG10 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 10, 3, 0, 21), + DP_COLOR_FULLG12 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 12, 3, 0, 22), + DP_COLOR_FULLG14 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 14, 3, 0, 26), + DP_COLOR_UFO10 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 10, 3, 0, 27), + + DP_COLOR_BAYER8 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 8, 2, 0, 20), + DP_COLOR_BAYER10 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 10, 2, 0, 21), + DP_COLOR_BAYER12 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 12, 2, 0, 22), + + // Unified format + DP_COLOR_GREY = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 8, 1, 0, 7), + + DP_COLOR_RGB565 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 16, 0, 0, 0), + DP_COLOR_BGR565 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 16, 0, 1, 0), + DP_COLOR_RGB888 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 24, 0, 1, 1), + DP_COLOR_BGR888 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 24, 0, 0, 1), + DP_COLOR_RGBA8888 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 32, 0, 1, 2), + DP_COLOR_BGRA8888 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 2), + DP_COLOR_ARGB8888 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 32, 0, 1, 3), + DP_COLOR_ABGR8888 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 3), + + DP_COLOR_UYVY = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 1, 0, 16, 1, 0, 4), + DP_COLOR_VYUY = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 1, 0, 16, 1, 1, 4), + DP_COLOR_YUYV = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 1, 0, 16, 1, 0, 5), + DP_COLOR_YVYU = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 1, 0, 16, 1, 1, 5), + + DP_COLOR_I420 = DP_COLORFMT_PACK(0, 0, 0, 3, 0, 1, 1, 8, 1, 0, 8), + DP_COLOR_YV12 = DP_COLORFMT_PACK(0, 0, 0, 3, 0, 1, 1, 8, 1, 1, 8), + DP_COLOR_I422 = DP_COLORFMT_PACK(0, 0, 0, 3, 0, 1, 0, 8, 1, 0, 9), + DP_COLOR_YV16 = DP_COLORFMT_PACK(0, 0, 0, 3, 0, 1, 0, 8, 1, 1, 9), + DP_COLOR_I444 = DP_COLORFMT_PACK(0, 0, 0, 3, 0, 0, 0, 8, 1, 0, 10), + DP_COLOR_YV24 = DP_COLORFMT_PACK(0, 0, 0, 3, 0, 0, 0, 8, 1, 1, 10), + + DP_COLOR_NV12 = DP_COLORFMT_PACK(0, 0, 0, 2, 1, 1, 1, 8, 1, 0, 12), + DP_COLOR_NV21 = DP_COLORFMT_PACK(0, 0, 0, 2, 1, 1, 1, 8, 1, 1, 12), + DP_COLOR_NV16 = DP_COLORFMT_PACK(0, 0, 0, 2, 1, 1, 0, 8, 1, 0, 13), + DP_COLOR_NV61 = DP_COLORFMT_PACK(0, 0, 0, 2, 1, 1, 0, 8, 1, 1, 13), + DP_COLOR_NV24 = DP_COLORFMT_PACK(0, 0, 0, 2, 1, 0, 0, 8, 1, 0, 14), + DP_COLOR_NV42 = DP_COLORFMT_PACK(0, 0, 0, 2, 1, 0, 0, 8, 1, 1, 14), + + // Mediatek proprietary format + DP_COLOR_420_BLKP_UFO = DP_COLORFMT_PACK(0, 0, 5, 2, 1, 1, 1, 256, 1, 0, 12),//Frame mode + Block mode + DP_COLOR_420_BLKP = DP_COLORFMT_PACK(0, 0, 1, 2, 1, 1, 1, 256, 1, 0, 12),//Frame mode + Block mode + DP_COLOR_420_BLKI = DP_COLORFMT_PACK(0, 0, 3, 2, 1, 1, 1, 256, 1, 0, 12),//Field mode + Block mode + DP_COLOR_422_BLKP = DP_COLORFMT_PACK(0, 0, 1, 1, 0, 1, 0, 512, 1, 0, 4), //Frame mode + + DP_COLOR_PARGB8888 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 26), + DP_COLOR_XARGB8888 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 27), + DP_COLOR_PABGR8888 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 28), + DP_COLOR_XABGR8888 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 29), + + DP_COLOR_IYU2 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 24, 1, 0, 25), + DP_COLOR_YUV444 = DP_COLORFMT_PACK(0, 0, 0, 1, 0, 0, 0, 24, 1, 0, 30), + + // Mediatek proprietary 10bit format + DP_COLOR_RGBA1010102 = DP_COLORFMT_PACK(1, 0, 0, 1, 0, 0, 0, 32, 0, 1, 2), + DP_COLOR_BGRA1010102 = DP_COLORFMT_PACK(1, 0, 0, 1, 0, 0, 0, 32, 0, 0, 2), + DP_COLOR_UYVY_10P = DP_COLORFMT_PACK(1, 0, 0, 1, 0, 1, 0, 20, 1, 0, 4),//Packed 10bit UYVY + DP_COLOR_NV21_10P = DP_COLORFMT_PACK(1, 0, 0, 2, 1, 1, 1, 10, 1, 1, 12),//Packed 10bit NV21 + DP_COLOR_420_BLKP_10_H = DP_COLORFMT_PACK(1, 0, 1, 2, 1, 1, 1, 320, 1, 0, 12),//Frame mode + Block mode + DP_COLOR_420_BLKP_10_V = DP_COLORFMT_PACK(1, 1, 1, 2, 1, 1, 1, 320, 1, 0, 12),//Frame mode + HEVC tile mode + DP_COLOR_420_BLKP_UFO_10_H = DP_COLORFMT_PACK(1, 0, 5, 2, 1, 1, 1, 320, 1, 0, 12),//Frame mode + Block mode + DP_COLOR_420_BLKP_UFO_10_V = DP_COLORFMT_PACK(1, 1, 5, 2, 1, 1, 1, 320, 1, 0, 12),//Frame mode + HEVC tile mode + + // Loose 10bit format + DP_COLOR_UYVY_10L = DP_COLORFMT_PACK(0, 1, 0, 1, 0, 1, 0, 20, 1, 0, 4), + DP_COLOR_VYUY_10L = DP_COLORFMT_PACK(0, 1, 0, 1, 0, 1, 0, 20, 1, 1, 4), + DP_COLOR_YUYV_10L = DP_COLORFMT_PACK(0, 1, 0, 1, 0, 1, 0, 20, 1, 0, 5), + DP_COLOR_YVYU_10L = DP_COLORFMT_PACK(0, 1, 0, 1, 0, 1, 0, 20, 1, 1, 5), + DP_COLOR_NV12_10L = DP_COLORFMT_PACK(0, 1, 0, 2, 1, 1, 1, 10, 1, 0, 12), + DP_COLOR_NV21_10L = DP_COLORFMT_PACK(0, 1, 0, 2, 1, 1, 1, 10, 1, 1, 12), + DP_COLOR_NV16_10L = DP_COLORFMT_PACK(0, 1, 0, 2, 1, 1, 0, 10, 1, 0, 13), + DP_COLOR_NV61_10L = DP_COLORFMT_PACK(0, 1, 0, 2, 1, 1, 0, 10, 1, 1, 13), + DP_COLOR_YV12_10L = DP_COLORFMT_PACK(0, 1, 0, 3, 0, 1, 1, 10, 1, 1, 8), + DP_COLOR_I420_10L = DP_COLORFMT_PACK(0, 1, 0, 3, 0, 1, 1, 10, 1, 0, 8), + +// DP_COLOR_YUV422I = DP_COLORFMT_PACK(1, 0, 1, 0, 16, 1, 41),//Dup to DP_COLOR_YUYV +// DP_COLOR_Y800 = DP_COLORFMT_PACK(1, 0, 1, 0, 8, 1, 42),//Dup to DP_COLOR_GREY +// DP_COLOR_COMPACT_RAW1 = DP_COLORFMT_PACK(1, 0, 1, 0, 10, 2, 43),//Dup to Bayer10 +// DP_COLOR_420_3P_YVU = DP_COLORFMT_PACK(3, 0, 1, 1, 8, 1, 44),//Dup to DP_COLOR_YV12 +} DP_COLOR_ENUM; + +// Legacy for 6589 compatible +typedef DP_COLOR_ENUM DpColorFormat; + +#define eYUV_420_3P DP_COLOR_I420 +#define eYUV_420_2P_YUYV DP_COLOR_YUYV +#define eYUV_420_2P_UYVY DP_COLOR_UYVY +#define eYUV_420_2P_YVYU DP_COLOR_YVYU +#define eYUV_420_2P_VYUY DP_COLOR_VYUY +#define eYUV_420_2P_ISP_BLK DP_COLOR_420_BLKP +#define eYUV_420_2P_VDO_BLK DP_COLOR_420_BLKI +#define eYUV_422_3P DP_COLOR_I422 +#define eYUV_422_2P DP_COLOR_NV16 +#define eYUV_422_I DP_COLOR_YUYV +#define eYUV_422_I_BLK DP_COLOR_422_BLKP +#define eYUV_444_3P DP_COLOR_I444 +#define eYUV_444_2P DP_COLOR_NV24 +#define eYUV_444_1P DP_COLOR_YUV444 +#define eBAYER8 DP_COLOR_BAYER8 +#define eBAYER10 DP_COLOR_BAYER10 +#define eBAYER12 DP_COLOR_BAYER12 +#define eRGB565 DP_COLOR_RGB565 +#define eBGR565 DP_COLOR_BGR565 +#define eRGB888 DP_COLOR_RGB888 +#define eBGR888 DP_COLOR_BGR888 +#define eARGB8888 DP_COLOR_ARGB8888 +#define eABGR8888 DP_COLOR_ABGR8888 +#define DP_COLOR_XRGB8888 DP_COLOR_ARGB8888 +#define DP_COLOR_XBGR8888 DP_COLOR_ABGR8888 +#define eRGBA8888 DP_COLOR_RGBA8888 +#define eBGRA8888 DP_COLOR_BGRA8888 +#define eXRGB8888 DP_COLOR_XRGB8888 +#define eXBGR8888 DP_COLOR_XBGR8888 +#define DP_COLOR_RGBX8888 DP_COLOR_RGBA8888 +#define DP_COLOR_BGRX8888 DP_COLOR_BGRA8888 +#define eRGBX8888 DP_COLOR_RGBX8888 +#define eBGRX8888 DP_COLOR_BGRX8888 +#define ePARGB8888 DP_COLOR_PARGB8888 +#define eXARGB8888 DP_COLOR_XARGB8888 +#define ePABGR8888 DP_COLOR_PABGR8888 +#define eXABGR8888 DP_COLOR_XABGR8888 +#define eGREY DP_COLOR_GREY +#define eI420 DP_COLOR_I420 +#define eYV12 DP_COLOR_YV12 +#define eIYU2 DP_COLOR_IYU2 + + +#define eYV21 DP_COLOR_I420 +#define eNV12_BLK DP_COLOR_420_BLKP +#define eNV12_BLK_FCM DP_COLOR_420_BLKI +#define eYUV_420_3P_YVU DP_COLOR_YV12 + +#define eNV12_BP DP_COLOR_420_BLKP +#define eNV12_BI DP_COLOR_420_BLKI +#define eNV12 DP_COLOR_NV12 +#define eNV21 DP_COLOR_NV21 +#define eI422 DP_COLOR_I422 +#define eYV16 DP_COLOR_YV16 +#define eNV16 DP_COLOR_NV16 +#define eNV61 DP_COLOR_NV61 +#define eUYVY DP_COLOR_UYVY +#define eVYUY DP_COLOR_VYUY +#define eYUYV DP_COLOR_YUYV +#define eYVYU DP_COLOR_YVYU +#define eUYVY_BP DP_COLOR_422_BLKP +#define eI444 DP_COLOR_I444 +#define eNV24 DP_COLOR_NV24 +#define eNV42 DP_COLOR_NV42 +#define DP_COLOR_YUY2 DP_COLOR_YUYV +#define eYUY2 DP_COLOR_YUY2 +#define eY800 DP_COLOR_GREY +//#define eIYU2 +#define eMTKYUV DP_COLOR_422_BLKP + +#define eCompactRaw1 DP_COLOR_BAYER10 + + +enum DpInterlaceFormat +{ + eInterlace_None, + eTop_Field, + eBottom_Field +}; + +enum DpSecure +{ + DP_SECURE_NONE = 0, + DP_SECURE = 1, + DP_SECURE_SHIFT = 8 +}; + +enum DpBlitUser +{ + DP_BLIT_HWC0 = 0, + DP_BLIT_HWC1 = 1, + DP_BLIT_HWC2 = 2, + DP_BLIT_HWC3 = 3, + DP_BLIT_HWC4 = 4, + DP_BLIT_HWC5 = 5, + + DP_BLIT_GENERAL_USER = DP_BLIT_HWC0, + DP_BLIT_GPU = DP_BLIT_HWC1, + // GPU_2 + // RESERVED + DP_BLIT_HWC_120FPS = DP_BLIT_HWC4, + DP_BLIT_ADDITIONAL_DISPLAY = DP_BLIT_HWC5, +}; + +#define MAX_NUM_READBACK_REGS (20) + +#define VENC_ENABLE_FLAG (0x08967) + +#endif // __DP_DATA_TYPE_H__ diff --git a/mtklibs/libdpframework/include/DpFragStream.h b/mtklibs/libdpframework/include/DpFragStream.h new file mode 100755 index 0000000000000000000000000000000000000000..89c340054661198b7697ff6cec60e240f354611b --- /dev/null +++ b/mtklibs/libdpframework/include/DpFragStream.h @@ -0,0 +1,155 @@ +#ifndef __DP_FRAG_STREAM_H__ +#define __DP_FRAG_STREAM_H__ + +#include "DpDataType.h" + +class DpStream; +class DpChannel; +class DpRingBufferPool; +class DpBasicBufferPool; + +class DpFragStream +{ +public: + DpFragStream(); + + ~DpFragStream(); + + /** + * Set source image information + * Parameters + * format : source image format + * width : source image width + * height : source image height + * pitch : source image pitch + */ + DP_STATUS_ENUM setSrcConfig(DpColorFormat format, + int32_t width, + int32_t height, + int32_t MCUXSize, + int32_t MCUYSize, + int32_t pitch, + DpRect *pROI = 0); + + DP_STATUS_ENUM setSrcConfig(DpColorFormat format, + int32_t width, + int32_t height, + int32_t MCUXSize, + int32_t MCUYSize, + int32_t YPitch, + int32_t UVPitch, + DpRect *pROI = 0); + + DP_STATUS_ENUM setDstBuffer(void **pAddrList, + uint32_t *pSizeList, + uint32_t planeNumber); + + /** + * Set target image information + * Parameters + * format : target image format + * width : target image width + * height : target image height + * pitch : target image pitch + */ + DP_STATUS_ENUM setDstConfig(DpColorFormat format, + int32_t width, + int32_t height, + int32_t pitch); + + /** + * Start fragment processing + */ + DP_STATUS_ENUM startFrag(uint32_t* pMCUYCount,bool bShrpEnabled); + + uint32_t getPqID(); + + DP_STATUS_ENUM setPQParameter(const DpPqParam &pqParam); + + /** + * Query fragment information + * Parameters: + * pBufID : The buffer identifier of the fragment + * pFormat : The required fragment buffer format + * **pBase : Base address depends on the plane count + * pXStart : The required X source start for decoder + * pYStart : The required Y source start for decoder + * pWidth : The required source width for decoder + * pHeight : The required source height for decoder + * pPitch : The required source pitch for decoder + * waitBuf : Wait for the fragment information ready + */ + DP_STATUS_ENUM dequeueFrag(int32_t *pBufID, + DpColorFormat *pFormat, + void **pBase, + int32_t *pMCUXStart, + int32_t *pMCUYStart, + int32_t *pWidth, + int32_t *pHeight, + int32_t *pPitch, + bool waitBuf = true); + + /** + * Set fragment information + * Parameters: + * The specified fragment identifier + */ + DP_STATUS_ENUM queueFrag(int32_t bufID); + + /** + * Stop the fragment processing + */ + DP_STATUS_ENUM stopFrag(); + + DP_STATUS_ENUM setDither(bool enDither) + { + m_ditherStatus = enDither; + + return DP_STATUS_RETURN_SUCCESS; + } + + DP_STATUS_ENUM setMcuCol(int32_t mcu_col) + { + m_MCU_col = mcu_col; + + return DP_STATUS_RETURN_SUCCESS; + } + + DP_STATUS_ENUM setEmbeddJPEG(bool enEmbeddedJPEG = false) + { + m_embeddedJPEG = enEmbeddedJPEG; + + return DP_STATUS_RETURN_SUCCESS; + } + + +private: + DpStream *m_pStream; + DpChannel *m_pChannel; + int32_t m_channelID; + DpRingBufferPool *m_pSrcPool; + DpBasicBufferPool *m_pDstPool; + DpColorFormat m_srcFormat; + int32_t m_MCUYSize; + int32_t m_MCUXSize; + int32_t m_srcWidth; + int32_t m_srcHeight; + int32_t m_srcYPitch; + int32_t m_srcUVPitch; + int32_t m_dstBufID; + DpColorFormat m_dstFormat; + int32_t m_dstWidth; + int32_t m_dstHeight; + int32_t m_dstYPitch; + int32_t m_dstUVPitch; + int32_t m_MCU_col; + DpRect m_cropInfo; + bool m_ditherStatus; + bool m_streamStart; + bool m_embeddedJPEG; + DpPqConfig m_PqConfig; + uint32_t m_PqID; + int32_t m_pqSupport; +}; + +#endif // __DP_FRAG_STREAM_H__ diff --git a/mtklibs/libdpframework/include/DpIspStream.h b/mtklibs/libdpframework/include/DpIspStream.h new file mode 100755 index 0000000000000000000000000000000000000000..16431ac7699e9da073f65544bd0bd987e78e9cd1 --- /dev/null +++ b/mtklibs/libdpframework/include/DpIspStream.h @@ -0,0 +1,396 @@ +#ifndef __DP_ISP_STREAM_H__ +#define __DP_ISP_STREAM_H__ + +#include "DpDataType.h" +#include +#include +#include "tpipe_config.h" + +using namespace std; + +#define ISP_MAX_OUTPUT_PORT_NUM 4 + +class DpMutex; + +typedef std::vector BufIDList; +typedef std::vector JobIDList; +typedef std::vector BufTimeList; + + +class DpIspStream +{ +public: + enum ISPStreamType + { + ISP_IC_STREAM, + ISP_VR_STREAM, + ISP_ZSD_STREAM, + ISP_IP_STREAM, + ISP_VSS_STREAM, + ISP_ZSD_SLOW_STREAM, + ISP_CC_STREAM = ISP_VR_STREAM + }; + + enum ISPStreamHint + { + HINT_ISP_NEW_FRAME = 0x0, // need to do tpipe calculation + HINT_ISP_TPIPE_NO_CHANGE = 0x1, // can skip tpipe calculation + HINT_ISP_FRAME_MODE = 0x2, // ISP-only frame mode + }; + + DpIspStream(ISPStreamType type); + + ~DpIspStream(); + + DP_STATUS_ENUM queueSrcBuffer(void *pVA, + uint32_t size); + + DP_STATUS_ENUM queueSrcBuffer(void *pVA, + uint32_t MVA, + uint32_t size); + + DP_STATUS_ENUM queueSrcBuffer(void **pVAList, + uint32_t *pSizeList, + int32_t planeNum); + + DP_STATUS_ENUM queueSrcBuffer(uint32_t *pMVAList, + uint32_t *pSizeList, + int32_t planeNum); + + DP_STATUS_ENUM queueSrcBuffer(void **pVAList, + uint32_t *pMVAList, + uint32_t *pSizeList, + int32_t planeNum); + + // for ION file descriptor + DP_STATUS_ENUM queueSrcBuffer(int32_t fileDesc, + uint32_t *sizeList, + uint32_t planeNum); + + DP_STATUS_ENUM dequeueSrcBuffer(); + + /** + * Description: + * Set source buffer configuration information + * + * Parameter: + * srcFormat: Source buffer format + * srcWidth: Source buffer width + * srcHeight: Source buffer height + * srcPitch: Source buffer pitch + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM setSrcConfig(DpColorFormat srcFormat, + int32_t srcWidth, + int32_t srcHeight, + int32_t srcPitch, + bool doFlush = true); + + + DP_STATUS_ENUM setSrcConfig(int32_t width, + int32_t height, + int32_t YPitch, + int32_t UVPitch, + DpColorFormat format, + DP_PROFILE_ENUM profile = DP_PROFILE_BT601, + DpInterlaceFormat field = eInterlace_None, + DpRect *pROI = 0, + bool doFlush = true); + + /** + * Description: + * Set source buffer crop window information + * + * Parameter: + * XStart: Source crop X start coordinate + * XSubpixel: Source crop X subpixel coordinate + * YStart: Source crop Y start coordinate + * YSubpixel: Source crop Y subpixel coordinate + * cropWidth: Source crop window width + * cropHeight: Source crop window height + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM setSrcCrop(int32_t XStart, + int32_t XSubpixel, + int32_t YStart, + int32_t YSubpixel, + int32_t cropWidth, + int32_t cropHeight); + + DP_STATUS_ENUM setSrcCrop(int32_t portIndex, + int32_t XStart, + int32_t XSubpixel, + int32_t YStart, + int32_t YSubpixel, + int32_t cropWidth, + int32_t cropHeight); + + DP_STATUS_ENUM queueDstBuffer(int32_t portIndex, + void **pVAList, + uint32_t *pSizeList, + int32_t planeNum); + + DP_STATUS_ENUM queueDstBuffer(int32_t portIndex, + uint32_t *pMVAList, + uint32_t *pSizeList, + int32_t planeNum); + + DP_STATUS_ENUM queueDstBuffer(int32_t portIndex, + void **pVAList, + uint32_t *pMVAList, + uint32_t *pSizeList, + int32_t planeNum); + + // for ION file descriptor + DP_STATUS_ENUM queueDstBuffer(int32_t portIndex, + int32_t fileDesc, + uint32_t *pSizeList, + int32_t planeNum); + + /** + * Description: + * Acquire a destination buffer for HW processing + * + * Parameter: + * port: Output port index + * base: buffer virtual base address + * waitBuf: true for the buffer is ready; + * else return immediately + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM dequeueDstBuffer(int32_t portIndex, + void **pVABase, + bool waitBuf = true); + + /** + * Description: + * Set destination buffer configuration information + * + * Parameter: + * format: Destination buffer format + * width: Destination buffer width + * height: Destination buffer height + * pitch: Destination buffer pitch + * port: Destination port number + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM setDstConfig(int32_t portIndex, + DpColorFormat dstFormat, + int32_t dstWidth, + int32_t dstHeight, + int32_t dstPitch, + bool doFlush = true); + + + DP_STATUS_ENUM setDstConfig(int32_t portIndex, + int32_t width, + int32_t height, + int32_t YPitch, + int32_t UVPitch, + DpColorFormat format, + DP_PROFILE_ENUM profile = DP_PROFILE_BT601, + DpInterlaceFormat field = eInterlace_None, + DpRect *pROI = 0, + bool doFlush = true); + + + /** + * Description: + * Set port desired rotation angles + * + * Parameter: + * portIndex: Port index number + * rotation: Desired rotation angle + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM setRotation(int32_t portIndex, + int32_t rotation); + + /** + * Description: + * Set port desired flip status + * + * Parameter: + * portIndex: Port index number + * flipStatus: Desired flip status + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM setFlipStatus(int32_t portIndex, + bool flipStatus); + + + /** + * Description: + * Set extra parameter for ISP + * + * Parameter: + * extraPara: ISP extra parameters + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM setParameter(ISP_TPIPE_CONFIG_STRUCT &extraPara, uint32_t hint = 0); + + DP_STATUS_ENUM setPortType(int32_t portIndex, + uint32_t portType = 0, + DpJPEGEnc_Config* JPEGEnc_cfg = NULL); + + DP_STATUS_ENUM setSharpness(int32_t portIndex, + int32_t gain) + { + if (m_sharpness[portIndex] != gain) + { + m_sharpness[portIndex] = gain; + m_frameChange = true; + } + + return DP_STATUS_RETURN_SUCCESS; + } + + DP_STATUS_ENUM setDither(int32_t portIndex, + bool enDither) + { + if (m_ditherStatus[portIndex] != enDither) + { + m_ditherStatus[portIndex] = enDither; + m_frameChange = true; + } + + return DP_STATUS_RETURN_SUCCESS; + } + + DP_STATUS_ENUM setPortMatrix(int32_t portIndex, DpColorMatrix *matrix); + + uint32_t getPqID(); + + DP_STATUS_ENUM setPQParameter(int32_t portIndex, const DpPqParam &pParam); + + /** + * Description: + * Start ISP stream processing (non-blocking) + * + * Parameter: + * None + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM startStream(); + + /** + * Description: + * Stop ISP stream processing + * + * Parameter: + * None + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM stopStream(); + + DP_STATUS_ENUM dequeueFrameEnd(); + + DP_STATUS_ENUM getJPEGFilesize(uint32_t* filesize); + +private: + ISPStreamType m_streamType; + struct timeval m_startTime; + bool m_frameChange; + DpStream *m_pStream; + DpChannel *m_pChannel; + int32_t m_channelID; + + DpMutex *m_pListMutex; + DpMutex *m_pBufferMutex; + // Source information + DpBasicBufferPool *m_pSrcPool; + int32_t m_srcBuffer; // Only used in MDP1.0 + BufIDList m_srcBufferList; + BufTimeList m_srcBufferStartTimeList; + + JobIDList m_jobIDList; + JobIDList m_frameDoneList; + + DpColorFormat m_srcFormat; + int32_t m_srcWidth; + int32_t m_srcHeight; + int32_t m_srcYPitch; + int32_t m_srcUVPitch; + bool m_cropChange; // Only used in MDP1.0 + bool m_srcFlush; + DpSecure m_srcSecure; + DP_PROFILE_ENUM m_srcProfile; + + // Destination information + DpBasicBufferPool *m_pDstPool[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_dstBuffer[ISP_MAX_OUTPUT_PORT_NUM]; // Only used in MDP1.0 + BufIDList m_dstBufferList[ISP_MAX_OUTPUT_PORT_NUM]; + DpColorFormat m_dstFormat[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_dstPlane[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_dstWidth[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_dstHeight[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_dstYPitch[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_dstUVPitch[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_rotation[ISP_MAX_OUTPUT_PORT_NUM]; + bool m_flipStatus[ISP_MAX_OUTPUT_PORT_NUM]; + bool m_dstEnable[ISP_MAX_OUTPUT_PORT_NUM]; + bool m_dstWasEnabled[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_sharpness[ISP_MAX_OUTPUT_PORT_NUM]; + bool m_ditherStatus[ISP_MAX_OUTPUT_PORT_NUM]; + bool m_dstFlush[ISP_MAX_OUTPUT_PORT_NUM]; + uint32_t m_dstPortType[ISP_MAX_OUTPUT_PORT_NUM]; + DP_PROFILE_ENUM m_dstProfile[ISP_MAX_OUTPUT_PORT_NUM]; + DpJPEGEnc_Config m_jpegEnc_cfg; + + // Crop information + int32_t m_srcXStart; // Only used in MDP1.0 + int32_t m_srcXSubpixel; // Only used in MDP1.0 + int32_t m_srcYStart; // Only used in MDP1.0 + int32_t m_srcYSubpixel; // Only used in MDP1.0 + int32_t m_cropWidth; // Only used in MDP1.0 + int32_t m_cropHeight; // Only used in MDP1.0 + + int32_t m_multiSrcXStart[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_multiSrcXSubpixel[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_multiSrcYStart[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_multiSrcYSubpixel[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_multiCropWidth[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_multiCropHeight[ISP_MAX_OUTPUT_PORT_NUM]; + bool m_multiCropChange[ISP_MAX_OUTPUT_PORT_NUM]; + + uint32_t m_jpegEnc_filesize; + + ISP_TPIPE_CONFIG_STRUCT *m_pParameter; + + DpPqConfig m_PqConfig[ISP_MAX_OUTPUT_PORT_NUM]; + uint32_t m_PqID[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_pqSupport; + DpColorMatrix *m_pDstMatrix[ISP_MAX_OUTPUT_PORT_NUM]; + + DP_STATUS_ENUM waitSubmit(); + DP_STATUS_ENUM waitComplete(); +}; + +#endif // __DP_ISP_STREAM_H__ diff --git a/mtklibs/libdpframework/include/DpNotifier.h b/mtklibs/libdpframework/include/DpNotifier.h new file mode 100755 index 0000000000000000000000000000000000000000..6ed6cec5d3291de01534bc7c9143b4bc71ba4313 --- /dev/null +++ b/mtklibs/libdpframework/include/DpNotifier.h @@ -0,0 +1,28 @@ +#ifndef __DP_NOTIFIER_WROT_H__ +#define __DP_NOTIFIER_WROT_H__ + +#include "DpDataType.h" + +typedef enum DP_SCENARIO_ENUM +{ + DP_SCENARIO_NONE, + DP_SCENARIO_VIDEO_NORMAL, + DP_SCENARIO_CAMERA_PREVIEW, + DP_SCENARIO_CAMERA_ZSD, + DP_SCENARIO_CAMERA_CAPTURE, + DP_SCENARIO_CAMERA_ICFP, + DP_SCENARIO_VIDEO_SWDEC_PLAYBACK, + DP_SCENARIO_VIDEO_PLAYBACK, + DP_SCENARIO_VIDEO_TELEPHONY, + DP_SCENARIO_VIDEO_RECORD, + DP_SCENARIO_VIDEO_RECORD_CAMERA, + DP_SCENARIO_VIDEO_RECORD_SLOWMOTION, + DP_SCENARIO_VIDEO_SNAPSHOT, + DP_SCENARIO_VIDEO_LIVE_PHOTO, + DP_SCENARIO_VIDEO_WIFI_DISPLAY, + DP_SCENARIO_FORCE_MMDVFS +} DP_SCENARIO_ENUM; + +DP_STATUS_ENUM notifyScenario(DP_SCENARIO_ENUM scenario); + +#endif // __DP_NOTIFIER_WROT_H__ diff --git a/mtklibs/libdpframework/include/DpVEncStream.h b/mtklibs/libdpframework/include/DpVEncStream.h new file mode 100755 index 0000000000000000000000000000000000000000..960e40669c966bff715ffb8ff9e65de72c41ddc9 --- /dev/null +++ b/mtklibs/libdpframework/include/DpVEncStream.h @@ -0,0 +1,414 @@ +#ifndef __DP_VENC_STREAM_H__ +#define __DP_VENC_STREAM_H__ + +#include "DpDataType.h" +#include +#include + +using namespace std; + +#define ISP_MAX_OUTPUT_PORT_NUM 4 +#define YUV_MAX_BUFFER_NUM 10 + +class DpMemory; +class DpMutex; + +struct ISP_TPIPE_CONFIG_STRUCT; + +typedef std::vector BufIDList; +typedef std::vector JobIDList; +typedef std::vector BufTimeList; + + +class DpVEncStream +{ +public: + enum ISPStreamType + { + ISP_IC_STREAM, + ISP_VR_STREAM, + ISP_ZSD_STREAM, + ISP_IP_STREAM, + ISP_VSS_STREAM, + ISP_ZSD_SLOW_STREAM, + ISP_CC_STREAM = ISP_VR_STREAM + }; + + enum ISPStreamHint + { + HINT_ISP_NEW_FRAME = 0x0, // need to do tpipe calculation + HINT_ISP_TPIPE_NO_CHANGE = 0x1, // can skip tpipe calculation + HINT_ISP_FRAME_MODE = 0x2, // ISP-only frame mode + }; + + DpVEncStream(ISPStreamType type); + + ~DpVEncStream(); + + DP_STATUS_ENUM startVideoRecord(uint32_t width, uint32_t height, uint32_t framerate = 120); + + DP_STATUS_ENUM stopVideoRecord(); + + /* Venc Modify + */ + +#if defined(MTK_SLOW_MOTION_HEVC_SUPPORT) + DP_STATUS_ENUM startVideoRecord_HEVC(uint32_t width, uint32_t height, uint32_t framerate); + DP_STATUS_ENUM stopVideoRecord_HEVC(); +#elif defined(MTK_SLOW_MOTION_H264_SUPPORT) + DP_STATUS_ENUM startVideoRecord_H264(uint32_t width, uint32_t height, uint32_t framerate); + DP_STATUS_ENUM stopVideoRecord_H264(); +#endif + /* Venc Modify - */ + + DP_STATUS_ENUM queueSrcBuffer(void *pVA, + uint32_t size); + + DP_STATUS_ENUM queueSrcBuffer(void *pVA, + uint32_t MVA, + uint32_t size); + + DP_STATUS_ENUM queueSrcBuffer(void **pVAList, + uint32_t *pSizeList, + int32_t planeNum); + + DP_STATUS_ENUM queueSrcBuffer(uint32_t *pMVAList, + uint32_t *pSizeList, + int32_t planeNum); + + DP_STATUS_ENUM queueSrcBuffer(void **pVAList, + uint32_t *pMVAList, + uint32_t *pSizeList, + int32_t planeNum); + + // for ION file descriptor + DP_STATUS_ENUM queueSrcBuffer(int32_t fileDesc, + uint32_t *sizeList, + uint32_t planeNum); + + DP_STATUS_ENUM dequeueSrcBuffer(); + + /** + * Description: + * Set source buffer configuration information + * + * Parameter: + * srcFormat: Source buffer format + * srcWidth: Source buffer width + * srcHeight: Source buffer height + * srcPitch: Source buffer pitch + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM setSrcConfig(DpColorFormat srcFormat, + int32_t srcWidth, + int32_t srcHeight, + int32_t srcPitch, + bool doFlush = true); + + + DP_STATUS_ENUM setSrcConfig(int32_t width, + int32_t height, + int32_t YPitch, + int32_t UVPitch, + DpColorFormat format, + DP_PROFILE_ENUM profile = DP_PROFILE_BT601, + DpInterlaceFormat field = eInterlace_None, + DpRect *pROI = 0, + bool doFlush = true); + + /** + * Description: + * Set source buffer crop window information + * + * Parameter: + * XStart: Source crop X start coordinate + * XSubpixel: Source crop X subpixel coordinate + * YStart: Source crop Y start coordinate + * YSubpixel: Source crop Y subpixel coordinate + * cropWidth: Source crop window width + * cropHeight: Source crop window height + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM setSrcCrop(int32_t XStart, + int32_t XSubpixel, + int32_t YStart, + int32_t YSubpixel, + int32_t cropWidth, + int32_t cropHeight); + + DP_STATUS_ENUM setSrcCrop(int32_t portIndex, + int32_t XStart, + int32_t XSubpixel, + int32_t YStart, + int32_t YSubpixel, + int32_t cropWidth, + int32_t cropHeight); + + DP_STATUS_ENUM queueDstBuffer(int32_t portIndex, + void **pVAList, + uint32_t *pSizeList, + int32_t planeNum); + + DP_STATUS_ENUM queueDstBuffer(int32_t portIndex, + uint32_t *pMVAList, + uint32_t *pSizeList, + int32_t planeNum); + + DP_STATUS_ENUM queueDstBuffer(int32_t portIndex, + void **pVAList, + uint32_t *pMVAList, + uint32_t *pSizeList, + int32_t planeNum); + + // for ION file descriptor + DP_STATUS_ENUM queueDstBuffer(int32_t portIndex, + int32_t fileDesc, + uint32_t *pSizeList, + int32_t planeNum); + + /** + * Description: + * Acquire a destination buffer for HW processing + * + * Parameter: + * port: Output port index + * base: buffer virtual base address + * waitBuf: true for the buffer is ready; + * else return immediately + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM dequeueDstBuffer(int32_t portIndex, + void **pVABase, + bool waitBuf = true); + + /** + * Description: + * Set destination buffer configuration information + * + * Parameter: + * format: Destination buffer format + * width: Destination buffer width + * height: Destination buffer height + * pitch: Destination buffer pitch + * port: Destination port number + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM setDstConfig(int32_t portIndex, + DpColorFormat dstFormat, + int32_t dstWidth, + int32_t dstHeight, + int32_t dstPitch, + bool doFlush = true); + + + DP_STATUS_ENUM setDstConfig(int32_t portIndex, + int32_t width, + int32_t height, + int32_t YPitch, + int32_t UVPitch, + DpColorFormat format, + DP_PROFILE_ENUM profile = DP_PROFILE_BT601, + DpInterlaceFormat field = eInterlace_None, + DpRect *pROI = 0, + bool doFlush = true); + + + /** + * Description: + * Set port desired rotation angles + * + * Parameter: + * portIndex: Port index number + * rotation: Desired rotation angle + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM setRotation(int32_t portIndex, + int32_t rotation); + + /** + * Description: + * Set port desired flip status + * + * Parameter: + * portIndex: Port index number + * flipStatus: Desired flip status + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM setFlipStatus(int32_t portIndex, + bool flipStatus); + + + /** + * Description: + * Set extra parameter for ISP + * + * Parameter: + * extraPara: ISP extra parameters + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM setParameter(ISP_TPIPE_CONFIG_STRUCT &extraPara, uint32_t hint = 0); + + DP_STATUS_ENUM setPortType(int32_t portIndex, + uint32_t portType = 0, + DpVEnc_Config* VEnc_cfg = NULL); + + DP_STATUS_ENUM setSharpness(int32_t portIndex, + int32_t gain) + { + if (m_sharpness[portIndex] != gain) + { + m_sharpness[portIndex] = gain; + m_frameChange = true; + } + + return DP_STATUS_RETURN_SUCCESS; + } + + DP_STATUS_ENUM setDither(int32_t portIndex, + bool enDither) + { + if (m_ditherStatus[portIndex] != enDither) + { + m_ditherStatus[portIndex] = enDither; + m_frameChange = true; + } + + return DP_STATUS_RETURN_SUCCESS; + } + + DP_STATUS_ENUM setPortMatrix(int32_t portIndex, DpColorMatrix *matrix); + + uint32_t getPqID(); + + DP_STATUS_ENUM setPQParameter(int32_t portIndex, const DpPqParam &pParam); + + /** + * Description: + * Start ISP stream processing (non-blocking) + * + * Parameter: + * None + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM startStream(); + + /** + * Description: + * Stop ISP stream processing + * + * Parameter: + * None + * + * Return Value: + * Return DP_STATUS_RETURN_SUCCESS if the API succeeded, + * else the API will return the error code. + */ + DP_STATUS_ENUM stopStream(); + + DP_STATUS_ENUM dequeueFrameEnd(); + + DP_STATUS_ENUM getJPEGFilesize(uint32_t* filesize); + +private: + ISPStreamType m_streamType; + bool m_frameChange; + DpStream *m_pStream; + DpChannel *m_pChannel; + int32_t m_channelID; + + DpMutex *m_pListMutex; + DpMutex *m_pBufferMutex; + // Source information + DpBasicBufferPool *m_pSrcPool; + BufIDList m_srcBufferList; + BufTimeList m_srcBufferStartTimeList; + + JobIDList m_jobIDList; + JobIDList m_frameDoneList; + + DpColorFormat m_srcFormat; + int32_t m_srcWidth; + int32_t m_srcHeight; + int32_t m_srcYPitch; + int32_t m_srcUVPitch; + bool m_srcFlush; + DpSecure m_srcSecure; + DP_PROFILE_ENUM m_srcProfile; + + // Destination information + DpBasicBufferPool *m_pDstPool[ISP_MAX_OUTPUT_PORT_NUM]; + BufIDList m_dstBufferList[ISP_MAX_OUTPUT_PORT_NUM]; + DpColorFormat m_dstFormat[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_dstPlane[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_dstWidth[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_dstHeight[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_dstYPitch[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_dstUVPitch[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_rotation[ISP_MAX_OUTPUT_PORT_NUM]; + bool m_flipStatus[ISP_MAX_OUTPUT_PORT_NUM]; + bool m_dstEnable[ISP_MAX_OUTPUT_PORT_NUM]; + bool m_dstWasEnabled[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_sharpness[ISP_MAX_OUTPUT_PORT_NUM]; + bool m_ditherStatus[ISP_MAX_OUTPUT_PORT_NUM]; + bool m_dstFlush[ISP_MAX_OUTPUT_PORT_NUM]; + uint32_t m_dstPortType[ISP_MAX_OUTPUT_PORT_NUM]; + DP_PROFILE_ENUM m_dstProfile[ISP_MAX_OUTPUT_PORT_NUM]; + DpVEnc_Config m_VEnc_cfg; + + // Crop information + int32_t m_multiSrcXStart[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_multiSrcXSubpixel[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_multiSrcYStart[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_multiSrcYSubpixel[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_multiCropWidth[ISP_MAX_OUTPUT_PORT_NUM]; + int32_t m_multiCropHeight[ISP_MAX_OUTPUT_PORT_NUM]; + bool m_multiCropChange[ISP_MAX_OUTPUT_PORT_NUM]; + + uint32_t m_jpegEnc_filesize; + + ISP_TPIPE_CONFIG_STRUCT *m_pParameter; + + DpPqConfig m_PqConfig[ISP_MAX_OUTPUT_PORT_NUM]; + uint32_t m_PqID[ISP_MAX_OUTPUT_PORT_NUM]; + DpColorMatrix *m_pDstMatrix[ISP_MAX_OUTPUT_PORT_NUM]; + + DpMemory *m_yuvBuffer[YUV_MAX_BUFFER_NUM]; + uint64_t m_configFrameCount; + uint64_t m_dequeueFrameCount; + + uint32_t m_encodeFrameWidth; + uint32_t m_encodeFrameHeight; + + uint32_t m_PABuffer[MAX_NUM_READBACK_REGS]; + uint32_t m_ValueBuffer[MAX_NUM_READBACK_REGS]; + uint32_t m_numPABuffer; + int32_t m_pqSupport; + + DP_STATUS_ENUM waitSubmit(); + DP_STATUS_ENUM waitComplete(); +}; + +#endif // __DP_VENC_STREAM_H__ diff --git a/mtklibs/libdpframework/libdpframework.so b/mtklibs/libdpframework/libdpframework.so new file mode 100755 index 0000000000000000000000000000000000000000..b4bd169b1e8ff10c9c92adf3b5280bd9eebe4cca Binary files /dev/null and b/mtklibs/libdpframework/libdpframework.so differ diff --git a/mtklibs/libdpframework_prot/Android.mk_ b/mtklibs/libdpframework_prot/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..f221a6f5aaf6183214f2c69e2bb0c0b16483e4d1 --- /dev/null +++ b/mtklibs/libdpframework_prot/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libdpframework_prot +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libdpframework_prot.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libdpframework_prot +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libdpframework_prot.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libdpframework_prot/README b/mtklibs/libdpframework_prot/README new file mode 100755 index 0000000000000000000000000000000000000000..550c792251590360b8492bdc0652aacf6a57f26c --- /dev/null +++ b/mtklibs/libdpframework_prot/README @@ -0,0 +1,10 @@ +API interface of MTK hardware accelerator for image resize, +rotate,color space transform for this device + + +HOW TO USE IT? +============== + +Provide api for every module which needs to do image related functions. +(i.e. surfaceflinger/gpu/venc/camera ... ) +Those caller modules are all under HAL layer. diff --git a/mtklibs/libdpframework_prot/arm/libdpframework_prot.a b/mtklibs/libdpframework_prot/arm/libdpframework_prot.a new file mode 100755 index 0000000000000000000000000000000000000000..b89848cc0b44ff345c79ddf99483ce46b39449fb Binary files /dev/null and b/mtklibs/libdpframework_prot/arm/libdpframework_prot.a differ diff --git a/mtklibs/libdpframework_prot/libdpframework_prot.a b/mtklibs/libdpframework_prot/libdpframework_prot.a new file mode 100755 index 0000000000000000000000000000000000000000..f4402c42d972413e22934acceba146c7fb383da5 Binary files /dev/null and b/mtklibs/libdpframework_prot/libdpframework_prot.a differ diff --git a/mtklibs/libdrmmtkutil/Android.mk_ b/mtklibs/libdrmmtkutil/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..01341f130b0f6af0cdf89348c3787e622543f7a0 --- /dev/null +++ b/mtklibs/libdrmmtkutil/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libdrmmtkutil +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libdrmmtkutil.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libdrmmtkutil +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libdrmmtkutil.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libdrmmtkutil/README b/mtklibs/libdrmmtkutil/README new file mode 100755 index 0000000000000000000000000000000000000000..2d1148351278cc3863eb4d3632dbaba5abd830e3 --- /dev/null +++ b/mtklibs/libdrmmtkutil/README @@ -0,0 +1,33 @@ +library of Drm features, including cta util, widevine util, oma drm util. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libdrmmtkutil.so will be used by drm, it contains drm related pre- and post-processing modules. +Without them, drm feature will not work. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libicui18n.so +2. libicuuc.so +3. libutils.so +4. libcutils.so +5. libdl.so +6. libcrypto.so +7. libssl.so +8. libdrmframework.so +9. libbinder.so +10. libnvramagentclient.so +11. libstlport.so + +and the following libs from MediaTek: +1. libdrmmtkwhitelist.so + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libdrmmtkutil.so provides basic function of drm. diff --git a/mtklibs/libdrmmtkutil/arm/libdrmmtkutil.a b/mtklibs/libdrmmtkutil/arm/libdrmmtkutil.a new file mode 100755 index 0000000000000000000000000000000000000000..bf271c1a8490c15861050bf397313c63e16d0ca3 Binary files /dev/null and b/mtklibs/libdrmmtkutil/arm/libdrmmtkutil.a differ diff --git a/mtklibs/libdrmmtkutil/libdrmmtkutil.a b/mtklibs/libdrmmtkutil/libdrmmtkutil.a new file mode 100755 index 0000000000000000000000000000000000000000..693acf2eed12d6ff3fefe649e7f0bc804e5bd90b Binary files /dev/null and b/mtklibs/libdrmmtkutil/libdrmmtkutil.a differ diff --git a/mtklibs/libdrmwvmcommon/Android.mk_ b/mtklibs/libdrmwvmcommon/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..7f68479d8ec37dda1bf30e802cf8de65906331e7 --- /dev/null +++ b/mtklibs/libdrmwvmcommon/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libdrmwvmcommon +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libdrmwvmcommon.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libdrmwvmcommon/NOTICE b/mtklibs/libdrmwvmcommon/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..594a7f436c16363bb70a0771bfe77806c9b556da --- /dev/null +++ b/mtklibs/libdrmwvmcommon/NOTICE @@ -0,0 +1,22 @@ + * Copyright (C) 2011 Google, Inc. All Rights Reserved: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/libdrmwvmcommon/README b/mtklibs/libdrmwvmcommon/README new file mode 100755 index 0000000000000000000000000000000000000000..2b81286952e0b7a0d7284cab08f8feecb67e10dd --- /dev/null +++ b/mtklibs/libdrmwvmcommon/README @@ -0,0 +1,20 @@ +library of Drm features, including widevine drm plugin api. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libdrmwvmcommon is used by widevine plugin, it contains method in DrmEngine. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libdrmwvmcommon is used by widevine plugin, it implements DrmEngine method. diff --git a/mtklibs/libdrmwvmcommon/arm/libdrmwvmcommon.a b/mtklibs/libdrmwvmcommon/arm/libdrmwvmcommon.a new file mode 100755 index 0000000000000000000000000000000000000000..425ee07c9f25e9c88f88c570a0e4015287707248 Binary files /dev/null and b/mtklibs/libdrmwvmcommon/arm/libdrmwvmcommon.a differ diff --git a/mtklibs/libeis/Android.mk_ b/mtklibs/libeis/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..33948e0bce1a9e9a8147af423b0d5ec48ad07943 --- /dev/null +++ b/mtklibs/libeis/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libeis +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libeis.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libeis +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libeis.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libeis/README b/mtklibs/libeis/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libeis/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libeis/arm/libeis.a b/mtklibs/libeis/arm/libeis.a new file mode 100755 index 0000000000000000000000000000000000000000..3a5a03b1858c8aafbd9fac1b4322e788e3d8eb0d Binary files /dev/null and b/mtklibs/libeis/arm/libeis.a differ diff --git a/mtklibs/libeis/libeis.a b/mtklibs/libeis/libeis.a new file mode 100755 index 0000000000000000000000000000000000000000..78a50b91fd5303e8de03de6e639b56e92e0cd9ae Binary files /dev/null and b/mtklibs/libeis/libeis.a differ diff --git a/mtklibs/libeisplus/Android.mk_ b/mtklibs/libeisplus/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..790f2400a754d18a61465d716c5f67a7bbadded6 --- /dev/null +++ b/mtklibs/libeisplus/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libeisplus +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libeisplus.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libeisplus +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libeisplus.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libeisplus/README b/mtklibs/libeisplus/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libeisplus/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libeisplus/arm/libeisplus.a b/mtklibs/libeisplus/arm/libeisplus.a new file mode 100755 index 0000000000000000000000000000000000000000..b630bc6873863f0833f0d9d4104a78f13105a6d7 Binary files /dev/null and b/mtklibs/libeisplus/arm/libeisplus.a differ diff --git a/mtklibs/libeisplus/libeisplus.a b/mtklibs/libeisplus/libeisplus.a new file mode 100755 index 0000000000000000000000000000000000000000..21ad8863513d670c95b6359a2b00088074485937 Binary files /dev/null and b/mtklibs/libeisplus/libeisplus.a differ diff --git a/mtklibs/libeissw/Android.mk_ b/mtklibs/libeissw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..0376ac0b0c4c25398fc8bbcbb2258ad869eadbb8 --- /dev/null +++ b/mtklibs/libeissw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libeissw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libeissw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libeissw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libeissw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libeissw/README b/mtklibs/libeissw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libeissw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libeissw/arm/libeissw.a b/mtklibs/libeissw/arm/libeissw.a new file mode 100755 index 0000000000000000000000000000000000000000..bbaec66198eeb0cc5b8cf091bdc58338d81c2ae3 Binary files /dev/null and b/mtklibs/libeissw/arm/libeissw.a differ diff --git a/mtklibs/libeissw/libeissw.a b/mtklibs/libeissw/libeissw.a new file mode 100755 index 0000000000000000000000000000000000000000..4ec781ff32db5d423e712ead237e3dba6b8ae94d Binary files /dev/null and b/mtklibs/libeissw/libeissw.a differ diff --git a/mtklibs/libepos/Android.mk_ b/mtklibs/libepos/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..7e6b47319c6cde681a37ee3350b858084f2a0fa6 --- /dev/null +++ b/mtklibs/libepos/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libepos +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libepos.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libepos +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libepos.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libepos/README b/mtklibs/libepos/README new file mode 100755 index 0000000000000000000000000000000000000000..5c1b60cb5e3b921dc9e2f5cb0a56f18db1491541 --- /dev/null +++ b/mtklibs/libepos/README @@ -0,0 +1,23 @@ +Library of EPO feature, it provides secure URL services. + + +WHAT IT DOES? +============= +it provides secure URL services. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libcutils +2. libcrypto +3. libssl +4. libz + +All source/dependency modules of this module are already put in +'vendor\mediatek\proprietary\protect\frameworks\base\epos' folder. + +HOW TO USE IT? +============== +It is proprietary library only for EPO services. And not opened interfaces to other modules. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libepos/arm/libepos.a b/mtklibs/libepos/arm/libepos.a new file mode 100755 index 0000000000000000000000000000000000000000..56eb8dad942ae341e3e45b91c38f9f694d65fdc0 Binary files /dev/null and b/mtklibs/libepos/arm/libepos.a differ diff --git a/mtklibs/libepos/libepos.a b/mtklibs/libepos/libepos.a new file mode 100755 index 0000000000000000000000000000000000000000..0bc6ed1671cd41d1b25a1b40c636d4031208b6fe Binary files /dev/null and b/mtklibs/libepos/libepos.a differ diff --git a/mtklibs/libfacebeauty/Android.mk_ b/mtklibs/libfacebeauty/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..3e44716ef99f24ca0de5c1d10a4c3bd224e5c29e --- /dev/null +++ b/mtklibs/libfacebeauty/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libfacebeauty +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libfacebeauty.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libfacebeauty +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libfacebeauty.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libfacebeauty/README b/mtklibs/libfacebeauty/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libfacebeauty/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libfacebeauty/arm/libfacebeauty.a b/mtklibs/libfacebeauty/arm/libfacebeauty.a new file mode 100755 index 0000000000000000000000000000000000000000..1aaf45d9f670575d5ecf616b22632010896e8ec0 Binary files /dev/null and b/mtklibs/libfacebeauty/arm/libfacebeauty.a differ diff --git a/mtklibs/libfacebeauty/libfacebeauty.a b/mtklibs/libfacebeauty/libfacebeauty.a new file mode 100755 index 0000000000000000000000000000000000000000..48b299f9faf773b54aba79a4c5c8e1ee1b7eedb9 Binary files /dev/null and b/mtklibs/libfacebeauty/libfacebeauty.a differ diff --git a/mtklibs/libfacebeautysw/Android.mk_ b/mtklibs/libfacebeautysw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..1db45a2a22af62e37a494d85ba61867e2df9bd99 --- /dev/null +++ b/mtklibs/libfacebeautysw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libfacebeautysw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libfacebeautysw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libfacebeautysw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libfacebeautysw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libfacebeautysw/README b/mtklibs/libfacebeautysw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libfacebeautysw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libfacebeautysw/arm/libfacebeautysw.a b/mtklibs/libfacebeautysw/arm/libfacebeautysw.a new file mode 100755 index 0000000000000000000000000000000000000000..7489f4a1206cf5cf48224fecf0ab2c8c77398565 Binary files /dev/null and b/mtklibs/libfacebeautysw/arm/libfacebeautysw.a differ diff --git a/mtklibs/libfacebeautysw/libfacebeautysw.a b/mtklibs/libfacebeautysw/libfacebeautysw.a new file mode 100755 index 0000000000000000000000000000000000000000..e0a0bc7391f446140f9eceaa0ddd1b7b28741895 Binary files /dev/null and b/mtklibs/libfacebeautysw/libfacebeautysw.a differ diff --git a/mtklibs/libfdft/Android.mk_ b/mtklibs/libfdft/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..1c764455bba9b1fb072d14857a6a5cc7c826c436 --- /dev/null +++ b/mtklibs/libfdft/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libfdft +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libfdft.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libfdft +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libfdft.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libfdft/README b/mtklibs/libfdft/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libfdft/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libfdft/arm/libfdft.a b/mtklibs/libfdft/arm/libfdft.a new file mode 100755 index 0000000000000000000000000000000000000000..ed6b9ee73c53773edaada721fb20532d6667a6b4 Binary files /dev/null and b/mtklibs/libfdft/arm/libfdft.a differ diff --git a/mtklibs/libfdft/libfdft.a b/mtklibs/libfdft/libfdft.a new file mode 100755 index 0000000000000000000000000000000000000000..ff98d3b964229b9da3cc5e644c06399e0a9ee5f3 Binary files /dev/null and b/mtklibs/libfdft/libfdft.a differ diff --git a/mtklibs/libfile_op/Android.mk_ b/mtklibs/libfile_op/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..7e1168176b4aeddf7b3ceea7741634c851152ef9 --- /dev/null +++ b/mtklibs/libfile_op/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libfile_op +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libnvram libcustom_nvram libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libfile_op.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libfile_op +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libnvram libcustom_nvram libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libfile_op.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libfile_op/NOTICE b/mtklibs/libfile_op/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..f0e4d5be4c178c18a84d12ab593765f6fc5217df --- /dev/null +++ b/mtklibs/libfile_op/NOTICE @@ -0,0 +1,38 @@ +This MediaTek software package contains software with the following notices and under the following licenses: + +============================================================================= + +/***************************************************************************** +* Copyright Statement: +* -------------------- +* This software is protected by Copyright and the information contained +* herein is confidential. The software may not be copied and the information +* contained herein may not be used or disclosed except with the written +* permission of MediaTek Inc. (C) 2008 +* +* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES +* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") +* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON +* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, +* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. +* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE +* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR +* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH +* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO +* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S +* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. +* +* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE +* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, +* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, +* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO +* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. +* +* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE +* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF +* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND +* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER +* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). +* +*****************************************************************************/ diff --git a/mtklibs/libfile_op/README b/mtklibs/libfile_op/README new file mode 100755 index 0000000000000000000000000000000000000000..23743e7907183b937aa7c7f03bed793978c19da6 --- /dev/null +++ b/mtklibs/libfile_op/README @@ -0,0 +1,38 @@ +This directory contains NvRAM libfile_op interface, which defines the interface of +libfile_op and is used to build a libfile_op related shared library. + + +WHAT IT DOES? +============= +It provide interface to backup NvRAM data to backup partition. +and restore NvRAM partition when fielsystem is empty. +Without NvRAM backup or restore feature, factory data maybe lost in some +case. + + +HOW IT WAS BUILT? +================== + +It needs the following libs from AOSP: +1. libc.so +2. libcutils.so + +and the following libs from MediaTek: +1. libnvram.so +2. libcustom_nvram.so + + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a shared library 'libfile_op.so'. + +The shared library 'libfile_op.so' is loaded and invoked by +meta tool for backup, invoked by NvRAM daemon tool for restore operation. + + diff --git a/mtklibs/libfile_op/arm/libfile_op.so b/mtklibs/libfile_op/arm/libfile_op.so new file mode 100755 index 0000000000000000000000000000000000000000..a4318c7e15bf07f61abe576c5f72df5e517f50db Binary files /dev/null and b/mtklibs/libfile_op/arm/libfile_op.so differ diff --git a/mtklibs/libfile_op/libfile_op.so b/mtklibs/libfile_op/libfile_op.so new file mode 100755 index 0000000000000000000000000000000000000000..9b3b797c50cb12e805433b9202b4637f6ac3f184 Binary files /dev/null and b/mtklibs/libfile_op/libfile_op.so differ diff --git a/mtklibs/libflicker/Android.mk_ b/mtklibs/libflicker/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d9cd3c49775a8dcc5704c397b026c942bd6f7de2 --- /dev/null +++ b/mtklibs/libflicker/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libflicker +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libflicker.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libflicker +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libflicker.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libflicker/README b/mtklibs/libflicker/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libflicker/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libflicker/arm/libflicker.a b/mtklibs/libflicker/arm/libflicker.a new file mode 100755 index 0000000000000000000000000000000000000000..9dc7182591ba55d3270a88ab03c436a25a4f26a3 Binary files /dev/null and b/mtklibs/libflicker/arm/libflicker.a differ diff --git a/mtklibs/libflicker/libflicker.a b/mtklibs/libflicker/libflicker.a new file mode 100755 index 0000000000000000000000000000000000000000..95b65edcd0cac4f79149eb3bc6263455633a697c Binary files /dev/null and b/mtklibs/libflicker/libflicker.a differ diff --git a/mtklibs/libgd/Android.mk_ b/mtklibs/libgd/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a8a4238826dda0345130062165719756504e9961 --- /dev/null +++ b/mtklibs/libgd/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libgd +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libgd.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libgd +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libgd.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libgd/README b/mtklibs/libgd/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libgd/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libgd/arm/libgd.a b/mtklibs/libgd/arm/libgd.a new file mode 100755 index 0000000000000000000000000000000000000000..f5de6509a911d6e8f7293b3e3d121cc778a02e40 Binary files /dev/null and b/mtklibs/libgd/arm/libgd.a differ diff --git a/mtklibs/libgd/libgd.a b/mtklibs/libgd/libgd.a new file mode 100755 index 0000000000000000000000000000000000000000..d7382dab7a83bc2dc270f5f17e163098839048a6 Binary files /dev/null and b/mtklibs/libgd/libgd.a differ diff --git a/mtklibs/libged/Android.mk_ b/mtklibs/libged/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..0d84f0d4435023c66c82e4e3167dec852e33170b --- /dev/null +++ b/mtklibs/libged/Android.mk_ @@ -0,0 +1,27 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libged +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libbinder libsync libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libged.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libged +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libsync libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libged.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libged/NOTICE b/mtklibs/libged/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..268fe090e899fe0bf9f46d0e63b05373a160e09d --- /dev/null +++ b/mtklibs/libged/NOTICE @@ -0,0 +1,22 @@ + * (C) COPYRIGHT 2014 ARM Limited, ALL RIGHTS RESERVED: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/libged/README b/mtklibs/libged/README new file mode 100755 index 0000000000000000000000000000000000000000..8e7a58e5b5e7d4b5dd679006fab5c45dd7355e71 --- /dev/null +++ b/mtklibs/libged/README @@ -0,0 +1,20 @@ + +This library is pre-built by MediaTek internally. + + +WHAT IT DOES? +============= +GPU Extension Driver (GED) is a common module that contains the debug codes/feature +for real GPU driver. GED is composed of user space driver and kernel space driver and +provides API services to real GPU driver for use. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +libcutils, liblog, and libutils + +HOW TO USE IT? +============== + +Call the exported API for use. diff --git a/mtklibs/libged/arm/libged.so b/mtklibs/libged/arm/libged.so new file mode 100755 index 0000000000000000000000000000000000000000..5dd69395e60434dcdc292ef4900241b3e89babae Binary files /dev/null and b/mtklibs/libged/arm/libged.so differ diff --git a/mtklibs/libged/include/ged/FrameRateRegulator.h b/mtklibs/libged/include/ged/FrameRateRegulator.h new file mode 100755 index 0000000000000000000000000000000000000000..7e42ff15b869f77c62e64e800d087bf19a8f0fc3 --- /dev/null +++ b/mtklibs/libged/include/ged/FrameRateRegulator.h @@ -0,0 +1,111 @@ +/* vim: set et sw=4 ts=4: */ + +#ifndef __MTK_FPSCONTROL_H_ +#define __MTK_FPSCONTROL_H_ + +#include +#include +#include +#include +#include + +#include "ged/ged_log.h" +#include "ged/ged_notifySF.h" + +#define USE_FRR + +namespace android { +//------------------------------------------------------------------------------ + +/* TODO: + 1. Singleton +*/ +class FrameRateRegulator { +public: + FrameRateRegulator() {} + + status_t initialize(NotifySF *nsf, GED_LOG_HANDLE handle); + + void fpsProbe(); + + void updateFpsUserSetting(int fps); + +private: + /*------------------------------------------------------------------------*/ + /* Internal data structure */ + /*------------------------------------------------------------------------*/ + class Arbitrator : public Thread { + /* TODO: + 1. Mediator pattern + */ + public: + Arbitrator() : Thread(false) + { + mFps[0] = mFps[1] = mLastFps = 60; + } + + status_t initialize(NotifySF *nsf, GED_LOG_HANDLE handle); + + void voteFps(int fps, int voter); + + /* Sent fps changing request to SurfaceFlinger */ + void changeFps(int fps); + + private: + int mFps[2]; + + int mLastFps; + + NotifySF *mNotifySF; + + GED_LOG_HANDLE mGedLogHandle; + + Mutex mFpsLock; + + /* Evaluates every ballot, and make decision of final FPS. */ + bool threadLoop(); + + bool isFpsQualified(int fps); + }; + + class ThermalListener : public Thread { + public: + ThermalListener() : Thread(false), mSocket(-1), mFps(60) {} + + status_t initialize(Arbitrator *arb); + + private: + int mSocket; + + Mutex mFpsLock; + + int mFps; + + Arbitrator *mArbitrator; + + /* Listen to thermal uevent */ + void handleUevents(const char*, int); + + bool threadLoop(); + + int getFps() { + Mutex::Autolock _l(mFpsLock); + return mFps; + } + + }; + + enum { + VOTER_THERMAL, + VOTER_USER_SETTING, + NUM_OF_VOTER, + }; + + Arbitrator mArbitrator; + + ThermalListener mThermalListener; +}; + +//------------------------------------------------------------------------------ +} +#endif diff --git a/mtklibs/libged/include/ged/ged.h b/mtklibs/libged/include/ged/ged.h new file mode 100755 index 0000000000000000000000000000000000000000..37fe917c3580ceff76c0ab68be9db50f54f025b4 --- /dev/null +++ b/mtklibs/libged/include/ged/ged.h @@ -0,0 +1,46 @@ +#ifndef __GED_H__ +#define __GED_H__ + +#include +#include "ged_log.h" +#include "ged_swd.h" + +#if defined (__cplusplus) +extern "C" { +#endif + +typedef enum +{ + GED_BOOST_GPU_FREQ_LEVEL_MAX = 100 +} GED_BOOST_GPU_FREQ_LEVEL; + + +GED_HANDLE ged_create(void); + +void ged_destroy(GED_HANDLE hGed); + +GED_ERROR ged_boost_gpu_freq(GED_HANDLE hGed, GED_BOOST_GPU_FREQ_LEVEL eLevel); + +GED_BOOL ged_check_null_driver_enable(GED_HANDLE hGed); + +void ged_update_null_driver_enable(GED_HANDLE hGed); + +GED_ERROR ged_notify_sw_vsync(GED_HANDLE hGed, GED_DVFS_UM_QUERY_PACK* psQueryData); + +GED_ERROR ged_dvfs_probe(GED_HANDLE hGed, int pid); + +GED_ERROR ged_dvfs_um_return(GED_HANDLE hGed, unsigned long gpu_tar_freq, bool bFallback); + +GED_ERROR ged_query_info( GED_HANDLE hGed, GED_INFO eType, size_t size, void* retrieve); + +// provide vsync_period in ns +GED_ERROR ged_vsync_calibration(GED_HANDLE hGed, int i32Delay, unsigned long nsVsync_period); +GED_ERROR ged_vsync_notify(GED_HANDLE hGed, unsigned long msVsync_period); + + + +#if defined (__cplusplus) +} +#endif + +#endif diff --git a/mtklibs/libged/include/ged/ged_dvfs.h b/mtklibs/libged/include/ged/ged_dvfs.h new file mode 100755 index 0000000000000000000000000000000000000000..8fecb5e2b50b532d58229dbb8c4f3d9ddd7e3373 --- /dev/null +++ b/mtklibs/libged/include/ged/ged_dvfs.h @@ -0,0 +1,44 @@ +#ifndef __GED_DVFS_H__ +#define __GED_DVFS_H__ + +#include "ged_type.h" + +#define GED_NO_UM_SERVICE -1 + +#define GED_DVFS_VSYNC_OFFSET_SIGNAL_EVENT 44 +#define GED_FPS_CHANGE_SIGNAL_EVENT 45 +#define GED_SRV_SUICIDE_EVENT 46 +#define GED_LOW_POWER_MODE_SIGNAL_EVENT 47 +#define GED_MHL4K_VID_SIGNAL_EVENT 48 +#define GED_GAS_SIGNAL_EVENT 49 + +#define DYNAMIC_VSYNC_OFFSET_PROTOCOL 10002 + +#if defined (__cplusplus) +extern "C" { +#endif + +GED_ERROR ged_dvfs_policy(GED_HANDLE hGed, unsigned long ul3DFenceDoneTime, unsigned long ulvsync_period,unsigned long t, long phase); +void ged_dvfs_set_vsync_offset(int voffset); +unsigned long proc_overhead; + +#define GED_EVENT_TOUCH (1 << 0) +#define GED_EVENT_THERMAL (1 << 1) +#define GED_EVENT_WFD (1 << 2) +#define GED_EVENT_MHL (1 << 3) +#define GED_EVENT_GAS (1 << 4) +#define GED_EVENT_LOW_POWER_MODE (1 << 5) +#define GED_EVENT_MHL4K_VID (1 << 6) + +#define GED_EVENT_FORCE_ON (1 << 0) +#define GED_EVENT_FORCE_OFF (1 << 1) +#define GED_EVENT_NOT_SYNC (1 << 2) + +#define GED_VSYNC_OFFSET_NOT_SYNC -2 +#define GED_VSYNC_OFFSET_SYNC -3 + +#if defined (__cplusplus) +} +#endif + +#endif diff --git a/mtklibs/libged/include/ged/ged_error.h b/mtklibs/libged/include/ged/ged_error.h new file mode 100755 index 0000000000000000000000000000000000000000..bff948f0b3e25d7ecc371a360bd24dc6fc142968 --- /dev/null +++ b/mtklibs/libged/include/ged/ged_error.h @@ -0,0 +1,18 @@ +#ifndef __GED_ERROR_H__ +#define __GED_ERROR_H__ + +typedef enum GED_ERROR_TAG +{ + GED_OK, + GED_ERROR_FAIL, + GED_ERROR_OOM, + GED_ERROR_OUT_OF_FD, + GED_ERROR_FAIL_WITH_LIMIT, + GED_ERROR_TIMEOUT, + GED_ERROR_CMD_NOT_PROCESSED, + GED_ERROR_INVALID_PARAMS +} GED_ERROR; + + +#endif + diff --git a/mtklibs/libged/include/ged/ged_log.h b/mtklibs/libged/include/ged/ged_log.h new file mode 100755 index 0000000000000000000000000000000000000000..e6cfc98544674d53a404c2fa866d89d2aa752676 --- /dev/null +++ b/mtklibs/libged/include/ged/ged_log.h @@ -0,0 +1,25 @@ +#ifndef __GED_LOG_H__ +#define __GED_LOG_H__ + +#include "ged_type.h" + +#if defined (__cplusplus) +extern "C" { +#endif + +GED_LOG_HANDLE ged_log_connect(const char* pszName); + +void ged_log_disconnect(GED_LOG_HANDLE hLog); + +GED_ERROR ged_log_print(GED_LOG_HANDLE hLog, const char *fmt, ...); + +/* print with tpt (tpt = time, pid, and tid) */ +GED_ERROR ged_log_tpt_print(GED_LOG_HANDLE hLog, const char *fmt, ...); + +GED_ERROR ged_log_reset(GED_LOG_HANDLE hLog); + +#if defined (__cplusplus) +} +#endif + +#endif diff --git a/mtklibs/libged/include/ged/ged_notifySF.h b/mtklibs/libged/include/ged/ged_notifySF.h new file mode 100755 index 0000000000000000000000000000000000000000..2db5114ba191a8ee6d1dbfcb9270eb828baf00eb --- /dev/null +++ b/mtklibs/libged/include/ged/ged_notifySF.h @@ -0,0 +1,83 @@ +#ifndef __MTK_GED_NOTIFYSF_H_ +#define __MTK_GED_NOTIFYSF_H_ + +#include +#include +#include +#include + +#include + +using namespace android; + + +#define SF_DEAD 0xdeaddad + + +static String16 get_interface_name(sp service) +{ + if (service != NULL) { + Parcel data, reply; + status_t err = service->transact(IBinder::INTERFACE_TRANSACTION, data, &reply); + if (err == NO_ERROR) { + return reply.readString16(); + } + } + return String16(); +} + +class NotifySF +{ + sp sm; + sp service; + String16 ifName; + pthread_mutex_t mMutex; + + public: + status_t obj_state; + NotifySF() + { + mMutex = PTHREAD_MUTEX_INITIALIZER; + sm = defaultServiceManager(); + service =NULL; + service = sm->checkService(String16("SurfaceFlinger")); + ifName = get_interface_name(service); + obj_state = NO_ERROR; + if(service==NULL) + obj_state = SF_DEAD; + } + + void reconnect() + { + pthread_mutex_lock(&mMutex); + sm = defaultServiceManager(); + service =NULL; + service = sm->checkService(String16("SurfaceFlinger")); + ifName = get_interface_name(service); + obj_state = NO_ERROR; + if(service==NULL) + { + obj_state = SF_DEAD; + } + pthread_mutex_unlock(&mMutex); + } + + status_t send(int protocol, int i32Data) + { + status_t ret; + Parcel data, reply; + data.writeInterfaceToken(ifName); + data.writeInt32(i32Data); + pthread_mutex_lock(&mMutex); + if(service!=NULL) + ret = service->transact(protocol, data, &reply); + else + { + obj_state = ret = SF_DEAD; + } + pthread_mutex_unlock(&mMutex); + return ret; + } +}; + +#endif diff --git a/mtklibs/libged/include/ged/ged_swd.h b/mtklibs/libged/include/ged/ged_swd.h new file mode 100755 index 0000000000000000000000000000000000000000..0c45798f37e706440462ac670f703d541d84697d --- /dev/null +++ b/mtklibs/libged/include/ged/ged_swd.h @@ -0,0 +1,27 @@ +#ifndef __GED_SW_WATCH_DOG_H__ +#define __GED_SW_WATCH_DOG_H__ + +#include "ged_type.h" + +#if defined (__cplusplus) +extern "C" { +#endif + +typedef enum GED_SWD_FENCE_FROM_TAG +{ + GED_SWD_FENCE_FROM_QUEUE_BUFFER, + GED_SWD_FENCE_FROM_DEQUEUE_BUFFER, +} GED_SWD_FENCE_FROM_TYPE; + +//set szName as NULL for default name: ged-swd +GED_SWD_HANDLE ged_swd_create(int i32MaxQueueCount, const char *szName); + +void ged_swd_destroy(GED_SWD_HANDLE hHandle); + +GED_ERROR ged_swd_push_fence(GED_SWD_HANDLE hHandle, GED_SWD_FENCE_FROM_TYPE type, int fence); + +#if defined (__cplusplus) +} +#endif + +#endif diff --git a/mtklibs/libged/include/ged/ged_type.h b/mtklibs/libged/include/ged/ged_type.h new file mode 100755 index 0000000000000000000000000000000000000000..fc3057744e7360f4fea49f41153e12b40cd8890f --- /dev/null +++ b/mtklibs/libged/include/ged/ged_type.h @@ -0,0 +1,66 @@ +#ifndef __GPU_TYPE_H__ +#define __GPU_TYPE_H__ + +#include + +#include "ged_error.h" + +typedef void* GED_HANDLE; + +typedef void* GED_SWD_HANDLE; + +typedef void* GED_LOG_HANDLE; + +typedef unsigned int GED_LOG_BUF_HANDLE; + +typedef enum GED_BOOL_TAG +{ + GED_FALSE, + GED_TRUE +} GED_BOOL; + + +typedef enum GED_INFO_TAG +{ + GED_LOADING, + GED_IDLE, + GED_BLOCKING, + GED_PRE_FREQ, + GED_PRE_FREQ_IDX, + GED_CUR_FREQ, + GED_CUR_FREQ_IDX, + GED_MAX_FREQ_IDX, + GED_MAX_FREQ_IDX_FREQ, + GED_MIN_FREQ_IDX, + GED_MIN_FREQ_IDX_FREQ, + GED_3D_FENCE_DONE_TIME, + GED_VSYNC_OFFSET, + GED_EVENT_STATUS, + GED_EVENT_DEBUG_STATUS, + GED_SRV_SUICIDE, + GED_PRE_HALF_PERIOD, + GED_LATEST_START, + GED_UNDEFINED +} GED_INFO; + + +typedef enum GED_VSYNC_TYPE_TAG +{ + GED_VSYNC_SW_EVENT, + GED_VSYNC_HW_EVENT +} GED_VSYNC_TYPE; + +typedef struct GED_DVFS_UM_QUERY_PACK_TAG +{ + unsigned int ui32GPULoading; + unsigned int ui32GPUFreqID; + unsigned long gpu_cur_freq; + unsigned long gpu_pre_freq; + long long usT; + long long nsOffset; + unsigned long ul3DFenceDoneTime; + unsigned long ulPreCalResetTS_us; + unsigned long ulWorkingPeriod_us; +}GED_DVFS_UM_QUERY_PACK; + +#endif diff --git a/mtklibs/libged/libged.so b/mtklibs/libged/libged.so new file mode 100755 index 0000000000000000000000000000000000000000..358cf86f4940b97a2c82dffd782b62504b134d61 Binary files /dev/null and b/mtklibs/libged/libged.so differ diff --git a/mtklibs/libgma/Android.mk_ b/mtklibs/libgma/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..826132604b5d52083f8b6a70ca5bdcd9d7261a0e --- /dev/null +++ b/mtklibs/libgma/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libgma +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libgma.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libgma +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libgma.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libgma/README b/mtklibs/libgma/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libgma/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libgma/arm/libgma.a b/mtklibs/libgma/arm/libgma.a new file mode 100755 index 0000000000000000000000000000000000000000..7eba5fb7e9fc7eaa93776d1513a2176a17a373a1 Binary files /dev/null and b/mtklibs/libgma/arm/libgma.a differ diff --git a/mtklibs/libgma/libgma.a b/mtklibs/libgma/libgma.a new file mode 100755 index 0000000000000000000000000000000000000000..a8b08a3e156ab180151d7dcc596f60d27d555f0f Binary files /dev/null and b/mtklibs/libgma/libgma.a differ diff --git a/mtklibs/libgpu_aux/Android.mk_ b/mtklibs/libgpu_aux/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..f4526e237f51ccd3827b02602d13ce7126b498b7 --- /dev/null +++ b/mtklibs/libgpu_aux/Android.mk_ @@ -0,0 +1,27 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libgpu_aux +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libdpframework libhardware libgralloc_extra libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libgpu_aux.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libgpu_aux +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libdpframework libhardware libgralloc_extra libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libgpu_aux.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libgpu_aux/NOTICE b/mtklibs/libgpu_aux/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..268fe090e899fe0bf9f46d0e63b05373a160e09d --- /dev/null +++ b/mtklibs/libgpu_aux/NOTICE @@ -0,0 +1,22 @@ + * (C) COPYRIGHT 2014 ARM Limited, ALL RIGHTS RESERVED: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/libgpu_aux/README b/mtklibs/libgpu_aux/README new file mode 100755 index 0000000000000000000000000000000000000000..7f0f34a8be73983eaf56f0a8ed2c962d47827e0a --- /dev/null +++ b/mtklibs/libgpu_aux/README @@ -0,0 +1,14 @@ +A common interface for color conversion for GPU drivers. + +WHAT IT DOES? +============= +The libgpu_aux.so provide a interface for GPU drivers to support +MTK's color format, such as NV12, or other MTK PRIVATE FORMAT. + +HOW IT WAS BUILT? +================== +It needs the following library from MTK: +1. libdpframework.so + +HOW TO USE IT? +============== diff --git a/mtklibs/libgpu_aux/arm/libgpu_aux.so b/mtklibs/libgpu_aux/arm/libgpu_aux.so new file mode 100755 index 0000000000000000000000000000000000000000..6f3ffaed0ebb2232fb14086754ea3452240f02cb Binary files /dev/null and b/mtklibs/libgpu_aux/arm/libgpu_aux.so differ diff --git a/mtklibs/libgpu_aux/include/AHY9U3~9/GpuAux.h b/mtklibs/libgpu_aux/include/AHY9U3~9/GpuAux.h new file mode 100755 index 0000000000000000000000000000000000000000..785df4094d8fa923c15667d21f275c50882ae5d4 --- /dev/null +++ b/mtklibs/libgpu_aux/include/AHY9U3~9/GpuAux.h @@ -0,0 +1,34 @@ + +#ifndef __GPUAUX_H__ +#define __GPUAUX_H__ + +#include +#include +#include + +#include +#include + +__BEGIN_DECLS + +struct GPUAUXContext; +typedef struct GPUAUXContext* GPUAUXContextHandle; + +int GpuAuxIsSupportFormat(android_native_buffer_t * buf); +int GpuAuxIsOptionalFormat(android_native_buffer_t * buf); +GPUAUXContextHandle GpuAuxCreateContext(int outputFormat, int numBuffers); + +int GpuAuxPrepareBuffer(GPUAUXContextHandle ctx, android_native_buffer_t* srcBuffer); + +int GpuAuxGetCurrentIdx(GPUAUXContextHandle ctx); +android_native_buffer_t* GpuAuxGetCurrentAuxBuffer(GPUAUXContextHandle ctx); +android_native_buffer_t* GpuAuxGetCurrentSourceBuffer(GPUAUXContextHandle ctx); + +int GpuAuxDoConversionIfNeed(GPUAUXContextHandle ctx); + +int GpuAuxDestoryContext(GPUAUXContextHandle ctx); + +__END_DECLS + +#endif + diff --git a/mtklibs/libgpu_aux/libgpu_aux.so b/mtklibs/libgpu_aux/libgpu_aux.so new file mode 100755 index 0000000000000000000000000000000000000000..d677fcb89a8e9644a82bd354786e7141fbfe4ed2 Binary files /dev/null and b/mtklibs/libgpu_aux/libgpu_aux.so differ diff --git a/mtklibs/libh264dec_hw/Android.mk_ b/mtklibs/libh264dec_hw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..74c6decc03a2ffebb8303fb74dd44e7d7f72f88c --- /dev/null +++ b/mtklibs/libh264dec_hw/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libh264dec_hw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libh264dec_hw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libh264dec_hw/NOTICE b/mtklibs/libh264dec_hw/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libh264dec_hw/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libh264dec_hw/README b/mtklibs/libh264dec_hw/README new file mode 100755 index 0000000000000000000000000000000000000000..f63933f592f48937c124d106a579c2a475b0f16d --- /dev/null +++ b/mtklibs/libh264dec_hw/README @@ -0,0 +1,24 @@ +Library of MediaTek hardware H.264 video decoder. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +This library provide the decode core of hardware H.264 video decoder of MediaTek. + + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libc.so +2. libcutils.so + + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== +provide the private interface for MediaTek video common driver. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libh264dec_hw/arm/libh264dec_hw.a b/mtklibs/libh264dec_hw/arm/libh264dec_hw.a new file mode 100755 index 0000000000000000000000000000000000000000..14308d9b8c2cec9160e8a2a5a80f51207da19358 Binary files /dev/null and b/mtklibs/libh264dec_hw/arm/libh264dec_hw.a differ diff --git a/mtklibs/libh264enc_hw/Android.mk_ b/mtklibs/libh264enc_hw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d339566e65c9a180c17b98142db9a3ffdecef36b --- /dev/null +++ b/mtklibs/libh264enc_hw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libh264enc_hw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libh264enc_hw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libh264enc_hw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libh264enc_hw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libh264enc_hw/NOTICE b/mtklibs/libh264enc_hw/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libh264enc_hw/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libh264enc_hw/README b/mtklibs/libh264enc_hw/README new file mode 100755 index 0000000000000000000000000000000000000000..0255e3205c9615d531e97957b0f78d5f4e0f058e --- /dev/null +++ b/mtklibs/libh264enc_hw/README @@ -0,0 +1,27 @@ +Library of MTK h.264 hw enc features, icluding encoding yuv to bitstream + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libh264enc_hw.a contains MediaTek developed h.264 hw enc modules. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libcutils.so + +and the following libs from MediaTek: +1. libmtk_drvb.so +2. libmet-tag.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +all api interface are at (vendor/mediatek/proprietary/hardware/libvcodec/common/hardware/h264_enc/) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libh264enc_hw/arm/libh264enc_hw.a b/mtklibs/libh264enc_hw/arm/libh264enc_hw.a new file mode 100755 index 0000000000000000000000000000000000000000..94758ad90345b177305323ae7e0b13546f370b5e Binary files /dev/null and b/mtklibs/libh264enc_hw/arm/libh264enc_hw.a differ diff --git a/mtklibs/libh264enc_hw/libh264enc_hw.a b/mtklibs/libh264enc_hw/libh264enc_hw.a new file mode 100755 index 0000000000000000000000000000000000000000..6eaa27f5672e2b22aa0a7aec19133950912d0cc2 Binary files /dev/null and b/mtklibs/libh264enc_hw/libh264enc_hw.a differ diff --git a/mtklibs/libhdr/Android.mk_ b/mtklibs/libhdr/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..c4b04e8c4136df6779a2d8c0a4d985bf2b37051b --- /dev/null +++ b/mtklibs/libhdr/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libhdr +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libhdr.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libhdr +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libhdr.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libhdr/README b/mtklibs/libhdr/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libhdr/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libhdr/arm/libhdr.a b/mtklibs/libhdr/arm/libhdr.a new file mode 100755 index 0000000000000000000000000000000000000000..e5fd1d0748c329389ee506d144039ea04f7137b1 Binary files /dev/null and b/mtklibs/libhdr/arm/libhdr.a differ diff --git a/mtklibs/libhdr/libhdr.a b/mtklibs/libhdr/libhdr.a new file mode 100755 index 0000000000000000000000000000000000000000..f7a44d9b5c5925d012e64a62021d5e07ab280c48 Binary files /dev/null and b/mtklibs/libhdr/libhdr.a differ diff --git a/mtklibs/libhdrsw/Android.mk_ b/mtklibs/libhdrsw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..9975ac562e42c60758f8cc4c1d1da1a2acb4f32c --- /dev/null +++ b/mtklibs/libhdrsw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libhdrsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libhdrsw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libhdrsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libhdrsw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libhdrsw/README b/mtklibs/libhdrsw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libhdrsw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libhdrsw/arm/libhdrsw.a b/mtklibs/libhdrsw/arm/libhdrsw.a new file mode 100755 index 0000000000000000000000000000000000000000..dab9e786d9c867c43e13bafeb084484fba9d3559 Binary files /dev/null and b/mtklibs/libhdrsw/arm/libhdrsw.a differ diff --git a/mtklibs/libhdrsw/libhdrsw.a b/mtklibs/libhdrsw/libhdrsw.a new file mode 100755 index 0000000000000000000000000000000000000000..22bfac5034fceac8cf0e76b944c1d3e43ff56977 Binary files /dev/null and b/mtklibs/libhdrsw/libhdrsw.a differ diff --git a/mtklibs/libhevcenc_sw/Android.mk_ b/mtklibs/libhevcenc_sw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a56d1df5e27e18dd642b4644a1f88f850d04f9ee --- /dev/null +++ b/mtklibs/libhevcenc_sw/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libhevcenc_sw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libhevcenc_sw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libhevcenc_sw/NOTICE b/mtklibs/libhevcenc_sw/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libhevcenc_sw/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libhevcenc_sw/README b/mtklibs/libhevcenc_sw/README new file mode 100755 index 0000000000000000000000000000000000000000..e736f50acb8be5ec6797b0460151e62dbc4186cd --- /dev/null +++ b/mtklibs/libhevcenc_sw/README @@ -0,0 +1,27 @@ +Library of MTK HEVC sw enc features, icluding encoding yuv to bitstream + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libhevcenc_sw.a contains MediaTek developed hevc sw enc modules. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libcutils.so + +and the following libs from MediaTek: +1. libmtk_drvb.so +2. libmet-tag.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +all api interface are at (vendor/mediatek/proprietary/hardware/libvcodec/common/software/hevc_enc/) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libhevcenc_sw/arm/libhevcenc_sw.a b/mtklibs/libhevcenc_sw/arm/libhevcenc_sw.a new file mode 100755 index 0000000000000000000000000000000000000000..ccc43045ca4b1024411e70a707aa71faa5ddca17 Binary files /dev/null and b/mtklibs/libhevcenc_sw/arm/libhevcenc_sw.a differ diff --git a/mtklibs/libhwm/Android.mk_ b/mtklibs/libhwm/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a54b401b59ff7773d952c7a297b87de2537e999d --- /dev/null +++ b/mtklibs/libhwm/Android.mk_ @@ -0,0 +1,27 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libhwm +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libnvram libfile_op libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libhwm.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libhwm +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libnvram libfile_op libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libhwm.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libhwm/NOTICE b/mtklibs/libhwm/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libhwm/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libhwm/README b/mtklibs/libhwm/README new file mode 100755 index 0000000000000000000000000000000000000000..a2f588826950474c56d00d9226945520f8da1248 --- /dev/null +++ b/mtklibs/libhwm/README @@ -0,0 +1,29 @@ +Sensor calibration tool + +WHAT IT DOES? +============= +This tool used for calibrating gsensor or gyroscope. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +libutils libcutils + +and the following libs from MediaTek: +libhwm + +HOW TO USE IT? +============== +Usage:[options] +Options: +-h Show the help information for this tool. +-gs This option to calibrate gsensor. +-gy This option to calibrate gyroscope. +-c This option used to clear driver and nvram data. +-w This option used to write calibration result to driver and nvram. + +Parameters: +: Delay time of read sensor data. +: Count of read sensor data. +: Tolerance(20 or 40) of calibration fail. +: Unused. diff --git a/mtklibs/libhwm/arm/libhwm.so b/mtklibs/libhwm/arm/libhwm.so new file mode 100755 index 0000000000000000000000000000000000000000..4e847bb567c68a9c29ce7c82028eec3ce06180c4 Binary files /dev/null and b/mtklibs/libhwm/arm/libhwm.so differ diff --git a/mtklibs/libhwm/include/libhwm.h b/mtklibs/libhwm/include/libhwm.h new file mode 100755 index 0000000000000000000000000000000000000000..3afbffa688f48179bd1b1783da366e6865f9127d --- /dev/null +++ b/mtklibs/libhwm/include/libhwm.h @@ -0,0 +1,163 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein is + * confidential and proprietary to MediaTek Inc. and/or its licensors. Without + * the prior written permission of MediaTek inc. and/or its licensors, any + * reproduction, modification, use or disclosure of MediaTek Software, and + * information contained herein, in whole or in part, shall be strictly + * prohibited. + * + * MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER + * ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL + * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR + * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH + * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, + * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES + * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. + * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO + * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK + * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE + * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S + * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE + * RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE + * MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE + * CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek + * Software") have been modified by MediaTek Inc. All revisions are subject to + * any receiver's applicable license agreements with MediaTek Inc. + */ + +#ifndef __LIBHWM_H__ +#define __LIBHWM_H__ +/*---------------------------------------------------------------------------*/ +#include + +#define GSENSOR_NAME "/dev/gsensor" +#define GSENSOR_ATTR_SELFTEST "/sys/bus/platform/drivers/gsensor/selftest" + +#define GYROSCOPE_NAME "/dev/gyroscope" +#define ALSPS_NAME "/dev/als_ps" +/*---------------------------------------------------------------------------*/ +// hardware\libhardware\include\hardware\sensors.h +#define LIBHWM_GRAVITY_EARTH (9.80665f) +/*---------------------------------------------------------------------------*/ +#define LIBHWM_ACC_NVRAM_SENSITIVITY (65536) +/*---------------------------------------------------------------------------*/ +#define LSB_TO_GRA(X) ((X*LIBHWM_GRAVITY_EARTH)/LIBHWM_ACC_NVRAM_SENSITIVITY) +#define GRA_TO_LSB(X) (round((X*LIBHWM_ACC_NVRAM_SENSITIVITY)/LIBHWM_GRAVITY_EARTH)) +/*---------------------------------------------------------------------------*/ +#define LIBHWM_INVAL_FD (-1) +/*---------------------------------------------------------------------------*/ +#define LIBHWM_IS_INVAL_FD(fd) (fd == LIBHWM_INVAL_FD) +// Gyroscope sensor sensitivity 1000 +#define LIBHWM_GYRO_NVRAM_SENSITIVITY 1000 +/*---------------------------------------------------------------------------*/ +#define ABSDIF(X, Y) ((X > Y) ? (Y - X) : (X - Y)) +#define ABS(X) ((X > 0) ? (X) : (-X)) +/*---------------------------------------------------------------------------*/ +typedef enum { + HWM_TYPE_NONE = 0, + HWM_TYPE_ACC = 1, + HWM_TYPE_MAG = 2, + HWM_TYPE_PRO = 3, + HWM_TYPE_LIG = 4, + HWM_TYPE_PS = 5, +} HwmType; +/*---------------------------------------------------------------------------*/ +typedef struct { + HwmType type; + char *ctl; + char *dat; + int ctl_fd; + int dat_fd; +} HwmDev; +/*---------------------------------------------------------------------------*/ +typedef union { + struct { /*raw data*/ + int rx; + int ry; + int rz; + }; + struct { + float x; + float y; + float z; + }; + struct { + float azimuth; + float pitch; + float roll; + }; + struct { + int ps_data; + int ps_cali; + int ps_threshold_high; + int ps_threshold_low; + }; +} HwmData; +/*---------------------------------------------------------------------------*/ +typedef struct { + void *ptr; + int len; +} HwmPrivate; +/*---------------------------------------------------------------------------*/ +extern int gsensor_calibration(int fd, int period, int count, int tolerance, int trace, HwmData *cali); +extern int gsensor_write_nvram(HwmData *dat); +extern int gsensor_read_nvram(HwmData *dat); +extern int gsensor_rst_cali(int fd); +extern int gsensor_set_cali(int fd, HwmData *dat); +extern int gsensor_get_cali(int fd, HwmData *dat); +extern int gsensor_read(int fd, HwmData *dat); +extern int gsensor_init(int fd); +extern int gsensor_close(int fd); +extern int gsensor_open(int *fd); +extern int gyroscope_calibration(int fd, int period, int count, int tolerance, int trace, HwmData *cali); +extern int gyroscope_write_nvram(HwmData *dat); +extern int gyroscope_read_nvram(HwmData *dat); +extern int gyroscope_rst_cali(int fd); +extern int gyroscope_set_cali(int fd, HwmData *dat); +extern int gyroscope_get_cali(int fd, HwmData *dat); +extern int gyroscope_read(int fd, HwmData *dat); +extern int gyroscope_close(int fd); +extern int gyroscope_open(int *fd); +extern int gyroscope_init(int fd); + +/*yucong add for alsps calibration functions*/ +extern int alsps_calibration(int fd, int period, int count, int tolerance, int trace, HwmData *cali); +extern int alsps_write_nvram(HwmData *dat); +extern int alsps_read_nvram(HwmData *dat); +extern int alsps_rst_cali(int fd); +extern int alsps_set_cali(int fd, HwmData *dat); +extern int alsps_get_cali(int fd, HwmData *dat); +extern int alsps_read(int fd, HwmData *dat); +extern int alsps_set_threshold(int fd, HwmData *dat); + +/*---------------------------------------------------------------------------*/ +/*---------------------------------------------------------------------------*/ +extern int get_psensor_data(void); +extern int calculate_psensor_min_value(void); +extern int get_psensor_min_value(void); +extern int calculate_psensor_max_value(void); +extern int get_psensor_max_value(void); +extern int do_calibration(int min, int max); +extern int get_psensor_threshold(int flag); +extern int set_psensor_threshold(int high, int low); +extern int clear_psensor_calibration(void); +/*---------------------------------------------------------------------------*/ +extern int do_gsensor_calibration(int tolerance); +extern int get_gsensor_calibration(float *x, float *y, float *z); +extern int clear_gsensor_calibration(void); + +/*---------------------------------------------------------------------------*/ +extern int do_gyroscope_calibration(int tolerance); +extern int get_gyroscope_calibration(float *x, float *y, float *z); +extern int clear_gyroscope_calibration(void); +#endif diff --git a/mtklibs/libhwm/libhwm.so b/mtklibs/libhwm/libhwm.so new file mode 100755 index 0000000000000000000000000000000000000000..a7e22ed73aab98938b8e8429c9f61a54ccaf2fc0 Binary files /dev/null and b/mtklibs/libhwm/libhwm.so differ diff --git a/mtklibs/libimsma/Android.mk_ b/mtklibs/libimsma/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d9a91df7703935a4d5f15996c7e95fffd4c61681 --- /dev/null +++ b/mtklibs/libimsma/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libimsma +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libbinder libgui libmedia libstagefright libstagefright_foundation libui libsink libsource libvcodec_cap libimsma_rtp libcomutils libaed libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libimsma.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libimsma +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libgui libmedia libstagefright libstagefright_foundation libui libsink libsource libvcodec_cap libimsma_rtp libcomutils libaed libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libimsma.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libimsma/README b/mtklibs/libimsma/README new file mode 100755 index 0000000000000000000000000000000000000000..c7c45200c7d1dcfd8d76221f896509e79921cc90 --- /dev/null +++ b/mtklibs/libimsma/README @@ -0,0 +1,32 @@ +Library of MTK ViLTE features, controlling uplink and downlink data path + +WHAT IT DOES? +============= +libimsma.so control the uplink and downlink + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +libcutils.so +libstagefright_foundation.so +libutils.so +libstagefright.so +libbinder.so +libmedia.so +libutils.so + +and the following libs from MediaTek: + +libsink.so +libsource.so +libvcodec_cap.so +libimsma_rtp.so +libcomutils.so +libimsma_socketwrapper.so + + +HOW TO USE IT? +============== +used by the libmtk_vtservice module to do the multimedia and rtp data process + + diff --git a/mtklibs/libimsma/arm/libimsma.so b/mtklibs/libimsma/arm/libimsma.so new file mode 100755 index 0000000000000000000000000000000000000000..35ed9a5c00cb801c71279a7aaa11cf807d063705 Binary files /dev/null and b/mtklibs/libimsma/arm/libimsma.so differ diff --git a/mtklibs/libimsma/libimsma.so b/mtklibs/libimsma/libimsma.so new file mode 100755 index 0000000000000000000000000000000000000000..8cdb60d2c6e837bf6a0d93f3157c2e8d9c9cd77c Binary files /dev/null and b/mtklibs/libimsma/libimsma.so differ diff --git a/mtklibs/libimsma_rtp/Android.mk_ b/mtklibs/libimsma_rtp/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..51f79e4a24366b1d95088036fc748a55685a1f75 --- /dev/null +++ b/mtklibs/libimsma_rtp/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libimsma_rtp +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libbinder libmedia libui libgui libskia libstagefright libstagefright_foundation libimsma_socketwrapper libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libimsma_rtp.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libimsma_rtp +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libmedia libui libgui libskia libstagefright libstagefright_foundation libimsma_socketwrapper libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libimsma_rtp.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libimsma_rtp/NOTICE b/mtklibs/libimsma_rtp/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libimsma_rtp/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libimsma_rtp/README b/mtklibs/libimsma_rtp/README new file mode 100755 index 0000000000000000000000000000000000000000..39e05ca48a0c0d79fcee2779abf84f92da31455a --- /dev/null +++ b/mtklibs/libimsma_rtp/README @@ -0,0 +1,26 @@ +This module creates the libimsma_rtp.so libary file. + +WHAT IT DOES? +============= +libimsma_rtp mainly used for parse and pack rtp packet for ViLTE + + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + + libcutils, libutils, libgui, libinder + +and the following libs from MediaTek: + + libstagefright, libmedia, libstagefright_foundation, libtimestretch, libaudioflinger, libdpframework, libvcodecdrv + + +HOW TO USE IT? +============== + +The libimsma_rtp libraries should not be used directly by an application developer. +Used by JNI layer + +The majority of source code for this library were written by MediaTek. Various +open source libraries are also used and contained in this folder. diff --git a/mtklibs/libimsma_rtp/arm/libimsma_rtp.so b/mtklibs/libimsma_rtp/arm/libimsma_rtp.so new file mode 100755 index 0000000000000000000000000000000000000000..5adbb48cbcffd25a8c9e50ae427a1b7233364370 Binary files /dev/null and b/mtklibs/libimsma_rtp/arm/libimsma_rtp.so differ diff --git a/mtklibs/libimsma_rtp/libimsma_rtp.so b/mtklibs/libimsma_rtp/libimsma_rtp.so new file mode 100755 index 0000000000000000000000000000000000000000..82a0ef8d1cf8654b494ffab65764abee6f53e8ce Binary files /dev/null and b/mtklibs/libimsma_rtp/libimsma_rtp.so differ diff --git a/mtklibs/libimsma_socketwrapper/Android.mk_ b/mtklibs/libimsma_socketwrapper/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..5e7583354014b4f529b99b38502e1f7f0a326790 --- /dev/null +++ b/mtklibs/libimsma_socketwrapper/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libimsma_socketwrapper +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libbinder libmedia libui libgui libskia libstagefright libstagefright_foundation libnetd_client libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libimsma_socketwrapper.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libimsma_socketwrapper +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libmedia libui libgui libskia libstagefright libstagefright_foundation libnetd_client libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libimsma_socketwrapper.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libimsma_socketwrapper/arm/libimsma_socketwrapper.so b/mtklibs/libimsma_socketwrapper/arm/libimsma_socketwrapper.so new file mode 100755 index 0000000000000000000000000000000000000000..2e45318194c5380597db6564fd68aa57d8ee737c Binary files /dev/null and b/mtklibs/libimsma_socketwrapper/arm/libimsma_socketwrapper.so differ diff --git a/mtklibs/libimsma_socketwrapper/libimsma_socketwrapper.so b/mtklibs/libimsma_socketwrapper/libimsma_socketwrapper.so new file mode 100755 index 0000000000000000000000000000000000000000..cd765c2f97d72d5fb77ac18c648113f84e4156b6 Binary files /dev/null and b/mtklibs/libimsma_socketwrapper/libimsma_socketwrapper.so differ diff --git a/mtklibs/libispfeature/Android.mk_ b/mtklibs/libispfeature/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..b76841e65ca61804891200002447099b59b93fcb --- /dev/null +++ b/mtklibs/libispfeature/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libispfeature +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libispfeature.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libispfeature +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libispfeature.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libispfeature/README b/mtklibs/libispfeature/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libispfeature/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libispfeature/arm/libispfeature.a b/mtklibs/libispfeature/arm/libispfeature.a new file mode 100755 index 0000000000000000000000000000000000000000..35704774a504b72a287720ae85f6ba5a0b1882d9 Binary files /dev/null and b/mtklibs/libispfeature/arm/libispfeature.a differ diff --git a/mtklibs/libispfeature/libispfeature.a b/mtklibs/libispfeature/libispfeature.a new file mode 100755 index 0000000000000000000000000000000000000000..b5168a479e218778a56951bae325b53d0abb3002 Binary files /dev/null and b/mtklibs/libispfeature/libispfeature.a differ diff --git a/mtklibs/libkisd/Android.mk_ b/mtklibs/libkisd/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a49898aab1fee91c5c49970ac73ef7a0ce0cafdb --- /dev/null +++ b/mtklibs/libkisd/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libkisd +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libkisd.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libkisd/README b/mtklibs/libkisd/README new file mode 100755 index 0000000000000000000000000000000000000000..9523a2f1bdc75b8f76bd665228e3abd33a6107f9 --- /dev/null +++ b/mtklibs/libkisd/README @@ -0,0 +1,13 @@ +Application of MTK drm key management daemon. + +WHAT IT DOES? +============= +Kisd is MediaTek developed drm key management daemon. +Without it, drm key management functionalities will not work. + +HOW IT WAS BUILT? +================== +It needs the following libraries from AOSP: +1.libcutils +2.libnetutils +3.libc \ No newline at end of file diff --git a/mtklibs/libkisd/libkisd.a b/mtklibs/libkisd/libkisd.a new file mode 100755 index 0000000000000000000000000000000000000000..b7674514c7a630dc9e619566a972f83ef678ed95 Binary files /dev/null and b/mtklibs/libkisd/libkisd.a differ diff --git a/mtklibs/liblic_divx/Android.mk_ b/mtklibs/liblic_divx/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..1c458505ab9d1b69448b32b6a1d9b870cd4f17a8 --- /dev/null +++ b/mtklibs/liblic_divx/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = liblic_divx +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libvcodecdrv libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/liblic_divx.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/liblic_divx/arm/liblic_divx.so b/mtklibs/liblic_divx/arm/liblic_divx.so new file mode 100755 index 0000000000000000000000000000000000000000..fd6665264b6991d7a3eb7f26b956de0cef815adf Binary files /dev/null and b/mtklibs/liblic_divx/arm/liblic_divx.so differ diff --git a/mtklibs/liblic_s263/Android.mk_ b/mtklibs/liblic_s263/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..f42904537af7b6e709219be1816b23ecfa4fb2f2 --- /dev/null +++ b/mtklibs/liblic_s263/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = liblic_s263 +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libvcodecdrv libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/liblic_s263.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/liblic_s263/arm/liblic_s263.so b/mtklibs/liblic_s263/arm/liblic_s263.so new file mode 100755 index 0000000000000000000000000000000000000000..1f09325f025943a1bc37eec89382e70e061b93da Binary files /dev/null and b/mtklibs/liblic_s263/arm/liblic_s263.so differ diff --git a/mtklibs/liblsctrans/Android.mk_ b/mtklibs/liblsctrans/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..da80413f93cf6d8b84e6af90eb7b44be6a999b3c --- /dev/null +++ b/mtklibs/liblsctrans/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = liblsctrans +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = liblsctrans.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = liblsctrans +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/liblsctrans.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/liblsctrans/README b/mtklibs/liblsctrans/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/liblsctrans/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/liblsctrans/arm/liblsctrans.a b/mtklibs/liblsctrans/arm/liblsctrans.a new file mode 100755 index 0000000000000000000000000000000000000000..f7a0b0e03a4d7b194208ebceb13be70b44f96deb Binary files /dev/null and b/mtklibs/liblsctrans/arm/liblsctrans.a differ diff --git a/mtklibs/liblsctrans/liblsctrans.a b/mtklibs/liblsctrans/liblsctrans.a new file mode 100755 index 0000000000000000000000000000000000000000..0172af6b369b08aa63ec7a6fb2161e6fe5f1e308 Binary files /dev/null and b/mtklibs/liblsctrans/liblsctrans.a differ diff --git a/mtklibs/libmagcalibrate/Android.mk_ b/mtklibs/libmagcalibrate/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..2aa09786718c4208f53f11633f0ebdd3d95e0574 --- /dev/null +++ b/mtklibs/libmagcalibrate/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmagcalibrate +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmagcalibrate.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmagcalibrate/NOTICE b/mtklibs/libmagcalibrate/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libmagcalibrate/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libmagcalibrate/README b/mtklibs/libmagcalibrate/README new file mode 100755 index 0000000000000000000000000000000000000000..bb33af8b207a9a445676a8a56815fc03f53e7955 --- /dev/null +++ b/mtklibs/libmagcalibrate/README @@ -0,0 +1,21 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. \ No newline at end of file diff --git a/mtklibs/libmagcalibrate/arm/libmagcalibrate.a b/mtklibs/libmagcalibrate/arm/libmagcalibrate.a new file mode 100755 index 0000000000000000000000000000000000000000..56d8bd7520dc79ad7cf5349c7434667ef051e7a4 Binary files /dev/null and b/mtklibs/libmagcalibrate/arm/libmagcalibrate.a differ diff --git a/mtklibs/libmal/Android.mk_ b/mtklibs/libmal/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..b972a5d2ca69f03f71f3a2b833dca77639381dd7 --- /dev/null +++ b/mtklibs/libmal/Android.mk_ @@ -0,0 +1,27 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libmdfx libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmal.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmdfx libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmal.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmal/README b/mtklibs/libmal/README new file mode 100755 index 0000000000000000000000000000000000000000..a263c63fe5dea1aadc8b5731364e8bf87c029a2e --- /dev/null +++ b/mtklibs/libmal/README @@ -0,0 +1,10 @@ +This module is the interface of MAL + + +WHAT IT DOES? +============= +This module is the interface of MAL + +HOW IT WAS BUILT? +================== +This module is binary released. diff --git a/mtklibs/libmal/arm/libmal.so b/mtklibs/libmal/arm/libmal.so new file mode 100755 index 0000000000000000000000000000000000000000..f08bbdf7dd975f115782699fd15f531bcb3a3ae8 Binary files /dev/null and b/mtklibs/libmal/arm/libmal.so differ diff --git a/mtklibs/libmal/include/datamngr_interface.h b/mtklibs/libmal/include/datamngr_interface.h new file mode 100755 index 0000000000000000000000000000000000000000..7b5a2beca814e91eb5efd2b7c36a2f2fef75149f --- /dev/null +++ b/mtklibs/libmal/include/datamngr_interface.h @@ -0,0 +1,29 @@ +#ifndef DATAMNGR_IF_H +#define DATAMNGR_IF_H + +#include "mdfx.h" + +typedef int (*dm_data_call_list_change_notify_fn)(dm_urc_data_call_list_changed_t *notify, void *priv); +typedef int (*dm_data_call_list_notify_fn)(dm_resp_setup_data_call_t *notify, void *priv); +typedef int (*dm_dedicated_bearer_act_notify_fn)(dm_urc_dedicate_bearer_activated_t *notify, void *priv); +typedef int (*dm_dedicated_bearer_modify_notify_fn)(dm_urc_dedicate_bearer_modified_t *notify, void *priv); +typedef int (*dm_dedicated_bearer_deact_notify_fn)(dm_urc_dedicate_bearer_deactivated_t *notify, void *priv); +typedef int (*dm_dedicated_data_call_notify_fn)(dm_resp_setup_dedicate_data_call_t *notify, void *priv); +typedef int (*dm_handover_notify_fn)(dm_ho_status_t *notify, void *priv); + +typedef struct _mal_dm_notify_function{ + dm_data_call_list_change_notify_fn data_call_list_change; + dm_data_call_list_notify_fn data_call_list; + dm_dedicated_bearer_act_notify_fn dedicated_bearer_act; + dm_dedicated_bearer_modify_notify_fn dedicated_bearer_modify; + dm_dedicated_bearer_deact_notify_fn dedicated_bearer_deact; + dm_dedicated_data_call_notify_fn dedicated_data_call; + dm_handover_notify_fn handover_notify; +} mal_dm_notify_function_t; + +extern int mal_dm_register(mal_dm_notify_function_t *callback_fn); + + +extern mal_dm_notify_function_t mal_dm_notify; + +#endif diff --git a/mtklibs/libmal/include/epdga_info.h b/mtklibs/libmal/include/epdga_info.h new file mode 100755 index 0000000000000000000000000000000000000000..ceb23c13ea87fda441d6efadc55880c26ccfd987 --- /dev/null +++ b/mtklibs/libmal/include/epdga_info.h @@ -0,0 +1,19 @@ +#ifndef __EPDGA_INFO_H__ +#define __EPDGA_INFO_H__ + +#include "mdfx.h" + +#define EPDGA_MAX_NUM_PCSCFS 10 +#define EPDGA_IPV6_ADDR_BIN_LEN 16 + +typedef struct epdga_pcscfs_t { + unsigned short pcscf_num; + unsigned short pcscf_v6_mask;// bit mask => 1 : IPV6, 0 : IPV4 + unsigned char pcscf[EPDGA_MAX_NUM_PCSCFS][EPDGA_IPV6_ADDR_BIN_LEN]; +} epdga_pcscfs_t; + + +int mal_epdga_query_pcscfs(void *conn_ptr, epdga_pcscfs_t *pcscfs); +int mal_epdga_query_ap_mac(void *conn_ptr, char *mac_addr); + +#endif \ No newline at end of file diff --git a/mtklibs/libmal/include/mal.h b/mtklibs/libmal/include/mal.h new file mode 100755 index 0000000000000000000000000000000000000000..3ada78043875c9be472d789ad6fa974799dcb351 --- /dev/null +++ b/mtklibs/libmal/include/mal.h @@ -0,0 +1,26 @@ +#ifndef __MAL_INTERFACE_H__ +#define __MAL_INTERFACE_H__ + +#include "simmngr_interface.h" +#include "datamngr_interface.h" + + +void* mal_init (); + +void* mal_init2 (); + +int mal_exit (void *o); + +int mal_execute_atcmd (void *o, char *cmd, char *response, int response_len); + +int mal_ril_connect (void *o); + +int mal_ril_disconnect (void *o); + +int mal_get_ps_reg_state (char *buf, unsigned int len); + +int mal_get_ps_reg_state_ex (int type, char *buf, unsigned int buf_len); + +int mal_set_ps_format(int long_format); + +#endif /* __MAL_INTERFACE_H__ */ diff --git a/mtklibs/libmal/include/simmngr_interface.h b/mtklibs/libmal/include/simmngr_interface.h new file mode 100755 index 0000000000000000000000000000000000000000..3be23b033aa707071e6cc5aba875ae592c50dd1b --- /dev/null +++ b/mtklibs/libmal/include/simmngr_interface.h @@ -0,0 +1,223 @@ +#ifndef SIMMNGR_IF_H +#define SIMMNGR_IF_H + +// request +typedef enum _sim_query_request_{ + USIM_QUERY_IMSI = 0, + USIM_QUERY_MNC_LEN, + USIM_QUERY_PSISMSC, + USIM_QUERY_SMSP, + ISIM_QUERY_IMPI, + ISIM_QUERY_PSISMSC, + ISIM_QUERY_IMPU, + ISIM_QUERY_DOMAIN, + ISIM_QUERY_SERVICE_TABLE, + ISIM_QUERY_PCSCF, + SIM_QUERY_IMEI, +} sim_query_request_e; + +// sim type +#define TYPE_USIM 0 +#define TYPE_ISIM 1 + +typedef enum _sim_state_{ + SIM_STATE_NOTIFY_NOT_READY = 0, + SIM_STATE_NOTIFY_READY = 1, + SIM_STATE_NOTIFY_REFRESH = 2, +} sim_notify_state_e; + +typedef enum _sim_insert_state_{ + SIM_INSERT_PLUG_OUT = 0, + SIM_INSERT_PLUG_IN, + SIM_INSERT_ABNORMAL, +} sim_insert_state_e; + +typedef enum _sim_check_state_{ + SIM_CHECK_OK = 0, + SIM_CHECK_FAIL, + SIM_CHECK_INIT, + SIM_CHECK_RETRY, + SIM_CHECK_NOT_INSERT, +} sim_check_state_e; + +typedef enum _sim_stk_cmd_type_{ + CMD_TYPE_INVALID = 0, + CMD_TYPE_REFRESH, +} sim_stk_cmd_type_e; + +typedef enum _sim_refresh_cmd_{ + CMD_SIM_INIT_FULL_FILE_CHANGE = 0,// SIM Initialization and Full File Change Notification + CMD_SIM_FILE_UPDATE,// A file on SIM has been updated + CMD_SIM_INIT_FILE_CHANGE,// SIM Initialization and File Change Notification + CMD_SIM_INIT,// SIM initialized, All files should be re-read + CMD_SIM_RESET,// SIM reset. SIM power required, SIM may be locked and all files should be re-read +} sim_refresh_cmd_e; + + +typedef struct _sim_req_info_ { + int sim_id;// for select sim, phone : from imsa, dongle : only 1? + int sim_type;// 0 : usim, 1 : isim + int request; + int ch_id;// isim only + int next_handle;// need next cmd handle + int rec_num;// store rec num for linear fixed + int rec_idx;// store rec idx for linear fixed + int rec_size;// store rec size for linear fixed +} sim_req_info_t; + +typedef struct _sim_aka_info_ { + int sim_id;// for select sim, phone : from imsa, dongle : only 1? + int sim_type;// 0 : usim, 1 : isim + int ch_id;// isim only + int rand_len; + char rand[32]; + int autn_len; + char autn[32]; +} sim_aka_info_t; + +typedef struct _sim_aka_result_ { + int result; + int response_len; + char response[256]; +} sim_aka_result_t; + +typedef struct _sim_type_info_ { + int result; + int sim_type;// 0 : usim, 1 : isim + int ch_id;// isim only +} sim_type_info_t; + +typedef struct _sim_imsi_result_ { + int result; + int imsi_len; + char imsi[16]; +} sim_imsi_result_t; + +typedef struct _sim_mnc_len_result_ { + int result; + int mnc_len; +} sim_mnc_len_result_t; + +typedef struct _sim_psismsc_result_ { + int result; + int psismsc_len; + unsigned char psismsc[256]; +} sim_psismsc_result_t; + +typedef struct _sim_impu_result_ { + int result; + int impu_num; + int impu_len[5]; + unsigned char impu[5][256]; +} sim_impu_result_t; + +typedef struct _sim_smsp_result_ { + int result; + int smsp_len; + unsigned char smsp[64]; +} sim_smsp_result_t; + +typedef struct _sim_impi_result_ { + int result; + int impi_len; + unsigned char impi[256]; +} sim_impi_result_t; + +typedef struct _sim_domain_result_ { + int result; + int domain_len; + unsigned char domain[256]; +} sim_domain_result_t; + +typedef struct _sim_service_table_result_ { + int result; + int service_table_len; + unsigned char service_table[256]; +} sim_service_table_result_t; + +typedef struct _sim_pcscf_result_ { + int result; + int pcscf_num; + int pcscf_len[20];// V4 + V6 + unsigned char pcscf[20][128];// V4 + V6 +} sim_pcscf_result_t; + +typedef struct _sim_state_result_ { + int result; + int state; +} sim_state_result_t; + +typedef struct _sim_data_notify { + unsigned int sim_id; + unsigned int data; +} sim_data_notify_t; + +typedef struct { + char name[32]; +} sim_user_checkin_info_t; + +typedef struct _sim_insert_check { + unsigned int sim_id; + unsigned int insert_flag; +} sim_insert_check_t; + +typedef struct { + int result; + int error_code; +} sim_ims_func_result_t; + +typedef struct _sim_imei_result_ { + int result; + int imei_len; + char imei[16]; +} sim_imei_result_t; + +typedef struct _sim_stk_notify_ { + unsigned int sim_id; + int result;// 0: fail, 1: start, 2: end + int cmd_type; + int cmd_qualifier; + unsigned char aid[32];// string + unsigned int efid_num;// max 256 + unsigned int efid[256];// hex +} sim_stk_notify_t; + +typedef struct _sim_state_notify_reg_req_ { + int is_reg;// 0 : de-reg, 1 : reg + int is_external;// 0 : internal, 1 : external + int reg_task_id; + int reg_event_id; +} sim_state_notify_reg_req_t; + + +typedef int (*simmngr_sim_insert_state_notify_fn)(sim_data_notify_t *sim_state, void *priv); +typedef int (*simmngr_sim_usim_detect_notify_fn)(sim_data_notify_t *usim_detect, void *priv); +typedef int (*simmngr_sim_isim_ch_notify_fn)(sim_data_notify_t *isim_ch, void *priv); +typedef int (*simmngr_sim_insert_check_notify_fn)(sim_insert_check_t *insert_check, void *priv); +typedef int (*simmngr_sim_stk_refresh_notify_fn)(sim_stk_notify_t *stk_notify, void *priv); +typedef struct _mal_simmngr_notify_function_ { + simmngr_sim_insert_state_notify_fn sim_insert_state; + simmngr_sim_usim_detect_notify_fn sim_usim_detect; + simmngr_sim_isim_ch_notify_fn sim_isim_ch; + simmngr_sim_insert_check_notify_fn sim_insert_check; + simmngr_sim_stk_refresh_notify_fn sim_stk_refresh; +} mal_simmngr_notify_function_t; + + +extern mal_simmngr_notify_function_t mal_simmngr_notify; + + +int mal_query_csq(void *conn_ptr, int *rssi, int *ber); +int mal_sim_notify_checkin(void *conn_ptr, sim_user_checkin_info_t *user_checkin_info); +int mal_sim_notify_checkout(void *conn_ptr, char *name, int name_len); +int mal_check_sim_type(void *conn_ptr, int sim_id, int *sim_type, int *ch_id); +int mal_check_sim_state(void *conn_ptr, int sim_id, int *sim_state); +int mal_query_sim_info(void *conn_ptr, sim_req_info_t *req_info, char *out_data, int *out_len); +int mal_sim_aka_verify(void *conn_ptr, sim_aka_info_t *aka_info, char *response, int *response_len); +int mal_ims_func_enable(void *conn_ptr, int *error_code); +int mal_ims_func_disable(void *conn_ptr, int *error_code); +int mal_sim_insert_check(void *conn_ptr, int sim_id); +int mal_simmngr_register(mal_simmngr_notify_function_t *callback_fn); + +#endif + diff --git a/mtklibs/libmal/libmal.so b/mtklibs/libmal/libmal.so new file mode 100755 index 0000000000000000000000000000000000000000..b1f29daf917828b56c1d98b2e68603e98461f5a1 Binary files /dev/null and b/mtklibs/libmal/libmal.so differ diff --git a/mtklibs/libmal_datamngr/Android.mk_ b/mtklibs/libmal_datamngr/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..845150fffa1aa1fcd37776d3a4bbaf0e2addc4e7 --- /dev/null +++ b/mtklibs/libmal_datamngr/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_datamngr +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libmdfx libnetutils libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmal_datamngr.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_datamngr +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmdfx libnetutils libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmal_datamngr.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmal_datamngr/NOTICE b/mtklibs/libmal_datamngr/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2a1c652cf35103d41c4d5c50585bcf2e3caa8f96 --- /dev/null +++ b/mtklibs/libmal_datamngr/NOTICE @@ -0,0 +1,15 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ \ No newline at end of file diff --git a/mtklibs/libmal_datamngr/README b/mtklibs/libmal_datamngr/README new file mode 100755 index 0000000000000000000000000000000000000000..30cc4c297b8ccb27f3bc7da120b9386187c2bd6a --- /dev/null +++ b/mtklibs/libmal_datamngr/README @@ -0,0 +1,10 @@ +This module is the sub-module of MAL + + +WHAT IT DOES? +============= +It handles data call setup function + +HOW IT WAS BUILT? +================== +This module is binary released. diff --git a/mtklibs/libmal_datamngr/arm/libmal_datamngr.so b/mtklibs/libmal_datamngr/arm/libmal_datamngr.so new file mode 100755 index 0000000000000000000000000000000000000000..5aba8e63d5b7e61cc2e006ca9d52f68fab7aa985 Binary files /dev/null and b/mtklibs/libmal_datamngr/arm/libmal_datamngr.so differ diff --git a/mtklibs/libmal_datamngr/libmal_datamngr.so b/mtklibs/libmal_datamngr/libmal_datamngr.so new file mode 100755 index 0000000000000000000000000000000000000000..aab5ebef8206d5b94f3daf48f1420e583cb0e5b5 Binary files /dev/null and b/mtklibs/libmal_datamngr/libmal_datamngr.so differ diff --git a/mtklibs/libmal_epdga/Android.mk_ b/mtklibs/libmal_epdga/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..797087e9e651722bb00bb82919c4738a9be93996 --- /dev/null +++ b/mtklibs/libmal_epdga/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_epdga +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libmdfx libnetutils libmal_simmngr libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmal_epdga.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_epdga +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmdfx libnetutils libmal_simmngr libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmal_epdga.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmal_epdga/README b/mtklibs/libmal_epdga/README new file mode 100755 index 0000000000000000000000000000000000000000..be37ec31e99ca2bb9a45967aaaed66a7f2f47e54 --- /dev/null +++ b/mtklibs/libmal_epdga/README @@ -0,0 +1,10 @@ +This module is the sub-module of MAL + + +WHAT IT DOES? +============= +It handles WiFi PDN EPDG function + +HOW IT WAS BUILT? +================== +This module is binary released. diff --git a/mtklibs/libmal_epdga/arm/libmal_epdga.so b/mtklibs/libmal_epdga/arm/libmal_epdga.so new file mode 100755 index 0000000000000000000000000000000000000000..0b39271792cf87033253e0c03c11d3a3f1e44249 Binary files /dev/null and b/mtklibs/libmal_epdga/arm/libmal_epdga.so differ diff --git a/mtklibs/libmal_epdga/libmal_epdga.so b/mtklibs/libmal_epdga/libmal_epdga.so new file mode 100755 index 0000000000000000000000000000000000000000..81821e3bdde518b8783aea1ea21362d8237bf3a8 Binary files /dev/null and b/mtklibs/libmal_epdga/libmal_epdga.so differ diff --git a/mtklibs/libmal_imsmngr/Android.mk_ b/mtklibs/libmal_imsmngr/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..6b871fc9ff7c7f8f4693dc927a39a9554f338fcc --- /dev/null +++ b/mtklibs/libmal_imsmngr/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_imsmngr +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libmdfx libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmal_imsmngr.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_imsmngr +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmdfx libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmal_imsmngr.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmal_imsmngr/README b/mtklibs/libmal_imsmngr/README new file mode 100755 index 0000000000000000000000000000000000000000..2ba4eef92f79c087b9cf5f45db3fe1c218358467 --- /dev/null +++ b/mtklibs/libmal_imsmngr/README @@ -0,0 +1,10 @@ +This module is the sub-module of MAL + + +WHAT IT DOES? +============= +It handles ims function + +HOW IT WAS BUILT? +================== +This module is binary released. diff --git a/mtklibs/libmal_imsmngr/arm/libmal_imsmngr.so b/mtklibs/libmal_imsmngr/arm/libmal_imsmngr.so new file mode 100755 index 0000000000000000000000000000000000000000..918d0c219d3f724ad923627e8064f39b8116fb9d Binary files /dev/null and b/mtklibs/libmal_imsmngr/arm/libmal_imsmngr.so differ diff --git a/mtklibs/libmal_imsmngr/libmal_imsmngr.so b/mtklibs/libmal_imsmngr/libmal_imsmngr.so new file mode 100755 index 0000000000000000000000000000000000000000..25093bd37e5b25eb55804b7fe8bb28c748602772 Binary files /dev/null and b/mtklibs/libmal_imsmngr/libmal_imsmngr.so differ diff --git a/mtklibs/libmal_mdmngr/Android.mk_ b/mtklibs/libmal_mdmngr/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..49596bbc28884ca8bab4d79adda487fc1d7be7ea --- /dev/null +++ b/mtklibs/libmal_mdmngr/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_mdmngr +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libmdfx libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmal_mdmngr.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_mdmngr +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmdfx libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmal_mdmngr.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmal_mdmngr/README b/mtklibs/libmal_mdmngr/README new file mode 100755 index 0000000000000000000000000000000000000000..b0576d6b3a0726b094d0e0166f6da15b8b45d2ed --- /dev/null +++ b/mtklibs/libmal_mdmngr/README @@ -0,0 +1,10 @@ +This module is the sub-module of MAL + + +WHAT IT DOES? +============= +It handles modem at command and urc function + +HOW IT WAS BUILT? +================== +This module is binary released. diff --git a/mtklibs/libmal_mdmngr/arm/libmal_mdmngr.so b/mtklibs/libmal_mdmngr/arm/libmal_mdmngr.so new file mode 100755 index 0000000000000000000000000000000000000000..2be922873e65186a2e51b22d24fd5b1f845087bb Binary files /dev/null and b/mtklibs/libmal_mdmngr/arm/libmal_mdmngr.so differ diff --git a/mtklibs/libmal_mdmngr/libmal_mdmngr.so b/mtklibs/libmal_mdmngr/libmal_mdmngr.so new file mode 100755 index 0000000000000000000000000000000000000000..ec0f21d9f7fe50c35e585aa78934a696134df36e Binary files /dev/null and b/mtklibs/libmal_mdmngr/libmal_mdmngr.so differ diff --git a/mtklibs/libmal_nwmngr/Android.mk_ b/mtklibs/libmal_nwmngr/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..54a8b909c943c852c865b7ad4a86b2fabaeff1e6 --- /dev/null +++ b/mtklibs/libmal_nwmngr/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_nwmngr +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libmdfx libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmal_nwmngr.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_nwmngr +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmdfx libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmal_nwmngr.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmal_nwmngr/README b/mtklibs/libmal_nwmngr/README new file mode 100755 index 0000000000000000000000000000000000000000..b0576d6b3a0726b094d0e0166f6da15b8b45d2ed --- /dev/null +++ b/mtklibs/libmal_nwmngr/README @@ -0,0 +1,10 @@ +This module is the sub-module of MAL + + +WHAT IT DOES? +============= +It handles modem at command and urc function + +HOW IT WAS BUILT? +================== +This module is binary released. diff --git a/mtklibs/libmal_nwmngr/arm/libmal_nwmngr.so b/mtklibs/libmal_nwmngr/arm/libmal_nwmngr.so new file mode 100755 index 0000000000000000000000000000000000000000..b6b0cad26cdfae2b6cef1c02f9c09adc5296a76e Binary files /dev/null and b/mtklibs/libmal_nwmngr/arm/libmal_nwmngr.so differ diff --git a/mtklibs/libmal_nwmngr/libmal_nwmngr.so b/mtklibs/libmal_nwmngr/libmal_nwmngr.so new file mode 100755 index 0000000000000000000000000000000000000000..a6c8d55905484fbea5de14e34fb7c6f3cd05816b Binary files /dev/null and b/mtklibs/libmal_nwmngr/libmal_nwmngr.so differ diff --git a/mtklibs/libmal_rds/Android.mk_ b/mtklibs/libmal_rds/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a8289789cf6a248c1a780ceaed2ae29eb8e4b7cb --- /dev/null +++ b/mtklibs/libmal_rds/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_rds +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libmdfx libnetutils libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmal_rds.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_rds +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmdfx libnetutils libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmal_rds.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmal_rds/README b/mtklibs/libmal_rds/README new file mode 100755 index 0000000000000000000000000000000000000000..470b550ca64c6a3acbf16b69f4f438380f88ce30 --- /dev/null +++ b/mtklibs/libmal_rds/README @@ -0,0 +1,10 @@ +This module is the sub-module of MAL + + +WHAT IT DOES? +============= +It handles rate choice function + +HOW IT WAS BUILT? +================== +This module is binary released. diff --git a/mtklibs/libmal_rds/arm/libmal_rds.so b/mtklibs/libmal_rds/arm/libmal_rds.so new file mode 100755 index 0000000000000000000000000000000000000000..8156b0ff339cb864884801facf02f3159cb05672 Binary files /dev/null and b/mtklibs/libmal_rds/arm/libmal_rds.so differ diff --git a/mtklibs/libmal_rds/libmal_rds.so b/mtklibs/libmal_rds/libmal_rds.so new file mode 100755 index 0000000000000000000000000000000000000000..a2e880df205d7de240f2a7a2b4dbbe91766ddfb5 Binary files /dev/null and b/mtklibs/libmal_rds/libmal_rds.so differ diff --git a/mtklibs/libmal_rilproxy/Android.mk_ b/mtklibs/libmal_rilproxy/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..12f2b87dbcefd0a8cdff4ec5604cd344780dad17 --- /dev/null +++ b/mtklibs/libmal_rilproxy/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_rilproxy +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libstdc++ libbinder libmdfx libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmal_rilproxy.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_rilproxy +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libstdc++ libbinder libmdfx libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmal_rilproxy.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmal_rilproxy/NOTICE b/mtklibs/libmal_rilproxy/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2a1c652cf35103d41c4d5c50585bcf2e3caa8f96 --- /dev/null +++ b/mtklibs/libmal_rilproxy/NOTICE @@ -0,0 +1,15 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ \ No newline at end of file diff --git a/mtklibs/libmal_rilproxy/README b/mtklibs/libmal_rilproxy/README new file mode 100755 index 0000000000000000000000000000000000000000..4f46fb1a04cf5fdef8fec464c5311f74e3499ab5 --- /dev/null +++ b/mtklibs/libmal_rilproxy/README @@ -0,0 +1,13 @@ +This module is the sub-module of MAL + + +WHAT IT DOES? +============= +Transfer the MAL event into the Parcel format +Send the RIL request to RILD , and receive the RIL Response +Receive the RIL Unsolicited request +Receive the Modem AT URC + +HOW IT WAS BUILT? +================== +This module is binary released. diff --git a/mtklibs/libmal_rilproxy/arm/libmal_rilproxy.so b/mtklibs/libmal_rilproxy/arm/libmal_rilproxy.so new file mode 100755 index 0000000000000000000000000000000000000000..f1b2bd4d4aeda9a3381b1c19047b3fe2bd5b0f23 Binary files /dev/null and b/mtklibs/libmal_rilproxy/arm/libmal_rilproxy.so differ diff --git a/mtklibs/libmal_rilproxy/libmal_rilproxy.so b/mtklibs/libmal_rilproxy/libmal_rilproxy.so new file mode 100755 index 0000000000000000000000000000000000000000..a0292836fbcd4f34ba1c3e3047681a2983b0ea96 Binary files /dev/null and b/mtklibs/libmal_rilproxy/libmal_rilproxy.so differ diff --git a/mtklibs/libmal_simmngr/Android.mk_ b/mtklibs/libmal_simmngr/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..43be2be303efc41b9eb530eab35380825aa57e68 --- /dev/null +++ b/mtklibs/libmal_simmngr/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_simmngr +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libmdfx libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmal_simmngr.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmal_simmngr +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmdfx libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmal_simmngr.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmal_simmngr/NOTICE b/mtklibs/libmal_simmngr/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libmal_simmngr/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libmal_simmngr/README b/mtklibs/libmal_simmngr/README new file mode 100755 index 0000000000000000000000000000000000000000..ec3181bcb0cff832884dcdd688a323d03fec7631 --- /dev/null +++ b/mtklibs/libmal_simmngr/README @@ -0,0 +1,15 @@ +This module is the sub-module of MAL, handle sim relation + + +WHAT IT DOES? +============= +handle the sim request from internal/external module +Send the at cmd to MDMNGR, and receive the Response +Receive the URC from MDMNGR + +HOW IT WAS BUILT? +================== +This module is binary released. + +HOW TO USE IT? +============== diff --git a/mtklibs/libmal_simmngr/arm/libmal_simmngr.so b/mtklibs/libmal_simmngr/arm/libmal_simmngr.so new file mode 100755 index 0000000000000000000000000000000000000000..f37d01dc3275739b80000b4119222557aa19f12a Binary files /dev/null and b/mtklibs/libmal_simmngr/arm/libmal_simmngr.so differ diff --git a/mtklibs/libmal_simmngr/libmal_simmngr.so b/mtklibs/libmal_simmngr/libmal_simmngr.so new file mode 100755 index 0000000000000000000000000000000000000000..f62b76e8a645359ef73bc134fdc7b05971ea2ea0 Binary files /dev/null and b/mtklibs/libmal_simmngr/libmal_simmngr.so differ diff --git a/mtklibs/libmav/Android.mk_ b/mtklibs/libmav/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..fd60507612fb51523081fba0c2482a1a7b784989 --- /dev/null +++ b/mtklibs/libmav/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmav +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmav.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmav +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmav.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmav/README b/mtklibs/libmav/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libmav/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libmav/arm/libmav.a b/mtklibs/libmav/arm/libmav.a new file mode 100755 index 0000000000000000000000000000000000000000..70cc9cc238e0a3dd62f1d43bdc092384af3853a6 Binary files /dev/null and b/mtklibs/libmav/arm/libmav.a differ diff --git a/mtklibs/libmav/libmav.a b/mtklibs/libmav/libmav.a new file mode 100755 index 0000000000000000000000000000000000000000..cd4fac8a34ce2aeaaa49284a04e9bbc123f15155 Binary files /dev/null and b/mtklibs/libmav/libmav.a differ diff --git a/mtklibs/libmavsw/Android.mk_ b/mtklibs/libmavsw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..5d6ade8f08ecaf82e3a5be93513707ac1ac726cf --- /dev/null +++ b/mtklibs/libmavsw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmavsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmavsw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmavsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmavsw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmavsw/README b/mtklibs/libmavsw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libmavsw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libmavsw/arm/libmavsw.a b/mtklibs/libmavsw/arm/libmavsw.a new file mode 100755 index 0000000000000000000000000000000000000000..c26d79fd7d6a05ab1508f6b824ada601ff65bfb5 Binary files /dev/null and b/mtklibs/libmavsw/arm/libmavsw.a differ diff --git a/mtklibs/libmavsw/libmavsw.a b/mtklibs/libmavsw/libmavsw.a new file mode 100755 index 0000000000000000000000000000000000000000..76202e953cf4f13db12eb6fa2aaecaccce1b0f50 Binary files /dev/null and b/mtklibs/libmavsw/libmavsw.a differ diff --git a/mtklibs/libmdfx/Android.mk_ b/mtklibs/libmdfx/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..cf34ce4677df8444d494f7e074e04be6612f86ff --- /dev/null +++ b/mtklibs/libmdfx/Android.mk_ @@ -0,0 +1,27 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmdfx +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmdfx.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmdfx +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmdfx.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmdfx/README b/mtklibs/libmdfx/README new file mode 100755 index 0000000000000000000000000000000000000000..c85aaeb8293f9fc995e755ad6f4a2e791db46f8a --- /dev/null +++ b/mtklibs/libmdfx/README @@ -0,0 +1,10 @@ +This module is the sub-module of MAL + + +WHAT IT DOES? +============= +It handles the system services of MAL + +HOW IT WAS BUILT? +================== +This module is binary released. diff --git a/mtklibs/libmdfx/arm/libmdfx.so b/mtklibs/libmdfx/arm/libmdfx.so new file mode 100755 index 0000000000000000000000000000000000000000..ab8f99ad26a7e080c1abc16fca7e5b5dca7bff12 Binary files /dev/null and b/mtklibs/libmdfx/arm/libmdfx.so differ diff --git a/mtklibs/libmdfx/include/compiler.h b/mtklibs/libmdfx/include/compiler.h new file mode 100755 index 0000000000000000000000000000000000000000..55f5efaed88d0158adb73dbb58d3adda327f0882 --- /dev/null +++ b/mtklibs/libmdfx/include/compiler.h @@ -0,0 +1,16 @@ +/* + Here is the information of the compiler to hide the platform-dependent libraries. +*/ + +#ifndef __COMPILER_H__ +#define __COMPILER_H__ + +#include "sys_info.h" + +// API +#ifdef __LINUX_PLAT__ +#define likely(cond) (__builtin_expect(!!(cond), 1)) +#define unlikely(cond) (__builtin_expect(!!(cond), 0)) +#endif + +#endif diff --git a/mtklibs/libmdfx/include/conn.h b/mtklibs/libmdfx/include/conn.h new file mode 100755 index 0000000000000000000000000000000000000000..fc8b28dfade6d55a218985e4f483351fe7ac40f5 --- /dev/null +++ b/mtklibs/libmdfx/include/conn.h @@ -0,0 +1,91 @@ +/* + Here is an interface of connection to hide implementation. +*/ + +#ifndef __CONN_H__ +#define __CONN_H__ + +#include "sys_info.h" +#include "compiler.h" +#include "task.h" +#include "event.h" +#include "io/mailbox.h" +#include "io/chnl.h" +#include + +// Compiler flags, NEED_TO_BE NOTICED, set by compiler +// N/A + +// Type definitions +typedef struct conn conn_t; +typedef struct conn* conn_ptr_t; +typedef struct conn** conn_ptr2_t; +typedef struct conn_init_arg conn_init_arg_t; +typedef struct conn_init_arg* conn_init_arg_ptr_t; +typedef int conn_id_t; +typedef void* (*conn_hdl_t) (conn_ptr_t conn_ptr, event_ptr_t event_ptr, void *arg); +typedef bool (*rx_cond_hdl_t) (event_ptr_t event_ptr, void *arg); + + +// Macros +#define CONN_TBL_SIZE (1024) +#define CONN_PATH_LEN (64) +#define CONN_PATH_PREFIX "tmp/conn_" + +// Functions, NEED_TO_BE_NOTICED, if the conn_ptr were given as a value, a compile-time error would rise +// N/A + +// Implementation +// => initialization arguments for channel +struct conn_init_arg +{ + // General variables + conn_hdl_t hdl; + void *hdl_arg; + // Individual variables which must be private + union + { + // N/A + }idv; +}; + +// => Abstract Data Type +struct conn +{ + // General variables + conn_id_t id; + mailbox_t mailbox; + chnl_t chnl; + event_seq_t seq; + task_t task; + struct conn_data *data_ptr; + thrd_lock_t mutex; + thrd_lock_t sem; + // Individual variables which must be private + union + { + // N/A + }idv; +}; + +// => Connection +extern bool mdfx_conn_rx_cond_event_id (conn_ptr_t conn_ptr,event_ptr_t event_ptr, void *arg); + +/* +extern conn_ptr_t conn_init (conn_ptr_t conn_ptr); +extern conn_ptr_t conn_exit (conn_ptr_t conn_ptr); +extern int conn_set_id (conn_ptr_t conn_ptr, conn_id_t id); +extern conn_id_t conn_get_id (conn_ptr_t conn_ptr); +extern void* event_set_data (event_ptr_t event_ptr, const void *data, size_t data_len); +extern size_t event_set_data_len (event_ptr_t event_ptr, size_t data_len); // NEED_TO_BE_NOTICED, not a good design +extern size_t event_set_data_size (event_ptr_t event_ptr, size_t data_size); // NEED_TO_BE_NOTICED, not a good design +extern void* event_get_data (event_ptr_t event_ptr, size_t *data_len_ptr); +extern size_t event_get_data_len (event_ptr_t event_ptr); // NEED_TO_BE_NOTICED, not a good design +extern size_t event_get_data_size (event_ptr_t event_ptr); // NEED_TO_BE_NOTICED, not a good design +extern int event_set_src_addr (event_ptr_t event_ptr, mailbox_addr_ptr_t src_addr_ptr); +extern mailbox_addr_ptr_t event_get_src_addr (event_ptr_t event_ptr); +extern int event_set_ext_chnl (event_ptr_t event_ptr, chnl_ptr_t ext_chnl_ptr); +extern chnl_ptr_t event_get_ext_chnl (event_ptr_t event_ptr); +*/ + +#endif diff --git a/mtklibs/libmdfx/include/ctnr/chain.h b/mtklibs/libmdfx/include/ctnr/chain.h new file mode 100755 index 0000000000000000000000000000000000000000..fb005db7ed75ab9d0625d20a26a94b780361f0ec --- /dev/null +++ b/mtklibs/libmdfx/include/ctnr/chain.h @@ -0,0 +1,146 @@ +/* + Here is an interface of the chain to hide implementation. +*/ + +#ifndef __CTNR_CHAIN_H__ +#define __CTNR_CHAIN_H__ + +#include "sys_info.h" +#include "compiler.h" +#include "ctnr/pool.h" +#include +#include + +// Compiler flags, NEED_TO_BE NOTICED, set by compiler +// => Array chain +// N/A + +// Type definitions +typedef struct chain chain_t; +typedef struct chain* chain_ptr_t; +typedef struct chain_node chain_node_t; +typedef struct chain_node* chain_node_ptr_t; +typedef struct chain_node** chain_node_ptr2_t; +typedef struct chain_init_arg chain_init_arg_t; +typedef struct chain_init_arg* chain_init_arg_ptr_t; +typedef void (*chain_hook_fp_t) (int idx, void *val, size_t val_len, va_list vl); +// => Array chain +// N/A + +// Macros +#define CHAIN_INVAL_IDX (-1) // NEED_TO_BE_NOTICED, the valid indexes must be greater than 0 +#define CHAIN_MAX_CAPACITY ((size_t)1 << ((sizeof(size_t) << 3) - 1)) +#define DEFAULT_CHAIN_INIT_SIZE DEFAULT_POOL_INIT_SIZE +#define CHAIN_NODE_VAL_INIT_SIZE (sizeof(int)) // NEED_TO_BE_NOTICED, we assume that an integer is the most common data to be stored +// => Array chain +// N/A + +// Functions +#define chain_init(chain_ptr, arg_ptr) (unlikely((chain_ptr) == NULL || (chain_ptr)->init_fp == NULL) ? NULL : (chain_ptr)->init_fp((chain_ptr), (arg_ptr))) +#define chain_exit(chain_ptr) (unlikely((chain_ptr) == NULL || (chain_ptr)->exit_fp == NULL) ? NULL : (chain_ptr)->exit_fp((chain_ptr))) +#define chain_insert(chain_ptr, idx, val, val_len) (unlikely((chain_ptr) == NULL || (chain_ptr)->insert_fp == NULL) ? NULL : (chain_ptr)->insert_fp((chain_ptr), (idx), (val), (val_len))) +#define chain_search(chain_ptr, idx, val_len_ptr) (unlikely((chain_ptr) == NULL || (chain_ptr)->search_fp == NULL) ? NULL : (chain_ptr)->search_fp((chain_ptr), (idx), (val_len_ptr))) +#define chain_update(chain_ptr, idx, val, val_len) (unlikely((chain_ptr) == NULL || (chain_ptr)->update_fp == NULL) ? NULL : (chain_ptr)->update_fp((chain_ptr), (idx), (val), (val_len))) +#define chain_delete(chain_ptr, idx) (unlikely((chain_ptr) == NULL || (chain_ptr)->delete_fp == NULL) ? 0 : (chain_ptr)->delete_fp((chain_ptr), (idx))) +#define chain_iterate(chain_ptr, hook_fp, args ...) (unlikely((chain_ptr) == NULL || (chain_ptr)->iterate_fp == NULL) ? SYS_FAIL : (chain_ptr)->iterate_fp((chain_ptr), (hook_fp), ## args)) +#define chain_is_empty(chain_ptr) (unlikely((chain_ptr) == NULL) ? true : ((chain_ptr)->max_idx == CHAIN_INVAL_IDX ? true : false)) +#define chain_get_min_idx(chain_ptr) (unlikely((chain_ptr) == NULL) ? CHAIN_INVAL_IDX : (const int)((chain_ptr)->min_idx)) +#define chain_get_max_idx(chain_ptr) (unlikely((chain_ptr) == NULL) ? CHAIN_INVAL_IDX : (const int)((chain_ptr)->max_idx)) + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the chain_ptr were given as a value, a compile-time error would be given +// => Default chain: chained chain +#define default_chain_employ(chain_ptr) array_chain_employ(chain_ptr) +#define default_chain_dismiss(chain_ptr) array_chain_dismiss(chain_ptr) +// => Threaded chain +#define array_chain_employ(chain_ptr) (unlikely((chain_ptr) == NULL) ? NULL : \ + (((chain_ptr)->init_fp = array_chain_init), \ + ((chain_ptr)->exit_fp = array_chain_exit), \ + ((chain_ptr)->insert_fp = array_chain_insert), \ + ((chain_ptr)->update_fp = array_chain_update), \ + ((chain_ptr)->search_fp = array_chain_search), \ + ((chain_ptr)->delete_fp = array_chain_delete), \ + ((chain_ptr)->iterate_fp = array_chain_iterate), \ + (chain_ptr))) +#define array_chain_dismiss(chain_ptr) (unlikely((chain_ptr) == NULL) ? NULL : \ + (((chain_ptr)->init_fp = NULL), \ + ((chain_ptr)->exit_fp = NULL), \ + ((chain_ptr)->insert_fp = NULL), \ + ((chain_ptr)->update_fp = NULL), \ + ((chain_ptr)->search_fp = NULL), \ + ((chain_ptr)->delete_fp = NULL), \ + ((chain_ptr)->iterate_fp = NULL), \ + (chain_ptr))) + +// Implementation +// => initialization arguments for chains +struct chain_init_arg +{ + // General variables + // N/A + // Individual variables which must be private + union + { + // Array chain + struct + { + // N/A + }array; + }idv; +}; + +// => Internal data type for the chain +struct chain_node +{ + // General variables + void *val; + size_t val_size; + size_t val_len; + // Individual variables which must be private + union + { + // Array chain + struct + { + // N/A + }array; + }idv; +}; + +// => Abstract Data Type +struct chain +{ + // General variables + // => Public + chain_ptr_t (*init_fp) (chain_ptr_t chain_ptr, const chain_init_arg_ptr_t arg_ptr); + chain_ptr_t (*exit_fp) (chain_ptr_t chain_ptr); + void* (*insert_fp) (chain_ptr_t chain_ptr, int idx, const void* val, size_t val_len); + void* (*update_fp) (chain_ptr_t chain_ptr, int idx, const void* val, size_t val_len); + void* (*search_fp) (chain_ptr_t chain_ptr, int idx, size_t *val_len_ptr); + int (*delete_fp) (chain_ptr_t chain_ptr, int idx); + int (*iterate_fp) (chain_ptr_t chain_ptr, chain_hook_fp_t hook_fp, ...); + // => Private + int min_idx; + int max_idx; + pool_t node_pool; + // Individual variables which must be private + union + { + // Array chain + struct + { + size_t capacity; + chain_node_ptr2_t node_array; + }array; + }idv; +}; + +// => Array chain +extern chain_ptr_t array_chain_init (chain_ptr_t chain_ptr, const chain_init_arg_ptr_t arg_ptr); +extern chain_ptr_t array_chain_exit (chain_ptr_t chain_ptr); +extern void* array_chain_insert (chain_ptr_t chain_ptr, int idx, const void* val, size_t val_len); +extern void* array_chain_update (chain_ptr_t chain_ptr, int idx, const void* val, size_t val_len); +extern void* array_chain_search (chain_ptr_t chain_ptr, int idx, size_t *val_len_ptr); +extern int array_chain_delete (chain_ptr_t chain_ptr, int idx); +extern int array_chain_iterate (chain_ptr_t chain_ptr, chain_hook_fp_t hook_fp, ...); + +#endif diff --git a/mtklibs/libmdfx/include/ctnr/heap.h b/mtklibs/libmdfx/include/ctnr/heap.h new file mode 100755 index 0000000000000000000000000000000000000000..f183f96aed3a9ff2510072c22149d5610c6afc00 --- /dev/null +++ b/mtklibs/libmdfx/include/ctnr/heap.h @@ -0,0 +1,141 @@ +/* + Here is an interface of the heap to hide implementation. + A heap provides the association between the keys and values. + Using a pool is a default policy for managing memory allocation. + The delete function returns the maximum values in the heap with a user-defined comparation function. +*/ + +#ifndef __CTNR_HEAP_H__ +#define __CTNR_HEAP_H__ + +#include "sys_info.h" +#include "compiler.h" +#include "ctnr/pool.h" +#include "ctnr/chain.h" +#include +#include + +// Compiler flags, NEED_TO_BE NOTICED, set by compiler +// => Chain heap +// N/A + +// Type definitions +typedef struct heap heap_t; +typedef struct heap* heap_ptr_t; +typedef struct heap_node heap_node_t; +typedef struct heap_node* heap_node_ptr_t; +typedef struct heap_node** heap_node_ptr2_t; +typedef struct heap_init_arg heap_init_arg_t; +typedef struct heap_init_arg* heap_init_arg_ptr_t; +typedef enum heap_cmp_res {heap_cmp_lesser = -1, heap_cmp_equal, heap_cmp_greater} heap_cmp_res_t; +typedef heap_cmp_res_t (*heap_cmp_fp_t) (const void *key_1, size_t key_len_1, const void *key_2, size_t key_len_2); +typedef void (*heap_hook_fp_t) (const void *key, size_t key_len, void *val, size_t val_len, va_list vl); +// => Chain heap +// N/A + +// Macros +#define HEAP_NODE_KEY_INIT_SIZE (sizeof(int)) // NEED_TO_BE_NOTICED, we assume that an integer is the most common key to be used +#define HEAP_NODE_VAL_INIT_SIZE (sizeof(int)) // NEED_TO_BE_NOTICED, we assume that an integer is the most common data to be stored +// => Chain heap +#define CHAIN_HEAP_INVAL_INDEX CHAIN_INVAL_IDX +#define CHAIN_HEAP_INIT_TBL_SIZE_PWR (6) + +// Functions +#define heap_init(heap_ptr, arg_ptr) (unlikely((heap_ptr) == NULL || (heap_ptr)->init_fp == NULL) ? NULL : (heap_ptr)->init_fp((heap_ptr), (arg_ptr))) +#define heap_exit(heap_ptr) (unlikely((heap_ptr) == NULL || (heap_ptr)->exit_fp == NULL) ? NULL : (heap_ptr)->exit_fp((heap_ptr))) +#define heap_insert(heap_ptr, key, key_len, val, val_len) (unlikely((heap_ptr) == NULL || (heap_ptr)->insert_fp == NULL) ? SYS_FAIL : (heap_ptr)->insert_fp((heap_ptr), (key), (key_len), (val), (val_len))) +#define heap_delete(heap_ptr, val, val_size) (unlikely((heap_ptr) == NULL || (heap_ptr)->delete_fp == NULL) ? 0 : (heap_ptr)->delete_fp((heap_ptr), (val), (val_size))) +#define heap_iterate(heap_ptr, hook_fp, args ...) (unlikely((heap_ptr) == NULL || (heap_ptr)->iterate_fp == NULL) ? SYS_FAIL : (heap_ptr)->iterate_fp((heap_ptr), (hook_fp), ## args)) +#define heap_is_empty(heap_ptr) (unlikely((heap_ptr) == NULL || (heap_ptr)->is_empty_fp == NULL) ? true : (heap_ptr)->is_empty_fp((heap_ptr))) + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the heap_ptr were given as a value, a compile-time error would be given +// => Default heap: chain heap +#define default_heap_employ(heap_ptr) chain_heap_employ(heap_ptr) +#define default_heap_dismiss(heap_ptr) chain_heap_dismiss(heap_ptr) +// => Chain heap +#define chain_heap_employ(heap_ptr) (unlikely((heap_ptr) == NULL) ? NULL : \ + (((heap_ptr)->init_fp = chain_heap_init), \ + ((heap_ptr)->exit_fp = chain_heap_exit), \ + ((heap_ptr)->insert_fp = chain_heap_insert), \ + ((heap_ptr)->delete_fp = chain_heap_delete), \ + ((heap_ptr)->iterate_fp = chain_heap_iterate), \ + ((heap_ptr)->is_empty_fp = chain_heap_is_empty), \ + (heap_ptr))) +#define chain_heap_dismiss(heap_ptr) (unlikely((heap_ptr) == NULL) ? NULL : \ + (((heap_ptr)->init_fp = NULL), \ + ((heap_ptr)->exit_fp = NULL), \ + ((heap_ptr)->insert_fp = NULL), \ + ((heap_ptr)->delete_fp = NULL), \ + ((heap_ptr)->iterate_fp = NULL), \ + ((heap_ptr)->is_empty_fp = NULL), \ + (heap_ptr))) + +// Implementation +// => initialization arguments for heaps +struct heap_init_arg +{ + // General variables + heap_cmp_fp_t cmp_fp; + // Individual variables which must be private + union + { + // Chain heap + struct + { + // N/A + }chain; + }idv; +}; + +// => Internal data type for the heap +struct heap_node +{ + // General variables + void *key, *val; + size_t key_size, val_size; + size_t key_len, val_len; + // Individual variables which must be private + union + { + // Chain heap + struct + { + // N/A + }chain; + }idv; +}; + +// => Abstract Data Type +struct heap +{ + // General variables + // => Public + heap_ptr_t (*init_fp) (heap_ptr_t heap_ptr, const heap_init_arg_ptr_t arg_ptr); + heap_ptr_t (*exit_fp) (heap_ptr_t heap_ptr); + int (*insert_fp) (heap_ptr_t heap_ptr, const void *key, size_t key_len, const void *val, size_t val_len); + size_t (*delete_fp) (heap_ptr_t heap_ptr, void *val, size_t val_size); + int (*iterate_fp) (heap_ptr_t heap_ptr, heap_hook_fp_t hook_fp, ...); + bool (*is_empty_fp) (heap_ptr_t heap_ptr); + // => Private + pool_t node_pool; + heap_cmp_fp_t cmp_fp; + // Individual variables which must be private + union + { + struct + { + chain_t tbl; + size_t tbl_size_pwr; + }chain; + }idv; +}; + +// => Chain heap +extern heap_ptr_t chain_heap_init (heap_ptr_t heap_ptr, const heap_init_arg_ptr_t arg_ptr); +extern heap_ptr_t chain_heap_exit (heap_ptr_t heap_ptr); +extern int chain_heap_insert (heap_ptr_t heap_ptr, const void* key, size_t key_len, const void* val, size_t val_len); +extern size_t chain_heap_delete (heap_ptr_t heap_ptr, void *val, size_t val_size); +extern int chain_heap_iterate (heap_ptr_t heap_ptr, heap_hook_fp_t hook_fp, ...); +extern bool chain_heap_is_empty (heap_ptr_t heap_ptr); + +#endif diff --git a/mtklibs/libmdfx/include/ctnr/map.h b/mtklibs/libmdfx/include/ctnr/map.h new file mode 100755 index 0000000000000000000000000000000000000000..0875df0510f9eafb17954d843dbcd13009fa9b54 --- /dev/null +++ b/mtklibs/libmdfx/include/ctnr/map.h @@ -0,0 +1,152 @@ +/* + Here is an interface of the map to hide implementation. + A map provides the association between the keys and values. + Using a pool is a default policy for managing memory allocation. + The insert function can only insert a new node without a collision. + The update function overwrites the value of an existing node. +*/ + +#ifndef __CTNR_MAP_H__ +#define __CTNR_MAP_H__ + +#include "sys_info.h" +#include "compiler.h" +#include "ctnr/pool.h" +#include "ctnr/chain.h" +#include +#include +#include + +// Compiler flags, NEED_TO_BE NOTICED, set by compiler +// => Hash map +// N/A + +// Type definitions +typedef struct map map_t; +typedef struct map* map_ptr_t; +typedef struct map_node map_node_t; +typedef struct map_node* map_node_ptr_t; +typedef struct map_node** map_node_ptr2_t; +typedef struct map_init_arg map_init_arg_t; +typedef struct map_init_arg* map_init_arg_ptr_t; +typedef void (*map_hook_fp_t) (const void *key, size_t key_len, void *val, size_t val_len, va_list vl); +// => Hash map +typedef int32_t (*hash_map_hash_fp_t) (map_ptr_t map_ptr, const void *key, size_t key_len); // NEED_TO_BE_NOTICED, should NOT assume 32-bit + +// Macros +#define MAP_NODE_KEY_INIT_SIZE (sizeof(int)) // NEED_TO_BE_NOTICED, we assume that an integer is the most common key to be used +#define MAP_NODE_VAL_INIT_SIZE (sizeof(int)) // NEED_TO_BE_NOTICED, we assume that an integer is the most common data to be stored +// => Hash map +#define HASH_MAP_INVAL_INDEX CHAIN_INVAL_IDX +#define HASH_MAP_DEFAULT_TBL_SIZE_PWR (8) // NEED_TO_BE_NOTICED, more than 31 is useless due to the 32-bit assumption + +// Functions +#define map_init(map_ptr, arg_ptr) (unlikely((map_ptr) == NULL || (map_ptr)->init_fp == NULL) ? NULL : (map_ptr)->init_fp((map_ptr), (arg_ptr))) +#define map_exit(map_ptr) (unlikely((map_ptr) == NULL || (map_ptr)->exit_fp == NULL) ? NULL : (map_ptr)->exit_fp((map_ptr))) +#define map_insert(map_ptr, key, key_len, val, val_len) (unlikely((map_ptr) == NULL || (map_ptr)->insert_fp == NULL) ? NULL : (map_ptr)->insert_fp((map_ptr), (key), (key_len), (val), (val_len))) +#define map_update(map_ptr, key, key_len, val, val_len) (unlikely((map_ptr) == NULL || (map_ptr)->update_fp == NULL) ? NULL : (map_ptr)->update_fp((map_ptr), (key), (key_len), (val), (val_len))) +#define map_search(map_ptr, key, key_len, val_len_ptr) (unlikely((map_ptr) == NULL || (map_ptr)->search_fp == NULL) ? NULL : (map_ptr)->search_fp((map_ptr), (key), (key_len), (val_len_ptr))) +#define map_delete(map_ptr, key, key_len) (unlikely((map_ptr) == NULL || (map_ptr)->delete_fp == NULL) ? SYS_FAIL : (map_ptr)->delete_fp((map_ptr), (key), (key_len))) +#define map_iterate(map_ptr, hook_fp, args ...) (unlikely((map_ptr) == NULL || (map_ptr)->iterate_fp == NULL) ? SYS_FAIL : (map_ptr)->iterate_fp((map_ptr), (hook_fp), ## args)) +#define map_is_empty(map_ptr) (unlikely((map_ptr) == NULL || (map_ptr)->is_empty_fp == NULL) ? true : (map_ptr)->is_empty_fp((map_ptr))) + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the map_ptr were given as a value, a compile-time error would be given +// => Default map: hash map +#define default_map_employ(map_ptr) hash_map_employ(map_ptr) +#define default_map_dismiss(map_ptr) hash_map_dismiss(map_ptr) +// => Hash map +#define hash_map_employ(map_ptr) (unlikely((map_ptr) == NULL) ? NULL : \ + (((map_ptr)->init_fp = hash_map_init), \ + ((map_ptr)->exit_fp = hash_map_exit), \ + ((map_ptr)->insert_fp = hash_map_insert), \ + ((map_ptr)->update_fp = hash_map_update), \ + ((map_ptr)->search_fp = hash_map_search), \ + ((map_ptr)->delete_fp = hash_map_delete), \ + ((map_ptr)->iterate_fp = hash_map_iterate), \ + ((map_ptr)->is_empty_fp = hash_map_is_empty), \ + (map_ptr))) +#define hash_map_dismiss(map_ptr) (unlikely((map_ptr) == NULL) ? NULL : \ + (((map_ptr)->init_fp = NULL), \ + ((map_ptr)->exit_fp = NULL), \ + ((map_ptr)->insert_fp = NULL), \ + ((map_ptr)->update_fp = NULL), \ + ((map_ptr)->search_fp = NULL), \ + ((map_ptr)->delete_fp = NULL), \ + ((map_ptr)->iterate_fp = NULL), \ + ((map_ptr)->is_empty_fp = NULL), \ + (map_ptr))) + +// Implementation +// => initialization arguments for maps +struct map_init_arg +{ + // General variables + // N/A + // Individual variables which must be private + union + { + // Hash map + struct + { + hash_map_hash_fp_t hash_fp; + size_t tbl_size_pwr; + }hash; + }idv; +}; + +// => Internal data type for the map +struct map_node +{ + // General variables + void *key, *val; + size_t key_size, val_size; + size_t key_len, val_len; + // Individual variables which must be private + union + { + // Hash map + struct + { + struct map_node *link; + }hash; + }idv; +}; + +// => Abstract Data Type +struct map +{ + // General variables + // => Public + map_ptr_t (*init_fp) (map_ptr_t map_ptr, const map_init_arg_ptr_t arg_ptr); + map_ptr_t (*exit_fp) (map_ptr_t map_ptr); + void* (*insert_fp) (map_ptr_t map_ptr, const void *key, size_t key_len, const void *val, size_t val_len); + void* (*update_fp) (map_ptr_t map_ptr, const void *key, size_t key_len, const void *val, size_t val_len); + void* (*search_fp) (map_ptr_t map_ptr, const void *key, size_t key_len, size_t *val_len_ptr); + int (*delete_fp) (map_ptr_t map_ptr, const void *key, size_t key_len); + int (*iterate_fp) (map_ptr_t map_ptr, map_hook_fp_t hook_fp, ...); + bool (*is_empty_fp) (map_ptr_t map_ptr); + // => Private + pool_t node_pool; + // Individual variables which must be private + union + { + struct + { + hash_map_hash_fp_t hash_fp; + chain_t tbl; + size_t tbl_size_pwr; + }hash; + }idv; +}; + +// => Hash map +extern map_ptr_t hash_map_init (map_ptr_t map_ptr, const map_init_arg_ptr_t arg_ptr); +extern map_ptr_t hash_map_exit (map_ptr_t map_ptr); +extern void* hash_map_insert (map_ptr_t map_ptr, const void* key, size_t key_len, const void* val, size_t val_len); +extern void* hash_map_update (map_ptr_t map_ptr, const void* key, size_t key_len, const void* val, size_t val_len); +extern void* hash_map_search (map_ptr_t map_ptr, const void* key, size_t key_len, size_t *val_len_ptr); +extern int hash_map_delete (map_ptr_t map_ptr, const void* key, size_t key_len); +extern int hash_map_iterate (map_ptr_t map_ptr, map_hook_fp_t hook_fp, ...); +extern bool hash_map_is_empty (map_ptr_t map_ptr); + +#endif diff --git a/mtklibs/libmdfx/include/ctnr/pool.h b/mtklibs/libmdfx/include/ctnr/pool.h new file mode 100755 index 0000000000000000000000000000000000000000..4d164a4a172e066edea2910e473b3e226d994f84 --- /dev/null +++ b/mtklibs/libmdfx/include/ctnr/pool.h @@ -0,0 +1,141 @@ +/* + Here is an interface of the pool to hide implementation. + A pool is used to allocate/free memory blocks with an equal size. + The initial size of the pool can be given whereas 0 indicates the default size. + A pool can trace all the allocated memory blocks and free them regardless of whether they are used or not. + The constructor and the destructor of each memory block is also provided. +*/ + +#ifndef __CTNR_POOL_H__ +#define __CTNR_POOL_H__ + +#include "sys_info.h" +#include "compiler.h" +#include +#include + +// Compiler flags, NEED_TO_BE NOTICED, set by the compiler +// => Two-tank pool +#define TWO_TANK_POOL_SHRINK + +// Type definitions +typedef struct pool pool_t; +typedef struct pool* pool_ptr_t; +typedef struct pool_node pool_node_t; +typedef struct pool_node* pool_node_ptr_t; +typedef struct pool_init_arg pool_init_arg_t; +typedef struct pool_init_arg* pool_init_arg_ptr_t; +typedef void (*async_pool_hook_fp_t) (void *block, size_t block_len, const void *arg); +typedef void (*sync_pool_hook_fp_t) (void *block, size_t block_len, va_list vl); + +// Macros, NEED_TO_BE_NOTICED, the maximal size should be constrained +#define DEFAULT_POOL_INIT_SIZE (64) // the power of 2 + +// API +#define pool_init(pool_ptr, arg_ptr) (unlikely((pool_ptr) == NULL || (pool_ptr)->init_fp == NULL) ? NULL : (pool_ptr)->init_fp((pool_ptr), (arg_ptr))) +#define pool_exit(pool_ptr) (unlikely((pool_ptr) == NULL || (pool_ptr)->exit_fp == NULL) ? NULL : (pool_ptr)->exit_fp((pool_ptr))) +#define pool_borrow(pool_ptr) (unlikely((pool_ptr) == NULL || (pool_ptr)->borrow_fp == NULL) ? NULL : (pool_ptr)->borrow_fp((pool_ptr))) +#define pool_return(pool_ptr, block) (unlikely((pool_ptr) == NULL || (block) == NULL || (pool_ptr)->return_fp == NULL) ? SYS_FAIL : (pool_ptr)->return_fp((pool_ptr), (block))) +#define pool_iterate(pool_ptr, hook_fp, args ...) (unlikely((pool_ptr) == NULL || (hook_fp) == NULL || (pool_ptr)->iterate_fp == NULL) ? SYS_FAIL : (pool_ptr)->iterate_fp((pool_ptr), (hook_fp), ## args)) +#define pool_get_block_len(pool_ptr) (unlikely((pool_ptr) == NULL) ? 0 : (const size_t)((pool_ptr)->block_len)) // NEED_TO_BE_NOTICED, the block length might be modified + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the pool_ptr were given as a value, a compile-time error would be given +// => Default pool: two-tank pool +#define default_pool_employ(pool_ptr) two_tank_pool_employ(pool_ptr) +#define default_pool_dismiss(pool_ptr) two_tank_pool_dismiss(pool_ptr) +// => Two-tank pool +#define two_tank_pool_employ(pool_ptr) (unlikely((pool_ptr) == NULL) ? NULL : \ + (((pool_ptr)->init_fp = two_tank_pool_init), \ + ((pool_ptr)->exit_fp = two_tank_pool_exit), \ + ((pool_ptr)->borrow_fp = two_tank_pool_borrow), \ + ((pool_ptr)->return_fp = two_tank_pool_return), \ + ((pool_ptr)->iterate_fp = two_tank_pool_iterate), \ + (pool_ptr))) +#define two_tank_pool_dismiss(pool_ptr) (unlikely((pool_ptr) == NULL) ? NULL : \ + (((pool_ptr)->init_fp = NULL), \ + ((pool_ptr)->exit_fp = NULL), \ + ((pool_ptr)->borrow_fp = NULL), \ + ((pool_ptr)->return_fp = NULL), \ + ((pool_ptr)->iterate_fp = NULL), \ + (pool_ptr))) + +// Implementation +// => initialization arguments for threads +struct pool_init_arg +{ + // General variables + size_t block_len; + size_t init_size; + async_pool_hook_fp_t block_init_fp; + const void *block_init_arg; + size_t block_init_arg_len; + async_pool_hook_fp_t block_exit_fp; + const void *block_exit_arg; + size_t block_exit_arg_len; + // Individual variables which must be private + union + { + struct + { + // N/A + }two_tank; + }idv; +}; + +// => Internal data type for the pool +struct pool_node +{ + // General variables + void *block; + // Individual variables which must be private + union + { + // Two-tank pool + struct + { + pool_node_ptr_t link; + }two_tank; + }idv; +}; + +// => Abstract data type +struct pool +{ + // General variables + // => Public + pool_ptr_t (*init_fp) (pool_ptr_t pool_ptr, const pool_init_arg_ptr_t arg_ptr); + pool_ptr_t (*exit_fp) (pool_ptr_t pool_ptr); + void* (*borrow_fp) (pool_ptr_t pool_ptr); + int (*return_fp) (pool_ptr_t pool_ptr, void *block); + int (*iterate_fp) (pool_ptr_t pool_ptr, sync_pool_hook_fp_t hook_fp, ...); + // => Private + size_t block_len; + size_t capacity; + size_t init_size; + async_pool_hook_fp_t block_init_fp; + void *block_init_arg; + async_pool_hook_fp_t block_exit_fp; + void *block_exit_arg; + pool_node_ptr_t entry; + // Individual variables which must be private + union + { + // Two-tank pool + struct + { +#ifdef TWO_TANK_POOL_SHRINK + size_t clean_size; +#endif + pool_node_ptr_t dirty_tank; + }two_tank; + }idv; +}; + +// => Two-tank pool +extern pool_ptr_t two_tank_pool_init (pool_ptr_t pool_ptr, const pool_init_arg_ptr_t arg_ptr); +extern pool_ptr_t two_tank_pool_exit (pool_ptr_t pool_ptr); +extern void* two_tank_pool_borrow (pool_ptr_t pool_ptr); +extern int two_tank_pool_return (pool_ptr_t pool_ptr, void *block); +extern int two_tank_pool_iterate (pool_ptr_t pool_ptr, sync_pool_hook_fp_t hook_fp, ...); + +#endif diff --git a/mtklibs/libmdfx/include/ctnr/queue.h b/mtklibs/libmdfx/include/ctnr/queue.h new file mode 100755 index 0000000000000000000000000000000000000000..6b4133fd9bcb17580c0df29f5e62a0b5f15f6db4 --- /dev/null +++ b/mtklibs/libmdfx/include/ctnr/queue.h @@ -0,0 +1,142 @@ +/* + Here is an interface of the queue to hide implementation. + The return value of dequeue indicates (1) the retrieved length when it is smaller than or equal to the val_len; (2) the required size when it is larger than the val_len. +*/ + +#ifndef __CTNR_QUEUE_H__ +#define __CTNR_QUEUE_H__ + +#include "sys_info.h" +#include "compiler.h" +#include "ctnr/pool.h" +#include +#include + +// Compiler flags, NEED_TO_BE NOTICED, set by compiler +// => Threaded queue +// N/A + +// Type definitions +typedef struct queue queue_t; +typedef struct queue* queue_ptr_t; +typedef struct queue_node queue_node_t; +typedef struct queue_node* queue_node_ptr_t; +typedef struct queue_node** queue_node_ptr2_t; +typedef struct queue_init_arg queue_init_arg_t; +typedef struct queue_init_arg* queue_init_arg_ptr_t; +typedef void (*queue_hook_fp_t) (void *val, size_t val_len, va_list vl); +// => Threaded queue +typedef int queue_id_t; + +// Macros +#define QUEUE_NODE_VAL_INIT_SIZE (sizeof(int)) // NEED_TO_BE_NOTICED, we assume that an integer is the most common data to be stored +// => Threaded queue +#define THRD_QUEUE_INVAL_ID (-1) +#define THRD_QUEUE_TRUNK_ID (0) +#define THRD_QUEUE_LINK_TBL_INIT_SIZE (32) // NEED_TO_BE_NOTICED, set by compiler + +// Functions +#define queue_init(queue_ptr, arg_ptr) (unlikely((queue_ptr) == NULL || (queue_ptr)->init_fp == NULL) ? NULL : (queue_ptr)->init_fp((queue_ptr), (arg_ptr))) +#define queue_exit(queue_ptr) (unlikely((queue_ptr) == NULL || (queue_ptr)->exit_fp == NULL) ? NULL : (queue_ptr)->exit_fp((queue_ptr))) +#define queue_enqueue(queue_ptr, val, val_len) (unlikely((queue_ptr) == NULL || (queue_ptr)->enqueue_fp == NULL) ? SYS_FAIL : (queue_ptr)->enqueue_fp((queue_ptr), (val), (val_len))) +#define queue_dequeue(queue_ptr, val, val_size) (unlikely((queue_ptr) == NULL || (queue_ptr)->dequeue_fp == NULL) ? 0 : (queue_ptr)->dequeue_fp((queue_ptr), (val), (val_size))) +#define queue_iterate(queue_ptr, hook_fp, args ...) (unlikely((queue_ptr) == NULL || (queue_ptr)->iterate_fp == NULL) ? SYS_FAIL : (queue_ptr)->iterate_fp((queue_ptr), (hook_fp), ## args)) +#define queue_is_empty(queue_ptr) (unlikely((queue_ptr) == NULL || (queue_ptr)->is_empty_fp == NULL) ? true : (queue_ptr)->is_empty_fp((queue_ptr))) + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the queue_ptr were given as a value, a compile-time error would be given +// => Default queue: chained queue +#define default_queue_employ(queue_ptr) thrd_queue_employ(queue_ptr) +#define default_queue_dismiss(queue_ptr) thrd_queue_dismiss(queue_ptr) +// => Threaded queue +#define thrd_queue_employ(queue_ptr) (unlikely((queue_ptr) == NULL) ? NULL : \ + (((queue_ptr)->init_fp = thrd_queue_init), \ + ((queue_ptr)->exit_fp = thrd_queue_exit), \ + ((queue_ptr)->enqueue_fp = thrd_queue_enqueue), \ + ((queue_ptr)->dequeue_fp = thrd_queue_dequeue), \ + ((queue_ptr)->iterate_fp = thrd_queue_iterate), \ + ((queue_ptr)->is_empty_fp = thrd_queue_is_empty), \ + (queue_ptr))) +#define thrd_queue_dismiss(queue_ptr) (unlikely((queue_ptr) == NULL) ? NULL : \ + (((queue_ptr)->init_fp = NULL), \ + ((queue_ptr)->exit_fp = NULL), \ + ((queue_ptr)->enqueue_fp = NULL), \ + ((queue_ptr)->dequeue_fp = NULL), \ + ((queue_ptr)->iterate_fp = NULL), \ + ((queue_ptr)->is_empty_fp = NULL), \ + (queue_ptr))) + +// Implementation +// => initialization arguments for queues +struct queue_init_arg +{ + // General variables + // N/A + // Individual variables which must be private + union + { + struct + { + queue_ptr_t trunk; + }thrd; + }idv; +}; + +// => Internal data type for the queue +struct queue_node +{ + // General variables + void *val; + size_t val_size; + size_t val_len; + // Individual variables which must be private + union + { + // Threaded queue + struct + { + queue_node_ptr2_t link_tbl; + size_t link_tbl_size; + size_t link_tbl_cnt; + // for trunk linked list only + queue_node_ptr_t rev_link; + }thrd; + }idv; +}; + +// => Abstract Data Type +struct queue +{ + // General variables + // => Public + queue_ptr_t (*init_fp) (queue_ptr_t queue_ptr, const queue_init_arg_ptr_t arg_ptr); + queue_ptr_t (*exit_fp) (queue_ptr_t queue_ptr); + int (*enqueue_fp) (queue_ptr_t queue_ptr, const void *val, size_t val_len); + size_t (*dequeue_fp) (queue_ptr_t queue_ptr, void *val, size_t val_size); + int (*iterate_fp) (queue_ptr_t queue_ptr, queue_hook_fp_t hook_fp, ...); + bool (*is_empty_fp) (queue_ptr_t queue_ptr); + // => Private + pool_t node_pool; + // Individual variables which must be private + union + { + // Threaded queue + struct + { + queue_id_t id; + queue_node_ptr_t head, tail; + queue_ptr_t trunk; + // for trunk linked list only + queue_id_t next_id; // NEED_TO_BE_NOTICED, how to recycle? + }thrd; + }idv; +}; + +// => Threaded queue +extern queue_ptr_t thrd_queue_init (queue_ptr_t queue_ptr, const queue_init_arg_ptr_t arg_ptr); +extern queue_ptr_t thrd_queue_exit (queue_ptr_t queue_ptr); +extern int thrd_queue_enqueue (queue_ptr_t queue_ptr, const void *val, size_t val_len); +extern size_t thrd_queue_dequeue (queue_ptr_t queue_ptr, void *val, size_t val_size); +extern int thrd_queue_iterate (queue_ptr_t queue_ptr, queue_hook_fp_t hook_fp, ...); +extern bool thrd_queue_is_empty (queue_ptr_t queue_ptr); + +#endif diff --git a/mtklibs/libmdfx/include/entity.h b/mtklibs/libmdfx/include/entity.h new file mode 100755 index 0000000000000000000000000000000000000000..43a79a2e958ca31e61906ab301d99e9c8c00c1f9 --- /dev/null +++ b/mtklibs/libmdfx/include/entity.h @@ -0,0 +1,239 @@ +/* + Here is an interface of entity to hide implementation. + A thread channel deals with the communication between two entities running on different threads of the same process. + A socket channel deals with the communication between two entities through the socket interface. +*/ + +#ifndef __ENTITY_H__ +#define __ENTITY_H__ + +#include "sys_info.h" +#include "task.h" +#include "conn.h" +#include "event.h" +#include "compiler.h" +#include "ctnr/chain.h" +#include "ctnr/map.h" +#include "entity/datamngr/datamngr.h" +#include "entity/mdmngr.h" +#include "entity/nwmngr.h" +#include "entity/imsmngr.h" +#include // NEED_TO_BE_NOTICED, temporarily methods to monitor memory usage + +// Compiler flags, NEED_TO_BE_NOTICED, set by the compiler +// => Main entity +// N/A +// => Sample entity +// N/A + +// Type definitions +typedef struct entity entity_t; +typedef struct entity* entity_ptr_t; +typedef struct entity_init_arg entity_init_arg_t; +typedef struct entity_init_arg* entity_init_arg_ptr_t; +// => General entity +// N/A +// => Main entity +// => => Default task data +typedef struct reg_data +{ + entity_id_t entity_id; + task_id_t task_id; +#ifdef __EVENT_USAGE_MONITOR__ + pid_t tid; +#endif + mailbox_addr_ptr_t addr_ptr; +}reg_data_t; +typedef struct reg_data* reg_data_ptr_t; +// => => Subscribe event data +typedef struct subscribe_data +{ + event_id_t event_id; + mailbox_addr_ptr_t addr_ptr; + struct subscribe_data *link; +}subscribe_data_t; +typedef struct subscribe_data* subscribe_data_ptr_t; +// => => Connection event data +typedef struct conn_data +{ + event_seq_t seq; + mailbox_addr_ptr_t addr_ptr; + rx_cond_hdl_t rx_cond; + void *rx_cond_arg; // NEED_TO_BE_MOTICED, dangerous! need to be maintain by the user + conn_hdl_t cb_hdl; + struct conn_data *link, *rev_link; +}conn_data_t; +typedef struct conn_data* conn_data_ptr_t; + +// Macros +// => General entity +// N/A +// => Main entity +// N/A +// => Old sample entity +#define SAMPLE_ENTITY_RX_IDX 0 +#define SAMPLE_ENTITY_TX_IDX 1 + +// Functions +#define entity_init(entity_ptr, arg_ptr) (unlikely((entity_ptr) == NULL || (entity_ptr)->init_fp == NULL) ? NULL : (entity_ptr)->init_fp((entity_ptr), (arg_ptr))) +#define entity_exit(entity_ptr) (unlikely((entity_ptr) == NULL || (entity_ptr)->exit_fp == NULL) ? NULL : (entity_ptr)->exit_fp((entity_ptr))) +#define entity_get_id(entity_ptr) (unlikely((entity_ptr) == NULL) ? ENTITY_INVAL_ID : (entity_ptr)->id) +// => General entity +#define entity_init_arg_set(arg_ptr, data) (unlikely((arg_ptr) == NULL) ? NULL : (arg_ptr)->idv.gen.arg = (data)) +#define entity_init_arg_get(arg_ptr) (unlikely((arg_ptr) == NULL) ? NULL : (arg_ptr)->idv.gen.arg) +#define entity_set_priv(entity_ptr, priv) (unlikely((entity_ptr) == NULL) ? NULL : (entity_ptr)->idv.gen.priv = (priv)) +#define entity_get_priv(entity_ptr) (unlikely((entity_ptr) == NULL) ? NULL : (entity_ptr)->idv.gen.priv) + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the entity_ptr were given as a value, a compile-time error would be given +// => Default entity: main entity +#define default_entity_employ(entity_ptr) main_entity_employ(entity_ptr) +#define default_entity_dismiss(entity_ptr) main_entity_dismiss(entity_ptr) +// => main entity +#define main_entity_employ(entity_ptr) (unlikely((entity_ptr) == NULL) ? NULL : \ + (((entity_ptr)->init_fp = main_entity_init), \ + ((entity_ptr)->exit_fp = main_entity_exit), \ + (entity_ptr))) +#define main_entity_dismiss(entity_ptr) (unlikely((entity_ptr) == NULL) ? NULL : \ + (((entity_ptr)->init_fp = NULL), \ + ((entity_ptr)->exit_fp = NULL), \ + (entity_ptr))) + +// => Old sample entity +#define old_sample_entity_employ(entity_ptr) (unlikely((entity_ptr) == NULL) ? NULL : \ + (((entity_ptr)->init_fp = old_sample_entity_init), \ + ((entity_ptr)->exit_fp = old_sample_entity_exit), \ + (entity_ptr))) +#define old_sample_entity_dismiss(entity_ptr) (unlikely((entity_ptr) == NULL) ? NULL : \ + (((entity_ptr)->init_fp = NULL), \ + ((entity_ptr)->exit_fp = NULL), \ + (entity_ptr))) + +// Implementation +// => initialization arguments for entity +struct entity_init_arg +{ + // General variables + // N/A + // Individual variables which must be private + union + { + // General entity + struct + { + void *arg; + }gen; + + // Main entity + struct + { + // N/A + }main; + + // ATI entity + struct + { + map_t urc_tbl; + }ati; + + // Old sample entity + struct + { + // N/A + }old_sample; + }idv; +}; + +// => Abstract data type +struct entity +{ + // General variables + // => Public + entity_ptr_t (*init_fp) (entity_ptr_t entity_ptr, const entity_init_arg_ptr_t arg_ptr); + entity_ptr_t (*exit_fp) (entity_ptr_t entity_ptr); + // => Private + entity_id_t id; + // Individual variables which must be private + union + { + // General entity, NEED_TO_BE_NOTICED, no specific implementation but made by developers + struct + { + void *priv; + }gen; + + // Main entity + struct + { + task_t task; + chain_t entity_tbl, task_tbl, service_tbl, event_tbl, conn_tbl; + pool_t addr_node_pool; + thrd_t thrd; + }main; + + // ATI entity + struct + { + map_t reg_tbl; + map_t hijack_tbl; + }ati; + + // Old sample entity + struct + { + task_t task_list[2]; + }old_sample; + }idv; +}; + +// => General entity +// N/A +// => Main entity +extern entity_ptr_t main_entity_init (entity_ptr_t entity_ptr, const entity_init_arg_ptr_t arg_ptr); +extern entity_ptr_t main_entity_exit (entity_ptr_t entity_ptr); + +// => Old sample entity +extern entity_ptr_t old_sample_entity_init (entity_ptr_t entity_ptr, const entity_init_arg_ptr_t arg_ptr); +extern entity_ptr_t old_sample_entity_exit (entity_ptr_t entity_ptr); + +// => MFI entity +extern entity_ptr_t mfi_entity_init (entity_ptr_t entity_ptr, const entity_init_arg_ptr_t arg_ptr); +extern entity_ptr_t mfi_entity_exit (entity_ptr_t entity_ptr); + +// => MFIA entity +extern entity_ptr_t mfia_entity_init (entity_ptr_t entity_ptr, const entity_init_arg_ptr_t arg_ptr); +extern entity_ptr_t mfia_entity_exit (entity_ptr_t entity_ptr); + +// => ATI entity +extern entity_ptr_t ati_entity_init (entity_ptr_t entity_ptr, const entity_init_arg_ptr_t arg_ptr); +extern entity_ptr_t ati_entity_exit (entity_ptr_t entity_ptr); + +// => Host entity +extern entity_ptr_t host_entity_init (entity_ptr_t entity_ptr, const entity_init_arg_ptr_t arg_ptr); +extern entity_ptr_t host_entity_exit (entity_ptr_t entity_ptr); + +// => User entity +extern entity_ptr_t usr_entity_init (entity_ptr_t entity_ptr, const entity_init_arg_ptr_t arg_ptr); +extern entity_ptr_t usr_entity_exit (entity_ptr_t entity_ptr); + +extern mailbox_addr_ptr_t default_task_addr_ptr; +extern task_ptr_t default_task_ptr; +extern pool_t default_event_pool; +extern thrd_lock_t default_event_pool_mutex; +extern pool_t default_conn_pool; +extern thrd_lock_t default_conn_pool_mutex; +extern reg_data_t task_tbl[]; +extern thrd_lock_t task_tbl_mutex; +extern reg_data_t srv_tbl[]; +extern thrd_lock_t srv_tbl_mutex; +extern subscribe_data_ptr_t event_tbl[]; +extern thrd_lock_t event_tbl_mutex; +extern conn_ptr_t conn_tbl[]; +// => MFI entity +extern int mfi_sock; +// => MFIA entity +extern int mfia_sock; +// => ATI entity +extern int ati_sock; +extern int ati_urc_sock; + +#endif diff --git a/mtklibs/libmdfx/include/entity/ati_entity.h b/mtklibs/libmdfx/include/entity/ati_entity.h new file mode 100755 index 0000000000000000000000000000000000000000..09ca9c7741a8e59a96ce84cf10f8d39068128c76 --- /dev/null +++ b/mtklibs/libmdfx/include/entity/ati_entity.h @@ -0,0 +1,46 @@ +#ifndef __ENTITY_ATI_ENTITY_H__ +#define __ENTITY_ATI_ENTITY_H__ + +#include "entity.h" +#include "task.h" +#include "event.h" +#include "ctnr/chain.h" + +// Compiler flags, NEED_TO_BE_NOTICED, set by the compiler +// N/A + +// Type definitions +typedef struct ati_reg_tbl_entry ati_reg_tbl_entry_t; +typedef struct ati_reg_tbl_entry* ati_reg_tbl_entry_ptr_t; +typedef struct ati_reg_req ati_reg_req_t; +typedef struct ati_reg_req* ati_reg_req_ptr_t; +typedef void* (*ati_atc_hdl_t) (ati_reg_tbl_entry_ptr_t entry_ptr, const char *atc, void *arg); + +#define ATI_ATC_PREFIX_MAX_LEN (32) + +// Variables +extern int mal_mode; // NEED_TO_BE_NOTICED, where to put? +// => ATI task +extern int ati_sock; +extern int ati_urc_sock; +// => ATI entity +struct ati_reg_tbl_entry +{ + char atc_prefix[ATI_ATC_PREFIX_MAX_LEN]; + event_id_t event_id; + ati_atc_hdl_t hdl; + chain_t mailbox_list; +}; + +struct ati_reg_req +{ + task_id_t task_id; + event_id_t event_id; + char atc_prefix[ATI_ATC_PREFIX_MAX_LEN]; +}; + +// Functions +extern entity_ptr_t ati_entity_init (entity_ptr_t entity_ptr, const entity_init_arg_ptr_t arg_ptr); +extern entity_ptr_t ati_entity_exit (entity_ptr_t entity_ptr); + +#endif diff --git a/mtklibs/libmdfx/include/entity/datamngr/apn_table.h b/mtklibs/libmdfx/include/entity/datamngr/apn_table.h new file mode 100755 index 0000000000000000000000000000000000000000..4d858ba630d42885334d39c6df3425c027388b43 --- /dev/null +++ b/mtklibs/libmdfx/include/entity/datamngr/apn_table.h @@ -0,0 +1,110 @@ +#ifndef APN_TABLE_H +#define APN_TABLE_H + +#include "datamngr_def.h" + +#ifdef APN_TABLE_SUPPORT + +#include "datamngr_debug.h" +#define APN_NI_SIZE 32 +#define APN_BEARER_SIZE 32 +#define MAX_APN_ENTRY 16 + +#ifdef VZW_REQ_SUPPORT + +#define VZW_APN_VERSION 20150729 +#define LTE_BEARER "LTE" +#define VZW_IMS_NI "VZWIMS" +#define VZW_ADMIN_NI "VZWADMIN" +#define VZW_INTERNET_NI "VZWINTERNET" +#define VZW_APP_NI "VZWAPP" + +#define VZW_APN_FILE "/data/.vzw_apn_info.raw" + +typedef enum { + VZW_IMS_CLASS = 1, + VZW_ADMIN_CLASS = 2, + VZW_INTERNET_CLASS =3, + VZW_APP_CLASS = 4, +} vzw_apn_class_t; + +#endif + +typedef enum { + MODE_NORMAL, + MODE_ROAMING, + MODE_IMS_TEST, + MODE_NUM +} apn_mode_t; + + +typedef struct apn_table_entry { + + unsigned apn_class; + char ni[APN_NI_SIZE]; + char bearer[APN_BEARER_SIZE]; + unsigned ip_ver; + unsigned enable; + unsigned time; + unsigned max_conn; + unsigned max_conn_t; + unsigned wait_time; + unsigned throttle_time; + +} apn_table_entry_t; + +typedef struct { + unsigned apn_class; + char ni[APN_NI_SIZE]; + char bearer[APN_BEARER_SIZE]; + unsigned ip_ver; + unsigned enable; + unsigned time; +} apn_info_t; + + +typedef struct { + unsigned max_conn; + unsigned max_conn_t; + unsigned wait_time; + unsigned throttle_time; +} apn_para_t; + + +typedef struct apn_table { + unsigned version; + unsigned num; + apn_mode_t mode; + unsigned char active[MAX_APN_ENTRY]; + apn_table_entry_t table[MAX_APN_ENTRY]; + +} apn_table_t; + + +typedef struct apn_ops +{ + int (*reset)(); + int (*init)(); + int (*store)(); + int (*restore)(); + int (*set_mode)(apn_mode_t); + int (*set_apn)(apn_table_entry_t *); + int (*edit_apn)(unsigned, apn_info_t *); + int (*edit_apn_para)(unsigned, apn_para_t *); + int (*get_apn_by_class)(apn_table_entry_t *, unsigned); + int (*get_apn_by_index)(apn_table_entry_t *, unsigned); + int (*get_apn_by_name)(apn_table_entry_t *, char *); + int (*get_init_apn)(apn_table_entry_t *); + int (*get_ims_apn)(apn_table_entry_t *); + int (*get_internet_apn)(apn_table_entry_t *); + void (*dump_entry)(unsigned); + void (*dump)(); + unsigned (*apn_num)(); + +} apn_ops_t; + + +extern apn_ops_t * get_apn_handle(); + +#endif +#endif diff --git a/mtklibs/libmdfx/include/entity/datamngr/datamngr.h b/mtklibs/libmdfx/include/entity/datamngr/datamngr.h new file mode 100755 index 0000000000000000000000000000000000000000..53adf8f0c49f2f69c5f383d2b54262154770f366 --- /dev/null +++ b/mtklibs/libmdfx/include/entity/datamngr/datamngr.h @@ -0,0 +1,75 @@ +#ifndef DATAMNGR_H +#define DATAMNGR_H +#include "mdfx.h" +#include "pdn_info.h" +#include "apn_table.h" +#include "datamngr_def.h" +#include "datamngr_debug.h" +#include "datamngr_util.h" +#include "datamngr_event.h" +#include "datamngr_op_handle.h" +#include "dati_hdl.h" + + +extern int dm_forge_urc_hdl (char *cmd, event_t *event); +extern int dm_notification(dm_req_notification_t *req, event_t *event); +extern int dm_if_status_req(dm_req_if_status_t *req, event_t *event); +extern int dm_set_initial_attach_apn_req(dm_req_set_initial_attach_apn_t *req, event_t *event); +extern int dm_set_initial_attach_apn_resp(dm_resp_set_initial_attach_apn_t *resp, event_t *event); +extern int dm_setup_data_call_req(dm_req_setup_data_call_t *req, event_t *event); +extern int dm_setup_data_call_resp(dm_resp_setup_data_call_t *resp, event_t *event); +extern int dm_setup_data_call_fail_ind(dm_resp_t *resp, event_t *event); +extern int dm_deactivate_data_call_req(dm_req_deactivate_data_call_t *req, event_t *event); +extern int dm_deactivate_data_call_resp(dm_resp_deactivate_data_call_t *resp, event_t *event); +extern int dm_deactivate_data_call_if_req(dm_req_deactivate_data_call_t *req, event_t *event); +extern int dm_deactivate_data_call_if_with_cause_req(dm_req_deactivate_data_call_t *req, event_t *event, int cause); +extern int dm_deactivate_data_call_if_resp(dm_resp_deactivate_data_call_t *resp, event_t *event); +extern int dm_setup_dedicate_data_call_req(dm_req_setup_dedicate_data_call_t *req, event_t *event); +extern int dm_setup_dedicate_data_call_resp(dm_resp_setup_dedicate_data_call_t *resp, event_t *event); +extern int dm_modify_data_call_req(dm_req_modify_data_call_t *req, event_t *event); +extern int dm_modify_data_call_resp(dm_resp_modify_data_call_t *resp, event_t *event); +extern int dm_deactivate_dedicate_data_call_req(dm_req_deactivate_dedicate_data_call_t *req, event_t *event); +extern int dm_deactivate_dedicate_data_call_resp(dm_resp_deactivate_dedicate_data_call_t *resp, event_t *event); +extern int dm_abort_setup_data_call_req(dm_req_abort_setup_data_call_t *req, event_t *event); +extern int dm_abort_setup_data_call_resp(dm_resp_abort_setup_data_call_t *resp, event_t *event); +extern int dm_pcscf_discovery_pco_req(dm_req_pcscf_discovery_pco_t *req, event_t *event); +extern int dm_pcscf_discovery_pco_resp(dm_resp_pcscf_discovery_pco_t *resp, event_t *event); +extern int dm_last_data_call_fail_cause_req(dm_req_last_data_call_fail_cause_t *req, event_t *event); +extern int dm_last_data_call_fail_cause_resp(dm_resp_last_data_call_fail_cause_t *resp, event_t *event); +extern int dm_data_call_list_req(dm_req_data_call_list_t *req, event_t *event); +extern int dm_data_call_list_resp(dm_resp_data_call_list_t *resp, event_t *event); +extern int dm_data_call_list_changed_urc(dm_urc_data_call_list_changed_t *urc, event_t *event); +extern int dm_default_bearer_modified_urc(dm_urc_default_bearer_modified_t *urc, event_t *event); +extern int dm_dedicate_bearer_activated_urc(dm_urc_dedicate_bearer_activated_t *urc, event_t *event); +extern int dm_dedicate_bearer_modified_urc(dm_urc_dedicate_bearer_modified_t *urc, event_t *event); +extern int dm_dedicate_bearer_deactivated_urc(dm_urc_dedicate_bearer_deactivated_t *urc, event_t *event); +extern int dm_fail_resp(dm_resp_t *resp, event_t *event); +#ifdef APN_TABLE_SUPPORT +extern int dm_apn_edit_req(dm_req_apn_edit_t *req, event_t *event); +extern int dm_apn_edit_para_req(dm_req_apn_edit_para_t *req, event_t *event); +extern int dm_apn_set_mode_req(dm_req_apn_set_mode_t *req, event_t *event); +extern int dm_apn_reset_req(int reset, event_t *event); +#endif +extern int dm_radio_power_req(dm_req_radio_power_t *req, event_t *event); +extern int dm_radio_power_resp(dm_resp_radio_power_t *resp, event_t *event); +extern int dm_radio_power_do_req(dm_req_radio_power_t *req, event_t *event); +extern int dm_allow_data_req(dm_req_allow_data_t *req, event_t *event); +extern int dm_allow_data_resp(dm_resp_allow_data_t *resp, event_t *event); +extern int dm_netlink_listen_req(dm_req_netlink_t *req, event_t *event); +extern int dm_bear_req(dm_req_bearer_t *req, event_t *event); +extern int dm_pass_ims_pdn_req(dm_req_setup_data_call_t *req, event_t *event); +extern int dm_get_ims_pdn_req(dm_req_if_t *req, event_t *event); +extern int dm_get_ims_para_req(dm_req_ims_para_info_t *req, event_t *event); +extern int dm_if_rat_cell_info_req(dm_if_rat_cell_info_req_t *req, event_t *event); +extern int dm_handover_req(dm_ho_status_t *req, event_t *event); +extern int dm_handover_resp(dm_resp_ho_t *resp, event_t *event); +extern int dm_notify_epdg_deactivate(dm_req_deactivate_data_call_t *req, event_t *event); + + + + + + + +#endif + diff --git a/mtklibs/libmdfx/include/entity/datamngr/datamngr_api.h b/mtklibs/libmdfx/include/entity/datamngr/datamngr_api.h new file mode 100755 index 0000000000000000000000000000000000000000..96a9a9022f5c0180ca2afb3bf953c79b2d3e0abe --- /dev/null +++ b/mtklibs/libmdfx/include/entity/datamngr/datamngr_api.h @@ -0,0 +1,35 @@ +#ifndef DATAMNGR_API_H +#define DATAMNGR_API_H +#include "mdfx.h" +#include "datamngr_event.h" + +extern conn_ptr_t mal_dm_init(conn_init_arg_t *arg); +extern int mal_dm_exit (conn_ptr_t conn_ptr); +extern int mal_dm_notification(dm_req_notification_t *req, conn_ptr_t conn_ptr); +extern int mal_dm_setup_data_call(dm_req_setup_data_call_t *req, dm_resp_setup_data_call_t *resp, conn_ptr_t conn_ptr); +extern int mal_dm_deactivate_data_call(dm_req_deactivate_data_call_t *req, dm_resp_deactivate_data_call_t *resp, conn_ptr_t conn_ptr); +extern int mal_dm_setup_dedicate_data_call(dm_req_setup_dedicate_data_call_t *req, dm_resp_setup_dedicate_data_call_t *resp, conn_ptr_t conn_ptr); +extern int mal_dm_modify_data_call(dm_req_modify_data_call_t *req, dm_resp_modify_data_call_t *resp, conn_ptr_t conn_ptr); +extern int mal_dm_deactivate_dedicate_data_call(dm_req_deactivate_dedicate_data_call_t *req, dm_resp_deactivate_dedicate_data_call_t *resp, conn_ptr_t conn_ptr); +extern int mal_dm_abort_setup_data_call(dm_req_abort_setup_data_call_t *req, dm_resp_abort_setup_data_call_t *resp, conn_ptr_t conn_ptr); +extern int mal_dm_pcscf_discovery_pco_req(dm_req_pcscf_discovery_pco_t *req, dm_resp_pcscf_discovery_pco_t *resp, conn_ptr_t conn_ptr); +extern int mal_dm_last_data_call_fail_cause(dm_req_last_data_call_fail_cause_t *req, dm_resp_last_data_call_fail_cause_t *resp, conn_ptr_t conn_ptr); +extern int mal_dm_data_call_list(dm_req_data_call_list_t *req, dm_resp_data_call_list_t *resp, conn_ptr_t conn_ptr); +extern int mal_dm_if_status(dm_req_if_status_t *req, dm_resp_if_status_t *resp, conn_ptr_t conn_ptr); +extern int mal_dm_if_rat_cell_info(dm_if_rat_cell_info_req_t *req, dm_if_rat_cell_info_resp_t *resp, conn_ptr_t conn_ptr); +extern int mal_dm_is_default_bearer(int cid, conn_ptr_t conn_ptr); +extern int mal_dm_pass_ims_pdn_info(dm_req_setup_data_call_t *req, conn_ptr_t conn_ptr); +extern int mal_dm_get_ims_pdn_info(dm_req_if_t *req, dm_resp_setup_data_call_t *resp, conn_ptr_t conn_ptr); +extern int mal_get_ims_para_info(int interface_id, dm_ims_para_info_t *ims_para); +extern int mal_dm_get_bearer(int cid, dm_resp_bearer_t *resp, conn_ptr_t conn_ptr); + + + +#ifdef APN_TABLE_SUPPORT +extern int mal_dm_apn_edit(dm_req_apn_edit_t *req, conn_ptr_t conn_ptr); +extern int mal_dm_apn_edit_para(dm_req_apn_edit_para_t *req, conn_ptr_t conn_ptr); +extern int mal_dm_apn_set_mode(dm_req_apn_set_mode_t *req, conn_ptr_t conn_ptr); +#endif + +#endif + diff --git a/mtklibs/libmdfx/include/entity/datamngr/datamngr_debug.h b/mtklibs/libmdfx/include/entity/datamngr/datamngr_debug.h new file mode 100755 index 0000000000000000000000000000000000000000..7e0409e40177cef1eebd7cf85ccf0225c16e0aa5 --- /dev/null +++ b/mtklibs/libmdfx/include/entity/datamngr/datamngr_debug.h @@ -0,0 +1,23 @@ +#ifndef DATAMNGR_DEBUG_H +#define DATAMNGR_DEBUG_H +#include "mdfx.h" + +extern unsigned dm_debug_lv; + +#define dm_print(tag, format, args ...) do { \ + if ((dm_debug_lv & tag) && tag == ERR_LV) { \ + mdfx_print((tag), "[DMGR-ERR] "format, ## args); \ + } \ + else if ((dm_debug_lv & tag) && tag == WARN_LV) { \ + mdfx_print((tag), "[DMGR-WAR] "format, ## args); \ + } \ + else if ((dm_debug_lv & tag) && tag == INFO_LV) { \ + mdfx_print((tag), "[DMGR-INF] "format, ## args); \ + } \ + else if ((dm_debug_lv & tag) && tag == DEBUG_LV) { \ + mdfx_print((tag), "[DMGR-DBG] "format, ## args); \ + } \ +} while (0) + + +#endif diff --git a/mtklibs/libmdfx/include/entity/datamngr/datamngr_def.h b/mtklibs/libmdfx/include/entity/datamngr/datamngr_def.h new file mode 100755 index 0000000000000000000000000000000000000000..34e6d68b6a48ea099f7f8646565280fd788baac2 --- /dev/null +++ b/mtklibs/libmdfx/include/entity/datamngr/datamngr_def.h @@ -0,0 +1,10 @@ +#ifndef DATAMNGR_DEF_H +#define DATAMNGR_DEF_H + +#ifdef VZW_REQ_SUPPORT +#define APN_TABLE_SUPPORT +#endif + + +#endif + diff --git a/mtklibs/libmdfx/include/entity/datamngr/datamngr_event.h b/mtklibs/libmdfx/include/entity/datamngr/datamngr_event.h new file mode 100755 index 0000000000000000000000000000000000000000..4eb1b190029118e930719453a07b2fc3c3553b4a --- /dev/null +++ b/mtklibs/libmdfx/include/entity/datamngr/datamngr_event.h @@ -0,0 +1,611 @@ +#ifndef DATAMNGR_EVENT_H +#define DATAMNGR_EVENT_H + +#include "mdfx.h" +#ifdef APN_TABLE_SUPPORT +#include "apn_table.h" +#endif + +#define IMSM_NAME "imsm" +#define LANMNGR_NAME "lanmngr" +#define ATI_NAME "ati" +#define ATI1_NAME "ati1" +#define ATI2_NAME "ati2" +#define ATI3_NAME "ati3" +#define ATI4_NAME "ati4" +#define RILDPROXY_NAME "rildproxy" +#define STRING_SIZE 128 + +#ifndef UNUSED +#define UNUSED(x) (x) //eliminate "warning: unused parameter" +#endif + + +#ifndef MAX_IPV4_ADDRESS +#define MAX_IPV4_ADDRESS 17 +#endif +#ifndef MAX_IPV6_ADDRESS +#define MAX_IPV6_ADDRESS 42 +#endif +#ifndef MAX_IPV4_ADDRESS_LENGTH +#define MAX_IPV4_ADDRESS_LENGTH 17 +#endif +//xxx.xxx.xxx.xxx +#ifndef MAX_IPV6_ADDRESS_LENGTH +#define MAX_IPV6_ADDRESS_LENGTH 65 +#endif +//xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx +//xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx +#ifndef MAX_NUM_DNS_ADDRESS_NUMBER +#define MAX_NUM_DNS_ADDRESS_NUMBER 2 +#endif +#ifndef MAX_PCSCF_NUMBER +#define MAX_PCSCF_NUMBER 6 +#endif + +#ifndef CONCATENATE_NUM +#define CONCATENATE_NUM 11 +#endif + +#ifndef DEFAULT_MTU_SIZE +#define DEFAULT_MTU_SIZE 1500 +#endif + + + +typedef enum { + MAL_DATA_DETACH = 0, + MAL_DATA_ATTACH = 1, + MAL_DATA_DETACH_NOT_RESPONSE = 2, + MAL_DATA_ATTACH_NOT_RESPONSE = 3, +} dm_data_att_t; + +typedef enum { + MAL_EGACT_CAUSE_DONT_CARE = 0, + MAL_EGACT_CAUSE_DEACT_NORMAL = 1, + MAL_EGACT_CAUSE_DEACT_RA_INITIAL_ERROR = 2, + MAL_EGACT_CAUSE_DEACT_NO_PCSCF = 3, + MAL_EGACT_CAUSE_DEACT_RA_REFRESH_ERROR = 4, + MAL_EGACT_CAUSE_DEACT_VIA_RB = 100, +} dm_disconn_cause_t; + +typedef enum { // fail cause + MAL_SM_OPERATOR_BARRED = 0b00001000, + MAL_SM_MBMS_CAPABILITIES_INSUFFICIENT = 0b00011000, + MAL_SM_LLC_SNDCP_FAILURE = 0b00011001, + MAL_SM_INSUFFICIENT_RESOURCES = 0b00011010, + MAL_SM_MISSING_UNKNOWN_APN = 0b00011011, + MAL_SM_UNKNOWN_PDP_ADDRESS_TYPE = 0b00011100, + MAL_SM_USER_AUTHENTICATION_FAILED = 0b00011101, + MAL_SM_ACTIVATION_REJECT_GGSN = 0b00011110 , + MAL_SM_ACTIVATION_REJECT_UNSPECIFIED = 0b00011111, + MAL_SM_SERVICE_OPTION_NOT_SUPPORTED = 0b00100000, + MAL_SM_SERVICE_OPTION_NOT_SUBSCRIBED = 0b00100001, + MAL_SM_SERVICE_OPTION_OUT_OF_ORDER = 0b00100010, + MAL_SM_NSAPI_IN_USE = 0b00100011, + MAL_SM_REGULAR_DEACTIVATION = 0b00100100, + MAL_SM_QOS_NOT_ACCEPTED = 0b00100101, + MAL_SM_NETWORK_FAILURE = 0b00100110, + MAL_SM_REACTIVATION_REQUESTED = 0b00100111, + MAL_SM_FEATURE_NOT_SUPPORTED = 0b00101000, + MAL_SM_SEMANTIC_ERROR_IN_TFT = 0b00101001, + MAL_SM_SYNTACTICAL_ERROR_IN_TFT = 0b00101010, + MAL_SM_UNKNOWN_PDP_CONTEXT = 0b00101011, + MAL_SM_SEMANTIC_ERROR_IN_PACKET_FILTER = 0b00101100, + MAL_SM_SYNTACTICAL_ERROR_IN_PACKET_FILTER = 0b00101101, + MAL_SM_PDP_CONTEXT_WITHOU_TFT_ALREADY_ACTIVATED = 0b00101110, + MAL_SM_MULTICAST_GROUP_MEMBERSHIP_TIMEOUT = 0b00101111, + MAL_SM_BCM_VIOLATION = 0b00110000, + MAL_SM_LAST_PDN_DISC_NOT_ALLOWED = 0b00110001, + MAL_SM_ONLY_IPV4_ALLOWED = 0b00110010, + MAL_SM_ONLY_IPV6_ALLOWED = 0b00110011, + MAL_SM_ONLY_SINGLE_BEARER_ALLOWED = 0b00110100, + MAL_ESM_INFORMATION_NOT_RECEIVED = 0b00110101, + MAL_SM_PDN_CONNECTION_NOT_EXIST = 0b00110110, + MAL_SM_MULTIPLE_PDN_APN_NOT_ALLOWED = 0b00110111, + MAL_SM_COLLISION_WITH_NW_INITIATED_REQUEST = 0b00111000, + MAL_ESM_UNSUPPORTED_QCI_VALUE = 0b00111011, + MAL_SM_BEARER_HANDLING_NOT_SUPPORT = 0b00111100, + MAL_SM_MAX_PDP_NUMBER_REACHED = 0b01000001, + MAL_SM_APN_NOT_SUPPORT_IN_RAT_PLMN = 0b01000010, + MAL_SM_INVALID_TRANSACTION_ID_VALUE = 0b01010001, + MAL_SM_SEMENTICALLY_INCORRECT_MESSAGE = 0b01011111, + MAL_SM_INVALID_MANDATORY_INFO = 0b01100000, + MAL_SM_MESSAGE_TYPE_NONEXIST_NOT_IMPLEMENTED = 0b01100001, + MAL_SM_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 0b01100010, + MAL_SM_INFO_ELEMENT_NONEXIST_NOT_IMPLEMENTED = 0b01100011, + MAL_SM_CONDITIONAL_IE_ERROR = 0b01100100, + MAL_SM_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 0b01100101, + MAL_SM_PROTOCOL_ERROR = 0b01101111, + MAL_SM_APN_RESTRICTION_VALUE_INCOMPATIBLE_WITH_PDP_CONTEXT = 0b01110000 +} AT_MAL_SM_Error; + + +/* See MAL_REQUEST_LAST_CALL_FAIL_CAUSE */ +typedef enum { + MAL_CALL_FAIL_UNOBTAINABLE_NUMBER = 1, + MAL_CALL_FAIL_NORMAL = 16, + MAL_CALL_FAIL_BUSY = 17, + MAL_CALL_FAIL_CONGESTION = 34, + MAL_CALL_FAIL_ACM_LIMIT_EXCEEDED = 68, + MAL_CALL_FAIL_MAL_CALL_BARRED = 240, + MAL_CALL_FAIL_FDN_BLOCKED = 241, + MAL_CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242, + MAL_CALL_FAIL_IMEI_NOT_ACCEPTED = 243, + MAL_CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000, + MAL_CALL_FAIL_CDMA_DROP = 1001, + MAL_CALL_FAIL_CDMA_INTERCEPT = 1002, + MAL_CALL_FAIL_CDMA_REORDER = 1003, + MAL_CALL_FAIL_CDMA_SO_REJECT = 1004, + MAL_CALL_FAIL_CDMA_RETRY_ORDER = 1005, + MAL_CALL_FAIL_CDMA_ACCESS_FAILURE = 1006, + MAL_CALL_FAIL_CDMA_PREEMPTED = 1007, + MAL_CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed + during emergency callback mode */ + MAL_CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */ + MAL_CALL_FAIL_ERROR_UNSPECIFIED = 0xffff +} MAL_LastCallFailCause; + +/* See MAL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */ +typedef enum { + MAL_PDP_FAIL_NONE = 0, /* No error, connection ok */ + MAL_PDP_FAIL = 1, /* PDN fail to setup */ + + /* an integer cause code defined in TS 24.008 + section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B. + If the implementation does not have access to the exact cause codes, + then it should return one of the following values, + as the UI layer needs to distinguish these + cases for error notification and potential retries. */ + MAL_PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */ + MAL_PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A, + MAL_PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */ + MAL_PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */ + MAL_PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */ + MAL_PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */ + MAL_PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F, + MAL_PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */ + MAL_PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */ + MAL_PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22, + MAL_PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */ + MAL_PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* restart radio */ + MAL_PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */ + MAL_PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */ + MAL_PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34, + MAL_PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */ + + /* Not mentioned in the specification */ + MAL_PDP_FAIL_VOICE_REGISTRATION_FAIL = -1, + MAL_PDP_FAIL_DATA_REGISTRATION_FAIL = -2, + + /* reasons for data call drop - network/modem disconnect */ + MAL_PDP_FAIL_SIGNAL_LOST = -3, + MAL_PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry + with parameters appropriate for new technology */ + MAL_PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting, + powered off - no retry */ + MAL_PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered + mode was up on same APN/data profile - no retry until + tethered call is off */ + + MAL_PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */ +} MAL_DataCallFailCause; + + +typedef enum { + DM_MOBILE_3GPP = 1, + DM_WIFI = 2, + DM_MOBILE_3GPP2 = 3, +} dm_rat_type_t; + +typedef struct { + char ext_module_name[STRING_SIZE]; +} dm_req_notification_t; + + +typedef enum { + MAL_AUTHTYPE_NONE = 0, + MAL_AUTHTYPE_PAP = 1, + MAL_AUTHTYPE_CHAP = 2, + MAL_AUTHTYPE_PAP_CHAP = 3, +} auth_type_t; + +typedef enum { + MAL_IPV4 = 0, + MAL_IPV6 = 1, + MAL_IPV4V6 = 2, +} ip_type_t; + +typedef struct { + //0: QCI is selected by network + //[1-4]: value range for guaranteed bit rate Traffic Flows + //[5-9]: value range for non-guarenteed bit rate Traffic Flows + //[128-254]: value range for Operator-specific QCIs + int qci; //class of EPS QoS + int dlGbr; //downlink guaranteed bit rate + int ulGbr; //uplink guaranteed bit rate + int dlMbr; //downlink maximum bit rate + int ulMbr; //uplink maximum bit rate +} MAL_Qos; + +typedef struct { + + char radioType[STRING_SIZE]; + char profile[STRING_SIZE]; + char apn[STRING_SIZE]; + char username[STRING_SIZE]; + char passwd[STRING_SIZE]; + int authType; // auth_type_t + int protocol; // ip_type_t + int interfaceId; // RILD_Req, aka fake + int retryCount; // SDC retry cnt + + int mIsValid; + MAL_Qos qos; + int emergency_ind; + int pcscf_discovery_flag; + int signaling_flag; + int isHandover; + int ran_type; // for VzW IMS on eHRPD +}MAL_Setup_Data_Call_Struct; + +typedef struct { + int valid; + MAL_Qos qos; + int emergency_ind; + int pcscf_discovery_flag; + int signaling_flag; + int is_handover; + int assigned_rate; // 0: UNSPEC, 1: LTE, 2: WIFI + +} dm_ims_para_info_t; + + +typedef struct { + int id; + int precedence; + int direction; + int networkPfIdentifier; + int bitmap; + char address[MAX_IPV6_ADDRESS_LENGTH]; + char mask[MAX_IPV6_ADDRESS_LENGTH]; + int protocolNextHeader; + int localPortLow; + int localPortHigh; + int remotePortLow; + int remotePortHigh; + int spi; + int tos; + int tosMask; + int flowLabel; +} MAL_PktFilter; + +typedef struct { + int authTokenNumber; + int authTokenList[16]; + int flowIdNumber; + int flowIdList[4][4]; +} MAL_AuthToken; + +typedef struct { + int linkedPfNumber; + int linkedPfList [16]; + int authtokenFlowIdNumber; + MAL_AuthToken authtokenFlowIdList[4]; +} MAL_TftParameter; + +typedef struct { + int operation; + int pfNumber; + MAL_PktFilter pfList [16]; //for response, just send necessary length. check responseSetupDedicateDataCall in ril.cpp + MAL_TftParameter tftParameter; +} MAL_Tft; + + +typedef struct { + unsigned short pcscfNum; + unsigned short pcscfIpv6Mask; + unsigned char pcscf[MAX_PCSCF_NUMBER][16]; +} dm_pcscf_t; + +typedef struct { + int ddcId; + int interfaceId; + int primaryCid; + int cid; /* Context ID, uniquely identifies this call */ + int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ + int signalingFlag; + int bearerId; + int failCause; + int hasQos; + MAL_Qos qos; + int hasTft; + MAL_Tft tft; + dm_pcscf_t pcscfs; +} MAL_Dedicate_Data_Call_Struct; + +#ifdef APN_TABLE_SUPPORT +typedef struct { + unsigned entry; + apn_info_t info; +} dm_req_apn_edit_t; + + +typedef struct { + unsigned entry; + apn_para_t para; +} dm_req_apn_edit_para_t; +#endif + +typedef struct { + int status; /* A MAL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ + int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry + back-off timer value RIL wants to override the one + pre-configured in FW. + The unit is miliseconds. + The value < 0 means no value is suggested. + The value 0 means retry should be done ASAP. + The value of INT_MAX(0x7fffffff) means no retry. */ + int cid; /* interface ID, uniquely identifies this call */ + int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ + int mtuSize; /* 0 is default and query fail*/ + int type; // ip_type_t + /* One of the PDP_type values in TS 27.007 section 10.1.1. + For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is + PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported + such as "IP" or "IPV6" */ + char ifname[STRING_SIZE]; /* The network interface name */ + unsigned ipv4Addr; + unsigned char ipv6Addr[16]; + /*char * addresses;*/ /* A space-delimited list of addresses with optional "/" prefix length, + e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". + May not be empty, typically 1 IPv4 or 1 IPv6 or + one of each. If the prefix length is absent the addresses + are assumed to be point to point with IPv4 having a prefix + length of 32 and IPv6 128. */ + /*unsigned dnsNum; + unsigned dnsIpv6Mask; + unsigned char dnses[MAX_NUM_DNS_ADDRESS_NUMBER][16]; */ + unsigned ipv4DnsNum; + unsigned char ipv4Dnses[MAX_NUM_DNS_ADDRESS_NUMBER][4]; + unsigned ipv6DnsNum; + unsigned char ipv6Dnses[MAX_NUM_DNS_ADDRESS_NUMBER][16]; + + /*char * dnses;*/ /* A space-delimited list of DNS server addresses, + e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". + May be empty. */ + + unsigned ipv4Gateway; + unsigned char ipv6Gateway[16]; + + /*char * gateways;*/ /* A space-delimited list of default gateway addresses, + e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". + May be empty in which case the addresses represent point + to point connections. */ + //VoLTE + //unsigned char* pcscf; + unsigned network_id; + int concatenateNum; + MAL_Dedicate_Data_Call_Struct concatenate[CONCATENATE_NUM]; + int defaultBearerValid; + MAL_Dedicate_Data_Call_Struct defaultBearer; + int eran_type; // 1:RDS_RAN_MOBILE_3GPP, 2:RDS_RAN_WIFI + +} MAL_Data_Call_Response_v11; + +typedef struct { + char apn[STRING_SIZE]; + int protocol; // ip_type_t + int authType; // auth_type_t + char username[STRING_SIZE]; + char passwd[STRING_SIZE]; + char operatorNumeric[STRING_SIZE]; + int canHandleIms; +} MAL_InitialAttachApn; + +typedef struct { + int id; //InterfaceID (RILD_Req-1, aka real) + int cause; +} dm_req_t; + +typedef dm_req_t dm_ind_t; // InterfaceId RILD Req-1, aka real + +typedef struct { + int ril_status; +} dm_resp_t; + +typedef struct { + int unused; +} dm_dummy_req_t; + + +typedef struct { + int on_off; // 0: cfun=0, > 0: cfun=1 +} dm_req_radio_power_t; + +typedef struct { + int setting; // dm_data_att_t +} dm_req_allow_data_t; + +typedef dm_resp_t dm_resp_allow_data_t; + +typedef dm_resp_t dm_resp_radio_power_t; + + +#ifdef APN_TABLE_SUPPORT +typedef struct { + int mode; // apn_mode_t +} dm_req_apn_set_mode_t; +#endif + + +typedef MAL_InitialAttachApn dm_req_set_initial_attach_apn_t; +typedef dm_resp_t dm_resp_set_initial_attach_apn_t; +typedef dm_resp_t dm_resp_ho_t; + +typedef MAL_Setup_Data_Call_Struct dm_req_setup_data_call_t; + +typedef struct { + int ril_status; + MAL_Data_Call_Response_v11 resp; +} dm_resp_setup_data_call_t; + +typedef MAL_Dedicate_Data_Call_Struct dm_req_modify_data_call_t; + +typedef struct { + int ril_status; + MAL_Dedicate_Data_Call_Struct resp; +} dm_resp_modify_data_call_t; + +typedef MAL_Dedicate_Data_Call_Struct dm_req_setup_dedicate_data_call_t ; + +typedef struct { + int ril_status; + short total_event; + short event_seq; + MAL_Dedicate_Data_Call_Struct resp; +} dm_resp_setup_dedicate_data_call_t ; + +typedef dm_req_t dm_req_deactivate_data_call_t; // interfaceId for RILD //RILD_Req-1 , aka real +typedef dm_resp_t dm_resp_deactivate_data_call_t; + +typedef dm_req_t dm_req_deactivate_dedicate_data_call_t; // cid +typedef dm_resp_t dm_resp_deactivate_dedicate_data_call_t; + +typedef dm_req_t dm_req_abort_setup_data_call_t; // ddcId +typedef dm_resp_t dm_resp_abort_setup_data_call_t; + +typedef dm_req_t dm_req_pcscf_discovery_pco_t; // cid + +typedef struct { + int ril_status; + dm_pcscf_t resp; +} dm_resp_pcscf_discovery_pco_t; + +typedef dm_dummy_req_t dm_req_last_data_call_fail_cause_t; + +typedef struct { + int ril_status; + int fail_cause; +} dm_resp_last_data_call_fail_cause_t; + +typedef dm_dummy_req_t dm_req_data_call_list_t; + +typedef struct { + int ril_status; + short total_event; + short event_seq; + MAL_Data_Call_Response_v11 resp; +} dm_resp_data_call_list_t; + +typedef struct { + int ril_status; + short total_event; + short event_seq; + MAL_Data_Call_Response_v11 resp; +} dm_urc_data_call_list_changed_t; + +typedef struct { + int ril_status; + MAL_Dedicate_Data_Call_Struct resp; +} dm_urc_dedicate_bearer_activated_t; + +typedef struct{ + int ril_status; + MAL_Dedicate_Data_Call_Struct resp; +} dm_urc_dedicate_bearer_modified_t ; + +typedef struct{ + int ril_status; + int cid; +} dm_urc_dedicate_bearer_deactivated_t; // should be equal to rds_ddc_ind_t + +typedef struct{ + int cid; +} dm_urc_default_bearer_modified_t ; + +typedef struct{ + int cid; +} dm_req_if_status_t; + + + +typedef enum { + IF_FAIL = -1, + IF_SUCC = 0, +} dm_if_rval_t; + +typedef struct{ + int ril_status; + int rval; // dm_if_rval_t + + char ifname[STRING_SIZE]; + int ip_type; // ip_type_t + + unsigned ipv4_addr; + unsigned ipv4_dns_num; + unsigned ipv4_dns[2]; + + unsigned char ipv6_addr[16]; + unsigned ipv6_dns_num; + unsigned char ipv6_dns[2][16]; + + unsigned prefix_len; + unsigned prefer_lifetime; + unsigned valid_lifetime; + +} dm_resp_if_status_t; + + +typedef struct{ + int type; +} dm_req_netlink_t; + + +typedef struct { + int cid; +} dm_if_rat_cell_info_req_t; + + +typedef struct { + int cid; +} dm_req_bearer_t; + + +typedef struct { + char ifname[STRING_SIZE]; + unsigned network_id; +} dm_req_if_t; + +typedef struct{ + int ril_status; + MAL_Dedicate_Data_Call_Struct resp; +} dm_resp_bearer_t; + +typedef struct { + int interface_id; +} dm_req_ims_para_info_t; + +typedef struct { + /*imc_rat_cell_info_struct*/ + unsigned rat_type; + char plmn[8]; + char lac[8]; + char ci[12]; + char cell_id[64]; + int is_ems_support; + int ril_status; +} dm_if_rat_cell_info_resp_t; + + + +typedef struct { + unsigned char ucho_status; // 0: start_ho 1: stop_ho + unsigned char fgho_result; // 0: fail(RDS_FALSE) 1: success(RDS_TRUE) + unsigned char uccid; // cid, for RILD + unsigned char esource_ran_type; // ran_type_e + unsigned char etarget_ran_type; // ran_type_e +} dm_ho_status_t; + +#endif + diff --git a/mtklibs/libmdfx/include/entity/datamngr/datamngr_op_handle.h b/mtklibs/libmdfx/include/entity/datamngr/datamngr_op_handle.h new file mode 100755 index 0000000000000000000000000000000000000000..f9deeaaf4f3ed31b93a5f1a971129871d3b29b91 --- /dev/null +++ b/mtklibs/libmdfx/include/entity/datamngr/datamngr_op_handle.h @@ -0,0 +1,92 @@ +#ifndef DATAMNGR_OP_HANDLER_H +#define DATAMNGR_OP_HANDLER_H + + +typedef struct { + char *prefix; + int (*handler)(char *, event_t *); + int hijack; +} dm_urc_handle_t; + + +#if 1 +#define RILD_REQ_IF_ID(if_id) (if_id) +#define IF_ID_FROM_RILD_REQ(if_id) (if_id) +#else +// interface id of RILD setup data call request = actul interface id + 1 +#define RILD_REQ_IF_ID(if_id) (if_id + 1) +#define IF_ID_FROM_RILD_REQ(if_id) (if_id - 1) +#endif + +#define INVALID_IF_ID (-1) +#define IMS_IF_ID (4) // IMS network id +#define EMERGENCY_IF_ID (5) // Emergency network id + +#ifdef VZW_REQ_SUPPORT + +#define ADMIN_IF_ID (0) // VZWADMIN class (1) - 1 +#define INTERNET_IF_ID (2) // VZWINTERNET class (3) - 1 +#define APP_IF_ID (3) // VZWAPP class (4) - 1 + +#define OP_HANDLE_SUPPORT +#endif + +typedef enum { + OP_FAIL = -1, + OP_SUCC = 0, + OP_REJECT, + OP_SKIP, +} op_rval_t; + + +typedef struct dm_op_handle +{ + int (*init)(); + int (*before_radio_power_on)(); + int (*before_radio_power_off)(); + int (*init_apn_done)(); + int (*set_init_apn)(); + int (*req_apn_conn)(dm_req_setup_data_call_t *, event_t *); + int (*resp_apn_conn)(dm_resp_setup_data_call_t *, event_t *); + int (*req_apn_disconn)(dm_req_deactivate_data_call_t *, event_t *); + int (*urc_apn_disconn)(int, event_t *event); + int (*set_apn)(int); + int (*set_apn_misc)(int); + int (*get_urc_num)(); + int (*get_urc_prefix)(int, char *, int *); + int (*handle_urc)(char *, event_t *); + int (*ra_init_error)(int); + int (*ra_refresh_error)(int); + int (*no_pcscf)(int); + //int (*conn_auto_apn)(); + void (*dump)(); + +} dm_op_handle_t; + + +#ifdef OP_HANDLE_SUPPORT +#define EXEC_OP_HANDLE(ret, func, args ...) do { \ + dm_op_handle_t *op_handle = get_op_handle(); \ + if (op_handle && op_handle->func) { \ + ret = op_handle->func(## args); \ + } \ + else { \ + dm_print(ERR_LV, "Null op handle!!\n"); \ + ret = SYS_FAIL; \ + } \ +} while (0) + +#else + +#define EXEC_OP_HANDLE(func, args ...) +#endif + +#ifdef VZW_REQ_SUPPORT +extern dm_op_handle_t * get_op_handle(); +#else +static dm_op_handle_t * get_op_handle() { + return NULL; +} +#endif + +#endif diff --git a/mtklibs/libmdfx/include/entity/datamngr/datamngr_util.h b/mtklibs/libmdfx/include/entity/datamngr/datamngr_util.h new file mode 100755 index 0000000000000000000000000000000000000000..3b75de97a39096a53aa467bebbc5284fd3c905ef --- /dev/null +++ b/mtklibs/libmdfx/include/entity/datamngr/datamngr_util.h @@ -0,0 +1,29 @@ +#ifndef DATAMNGR_UTIL_H +#define DATAMNGR_UTIL_H +#include "datamngr_debug.h" + +extern unsigned dm_debug_lv; + +#define DM_MUTEX_LOCK(mutex) do { \ + dm_print(DEBUG_LV, "%s mutex lock\n", __FUNCTION__); \ + if (mutex == NULL) { \ + mutex = (thrd_lock_t *) malloc(sizeof(thrd_lock_t)); \ + mdfx_mutex_init(mutex); \ + } \ + mdfx_mutex_lock(mutex); \ +} while (0) + + +#define DM_MUTEX_UNLOCK(mutex) do { \ + dm_print(DEBUG_LV, "%s mutex unlock\n", __FUNCTION__); \ + if (mutex == NULL) { \ + dm_print(ERR_LV, "%s mutex lock before lock\n", __FUNCTION__); \ + } \ + else { \ + mdfx_mutex_unlock(mutex); \ + } \ +} while (0) + +#endif + + diff --git a/mtklibs/libmdfx/include/entity/datamngr/dati_hdl.h b/mtklibs/libmdfx/include/entity/datamngr/dati_hdl.h new file mode 100755 index 0000000000000000000000000000000000000000..8da98e1dd340be5b3c6a66f48c12be96ca627ef5 --- /dev/null +++ b/mtklibs/libmdfx/include/entity/datamngr/dati_hdl.h @@ -0,0 +1,74 @@ +#ifndef __ENTITY_DATI_H_ +#define __ENTITY_DATI_H_ + +#include "entity/datamngr/datamngr.h" + +#define DATI_DUMMY_ATC_ERR (0) +#define DATI_DUMMY_ATC_OK (1) +#define DATI_DUMMY_NORMAL_URC (0) +#define DATI_DUMMY_BYPASS_URC (1) + +#define INVAL_ATC "INVAL_AT_VAL" +#define ATC_TBL_SIZE 4 // NEED_TO_BE_NOTICED, temporarily used, a map imple. would replace this one later +typedef struct dati_atc_tbl_entry dati_atc_tbl_entry_t; +typedef struct dati_atc_tbl_entry* dati_atc_tbl_entry_ptr_t; +typedef struct dati_atc_hdl_arg dati_atc_hdl_arg_t; +typedef struct dati_atc_hdl_arg* dati_atc_hdl_arg_ptr_t; +typedef void* (*dati_atc_hdl_t) (dati_atc_tbl_entry_ptr_t entry_ptr, char* atc, void* arg); + +typedef struct dati_atc_tbl_entry +{ + const char *cmd; + int num_of_param; + const char * const *param; + dati_atc_hdl_t assign_hdl; + dati_atc_hdl_t query_hdl; +} dati_atc_tbl_entry_t; + +typedef struct dati_pdn_tbl_entry +{ + int state; + int cid; + dm_req_setup_data_call_t dm_req_setup_data_call; + dm_req_deactivate_data_call_t dm_req_deactivate_data_call; +}dati_pdn_tbl_entry_t; + +typedef struct dati_atc_hdl_arg +{ + event_ptr_t event_ptr; + // AT+CGDCONT; AT+CGACT; AT+CGDATA + dati_pdn_tbl_entry_t pdn_tbl[DM_MAX_PDN_NUM]; + thrd_lock_t dati_pdn_tbl_mutex; +} dati_atc_hdl_arg_t; + +extern struct dati_atc_tbl_entry atc_tbl[]; +extern void* datamngr_dati_task_hdl (task_ptr_t task_ptr, event_ptr_t event_ptr, void *arg); + +// Data manager handler +extern int dati_dummy_resp (void *resp, event_t *event, int res_type); +extern int dati_dummy_urc (void *resp, char* urc, int res_type); +extern void* dati_cfun_hdl (dati_atc_tbl_entry_ptr_t entry_ptr, char* atc, void *arg); +extern void* dati_cgdcont_hdl (dati_atc_tbl_entry_ptr_t entry_ptr, char* atc, void *arg); +extern void* dati_cgact_hdl (dati_atc_tbl_entry_ptr_t entry_ptr, char* atc, void *arg); +extern void* dati_cgdata_hdl (dati_atc_tbl_entry_ptr_t entry_ptr, char* atc, void *arg); +extern int dati_setup_data_call_rep (dm_resp_setup_data_call_t *resp, event_t *event); +extern int dati_setup_data_call_rep (dm_resp_setup_data_call_t *resp, event_t *event); +extern int dati_setup_data_call_resp (dm_resp_setup_data_call_t *resp, event_t *event); +extern int dati_deactivate_data_call_resp (dm_resp_deactivate_data_call_t *resp, event_t *event); +extern int dati_deactivate_data_call_if_resp (dm_resp_deactivate_data_call_t *resp, event_t *event); +extern int dati_setup_dedicate_data_call_resp (dm_resp_setup_dedicate_data_call_t *resp, event_t *event); +extern int dati_modify_data_call_resp (dm_resp_modify_data_call_t *resp, event_t *event); +extern int dati_deactivate_dedicate_data_call_resp (dm_resp_deactivate_dedicate_data_call_t *resp, event_t *event); +extern int dati_abort_setup_data_call_resp (dm_resp_abort_setup_data_call_t *resp, event_t *event); +extern int dati_pcscf_discovery_pco_resp (dm_resp_pcscf_discovery_pco_t *resp, event_t *event); +extern int dati_last_data_call_fail_cause_resp (dm_resp_last_data_call_fail_cause_t *resp, event_t *event); +extern int dati_data_call_list_resp (dm_resp_data_call_list_t *resp, event_t *event); +extern int dati_data_call_list_changed_urc (dm_urc_data_call_list_changed_t *urc, event_t *event); +extern int dati_dedicate_bearer_activated_urc (dm_urc_dedicate_bearer_activated_t *urc, event_t *event); +extern int dati_dedicate_bearer_modified_urc (dm_urc_dedicate_bearer_modified_t *urc, event_t *event); +extern int dati_dedicate_bearer_deactivated_urc (dm_urc_dedicate_bearer_deactivated_t *urc, event_t *event); +extern int dati_fail_resp (dm_resp_t *resp, event_t *event); +extern int dati_radio_power_resp(dm_resp_radio_power_t *resp, event_t *event); +extern int dati_allow_data_resp(dm_resp_allow_data_t *resp, event_t *event); + +#endif diff --git a/mtklibs/libmdfx/include/entity/datamngr/pdn_info.h b/mtklibs/libmdfx/include/entity/datamngr/pdn_info.h new file mode 100755 index 0000000000000000000000000000000000000000..211339393bc8ed1e68685af24a8bce40081854ff --- /dev/null +++ b/mtklibs/libmdfx/include/entity/datamngr/pdn_info.h @@ -0,0 +1,74 @@ +#ifndef PDN_INFO_H +#define PDN_INFO_H +#include "mdfx.h" +#include "apn_table.h" +#include "datamngr_debug.h" +#include "datamngr_event.h" + +/////////////////////////////////////////////// +#define EPDG_CID_OFFSET (100) +#define MAX_MID_NUM (11) + +#define MID_INVALID (-1) +#define MID_IMS (0) +#define MID_EIMS (1) +#define MID_FIXED (2) + +#define ERAN_TYPE_MOBILE (1) +#define ERAN_TYPE_WIFI (2) + +int add_cid2mid(int cid, int mid); +int get_cid2mid(int cid); +int get_mid2cid(int mid); +/////////////////////////////////////////////// +#define DM_MAX_PDN_NUM (16) + + +typedef struct { + int interfaceId; + int primaryCid; + int cid; + int ddcId; //for dedicate bearer + int isDedicateBearer; + int isEmergency; //0: normal, 1: emergency PDN + int active; //0: inactive, 1: link down, 2: active + int signalingFlag; + char ifname[STRING_SIZE]; + char apn[STRING_SIZE]; + int protocol; + unsigned char addressV4[MAX_IPV4_ADDRESS_LENGTH]; + unsigned char addressV6[MAX_IPV6_ADDRESS_LENGTH]; + unsigned dnsV4Num; + unsigned dnsV6Num; + unsigned char dnsV4[MAX_NUM_DNS_ADDRESS_NUMBER][MAX_IPV4_ADDRESS_LENGTH]; + unsigned char dnsV6[MAX_NUM_DNS_ADDRESS_NUMBER][MAX_IPV6_ADDRESS_LENGTH]; + + unsigned prefixLength; + unsigned preferLifetime; + unsigned validLifetime; + + void *priv; + + MAL_Dedicate_Data_Call_Struct bearer; + +} dm_pdn_info_t; + + + +//dm_pdn_info_t * alloc_pdn_info(); +dm_pdn_info_t * find_pdn_info_by_apn(char *apn); +dm_pdn_info_t * find_pdn_info_by_index(unsigned index); +dm_pdn_info_t * find_pdn_info_by_interface(int interface_id); +int clear_pdn_info_by_cid(int cid); +int clear_pdn_info_by_if(int interfaceId, int eran_type); +dm_pdn_info_t * find_pdn_info_by_cid(int cid); +int add_pre_pdn_info(unsigned interface_id, char *apn); +int retrieve_pre_pdn_info(unsigned interface_id, char *apn); +int remove_pre_pdn_info(unsigned interface_id); +int get_interface_by_cid(int cid); +int reset_pdn_info(); +void dump_pdn_info(); + + +#endif + diff --git a/mtklibs/libmdfx/include/entity/epdga/epdga.h b/mtklibs/libmdfx/include/entity/epdga/epdga.h new file mode 100755 index 0000000000000000000000000000000000000000..38ad7105235e09224c7a15fe226f5583add800cb --- /dev/null +++ b/mtklibs/libmdfx/include/entity/epdga/epdga.h @@ -0,0 +1,110 @@ +#ifndef __EPDGA_H__ +#define __EPDGA_H__ + +#include + +#define IFNAMSIZ 16 +#define APN_NAME_LEN 20 +#define V4_ADDR_STR_LEN 16 +#define V6_ADDR_STR_LEN 40 +#define IF_NAME_LEN 20 +#define IMSI_STR_LEN 25 +#define MNC_STR_LEN 4 +#define MCC_STR_LEN 4 +#define MAC_ADDR_STR_LEN 18 +#define FQDN_STR_LEN 200 + +#define EPDGA_MAX_NUM_PCSCFS 10 +#define EPDGA_IPV6_ADDR_BIN_LEN 16 + +#define AKA_AUTH_LEN 64 +#define AKA_RAND_LEN 64 +#define AKA_RESPONSE_LEN 500 + + +typedef char ea_apn_name_t[APN_NAME_LEN]; + + +typedef enum ea_rsp_type_t { + NONE_RSP, + ATTACH_CNF, + DETACH_CNF, + HOL2W_CNF, + DISCONNECT +} ea_rsp_type_t; + +typedef struct ea_sim_info_t { + char imsi[IMSI_STR_LEN]; + char mcc[MNC_STR_LEN]; + char mnc[MNC_STR_LEN]; +} ea_sim_info_t; + +typedef struct ea_if_info_t { + char if_name[IFNAMSIZ]; + char addr_v6[V6_ADDR_STR_LEN]; + char addr_v4[V4_ADDR_STR_LEN]; +} ea_if_info_t; + +typedef enum ea_ip_type_t { + IPv4 = 0, + IPv6 = 1, + IPv4v6 = 2, +} ea_ip_type_t; + +typedef struct ea_attach_info_t { + ea_apn_name_t apn; + ea_if_info_t wifi; + ea_sim_info_t sim; + ea_ip_type_t pdn_type; + ea_if_info_t interface; + uint32_t timeout_sec; + char fqdn[FQDN_STR_LEN]; + char ap_mac[MAC_ADDR_STR_LEN]; +} ea_attach_info_t; + +typedef struct ea_detach_info_t { + ea_apn_name_t apn; +} ea_detach_info_t; + +typedef ea_attach_info_t ea_hol2w_info_t; + +typedef struct ea_rsp_t { + ea_rsp_type_t type; + ea_apn_name_t apn; + uint32_t status; //uint32_t + uint32_t sub_errno; + char if_name[IFNAMSIZ]; + uint32_t mtu; + char addr_v6[V6_ADDR_STR_LEN]; + char pcscf_v6[V6_ADDR_STR_LEN]; + char dns_v6[V6_ADDR_STR_LEN]; + char addr_v4[V4_ADDR_STR_LEN]; + char pcscf_v4[V4_ADDR_STR_LEN]; + char dns_v4[V4_ADDR_STR_LEN]; +} ea_rsp_t; + +typedef struct ea_pcscfs_t { + unsigned short pcscf_num; + unsigned short pcscf_v6_mask;// bit mask => 1 : IPV6, 0 : IPV4 + unsigned char pcscf[EPDGA_MAX_NUM_PCSCFS][EPDGA_IPV6_ADDR_BIN_LEN]; +} ea_pcscfs_t; + +typedef struct ea_sim_req_t { + ea_apn_name_t apn; + char rand[AKA_AUTH_LEN]; + char auth[AKA_RAND_LEN]; +} ea_sim_req_t; + +typedef struct ea_sim_rsp_t { + int sw1; + int sw2; + char response[AKA_RESPONSE_LEN]; +} ea_sim_rsp_t; + +typedef struct ea_pdn_info { + ea_apn_name_t apn; + char ap_mac[MAC_ADDR_STR_LEN]; + ea_pcscfs_t pcscfs; +} ea_pdn_info; + +#endif \ No newline at end of file diff --git a/mtklibs/libmdfx/include/entity/imsmngr.h b/mtklibs/libmdfx/include/entity/imsmngr.h new file mode 100755 index 0000000000000000000000000000000000000000..94b2d1ae363b89f6541d4ba8c1ae775822fe81f0 --- /dev/null +++ b/mtklibs/libmdfx/include/entity/imsmngr.h @@ -0,0 +1,24 @@ +#ifndef __LIBMDFX_ENTITY_IMSMNGR_H__ +#define __LIBMDFX_ENTITY_IMSMNGR_H__ + +typedef struct _imsmngr_req { + unsigned int request_id; + unsigned int request_len; + char request_data[0]; +} imsmngr_req_t; + +typedef struct _imsmngr_resp { + unsigned int result; + unsigned int response_id; + unsigned int response_len; + char response_data[0]; +} imsmngr_resp_t; + +typedef struct _imsmngr_notify { + unsigned int notify_id; + unsigned int notify_len; + char notify_data[0]; +} imsmngr_notify_t; + + +#endif /* __LIBMDFX_ENTITY_IMSMNGR_H__ */ diff --git a/mtklibs/libmdfx/include/entity/mdmngr.h b/mtklibs/libmdfx/include/entity/mdmngr.h new file mode 100755 index 0000000000000000000000000000000000000000..c6487956d7d786ba8753206dd004e810adaf289a --- /dev/null +++ b/mtklibs/libmdfx/include/entity/mdmngr.h @@ -0,0 +1,79 @@ +#ifndef __LIBMDFX_ENTITY_MDMNGR_H__ +#define __LIBMDFX_ENTITY_MDMNGR_H__ + +/* ------------------------------------ */ +/* Modem Manager */ +/* ------------------------------------ */ + +typedef struct _mdmngr_atcmd_req { + void *priv_data; + unsigned int timeout; + char resp_prefix[16]; + char cmd[512]; +} mdmngr_atcmd_req_t; + +enum ATCMD_RESULT_e { + ATCMD_RESULT_OK = 0, + ATCMD_RESULT_CMD_ERROR, + ATCMD_RESULT_TIMEOUT, + ATCMD_RESULT_NOT_SUPPORT, + ATCMD_RESULT_DATA_NULL, + ATCMD_RESULT_CONNECTION_DISCONNECT, + ATCMD_RESULT_RIL_ERROR, +}; + +typedef struct _mdmngr_atcmd_resp { + void *priv_data; + unsigned int result; + char data[4096]; +} mdmngr_atcmd_resp_t; + +typedef struct _mdmngr_aturc_register_req { + char urc_prefix[512]; +} mdmngr_aturc_register_req_t; + +enum ATURC_TYPE_e { + ATURC_ESIMS, + ATURC_EUSIM, + ATURC_ESIMAPP, + ATURC_ECSQ, + ATURC_CREG, + ATURC_CGREG, + ATURC_CEREG, + ATURC_CIREPI, + ATURC_STKPCI, +}; + +typedef struct _mdmngr_aturc_notify { + int type; + char data[512]; +} mdmngr_aturc_notify_t; + + +enum MDMNGR_STATE_e { + MDMNGR_STATE_READY = 0, + MDMNGR_STATE_OOS, +}; + +typedef struct _mdmngr_state { + int state; +} mdmngr_state_t; + +typedef struct _rilproxy_atcmd_req { + void *priv_data; + unsigned int channel; + char *cmd; +} rilproxy_atcmd_req_t; + +typedef mdmngr_atcmd_resp_t rilproxy_atcmd_resp_t; + +typedef struct _rilproxy_ril_connect_req { + char cmd_socket_name[32]; + char urc_socket_name[32]; +} rilproxy_ril_connect_req_t; + +typedef struct _rilproxy_ril_resp { + int result; +} rilproxy_ril_resp_t; + +#endif /* __LIBMDFX_ENTITY_MDMNGR_H__ */ diff --git a/mtklibs/libmdfx/include/entity/nwmngr.h b/mtklibs/libmdfx/include/entity/nwmngr.h new file mode 100755 index 0000000000000000000000000000000000000000..c885b58d66b9fbe0764b0cc32f4976378a1c6cad --- /dev/null +++ b/mtklibs/libmdfx/include/entity/nwmngr.h @@ -0,0 +1,25 @@ +#ifndef __LIBMDFX_ENTITY_NWMNGR_H__ +#define __LIBMDFX_ENTITY_NWMNGR_H__ + +/* ------------------------------------ */ +/* Network Manager */ +/* ------------------------------------ */ + +typedef struct _nwmngr_ps_reg_state { + unsigned int cmd_result; + unsigned int n; + unsigned int state; + char lac[8]; + char ci[12]; + unsigned int Act; + char rac[4]; + unsigned int cause_type; + unsigned int reject_cause; + + unsigned int wifi_state; + + char raw_data[128]; +} nwmngr_ps_reg_state_t; + + +#endif /* __LIBMDFX_ENTITY_NWMNGR_H__ */ diff --git a/mtklibs/libmdfx/include/entity/rds/rds_if.h b/mtklibs/libmdfx/include/entity/rds/rds_if.h new file mode 100755 index 0000000000000000000000000000000000000000..d1cdea3ab817ea9c9496ca2f05e631083f46b41e --- /dev/null +++ b/mtklibs/libmdfx/include/entity/rds/rds_if.h @@ -0,0 +1,415 @@ +#ifndef __RDS_IF_H__ +#define __RDS_IF_H__ + +#define RDS_VER_MAJOR 0 +#define RDS_VER_MINOR 1 +#define RDS_VERNO ((RDS_VER_MAJOR << 16) | RDS_VER_MINOR) + +#define RDS_STR_LEN 32 +#define RDS_FQDN_LEN 128 //[20151012] actual length need to confirm with Alan-YL +#define RDS_MCC_LEN 3 +#define RDS_MNC_LEN 3 +#define RDS_UNUSED(x) ((void)(x)) + +#define RDS_MAX_HOCNT 65535 + +#define RDS_HOKEY_START_IFID0 "ril.volte.hos.interface0" +#define RDS_HOKEY_START_IFID1 "ril.volte.hos.interface1" +#define RDS_HOKEY_START_IFID2 "ril.volte.hos.interface2" +#define RDS_HOKEY_START_IFID3 "ril.volte.hos.interface3" +#define RDS_HOKEY_START_IFID4 "ril.volte.hos.interface4" +#define RDS_HOKEY_START_IFID5 "ril.volte.hos.interface5" +#define RDS_HOKEY_START_IFID6 "ril.volte.hos.interface6" +#define RDS_HOKEY_START_IFID7 "ril.volte.hos.interface7" +#define RDS_HOKEY_START_IFID8 "ril.volte.hos.interface8" +#define RDS_HOKEY_START_IFID9 "ril.volte.hos.interface9" +#define RDS_HOKEY_START_IFID10 "ril.volte.hos.interface10" +#define RDS_HOKEY_START_IFID11 "ril.volte.hos.interface11" +#define RDS_HOKEY_START_IFID12 "ril.volte.hos.interface12" +#define RDS_HOKEY_START_IFID13 "ril.volte.hos.interface13" +#define RDS_HOKEY_START_IFID14 "ril.volte.hos.interface14" +#define RDS_HOKEY_START_IFID15 "ril.volte.hos.interface15" + +#define RDS_HOKEY_END_IFID0 "ril.volte.hoe.interface0" +#define RDS_HOKEY_END_IFID1 "ril.volte.hoe.interface1" +#define RDS_HOKEY_END_IFID2 "ril.volte.hoe.interface2" +#define RDS_HOKEY_END_IFID3 "ril.volte.hoe.interface3" +#define RDS_HOKEY_END_IFID4 "ril.volte.hoe.interface4" +#define RDS_HOKEY_END_IFID5 "ril.volte.hoe.interface5" +#define RDS_HOKEY_END_IFID6 "ril.volte.hoe.interface6" +#define RDS_HOKEY_END_IFID7 "ril.volte.hoe.interface7" +#define RDS_HOKEY_END_IFID8 "ril.volte.hoe.interface8" +#define RDS_HOKEY_END_IFID9 "ril.volte.hoe.interface9" +#define RDS_HOKEY_END_IFID10 "ril.volte.hoe.interface10" +#define RDS_HOKEY_END_IFID11 "ril.volte.hoe.interface11" +#define RDS_HOKEY_END_IFID12 "ril.volte.hoe.interface12" +#define RDS_HOKEY_END_IFID13 "ril.volte.hoe.interface13" +#define RDS_HOKEY_END_IFID14 "ril.volte.hoe.interface14" +#define RDS_HOKEY_END_IFID15 "ril.volte.hoe.interface15" + + +/* =========================================== * + * General Types * + * =========================================== */ +typedef char rds_char; +/* portable wide character for unicode character set */ +typedef unsigned short rds_wchar; +/* portable 8-bit unsigned integer */ +typedef unsigned char rds_uint8; +/* portable 8-bit signed integer */ +typedef signed char rds_int8; +/* portable 16-bit unsigned integer */ +typedef unsigned short int rds_uint16; +/* portable 16-bit signed integer */ +typedef signed short int rds_int16; +/* portable 32-bit unsigned integer */ +typedef unsigned int rds_uint32; +/* portable 32-bit signed integer */ +typedef signed int rds_int32; +/* portable 64-bit unsigned integer */ +typedef unsigned long long int rds_uint64; +/* portable 64-bit signed integer */ +typedef signed long long int rds_int64; +/* boolean representation */ +typedef enum +{ + RDS_ERR_INPUT_LEN = -100, + + /* FALSE value */ + RDS_FALSE = 0, + /* TRUE value */ + RDS_TRUE = 1 +} rds_bool; + +typedef enum { + RDS_PREF_WIFI_ONLY = 0, + RDS_PREF_CELLULAR_PREF = 1, + RDS_PREF_WIFI_PREF = 2, + RDS_PREF_CELLULAR_ONLY = 3, + RDS_PREF_MAX +} rds_pref_e; + +#define RDS_TASK_ID(x) ((x)-RDS_TASK_OFFSET) + +typedef enum +{ + RDS_TASK_OFFSET = 0xF000, + RDS_TASK_EPDGS, + RDS_TASK_RILD, + RDS_TASK_IMSM, + RDS_TASK_UT, + RDS_TASK_ALL +} rds_ext_task_e; + +typedef enum{ + IMC_RAT_TYPE_NONE = 0, + IMC_RAT_TYPE_2G = IMC_RAT_TYPE_NONE, + IMC_RAT_TYPE_3G_FDD, + IMC_RAT_TYPE_3G_TDD, + IMC_RAT_TYPE_4G_FDD, + IMC_RAT_TYPE_4G_TDD, + + /* WFC */ + IMC_RAT_TYPE_802_11, + IMC_RAT_TYPE_802_11a, + IMC_RAT_TYPE_802_11b, + IMC_RAT_TYPE_802_11g, + IMC_RAT_TYPE_802_11n, + IMC_RAT_TYPE_802_11ac, + + IMC_RAT_TYPE_MAX = IMC_RAT_TYPE_802_11ac, + IMC_RAT_TYPE_UNSPEC = 0x80, +}imc_rat_type_t; + +typedef enum { + RDS_RAN_UNSPEC = 0, //[20150910] + RDS_RAN_MOBILE_3GPP = 1, + RDS_RAN_WIFI = 2, + RDS_RAN_MOBILE_3GPP2, + RDS_RAN_TYPE_MAX, + RDS_RAN_NONE = 0xFE, //DENY by PS, but can try CS + RDS_RAN_DENY = 0xFF //DENY by RDS +} ran_type_e; + +typedef enum { + RDS_HO_START = 0, + RDS_HO_STOP = 1, + RDS_HO_MAX +} ho_notify_t; + +typedef enum { + WOS_IMSCALL_NONE = 0, //reserve type to skip 0 + WOS_IR92_VOCALL = 1, + WOS_IR94_VICALL = 2, + WOS_CALL_CNT, +} wos_call_t; + +/***************************** +* [20151016]:TMO IKEV2 Err Retry +* need Po-Chun's help on fill in the actual err code enum*/ +typedef enum { + EA_ATCH_ERR_NONE = 0, + EA_ATCH_ERR_VZ = 0xFFF10000, + EA_ATCH_ERR_WW = 0xFFF20000, + EA_ATCH_ERR_TMO = 0xFFF30000, + ERROR_NOTIFY_BASE = 100000, + UNSUPPORTED_CRITICAL_PAYLOAD = ERROR_NOTIFY_BASE + 1, + INVALID_MAJOR_VERSION = ERROR_NOTIFY_BASE + 5, + INVALID_MESSAGE_ID = ERROR_NOTIFY_BASE + 7, + NO_PROPOSAL_CHOSEN = ERROR_NOTIFY_BASE + 14, + INVALID_KE_PAYLOAD = ERROR_NOTIFY_BASE + 17, + AUTHENTICATION_FAILED = ERROR_NOTIFY_BASE + 24, + SINGLE_PAIR_REQUIRED = ERROR_NOTIFY_BASE + 34, + NO_ADDITIONAL_SAS = ERROR_NOTIFY_BASE + 35, + INTERNAL_ADDRESS_FAILURE = ERROR_NOTIFY_BASE + 36, + FAILED_CP_REQUIRED = ERROR_NOTIFY_BASE + 37, + TS_UNACCEPTABLE = ERROR_NOTIFY_BASE + 38, + NO_SUBSCRIPTION = ERROR_NOTIFY_BASE + 9000, + NETWORK_TOO_BUSY = ERROR_NOTIFY_BASE + 10000, + NETWORK_FAILURE = ERROR_NOTIFY_BASE + 10500, + ROAMING_NOR_ALLOWED = ERROR_NOTIFY_BASE + 11000, + RAT_DISALLOWED = ERROR_NOTIFY_BASE + 11001, + EA_TMO_NETWORK_FAILURE, + EA_TMO_NETWORK_TOO_BUSY, + EA_TMO_RAT_DISALLOWED, + EA_TMO_ROAMING_NOR_ALLOWED, + EA_ATCH_ERR_CNT, +} ea_atch_err; +/*****************************/ + +typedef enum { + RDS_WFCA_CMDRSV = 0, //reserve + RDS_WFCA_CFGEN, //configuration + RDS_WFCA_QUERY, //query statistics +} rds_wfca_cmd_e; + +typedef enum { + WFCA_STAT_RSV = 0, //reserve + WFCA_STAT_UPDATE, //following contains valid update info + WFCA_STAT_NOUPDATE, //No update from LTECSR(under threshould) + WFCA_STAT_UNINIT = 255, //WFCA statistics hasn¡¦t been correctly cfg by RDS +} wfca_state_e; + +typedef enum { + RDS_RTPIF_IMS, + RDS_RTPIF_EMG, + RDS_RTPIF_CNT, +} wfca_rtpif_e; + +typedef enum { + RDS_RAT_UNKNOWN = 0, + RDS_RAT_GPRS = 1, + RDS_RAT_EDGE = 2, + RDS_RAT_UMTS = 3, + RDS_RAT_HSDPA = 9, + RDS_RAT_HSUPA = 10, + RDS_RAT_HSPA = 11, + RDS_RAT_LTE = 14 +} rds_rat_e; + +typedef enum { + RDS_MD1 = 0, + RDS_MD2 = 1, + RDS_MD3 = 2, + RDS_MD_CNT, +} rds_md_e; + +typedef struct _rds_ru_set_mdstat_req_t{ + rds_uint8 md_idx; // 0:MD1 1:MD2 2:MD3 + rds_uint8 sim_idx; // for futhur flexibility + rds_uint8 fgisroaming; // RDS_TRUE, RDS_FALSE + rds_uint8 md_rat; // rds_rat_e + rds_uint8 srv_state; //service state +} rds_ru_set_mdstat_req_t; + +typedef MAL_Data_Call_Response_v11 MAL_Data_Call_RdsRsp_v11; + +typedef struct _rds_event_t{ + rds_uint32 u4snd_id; + void *pvsnd_data; + size_t u4snd_data_len; + rds_uint32 u4rcv_id; + void *pvrcv_data; + size_t u4rcv_data_len; +}rds_event_t; + +typedef struct _rds_ru_set_uiparam_req_t{ + rds_uint8 fgimsolte_en; // ims over lte enable + rds_uint8 fgwfc_en; // wfc enable + rds_char omacp_fqdn[RDS_FQDN_LEN]; + rds_uint8 fgwifiui_en; // ui wifi botton + rds_uint8 rdspolicy; // preference mode + rds_uint8 fgdata_roaming_ui_en; //data roaming ui enable +} rds_ru_set_uiparam_req_t; + +typedef struct _rds_ru_set_wifistat_req_t{ + rds_uint8 fgwifi_en; + rds_char szwifi_ifname[RDS_STR_LEN]; + rds_char szwifi_ipv4addr[2*RDS_STR_LEN]; + rds_char szwifi_ipv6addr[2*RDS_STR_LEN]; + rds_char szwifi_macaddr[2*RDS_STR_LEN]; +} rds_ru_set_wifistat_req_t; + +typedef struct _rds_ru_sst_update_req_t{ + // prevent ping-pong between two RAN, + // rds took high low threshold to determine the H.O. time + // The rds considers rovein RAN when signal strengh + // over high threshold and roveout below low threshold + rds_int32 i4wifirssih; // wifi rssi threshold high + rds_int32 i4wifirssil; // wifi rssi threshold low + rds_int32 i4ltersrph; // lte rsrp threshold high + rds_int32 i4ltersrpl; // lte rsrp threshold low +} rds_ru_sst_update_req_t; + +typedef struct _rds_ho_status_t{ + /* please Alan help to provide */ + rds_uint8 ucho_status; // 0: start_ho 1: stop_ho + rds_uint8 fgho_result; // 0: fail(RDS_FALSE) 1: success(RDS_TRUE) + rds_uint8 interfaceID; // (RILD_Req -1, aka real) /*[20150924]: ifid btween MAL/rild => keep TRUE ifid*/ + rds_uint8 esource_ran_type; //ran_type_e + rds_uint8 etarget_ran_type; //ran_type_e +} rds_ho_status_t; + +typedef struct _rds_reg_req_t{ + rds_uint32 u4rds_task_id; //RDS_TASK_ID() +}rds_reg_req_t; + +typedef struct _rds_rb_get_demand_req_t{ + rds_uint32 u4pdn_id; +} rds_rb_get_demand_req_t; + +typedef struct _rds_rb_get_ran_type_rsp_t{ + rds_int32 i4rds_ret; // RDS_TRUE / RDS_FALSE + rds_uint32 u4ran_type; //ran_type_e +} rds_rb_get_ran_type_rsp_t; + +typedef struct _rds_rb_get_last_err_rsp_t{ + rds_int32 i4rds_ret; // RDS_TRUE / RDS_FALSE + rds_int32 i4lasterr; + rds_int32 i4lastsuberr; +} rds_rb_get_last_err_rsp_t; + +typedef struct _rds_err_rsp_t{ + /* rds will reply i4rds_ret if input size is wrong for send and recv */ + rds_int32 i4rds_ret; // RDS_TRUE / RDS_FALSE +} rds_err_rsp_t; + +typedef dm_req_setup_data_call_t rds_sdc_req_t; +typedef dm_resp_setup_data_call_t rds_sdc_cnf_t; + +typedef struct { + rds_int32 ril_status; + MAL_Data_Call_Response_v11 ind; +} rds_sdc_ind_t; + +typedef dm_req_t rds_ddc_req_t; + +typedef struct { + rds_int32 status; + rds_uint8 eran_type; +} rds_ddc_cnf_t; + +typedef struct { + rds_int32 ril_status; + rds_int32 cid; //InterfaceID (RILD_Req-1, aka real) /*[20150924]: ifid btween MAL/rild => keep TRUE ifid*/ +} rds_ddc_ind_t; + +typedef struct _rds_rvout_alert_t{ + rds_bool rvalert_en; //is near rvout threshold + rds_int32 i4wifirssi; //current wifi rssi +} rds_rvout_alert_t; + +typedef struct _rds_wifi_pdnact_t{ + rds_int32 ifid; //currently will always be IMS ifid = 4 + rds_bool pdn_rdy; //RDS_TRUE: ready +} rds_wifi_pdnact_t; + +typedef int (*rds_ho_status_ind_fn)(rds_ho_status_t *prstatus); +typedef int (*rds_rvout_alert_ind_fn)(rds_rvout_alert_t *pralert); +typedef int (*rds_wifi_pdnact_ind_fn)(rds_wifi_pdnact_t *pralert); +typedef struct _rds_notify_funp_t{ + rds_ho_status_ind_fn pfrds_ho_status_ind; + rds_rvout_alert_ind_fn pfrds_rvout_alert_ind; + rds_wifi_pdnact_ind_fn pfrds_wifi_pdnact_ind; +} rds_notify_funp_t; + +typedef rds_sdc_req_t rr_sdc_req_t; +typedef rds_sdc_cnf_t rr_sdc_cnf_t; +typedef rds_ddc_cnf_t rr_ddc_cnf_t; +typedef rds_ddc_req_t rr_ddc_req_t; + +typedef struct _wfca_callinfo_t { + int version; + int state; //wfca_state_e + int id; + int loss_rate; + int thrpt; //throughput* +} wfca_callinfo_t; + +typedef struct _rds_wfca_cfg_t{ + int version; + int id; + int threshold; + int duration; +} rds_wfca_cfg_t; + +typedef struct _rds_wfca_req_t{ + int cmd; //rds_wfca_cmd_e + rds_wfca_cfg_t cfg; +} rds_wfca_req_t; + +/* test mode purpose */ +typedef enum { + SDC_IND_SUCC = 0, + SDC_IND_FAIL, + PDN_NW_DDC, + PDN_INFO_DUMP, + UT_CFG_WONLY, + UT_CFG_WPREF, + UT_CFG_MONLY, + UT_CFG_MPREF, + UT_SKIP_1stIMS = 254, + ENABLE_ENTITY_UT = 255, +} ut_cmd_t; + +typedef struct _rds_ut_cmd_t{ + rds_uint32 evnt_id; + rds_uint32 cmd; + rds_uint32 ril_ifid; + rds_char iipv6[16]; //for SDC IND UT +} rds_ut_cmd_t; + +typedef struct _rds_ru_set_callstat_req_t{ + rds_bool in_call; + wos_call_t call_type; +} rds_ru_set_callstat_req_t; + +typedef struct _ru_nm_cgreg_mode_req_t{ + rds_uint8 uccgreg_mode; +} ru_nm_cgreg_mode_req_t; + +typedef struct _ru_nm_cgreg_mode_cnf_t{ + unsigned int result; + char data[4096]; +} ru_nm_cgreg_mode_cnf_t; + +/* =========================================== * + * Public APIs * + * =========================================== */ +extern rds_int32 rds_get_verno(void); +extern rds_int32 rds_set_ui_param(rds_ru_set_uiparam_req_t *req, conn_ptr_t conn_ptr); +extern rds_int32 rds_set_wifistat(rds_ru_set_wifistat_req_t *req, conn_ptr_t conn_ptr); +extern rds_int32 rds_set_callstat(rds_ru_set_callstat_req_t *req, conn_ptr_t conn_ptr); +extern rds_int32 rds_set_mdstat(rds_ru_set_mdstat_req_t *req, conn_ptr_t conn_ptr); +extern conn_ptr_t epdgs_rds_conn_init(rds_notify_funp_t *callback_fn); +extern rds_int32 epdgs_rds_conn_exit(conn_ptr_t conn_ptr); +extern conn_ptr_t rild_rds_conn_init(rds_notify_funp_t *callback_fn); +extern rds_int32 rild_rds_conn_exit(conn_ptr_t conn_ptr); +extern rds_int32 rds_get_ran_type(rds_rb_get_demand_req_t *req, rds_rb_get_ran_type_rsp_t *rsp, conn_ptr_t conn_ptr); +extern rds_int32 rds_get_last_err(rds_rb_get_demand_req_t *req, rds_rb_get_last_err_rsp_t *rsp, conn_ptr_t conn_ptr); +extern rds_int32 rds_urc_ut_req(rds_rb_get_demand_req_t *req, conn_ptr_t conn_ptr); // UT ONLY +extern rds_int32 epdgs_rds_error_test(conn_ptr_t conn_ptr); //UT ONLY +extern rds_int32 rild_rds_sdc_req(dm_req_setup_data_call_t *req, dm_resp_setup_data_call_t *cnf); +extern rds_int32 rild_rds_ddc_req(dm_req_t *req, rr_ddc_cnf_t *cnf); +extern rds_int32 rild_rds_utcmd_req(rds_ut_cmd_t *req); +#endif diff --git a/mtklibs/libmdfx/include/entity/rds/rds_internal_comm.h b/mtklibs/libmdfx/include/entity/rds/rds_internal_comm.h new file mode 100755 index 0000000000000000000000000000000000000000..4d7d442df93bd2bb768e215ff46780ab17dea751 --- /dev/null +++ b/mtklibs/libmdfx/include/entity/rds/rds_internal_comm.h @@ -0,0 +1,102 @@ +#ifndef __RDS_INTERNAL_COMM_H__ +#define __RDS_INTERNAL_COMM_H__ + +#include "rds_if.h" +#include "mdfx.h" + +#define RDS_EA_IMSIF (4) //REAL +#define RDS_EA_IMSEMGIF (5) //REAL +#define RDS_EA_CNFSUCC (0) +#define RDS_EA_CNFSUCC (0) +#define RDS_HO_WLSTCNT (8) + +typedef struct _ho_apn_t{ + rds_char ho_apn[RDS_STR_LEN]; + rds_int8 ea_state; +} ho_apn_t; + +typedef struct _rds_ho_wlist_t{ + rds_int8 list_cnt; + ho_apn_t i4ho_apn[RDS_HO_WLSTCNT]; +} rds_ho_wlist_t; + +typedef enum _rds_wo_action_t +{ + RDS_WO_ACTION_ATTACH, + RDS_WO_ACTION_HOL2W, + RDS_WO_ACTION_DETACH, + RDS_WO_ACTION_CNT +} rds_wo_action_t; + +typedef enum { + RDS_FQDN_OMACP, + RDS_FQDN_NW, + RDS_FQDN_SIM, + RDS_FQDN_CNT, +} rds_fqdn_e; + +typedef struct _rds_fqdni4_t{ + rds_fqdn_e fqdn_type; + rds_char fqdn_name[RDS_FQDN_LEN]; +} rds_fqdni4_t; + +typedef MAL_Setup_Data_Call_Struct rds_setup_data_call_req_t; +typedef MAL_Data_Call_RdsRsp_v11 ea_attach_cnf_t; + +typedef struct _rds_comm_req_t{ + rds_int32 id; + rds_int32 cause; +} rds_comm_req_t; + +typedef struct _rds_comm_rsp_t{ + rds_int32 ril_status; +} rds_comm_rsp_t; + +typedef struct _rds_setup_data_call_rsp_t{ + rds_int32 ril_status; + MAL_Data_Call_Response_v11 resp; +} rds_setup_data_call_rsp_t; + +typedef rds_comm_req_t rds_deact_data_call_req_t; +typedef rds_comm_rsp_t rds_deact_data_call_rsp_t; + +typedef struct _ea_detach_req_t{ + rds_uint8 ewod_action; //WO_ACTION_DETACH + rds_char szapn[STRING_SIZE]; +}ea_detach_req_t; + +typedef struct _ea_detach_cnf_t { + rds_int32 i4ret; + rds_char szapn[RDS_STR_LEN]; +}ea_detach_cnf_t; + +typedef ea_attach_cnf_t ea_hol2w_cnf_t; + +typedef struct _ea_disconn_ind_t{ + rds_char szapn[RDS_STR_LEN]; +}ea_disconn_ind_t; + +typedef struct _ea_fqdn_t{ + rds_uint8 i4fqdn_cnt; + rds_fqdni4_t i4fqdn_list[RDS_FQDN_CNT]; +} ea_fqdn_t; + +typedef struct _ea_attach_req_t{ + rds_wo_action_t ewod_action; + ip_type_t eprotocol; + rds_int32 u4mIsValid; + rds_int32 u4interfaceId; + rds_int32 u4emergency_ind; + rds_char ipv6iid[16]; + rds_char szapn[STRING_SIZE]; + rds_char szwifi_ifname[RDS_STR_LEN]; + rds_char szwifi_ipv4addr[2*RDS_STR_LEN]; + rds_char szwifi_ipv6addr[2*RDS_STR_LEN]; + rds_char szwifi_macaddr[2*RDS_STR_LEN]; + rds_uint32 attach_to; //Attach timeout(sec) + ea_fqdn_t eafqdn_info; +}ea_attach_req_t; + +typedef ea_attach_req_t ea_hol2w_req_t; + +#endif diff --git a/mtklibs/libmdfx/include/entity/simmngr/simmngr_api.h b/mtklibs/libmdfx/include/entity/simmngr/simmngr_api.h new file mode 100755 index 0000000000000000000000000000000000000000..ff1db165e340047dd60447c04b256f668c112da0 --- /dev/null +++ b/mtklibs/libmdfx/include/entity/simmngr/simmngr_api.h @@ -0,0 +1,10 @@ +#ifndef SIMMNGR_API_H +#define SIMMNGR_API_H +#include "mdfx.h" + +extern int sm_aka_verify(int rand_len, void *rand, int autn_len, void *autn, void *response, int *response_len); +extern int sm_query_mnc_mcc(void *mnc, int *mnc_len, void *mcc, int *mcc_len); +extern int sm_query_imsi(void *imsi, int *imsi_len); +extern int sm_query_imei(void *imei, int *imei_len); + +#endif \ No newline at end of file diff --git a/mtklibs/libmdfx/include/entity/simmngr/simmngr_def.h b/mtklibs/libmdfx/include/entity/simmngr/simmngr_def.h new file mode 100755 index 0000000000000000000000000000000000000000..bfffbdd6ba127b0e46ca0aaacaf59ad183410b8c --- /dev/null +++ b/mtklibs/libmdfx/include/entity/simmngr/simmngr_def.h @@ -0,0 +1,63 @@ +#ifndef SIMMNGR_DEF_H +#define SIMMNGR_DEF_H + +#include "mdfx.h" + +#define IGNORE_CHAR(s,c) {while ((*(s)) == (c) && *(s)) (s)++;} +#define FIND_CHAR(s,c) {while ((*(s)) != (c) && *(s)) (s)++;} + +// request +typedef enum _sim_query_request_{ + USIM_QUERY_IMSI = 0, + USIM_QUERY_MNC_LEN, + USIM_QUERY_PSISMSC, + USIM_QUERY_SMSP, + ISIM_QUERY_IMPI, + ISIM_QUERY_PSISMSC, + ISIM_QUERY_IMPU, + ISIM_QUERY_DOMAIN, + ISIM_QUERY_SERVICE_TABLE, + ISIM_QUERY_PCSCF, + SIM_QUERY_IMEI, +} sim_query_request_e; + + +// sim type +#define TYPE_USIM 0 +#define TYPE_ISIM 1 + +typedef enum _sim_state_{ + SIM_STATE_NOTIFY_NOT_READY = 0, + SIM_STATE_NOTIFY_READY = 1, + SIM_STATE_NOTIFY_REFRESH = 2, +} sim_notify_state_e; + +typedef enum _sim_insert_state_{ + SIM_INSERT_PLUG_OUT = 0, + SIM_INSERT_PLUG_IN, + SIM_INSERT_ABNORMAL, +} sim_insert_state_e; + +typedef enum _sim_check_state_{ + SIM_CHECK_OK = 0, + SIM_CHECK_FAIL, + SIM_CHECK_INIT, + SIM_CHECK_RETRY, + SIM_CHECK_NOT_INSERT, +} sim_check_state_e; + +typedef enum _sim_stk_cmd_type_{ + CMD_TYPE_INVALID = 0, + CMD_TYPE_REFRESH, +} sim_stk_cmd_type_e; + +typedef enum _sim_refresh_cmd_{ + CMD_SIM_INIT_FULL_FILE_CHANGE = 0,// SIM Initialization and Full File Change Notification + CMD_SIM_FILE_UPDATE,// A file on SIM has been updated + CMD_SIM_INIT_FILE_CHANGE,// SIM Initialization and File Change Notification + CMD_SIM_INIT,// SIM initialized, All files should be re-read + CMD_SIM_RESET,// SIM reset. SIM power required, SIM may be locked and all files should be re-read +} sim_refresh_cmd_e; + +#endif + diff --git a/mtklibs/libmdfx/include/entity/simmngr/simmngr_struct.h b/mtklibs/libmdfx/include/entity/simmngr/simmngr_struct.h new file mode 100755 index 0000000000000000000000000000000000000000..935f72649a7f999e65d6be645d5dd8e717909417 --- /dev/null +++ b/mtklibs/libmdfx/include/entity/simmngr/simmngr_struct.h @@ -0,0 +1,142 @@ +#ifndef SIMMNGR_STRUCT_H +#define SIMMNGR_STRUCT_H + +#include "mdfx.h" + +typedef struct _sim_req_info_ { + int sim_id;// for select sim, phone : from imsa, dongle : only 1? + int sim_type;// 0 : usim, 1 : isim + int request; + int ch_id;// isim only + int next_handle;// need next cmd handle + int rec_num;// store rec num for linear fixed + int rec_idx;// store rec idx for linear fixed + int rec_size;// store rec size for linear fixed +} sim_req_info_t; + +typedef struct _sim_aka_info_ { + int sim_id;// for select sim, phone : from imsa, dongle : only 1? + int sim_type;// 0 : usim, 1 : isim + int ch_id;// isim only + int rand_len; + char rand[32]; + int autn_len; + char autn[32]; +} sim_aka_info_t; + +typedef struct _sim_aka_result_ { + int result; + int response_len; + char response[256]; +} sim_aka_result_t; + +typedef struct _sim_type_info_ { + int result; + int sim_type;// 0 : usim, 1 : isim + int ch_id;// isim only +} sim_type_info_t; + +typedef struct _sim_imsi_result_ { + int result; + int imsi_len; + char imsi[16]; +} sim_imsi_result_t; + +typedef struct _sim_mnc_len_result_ { + int result; + int mnc_len; +} sim_mnc_len_result_t; + +typedef struct _sim_psismsc_result_ { + int result; + int psismsc_len; + unsigned char psismsc[256]; +} sim_psismsc_result_t; + +typedef struct _sim_impu_result_ { + int result; + int impu_num; + int impu_len[5]; + unsigned char impu[5][256]; +} sim_impu_result_t; + +typedef struct _sim_smsp_result_ { + int result; + int smsp_len; + unsigned char smsp[64]; +} sim_smsp_result_t; + +typedef struct _sim_impi_result_ { + int result; + int impi_len; + unsigned char impi[256]; +} sim_impi_result_t; + +typedef struct _sim_domain_result_ { + int result; + int domain_len; + unsigned char domain[256]; +} sim_domain_result_t; + +typedef struct _sim_service_table_result_ { + int result; + int service_table_len; + unsigned char service_table[256]; +} sim_service_table_result_t; + +typedef struct _sim_pcscf_result_ { + int result; + int pcscf_num; + int pcscf_len[20];// V4 + V6 + unsigned char pcscf[20][128];// V4 + V6 +} sim_pcscf_result_t; + +typedef struct _sim_state_result_ { + int result; + int state; +} sim_state_result_t; + +typedef struct _sim_data_notify { + unsigned int sim_id; + unsigned int data; +} sim_data_notify_t; + +typedef struct { + char name[32]; +} sim_user_checkin_info_t; + +typedef struct _sim_insert_check { + unsigned int sim_id; + unsigned int insert_flag; +} sim_insert_check_t; + +typedef struct { + int result; + int error_code; +} sim_ims_func_result_t; + +typedef struct _sim_imei_result_ { + int result; + int imei_len; + char imei[16]; +} sim_imei_result_t; + +typedef struct _sim_stk_notify_ { + unsigned int sim_id; + int result;// 0: fail, 1: start, 2: end + int cmd_type; + int cmd_qualifier; + unsigned char aid[32];// string + unsigned int efid_num;// max 256 + unsigned int efid[256];// hex +} sim_stk_notify_t; + +typedef struct _sim_state_notify_reg_req_ { + int is_reg;// 0 : de-reg, 1 : reg + int is_external;// 0 : internal, 1 : external + int reg_task_id; + int reg_event_id; +} sim_state_notify_reg_req_t; + +#endif + diff --git a/mtklibs/libmdfx/include/event.h b/mtklibs/libmdfx/include/event.h new file mode 100755 index 0000000000000000000000000000000000000000..d5f33cc7e70983721a96c9e021222875987cf21f --- /dev/null +++ b/mtklibs/libmdfx/include/event.h @@ -0,0 +1,133 @@ +/* + Here is an interface for events to hide implementation. + An event is identified by unique source address and a per-source sequence number. + The hop-by-hop forwarding path sbould be traced. + On the other hand, an event carries an ID and arbitrary user data. + The TLV data format may be used to various number of arguments in a single event. + + MAL events are required to use mailboxes inside MAL and channels outside MAL. + Therefore, the addressing information would be recorded for both of them, respectively. + For data and event_addr, a setting operation duplicates a copy while a getting operation retrieve a pointer to the one in the event. + Moreover, MAL limits the header files which can be modified by users, so that the exact event-ID definitions are specified in "sys_info.h". +*/ + +#ifndef __EVENT_H__ +#define __EVENT_H__ + +#include "sys_info.h" +#include "compiler.h" +#include "io/mailbox.h" +#include "io/chnl.h" +#include "ctnr/chain.h" +#include +#include +#include // NEED_TO_BE_NOTICED, temporarily methods to monitor memory usage + +// Compiler flags, NEED_TO_BE NOTICED, set by compiler +#define MAL_SUPPORT + +// Type definitions +typedef struct event event_t; +typedef struct event* event_ptr_t; +typedef struct event** event_ptr2_t; +typedef struct event_addr event_addr_t; +typedef struct event_addr* event_addr_ptr_t; +typedef struct event_addr** event_addr_ptr2_t; +typedef int event_seq_t; +typedef enum event_id event_id_t; +typedef void (*event_hook_fp_t) (event_addr_ptr_t addr_ptr, va_list vl); +typedef enum event_addr_ext_type {EVENT_ADDR_EXT_TYPE_NONE, EVENT_ADDR_EXT_TYPE_CHNL, EVENT_ADDR_EXT_TYPE_MAILBOX} event_addr_ext_type_t; + +// Macros +#define EVENT_DATA_INIT_SIZE (sizeof(int)) // NEED_TO_BE_NOTICED, we assume that an integer is the most common data to be stored +#define EVENT_INVALID_SEQ (0) +#ifdef MAL_SUPPORT +// => MAL +#define EVENT_UNSOLICITED (-1) +#endif +#define EVENT_USAGE_THRESHOLD (1 << 20) // NEED_TO_BE_NOTICED, temporarily methods to monitor memory usage + +// Implementation +// => Internal data type for the event +struct event_addr +{ + // General variables + event_seq_t seq; + // Individual variables which must be private +#ifdef MAL_SUPPORT + // MAL + // => Inside-MAL address + mailbox_addr_t src_addr; + mailbox_addr_t dst_addr; + // => Outside-MAL address + event_addr_ext_type_t ext_type; + chnl_t ext_chnl; + mailbox_t ext_mailbox; + event_seq_t ext_seq; +#endif +}; + +// => Abstract Data Type +struct event +{ + // General variables + // => Public + event_id_t id; + void *data; + size_t data_len; + size_t data_size; + // => Private + chain_t addr_track; +// chain_t scatter_list; // NEED_TO_BE_NOTICED, to do + // Individual variables which must be private +#ifdef __EVENT_USAGE_MONITOR__ + pid_t tid; // NEED_TO_BE_NOTICED, temporarily methods to monitor memory usage +#endif + +#ifdef MAL_SUPPORT + // N/A +#endif +}; + +// => Functions +extern event_ptr_t event_init (event_ptr_t event_ptr); +extern event_ptr_t event_exit (event_ptr_t event_ptr); +// => => Event ID +extern event_id_t event_set_id (event_ptr_t event_ptr, event_id_t id); +extern event_id_t event_get_id (event_ptr_t event_ptr); +// => => Event data +extern void* event_set_data (event_ptr_t event_ptr, const void *data, size_t data_len); +extern void* event_get_data (event_ptr_t event_ptr, size_t *data_len_ptr); +extern size_t event_set_data_len (event_ptr_t event_ptr, size_t data_len); // NEED_TO_BE_NOTICED, a dangerous operation, be careful +extern size_t event_get_data_len (event_ptr_t event_ptr); // NEED_TO_BE_NOTICED, a dangerous operation, be careful +extern size_t event_set_data_size (event_ptr_t event_ptr, size_t data_size); // NEED_TO_BE_NOTICED, a dangerous operation, be careful +extern size_t event_get_data_size (event_ptr_t event_ptr); // NEED_TO_BE_NOTICED, a dangerous operation, be careful +// => => Event address +extern event_addr_ptr_t event_set_addr (event_ptr_t event_ptr, event_addr_ptr_t addr_ptr); +extern int event_reset_addr (event_ptr_t event_ptr); +extern event_addr_ptr_t event_get_first_addr (event_ptr_t event_ptr); +extern event_addr_ptr_t event_get_last_addr (event_ptr_t event_ptr); +extern int event_reset_last_addr (event_ptr_t event_ptr); +extern int event_iterate_addr_track (event_ptr_t event_ptr, event_hook_fp_t hook_fp, ...); +// => => => Address operations +extern event_seq_t event_addr_set_seq (event_addr_ptr_t addr_ptr, event_seq_t seq); +extern event_seq_t event_addr_get_seq (event_addr_ptr_t addr_ptr); + +#ifdef MAL_SUPPORT +// => => MAL-specific +// => => => Address operations, NEEDTO_BE_NOTICED, certain functions will be implemented on demand +extern mailbox_addr_ptr_t event_addr_set_src_addr (event_addr_ptr_t addr_ptr, const mailbox_addr_ptr_t src_addr_ptr); +extern mailbox_addr_ptr_t event_addr_get_src_addr (event_addr_ptr_t addr_ptr); +extern mailbox_addr_ptr_t event_addr_set_dst_addr (event_addr_ptr_t addr_ptr, const mailbox_addr_ptr_t dst_addr_ptr); +extern mailbox_addr_ptr_t event_addr_get_dst_addr (event_addr_ptr_t addr_ptr); +extern event_addr_ext_type_t event_addr_get_ext_type (event_addr_ptr_t addr_ptr); +extern chnl_ptr_t event_addr_set_ext_chnl (event_addr_ptr_t addr_ptr, const chnl_ptr_t ext_chnl_ptr); +extern chnl_ptr_t event_addr_get_ext_chnl (event_addr_ptr_t addr_ptr); +extern mailbox_ptr_t event_addr_set_ext_mailbox (event_addr_ptr_t addr_ptr, const mailbox_ptr_t ext_mailbox_ptr); +extern mailbox_ptr_t event_addr_get_ext_mailbox (event_addr_ptr_t addr_ptr); +extern event_seq_t event_addr_set_ext_seq (event_addr_ptr_t addr_ptr, event_seq_t seq); +extern event_seq_t event_addr_get_ext_seq (event_addr_ptr_t addr_ptr); +extern event_addr_ptr_t event_addr_cpy (event_addr_ptr_t dst_addr_ptr, const event_addr_ptr_t src_addr_ptr); +#endif + +#endif diff --git a/mtklibs/libmdfx/include/io/chnl.h b/mtklibs/libmdfx/include/io/chnl.h new file mode 100755 index 0000000000000000000000000000000000000000..a098e14a92c6e9d5a68304a13623ae79db0c6e1e --- /dev/null +++ b/mtklibs/libmdfx/include/io/chnl.h @@ -0,0 +1,178 @@ +/* + Here is an interface of channel to hide platform-dependent libraries. + A thread channel deals with the communication between two entities running on different threads of the same process. + A Unix Domain Socket (UDS) channel deals with the communication between two entities running on the same machine through the socket interface. +*/ + +#ifndef __IO_CHNL_H__ +#define __IO_CHNL_H__ + +#include "sys_info.h" +#include "compiler.h" +#include "ctnr/queue.h" +#include "thrd/thrd_lock.h" +#include +#include +#ifdef __LINUX_PLAT__ +#include +#endif + +// Compiler flags, NEED_TO_BE_NOTICED, set by the compiler +// => Thread channel +// N/A +#ifdef __LINUX_PLAT__ +// => UDS channel +// N/A +#endif + +// Type definitions +typedef struct chnl chnl_t; +typedef struct chnl* chnl_ptr_t; +typedef struct chnl** chnl_ptr2_t; +typedef struct chnl_init_arg chnl_init_arg_t; +typedef struct chnl_init_arg* chnl_init_arg_ptr_t; +typedef struct chnl_addr chnl_addr_t; +typedef struct chnl_addr* chnl_addr_ptr_t; +typedef struct chnl_addr** chnl_addr_ptr2_t; +// => Thread channel +// N/A +#ifdef __LINUX_PLAT__ +// => Unix domian socket channel +typedef enum uds_chnl_mode {uds_chnl_mode_fail, uds_chnl_mode_cli, uds_chnl_mode_srv, uds_chnl_mode_reuse} uds_chnl_mode_t; +#endif + +// Macros +// => Thread channel +// N/A +#ifdef __LINUX_PLAT__ +// => Unix domian socket channel +#define UDS_CHNL_LISTEN_BACKLOG (8) +#define UDS_CHNL_PATH_LEN (32) +#endif + +// Functions +#define chnl_init(chnl_ptr, arg_ptr) (unlikely((chnl_ptr) == NULL || (chnl_ptr)->init_fp == NULL) ? NULL : (chnl_ptr)->init_fp((chnl_ptr), (arg_ptr))) +#define chnl_exit(chnl_ptr) (unlikely((chnl_ptr) == NULL || (chnl_ptr)->exit_fp == NULL) ? NULL : (chnl_ptr)->exit_fp((chnl_ptr))) +#define chnl_input(chnl_ptr, data, data_len) (unlikely((chnl_ptr) == NULL || (chnl_ptr)->input_fp == NULL) ? SYS_FAIL : (chnl_ptr)->input_fp((chnl_ptr), (data), (data_len))) +#define chnl_output(chnl_ptr, data, data_len) (unlikely((chnl_ptr) == NULL || (chnl_ptr)->output_fp == NULL) ? 0 : (chnl_ptr)->output_fp((chnl_ptr), (data), (data_len))) +#define chnl_is_empty(chnl_ptr) (unlikely((chnl_ptr) == NULL || (chnl_ptr)->is_empty_fp == NULL) ? true : (chnl_ptr)->is_empty_fp((chnl_ptr))) + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the chnl_ptr were given as a value, a compile-time error would be given +// => Default channel: thread channel +#define default_chnl_employ(chnl_ptr) thrd_chnl_employ(chnl_ptr) +#define default_chnl_dismiss(chnl_ptr) thrd_chnl_dismiss(chnl_ptr) +// => Thread channel +#define thrd_chnl_employ(chnl_ptr) (unlikely((chnl_ptr) == NULL) ? NULL : \ + (((chnl_ptr)->init_fp = thrd_chnl_init), \ + ((chnl_ptr)->exit_fp = thrd_chnl_exit), \ + ((chnl_ptr)->input_fp = thrd_chnl_input), \ + ((chnl_ptr)->output_fp = thrd_chnl_output), \ + ((chnl_ptr)->is_empty_fp = thrd_chnl_is_empty), \ + (chnl_ptr))) +#define thrd_chnl_dismiss(chnl_ptr) (unlikely((chnl_ptr) == NULL) ? NULL : \ + (((chnl_ptr)->init_fp = NULL), \ + ((chnl_ptr)->exit_fp = NULL), \ + ((chnl_ptr)->input_fp = NULL), \ + ((chnl_ptr)->output_fp = NULL), \ + ((chnl_ptr)->is_empty_fp = NULL), \ + (chnl_ptr))) +#ifdef __LINUX_PLAT__ +// => Unix domian socket channel +#define uds_chnl_employ(chnl_ptr) (unlikely((chnl_ptr) == NULL) ? NULL : \ + (((chnl_ptr)->init_fp = uds_chnl_init), \ + ((chnl_ptr)->exit_fp = uds_chnl_exit), \ + ((chnl_ptr)->input_fp = uds_chnl_input), \ + ((chnl_ptr)->output_fp = uds_chnl_output), \ + ((chnl_ptr)->is_empty_fp = uds_chnl_is_empty), \ + (chnl_ptr))) +#define uds_chnl_dismiss(chnl_ptr) (unlikely((chnl_ptr) == NULL) ? NULL : \ + (((chnl_ptr)->init_fp = NULL), \ + ((chnl_ptr)->exit_fp = NULL), \ + ((chnl_ptr)->input_fp = NULL), \ + ((chnl_ptr)->output_fp = NULL), \ + ((chnl_ptr)->is_empty_fp = NULL), \ + (chnl_ptr))) +#endif + +// Implementation +// => initialization arguments for channel +struct chnl_init_arg +{ + // General variables + // N/A + // Individual variables which must be private + union + { + // Thread channel + struct + { + queue_init_arg_t rx_queue_init_arg; + queue_ptr_t tx_queue_ptr; + thrd_lock_ptr_t tx_queue_lock_ptr; + }thrd; + +#ifdef __LINUX_PLAT__ + // Unix domian socket channel + struct + { + uds_chnl_mode_t mode; + char *path; // not for uds_chnl_mode_reuse + chnl_ptr_t chnl_ptr; // only for uds_chnl_mode_reuse + }uds; +#endif + }idv; +}; + +// => Abstract data type +struct chnl +{ + // General variables + // => Public + chnl_ptr_t (*init_fp) (chnl_ptr_t chnl_ptr, const chnl_init_arg_ptr_t arg_ptr); + chnl_ptr_t (*exit_fp) (chnl_ptr_t chnl_ptr); + int (*input_fp) (chnl_ptr_t chnl_ptr, const void *data, size_t data_len); + size_t (*output_fp) (chnl_ptr_t chnl_ptr, void *data, size_t data_size); + bool (*is_empty_fp) (chnl_ptr_t chnl_ptr); + // => Private + // N/A + // Individual variables which must be private + union + { + // Thread channel + struct + { + queue_t rx_queue; + thrd_lock_t rx_queue_lock; + queue_ptr_t tx_queue_ptr; + thrd_lock_ptr_t tx_queue_lock_ptr; + }thrd; + +#ifdef __LINUX_PLAT__ + // Unix domian socket channel + struct + { + int sock; + struct sockaddr_un addr; + uds_chnl_mode_t mode; + uint32_t data_len; + }uds; +#endif + }idv; +}; + +// => Thread channel +extern chnl_ptr_t thrd_chnl_init (chnl_ptr_t chnl_ptr, const chnl_init_arg_ptr_t arg_ptr); +extern chnl_ptr_t thrd_chnl_exit (chnl_ptr_t chnl_ptr); +extern int thrd_chnl_input (chnl_ptr_t chnl_ptr, const void *data, size_t data_len); +extern size_t thrd_chnl_output (chnl_ptr_t chnl_ptr, void *data, size_t data_size); +extern bool thrd_chnl_is_empty (chnl_ptr_t chnl_ptr); +#ifdef __LINUX_PLAT__ +// => Unix domian socket channel +extern chnl_ptr_t uds_chnl_init (chnl_ptr_t chnl_ptr, const chnl_init_arg_ptr_t arg_ptr); +extern chnl_ptr_t uds_chnl_exit (chnl_ptr_t chnl_ptr); +extern int uds_chnl_input (chnl_ptr_t chnl_ptr, const void *data, size_t data_len); +extern size_t uds_chnl_output (chnl_ptr_t chnl_ptr, void *data, size_t data_size); +extern bool uds_chnl_is_empty (chnl_ptr_t chnl_ptr); +#endif + +#endif diff --git a/mtklibs/libmdfx/include/io/mailbox.h b/mtklibs/libmdfx/include/io/mailbox.h new file mode 100755 index 0000000000000000000000000000000000000000..4e72add6183e49b480d6a35fd24bfc90bd5b57f1 --- /dev/null +++ b/mtklibs/libmdfx/include/io/mailbox.h @@ -0,0 +1,205 @@ +/* + Here is an interface of mailbox to hide platform-dependent libraries. + A thread mailbox deals with the communication between two entities running on different threads of the same process. +*/ + +#ifndef __IO_MAILBOX_H__ +#define __IO_MAILBOX_H__ + +#include "sys_info.h" +#include "compiler.h" +#include "ctnr/queue.h" +#include "thrd/thrd_lock.h" +#include +#include +#ifdef __LINUX_PLAT__ +#include +#endif + + +// Compiler flags, NEED_TO_BE_NOTICED, set by the compiler +// => Thread mailbox +// N/A +#ifdef __LINUX_PLAT__ +// => UDS mailbox +// N/A +#endif + +// Type definitions +typedef struct mailbox mailbox_t; +typedef struct mailbox* mailbox_ptr_t; +typedef struct mailbox** mailbox_ptr2_t; +typedef struct mailbox_init_arg mailbox_init_arg_t; +typedef struct mailbox_init_arg* mailbox_init_arg_ptr_t; +typedef struct mailbox_addr mailbox_addr_t; +typedef struct mailbox_addr* mailbox_addr_ptr_t; +typedef struct mailbox_addr** mailbox_addr_ptr2_t; +// => Thread mailbox +// N/A +#ifdef __LINUX_PLAT__ +// => Unix domian socket mailbox +typedef enum uds_mailbox_mode {uds_mailbox_mode_fail, uds_mailbox_mode_normal, uds_mailbox_mode_reuse} uds_mailbox_mode_t; +#endif + +// Macros +// => Thread mailbox +// N/A +#ifdef __LINUX_PLAT__ +// => UDS mailbox +// N/A +#endif + +// Functions +#define mailbox_init(mailbox_ptr, arg_ptr) (unlikely((mailbox_ptr) == NULL || (mailbox_ptr)->init_fp == NULL) ? NULL : (mailbox_ptr)->init_fp((mailbox_ptr), (arg_ptr))) +#define mailbox_exit(mailbox_ptr) (unlikely((mailbox_ptr) == NULL || (mailbox_ptr)->exit_fp == NULL) ? NULL : (mailbox_ptr)->exit_fp((mailbox_ptr))) +#define mailbox_send(mailbox_ptr, data, data_len, dst_addr_ptr) (unlikely((mailbox_ptr) == NULL || (mailbox_ptr)->send_fp == NULL) ? SYS_FAIL : (mailbox_ptr)->send_fp((mailbox_ptr), (data), (data_len), (dst_addr_ptr))) +#define mailbox_recv(mailbox_ptr, data, data_len, src_addr_ptr) (unlikely((mailbox_ptr) == NULL || (mailbox_ptr)->recv_fp == NULL) ? 0 : (mailbox_ptr)->recv_fp((mailbox_ptr), (data), (data_len), (src_addr_ptr))) +#define mailbox_get_addr(mailbox_ptr) (unlikely((mailbox_ptr) == NULL || (mailbox_ptr)->get_addr_fp == NULL) ? NULL : (mailbox_ptr)->get_addr_fp((mailbox_ptr))) +#define mailbox_is_empty(mailbox_ptr) (unlikely((mailbox_ptr) == NULL || (mailbox_ptr)->is_empty_fp == NULL) ? true : (mailbox_ptr)->is_empty_fp((mailbox_ptr))) + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the mailbox_ptr were given as a value, a compile-time error would be given +// => Default mailbox_ptr: thread mailbox +#define default_mailbox_employ(mailbox_ptr) thrd_mailbox_employ(mailbox_ptr) +#define default_mailbox_dismiss(mailbox_ptr) thrd_mailbox_dismiss(mailbox_ptr) +// => Thread mailbox +#define thrd_mailbox_employ(mailbox_ptr) (unlikely((mailbox_ptr) == NULL) ? NULL : \ + (((mailbox_ptr)->init_fp = thrd_mailbox_init), \ + ((mailbox_ptr)->exit_fp = thrd_mailbox_exit), \ + ((mailbox_ptr)->send_fp = thrd_mailbox_send), \ + ((mailbox_ptr)->recv_fp = thrd_mailbox_recv), \ + ((mailbox_ptr)->get_addr_fp = thrd_mailbox_get_addr), \ + ((mailbox_ptr)->is_empty_fp = thrd_mailbox_is_empty), \ + (mailbox_ptr))) +#define thrd_mailbox_dismiss(mailbox_ptr) (unlikely((mailbox_ptr) == NULL) ? NULL : \ + (((mailbox_ptr)->init_fp = NULL), \ + ((mailbox_ptr)->exit_fp = NULL), \ + ((mailbox_ptr)->send_fp = NULL), \ + ((mailbox_ptr)->recv_fp = NULL), \ + ((mailbox_ptr)->get_addr_fp = NULL), \ + ((mailbox_ptr)->is_empty_fp = NULL), \ + (mailbox_ptr))) +#ifdef __LINUX_PLAT__ +// => UDS mailbox +#define uds_mailbox_employ(mailbox_ptr) (unlikely((mailbox_ptr) == NULL) ? NULL : \ + (((mailbox_ptr)->init_fp = uds_mailbox_init), \ + ((mailbox_ptr)->exit_fp = uds_mailbox_exit), \ + ((mailbox_ptr)->send_fp = uds_mailbox_send), \ + ((mailbox_ptr)->recv_fp = uds_mailbox_recv), \ + ((mailbox_ptr)->get_addr_fp = uds_mailbox_get_addr), \ + ((mailbox_ptr)->is_empty_fp = uds_mailbox_is_empty), \ + (mailbox_ptr))) +#define uds_mailbox_dismiss(mailbox_ptr) (unlikely((mailbox_ptr) == NULL) ? NULL : \ + (((mailbox_ptr)->init_fp = NULL), \ + ((mailbox_ptr)->exit_fp = NULL), \ + ((mailbox_ptr)->send_fp = NULL), \ + ((mailbox_ptr)->recv_fp = NULL), \ + ((mailbox_ptr)->get_addr_fp = NULL), \ + ((mailbox_ptr)->is_empty_fp = NULL), \ + (mailbox_ptr))) +#endif + +// Implementation +// => initialization arguments for mailbox +struct mailbox_init_arg +{ + // General variables + // N/A + // Individual variables which must be private + union + { + // Thread mailbox + struct + { + queue_init_arg_t rx_queue_init_arg; + }thrd; + +#ifdef __LINUX_PLAT__ + // UDS mailbox + struct + { + uds_mailbox_mode_t mode; + char *path; // only for uds_mailbox_mode_normal + mailbox_ptr_t mailbox_ptr; // only for uds_mailbox_mode_reuse + }uds; +#endif + }idv; +}; + +// => mailbox address +struct mailbox_addr +{ + // General variables + // N/A + // Individual variables which must be private + union + { + // Thread mailbox + struct + { + queue_ptr_t tx_queue_ptr; + thrd_lock_ptr_t tx_queue_lock_ptr; + }thrd; + +#ifdef __LINUX_PLAT__ + // UDS mailbox + struct + { + struct sockaddr_un addr; + }uds; +#endif + }idv; +}; + +// => Abstract data type +struct mailbox +{ + // General variables + // => Public + mailbox_ptr_t (*init_fp) (mailbox_ptr_t mailbox_ptr, const mailbox_init_arg_ptr_t arg_ptr); + mailbox_ptr_t (*exit_fp) (mailbox_ptr_t mailbox_ptr); + int (*send_fp) (mailbox_ptr_t mailbox_ptr, const void *data, size_t data_len, const mailbox_addr_ptr_t dst_addr_ptr); + size_t (*recv_fp) (mailbox_ptr_t mailbox_ptr, void *data, size_t data_size, mailbox_addr_ptr_t src_addr_ptr); + const mailbox_addr_ptr_t (*get_addr_fp) (mailbox_ptr_t mailbox_ptr); + bool (*is_empty_fp) (mailbox_ptr_t mailbox_ptr); + // => Private + mailbox_addr_t addr; + // Individual variables which must be private + union + { + // Thread mailbox + struct + { + queue_t rx_queue; + thrd_lock_t rx_queue_lock; + }thrd; + +#ifdef __LINUX_PLAT__ + // Unix domian socket channel + struct + { + int sock; + uds_mailbox_mode_t mode; + uint32_t data_len; + }uds; +#endif + }idv; +}; + +// => Thread mailbox +extern mailbox_ptr_t thrd_mailbox_init (mailbox_ptr_t mailbox_ptr, const mailbox_init_arg_ptr_t arg_ptr); +extern mailbox_ptr_t thrd_mailbox_exit (mailbox_ptr_t mailbox_ptr); +extern int thrd_mailbox_send (mailbox_ptr_t mailbox_ptr, const void *data, size_t data_len, const mailbox_addr_ptr_t dst_addr_ptr); +extern size_t thrd_mailbox_recv (mailbox_ptr_t mailbox_ptr, void *data, size_t data_size, mailbox_addr_ptr_t src_addr_ptr); +extern const mailbox_addr_ptr_t thrd_mailbox_get_addr (mailbox_ptr_t mailbox_ptr); +extern bool thrd_mailbox_is_empty (mailbox_ptr_t mailbox_ptr); +#ifdef __LINUX_PLAT__ +// => UDS mailbox +extern mailbox_ptr_t uds_mailbox_init (mailbox_ptr_t mailbox_ptr, const mailbox_init_arg_ptr_t arg_ptr); +extern mailbox_ptr_t uds_mailbox_exit (mailbox_ptr_t mailbox_ptr); +extern int uds_mailbox_send (mailbox_ptr_t mailbox_ptr, const void *data, size_t data_len, const mailbox_addr_ptr_t dst_addr_ptr); +extern size_t uds_mailbox_recv (mailbox_ptr_t mailbox_ptr, void *data, size_t data_size, mailbox_addr_ptr_t src_addr_ptr); +extern const mailbox_addr_ptr_t uds_mailbox_get_addr (mailbox_ptr_t mailbox_ptr); +extern bool uds_mailbox_is_empty (mailbox_ptr_t mailbox_ptr); +#endif + +#endif diff --git a/mtklibs/libmdfx/include/io/std_io.h b/mtklibs/libmdfx/include/io/std_io.h new file mode 100755 index 0000000000000000000000000000000000000000..3791ffbaad81413659d7a4da6b115e281df36dbe --- /dev/null +++ b/mtklibs/libmdfx/include/io/std_io.h @@ -0,0 +1,46 @@ +/* + Here is an interface of the standard I/O to hide the platform-dependent libraries. +*/ + +#ifndef __IO_STD_IO_H__ +#define __IO_STD_IO_H__ + +#include "sys_info.h" +#include +#ifdef __ANDROID__ +#include +#endif + +// Additional information +#ifdef __ANDROID__ +#define DEFAULT_TAG_NAME "MAL-MAIN" +extern int android_log_prio[]; +#endif + +// API +#ifdef __ANDROID__ +#ifdef __GCC_COMPILER__ +#define lv_print(lv, format, args ...) (((lv) & PRINT_LV) == 0 ? SYS_SUCC : \ + ((format) == NULL ? SYS_FAIL : \ + (__android_log_print(android_log_prio[(lv)], DEFAULT_TAG_NAME, format "%s%s%s%d%s", ## args, "[", __func__, ", ", __LINE__, "]: ") < 0 ? \ + SYS_FAIL : (fflush(stdout), SYS_SUCC)))) +#else +#define lv_print(lv, format, args ...) (((lv) & PRINT_LV) == 0 ? SYS_SUCC : \ + ((format) == NULL ? SYS_FAIL : \ + (__android_log_print(android_log_prio[(lv)], DEFAULT_TAG_NAME, (format), ## args) < 0 ? \ + SYS_FAIL : (fflush(stdout), SYS_SUCC)))) +#endif +#else +#ifdef __GCC_COMPILER__ +#define lv_print(lv, format, args ...) (((lv) & PRINT_LV) == 0 ? SYS_SUCC : \ + ((format) == NULL ? SYS_FAIL : \ + (fprintf(stdout, "%s%s%s%d%s", "[", __func__, ", ", __LINE__, "]: "), \ + (fprintf(stdout, (format), ## args) < 0 ? SYS_FAIL : (fflush(stdout), SYS_SUCC))))) +#else +#define lv_print(lv, format, args ...) (((lv) & PRINT_LV) == 0 ? SYS_SUCC : \ + ((format) == NULL ? SYS_FAIL : \ + (fprintf(stdout, (format), ## args) < 0 ? SYS_FAIL : (fflush(stdout), SYS_SUCC)))) +#endif +#endif + +#endif diff --git a/mtklibs/libmdfx/include/mdfx.h b/mtklibs/libmdfx/include/mdfx.h new file mode 100755 index 0000000000000000000000000000000000000000..06b5b900328cc9ee946ffc651dfbbcba418f19ca --- /dev/null +++ b/mtklibs/libmdfx/include/mdfx.h @@ -0,0 +1,200 @@ +/* + Here is an interface of the MTK modem framework to hide implementation. +*/ + +#ifndef __MDFX_H__ +#define __MDFX_H__ + +#include "sys_info.h" +#include "compiler.h" +#include "io/std_io.h" +#include "mem/mem_alloc.h" +#include "thrd.h" +#include "thrd/thrd_lock.h" +#include "ctnr/pool.h" +#include "ctnr/queue.h" +#include "ctnr/map.h" +#include "tmr.h" +#include "event.h" + +#include "io/mailbox.h" +#include "entity.h" +#include "task.h" +#include "srv.h" +#include "conn.h" + +#include +#include + +// Compiler flags, NEED_TO_BE_NOTICED, set by the compiler +// N/A + +// Type definitions +typedef int context_id_t; + +// Macros +#define MDFX_MFI_CHNL MFI_TASK_PATH +#define CONTEXT_INVAL_ID TASK_INVAL_ID + +// Global variables +// N/A + +// Functions +extern void mdfx_mfia_start (void); +extern void mdfx_wait_all_entity_init (void); +context_id_t mdfx_get_id_by_addr (mailbox_addr_ptr_t addr_ptr); +// => Logging +#define mdfx_print(tag, format, args ...) (lv_print((tag), format, ## args)) + +// => Memory +#define mdfx_mem_alloc(size) (mem_alloc((size))) +#define mdfx_mem_realloc(ptr, size) (mem_realloc((ptr), (size))) +#define mdfx_mem_free(ptr) (mem_free((ptr))) + +// => Thread +extern thrd_ptr_t mdfx_thrd_init (thrd_ptr_t thrd_ptr); +extern thrd_ptr_t mdfx_thrd_exit (thrd_ptr_t thrd_ptr); +#define mdfx_thrd_exec(thrd_ptr, hdl, arg) (thrd_exec((thrd_ptr), (hdl), (arg))) +// => Thread lock +// => => Mutex +extern thrd_lock_ptr_t mdfx_mutex_init (thrd_lock_ptr_t thrd_lock_ptr); +extern thrd_lock_ptr_t mdfx_mutex_exit (thrd_lock_ptr_t thrd_lock_ptr); +#define mdfx_mutex_lock(thrd_lock_ptr) (thrd_lock_on((thrd_lock_ptr))) +#define mdfx_mutex_unlock(thrd_lock_ptr) (thrd_lock_off((thrd_lock_ptr))) +// => => Semaphore, e.g. capacity = 1, avail_rsc = 0 for a binary semaphore +extern thrd_lock_ptr_t mdfx_sem_init (thrd_lock_ptr_t thrd_lock_ptr, size_t capacity, ssize_t avail_rsc); +extern thrd_lock_ptr_t mdfx_sem_exit (thrd_lock_ptr_t thrd_lock_ptr); +#define mdfx_sem_wait(thrd_lock_ptr) (thrd_lock_sem_wait((thrd_lock_ptr))) +#define mdfx_sem_signal(thrd_lock_ptr) (thrd_lock_sem_signal((thrd_lock_ptr))) +// => => Producer-consumer model +extern thrd_lock_ptr_t mdfx_pcm_init (thrd_lock_ptr_t thrd_lock_ptr, size_t capacity); +extern thrd_lock_ptr_t mdfx_pcm_exit (thrd_lock_ptr_t thrd_lock_ptr); +#define mdfx_pcm_plock(thrd_lock_ptr) (thrd_lock_prod_on((thrd_lock_ptr))) +#define mdfx_pcm_punlock(thrd_lock_ptr, num_of_done) (thrd_lock_prod_off((thrd_lock_ptr), (num_of_done))) +#define mdfx_pcm_clock(thrd_lock_ptr) (thrd_lock_cons_on((thrd_lock_ptr))) +#define mdfx_pcm_cunlock(thrd_lock_ptr, num_of_done) (thrd_lock_cons_off((thrd_lock_ptr), (num_of_done))) + +// => Container +// => => Pool +extern pool_ptr_t mdfx_pool_init (pool_ptr_t pool_ptr, const pool_init_arg_ptr_t arg_ptr); +extern pool_ptr_t mdfx_pool_exit (pool_ptr_t pool_ptr); +#define mdfx_pool_borrow(pool_ptr) (pool_borrow((pool_ptr))) +#define mdfx_pool_return(pool_ptr, block) (pool_return((pool_ptr), (block))) +// => => Queue +extern queue_ptr_t mdfx_queue_init (queue_ptr_t queue_ptr, const queue_init_arg_ptr_t arg_ptr); +extern queue_ptr_t mdfx_queue_exit (queue_ptr_t queue_ptr); +#define mdfx_queue_enqueue(queue_ptr, val, val_len) (queue_enqueue((queue_ptr), (val), (val_len))) +#define mdfx_queue_dequeue(queue_ptr, val, val_size) (queue_dequeue((queue_ptr), (val), (val_size))) +#define mdfx_queue_iterate(queue_ptr, hook_fp, args ...) (queue_iterate((queue_ptr), (hook_fp), ## args)) +#define mdfx_queue_is_empty(queue_ptr) (queue_is_empty((queue_ptr))) +// => => Map +extern map_ptr_t mdfx_map_init (map_ptr_t map_ptr, const map_init_arg_ptr_t arg_ptr); +extern map_ptr_t mdfx_map_exit (map_ptr_t map_ptr); +#define mdfx_map_insert(map_ptr, key, key_len, val, val_len) (map_insert((map_ptr), (key), (key_len), (val), (val_len))) +#define mdfx_map_update(map_ptr, key, key_len, val, val_len) (map_update((map_ptr), (key), (key_len), (val), (val_len))) +#define mdfx_map_search(map_ptr, key, key_len, val_len_ptr) (map_search((map_ptr), (key), (key_len), (val_len_ptr))) +#define mdfx_map_delete(map_ptr, key, key_len) (map_delete((map_ptr), (key), (key_len))) +#define mdfx_map_iterate(map_ptr, hook_fp, args ...) (map_iterate((map_ptr), (hook_fp), ## args)) +#define mdfx_map_is_empty(map_ptr) (map_is_empty((map_ptr))) + +// => Timer +extern tmr_ptr_t mdfx_tmr_init (tmr_ptr_t tmr_ptr, const tmr_init_arg_ptr_t arg_ptr); +extern tmr_ptr_t mdfx_tmr_exit (tmr_ptr_t tmr_ptr); +extern int mdfx_tmr_arm (tmr_ptr_t tmr_ptr, tmr_time_ptr_t time_ptr, event_ptr_t event_ptr, context_id_t context_id); + +// => Event +#define mdfx_event_init(event_ptr) (event_init((event_ptr))) +#define mdfx_event_exit(event_ptr) (event_exit((event_ptr))) +extern event_ptr_t mdfx_event_alloc (const event_ptr_t rel_event_ptr); +extern int mdfx_event_free (event_ptr_t event_ptr); +extern int mdfx_event_dump (event_ptr_t event_ptr); +// => => Event ID +#define mdfx_event_set_id(event_ptr, id) (event_set_id((event_ptr), (id))) +#define mdfx_event_get_id(event_ptr) (event_get_id((event_ptr))) +// => => Event Data +#define mdfx_event_set_data(event_ptr, data, data_len) (event_set_data((event_ptr), (data), (data_len))) +#define mdfx_event_get_data(event_ptr, data_len_ptr) (event_get_data((event_ptr), (data_len_ptr))) +#define mdfx_event_get_data_len(event_ptr) (event_get_data_len((event_ptr))) +// => => Event address +extern context_id_t mdfx_event_get_src_id (event_ptr_t event_ptr); +extern context_id_t mdfx_event_get_ext_id (event_ptr_t event_ptr); +extern context_id_t mdfx_event_get_xsrc_id (event_ptr_t event_ptr); +// ==== NEED_TO_BE_NOTICED, legacy event APIs, higjly NOT recommended to use ==== +extern bool mdfx_event_cmp_chnl(event_ptr_t event_ptr_1, event_ptr_t event_ptr_2); // NEED_TO_BE_NOTICED, requested by Box Wu +// ==== NEED_TO_BE_NOTICED, legacy event APIs, higjly NOT recommended to use ==== + +// => Task API +extern task_ptr_t mdfx_task_init (task_ptr_t task_ptr, entity_id_t entity_id, task_id_t task_id); +extern task_ptr_t mdfx_task_exit (task_ptr_t task_ptr); +#define mdfx_task_exec(task_ptr, hdl, arg) (task_exec((task_ptr), (hdl), (arg))) +#define mdfx_task_get_id(task_ptr) (task_get_id((task_ptr))) +extern int mdfx_task_subscribe_event (task_ptr_t task_ptr, event_id_t event_id); +extern int mdfx_task_subscribe_atc (task_ptr_t task_ptr, const char *atc_prefix, event_id_t event_id); +extern int mdfx_task_hijack_atc (task_ptr_t task_ptr, const char *atc_prefix, event_id_t event_id); +extern int mdfx_task_send_event (task_ptr_t task_ptr, event_ptr_t event_ptr, task_id_t task_id); +extern int mdfx_task_reply_event (task_ptr_t task_ptr, event_ptr_t orig_event_ptr, event_ptr_t event_ptr); +extern int mdfx_task_bcast_event (task_ptr_t task_ptr, event_ptr_t event_ptr); +extern int mdfx_task_send_recv_event (task_ptr_t task_ptr, event_ptr_t event_ptr, task_id_t task_id, task_rx_cond_t rx_cond, void *rx_cond_arg); +extern int mdfx_task_send_ext_event (task_ptr_t task_ptr, event_ptr_t event_ptr, ...); +extern int mdfx_task_bcast_ext_event (task_ptr_t task_ptr, event_ptr_t event_ptr, ...); +// ==== NEED_TO_BE_NOTICED, legacy task APIs, higjly NOT recommended to use ==== +extern bool rx_cond_event_id (task_ptr_t task_ptr,event_ptr_t event_ptr,void * arg); // NEED_TO_BE_NOTICED, requested by Box Wu +#define mdfx_task_send_and_wait_for_event(task_ptr, event_ptr, task_id, event_id) (mdfx_task_send_recv_event((task_ptr), (event_ptr), (task_id), rx_cond_event_id, (void*)(event_id))) /* NEED_TO_BE_NOTICED, requested by Box Wu */ +extern event_ptr_t mdfx_task_recv_event (task_ptr_t task_ptr, task_rx_cond_t rx_cond, void *rx_cond_arg); // NEED_TO_BE_NOTICED, requested by Ian Cheng +#define mdfx_task_wait_for_event(task_ptr, event_id) (mdfx_task_recv_event((task_ptr), rx_cond_event_id, (void*)(event_id))) /* NEED_TO_BE_NOTICED, requested by Ian Cheng */ +// ==== NEED_TO_BE_NOTICED, legacy task APIs, higjly NOT recommended to use ==== + +// => Entity API +#define mdfx_entity_set_id(entity_ptr, entity_id) (unlikely((entity_ptr) == NULL) ? ENTITY_INVAL_ID : ((entity_ptr)->id = (entity_id))) +#define mdfx_entity_get_id(entity_ptr) (unlikely((entity_ptr) == NULL) ? ENTITY_INVAL_ID : (entity_ptr)->id) +#define mdfx_entity_set_priv(entity_ptr, priv_data) (unlikely((entity_ptr) == NULL) ? NULL : ((entity_ptr)->idv.gen.priv = (priv_data))) +#define mdfx_entity_get_priv(entity_ptr) (unlikely((entity_ptr) == NULL) ? NULL : (entity_ptr)->idv.gen.priv) + + +// => => MFI task +extern task_ptr_t mdfx_mfi_task_init (task_ptr_t task_ptr, entity_id_t entity_id, task_id_t task_id); +extern task_ptr_t mdfx_mfi_task_exit (task_ptr_t task_ptr); +extern task_ptr_t mdfx_mfia_task_init (task_ptr_t task_ptr, entity_id_t entity_id, task_id_t task_id); +extern task_ptr_t mdfx_mfia_task_exit (task_ptr_t task_ptr); +extern task_ptr_t mdfx_ati_task_init (task_ptr_t task_ptr, entity_id_t entity_id, task_id_t task_id); +extern task_ptr_t mdfx_ati_task_exit (task_ptr_t task_ptr); + +extern int mdfx_mfi_task_send_ext_event (task_ptr_t task_ptr, event_ptr_t event_ptr); +extern int mdfx_mfia_task_send_ext_event (task_ptr_t task_ptr, event_ptr_t event_ptr); +// => Service API +extern srv_ptr_t mdfx_srv_init (srv_ptr_t srv_ptr, entity_id_t entity_id, task_id_t task_id); +extern srv_ptr_t mdfx_srv_exit (srv_ptr_t srv_ptr); +#define mdfx_srv_exec(srv_ptr, hdl, arg) (srv_exec((srv_ptr), (hdl), (arg))) +#define mdfx_srv_get_id(srv_ptr) (unlikely((srv_ptr) == NULL) ? SRV_INVAL_ID : (srv_ptr)->id) +extern int mdfx_srv_subscribe_event (srv_ptr_t srv_ptr, event_id_t event_id); +int mdfx_srv_send_event (srv_ptr_t srv_ptr, event_ptr_t event_ptr, task_id_t srv_id); +event_ptr_t mdfx_srv_recv_event (srv_ptr_t srv_ptr); +int mdfx_srv_reply_event (srv_ptr_t srv_ptr, event_ptr_t orig_event_ptr, event_ptr_t event_ptr); +extern event_ptr_t mdfx_srv_send_recv_event (srv_ptr_t srv_ptr, event_ptr_t event_ptr, task_id_t task_id, srv_rx_cond_t rx_cond, void *rx_cond_arg); +extern int mdfx_srv_send_ext_event (srv_ptr_t srv_ptr, event_ptr_t event_ptr); +#if 0 +// => Event API +extern event_ptr_t mdfx_event_alloc(event_ptr_t rel_event_ptr); +extern int mdfx_event_free (event_ptr_t event_ptr); +#define mdfx_event_set_id(event_ptr, id) (event_set_id((event_ptr), (id))) +#define mdfx_event_get_id(event_ptr) (event_get_id((event_ptr))) +#define mdfx_event_set_data(event_ptr, data, data_len) (event_set_data((event_ptr), (data), (data_len))) +#define mdfx_event_get_data(event_ptr, data_len_ptr) (event_get_data((event_ptr), (data_len_ptr))) +#define mdfx_event_get_data_len(event_ptr) (event_get_data_len((event_ptr))) +#define mdfx_event_set_unsolicited(event_ptr) (event_set_unsolicited((event_ptr))) +#define mdfx_event_set_chnl(event_ptr, chnl_ptr) (event_set_chnl((event_ptr), (chnl_ptr))) +#define mdfx_event_get_chnl(event_ptr, chnl_ptr) (event_get_chnl((event_ptr), (chnl_ptr))) +extern bool mdfx_event_cmp_chnl(event_ptr_t event_ptr_1, event_ptr_t event_ptr_2); +#endif +// => Connection API +extern int mdfx_chnl_send (chnl_ptr_t chnl_ptr, event_ptr_t event_ptr); +extern conn_ptr_t mdfx_conn_alloc (void); +extern int mdfx_conn_free (conn_ptr_t conn_ptr); +extern conn_ptr_t mdfx_conn_init (conn_ptr_t conn_ptr, const conn_init_arg_ptr_t arg_ptr); +extern conn_ptr_t mdfx_conn_exit (conn_ptr_t conn_ptr); +extern int mdfx_conn_send (conn_ptr_t conn_ptr, event_ptr_t event_ptr); +extern int mdfx_conn_recv (conn_ptr_t conn_ptr, event_ptr_t event_ptr); +extern event_ptr_t mdfx_conn_send_recv (conn_ptr_t conn_ptr, event_ptr_t event_ptr); +extern event_ptr_t mdfx_conn_send_cb (conn_ptr_t conn_ptr, event_ptr_t event_ptr, rx_cond_hdl_t rx_cond, void *rx_cond_arg, conn_hdl_t cb_hdl); +#define mdfx_conn_get_id(conn_ptr) (unlikely((conn_ptr) == NULL) ? CONTEXT_INVAL_ID : (conn_ptr)->->chnl.idv.uds.sock + SRV_MAX_ID) +#endif diff --git a/mtklibs/libmdfx/include/mem/mem_alloc.h b/mtklibs/libmdfx/include/mem/mem_alloc.h new file mode 100755 index 0000000000000000000000000000000000000000..20765af4e8279d76bdd4530995dbd9fa76feef6b --- /dev/null +++ b/mtklibs/libmdfx/include/mem/mem_alloc.h @@ -0,0 +1,15 @@ +/* + Here is an interface of the memory allocation to hide the platform-dependent libraries. +*/ + +#ifndef __MEM_MEM_ALLOC_H__ +#define __MEM_MEM_ALLOC_H__ + +#include + +// API +extern void* mem_alloc (size_t size); +extern void* mem_realloc (void* ptr, size_t size); +extern int mem_free (void* ptr); + +#endif diff --git a/mtklibs/libmdfx/include/srv.h b/mtklibs/libmdfx/include/srv.h new file mode 100755 index 0000000000000000000000000000000000000000..6d2dd40873934a264bcea03871b8361195793f54 --- /dev/null +++ b/mtklibs/libmdfx/include/srv.h @@ -0,0 +1,99 @@ +/* + Here is an interface of service to hide implementation. + The srv_exec() actively sends a request to MTK MDFX and receives the response from it. +*/ + +#ifndef __SRV_H__ +#define __SRV_H__ + +#include "sys_info.h" +#include "compiler.h" +#include "conn.h" +#include "io/mailbox.h" +#include "thrd.h" + +// Compiler flags, NEED_TO_BE_NOTICED, set by the compiler +// N/A + +// Type definitions +typedef struct srv srv_t; +typedef struct srv* srv_ptr_t; +typedef struct srv_init_arg srv_init_arg_t; +typedef struct srv_init_arg* srv_init_arg_ptr_t; +typedef void* (*srv_hdl_t) (srv_ptr_t srv_ptr, void *arg); +typedef bool (*srv_rx_cond_t) (srv_ptr_t srv_ptr, event_ptr_t event_ptr, void *arg); + +// Macros +// => Thread service +// N/A + +// Functions +#define srv_init(srv_ptr, arg_ptr) (unlikely((srv_ptr) == NULL || (srv_ptr)->init_fp == NULL) ? NULL : (srv_ptr)->init_fp((srv_ptr), (arg_ptr))) +#define srv_exit(srv_ptr) (unlikely((srv_ptr) == NULL || (srv_ptr)->exit_fp == NULL) ? NULL : (srv_ptr)->exit_fp((srv_ptr))) +#define srv_exec(srv_ptr, hdl, arg) (unlikely((srv_ptr) == NULL || (srv_ptr)->exec_fp == NULL) ? SYS_FAIL : (srv_ptr)->exec_fp((srv_ptr), (hdl), (arg))) +#define srv_get_id(srv_ptr) (unlikely((srv_ptr) == NULL) ? SRV_INVAL_ID : (srv_ptr)->id) +// => Thread service +#define srv_get_mailbox(srv_ptr) (unlikely((srv_ptr) == NULL) ? NULL : &((srv_ptr)->mailbox)) + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the srv_ptr were given as a value, a compile-time error would be given +// => Default service +#define default_srv_employ(srv_ptr) thrd_srv_employ(srv_ptr) +#define default_srv_dismiss(srv_ptr) thrd_srv_dismiss(srv_ptr) +// => Thread service +#define thrd_srv_employ(srv_ptr) (unlikely((srv_ptr) == NULL) ? NULL : \ + (((srv_ptr)->init_fp = thrd_srv_init), \ + ((srv_ptr)->exit_fp = thrd_srv_exit), \ + ((srv_ptr)->exec_fp = thrd_srv_exec), \ + (srv_ptr))) +#define thrd_srv_dismiss(srv_ptr) (unlikely((srv_ptr) == NULL) ? NULL : \ + (((srv_ptr)->init_fp = NULL), \ + ((srv_ptr)->exit_fp = NULL), \ + ((srv_ptr)->exec_fp = NULL), \ + (srv_ptr))) + +// Implementation +// => initialization arguments for service +struct srv_init_arg +{ + // General variables + task_id_t id; + conn_ptr_t ext_conn_ptr; + // Individual variables which must be private + union + { + // Thread service + struct + { + // N/A + }thrd; + }idv; +}; + +// => Abstract data type +struct srv +{ + // General variables + // => Public + srv_ptr_t (*init_fp) (srv_ptr_t srv_ptr, const srv_init_arg_ptr_t arg_ptr); + srv_ptr_t (*exit_fp) (srv_ptr_t srv_ptr); + int (*exec_fp) (srv_ptr_t srv_ptr, srv_hdl_t hdl, void *arg); + // => Private + task_id_t id; + mailbox_t mailbox; + // Individual variables which must be private + union + { + // Thread service + struct + { + thrd_t thrd; + }thrd; + }idv; +}; + +// => Thread service +extern srv_ptr_t thrd_srv_init (srv_ptr_t srv_ptr, const srv_init_arg_ptr_t arg_ptr); +extern srv_ptr_t thrd_srv_exit (srv_ptr_t srv_ptr); +extern int thrd_srv_exec (srv_ptr_t srv_ptr, srv_hdl_t hdl, void *arg); + +#endif diff --git a/mtklibs/libmdfx/include/sys_info.h b/mtklibs/libmdfx/include/sys_info.h new file mode 100755 index 0000000000000000000000000000000000000000..fb2cd1e9ec93c22228216457b544d47dea9f9ef9 --- /dev/null +++ b/mtklibs/libmdfx/include/sys_info.h @@ -0,0 +1,411 @@ +/* + Here is the information of the target system. +*/ + +#ifndef __SYS_INFO_H__ +#define __SYS_INFO_H__ + +// Platform, NEED_TO_BE_NOTICED, assigned by compilers +#define __LINUX_PLAT__ +#define __GCC_COMPILER__ +#define __EVENT_USAGE_MONITOR__ + +// Boolean value +#ifndef __cplusplus +#include +/* +typedef int bool; +#define true (0 == 0) +#define false (0 != 0) +*/ +#endif + +#ifdef __EVENT_USAGE_MONITOR__ +// NEED_TO_BE_NOTICED, temporarily methods to monitor memory usage +#include +#include +#include +#define gettid() syscall(__NR_gettid) +extern pid_t mal_pid; +#endif + +// Return value +#define SYS_SUCC (0) +#define SYS_FAIL (-1) + +// Print level +#define ERR_LV (1) +#define WARN_LV (2) +#define INFO_LV (4) +#define DEBUG_LV (8) +#define PRINT_LV (ERR_LV | WARN_LV | INFO_LV | DEBUG_LV) // NEED_TO_BE_NOTICED, assigned by compilers + +// MDFX +// => Entity ID +typedef enum entity_id +{ + ENTITY_INVAL_ID, // for control + + ENTITY_FRAMEWORK_MAIN, + ENTITY_FRAMEWORK_MFI, + ENTITY_FRAMEWORK_HOST, + ENTITY_FRAMEWORK_MFIA, + ENTITY_ATI, + + ENTITY_MDMNGR, + ENTITY_RILPROXY, + ENTITY_SIMMNGR, + ENTITY_DATAMNGR, + ENTITY_IMSMNGR, + ENTITY_RDS, + ENTITY_EPDGA, + ENTITY_NWMNGR, + + ENTITY_MAX_ID // for control +}entity_id_t; + +// => Task ID +typedef enum task_id +{ + TASK_INVAL_ID, // for control + + TASK_FRAMEWORK_DEFAULT, + TASK_FRAMEWORK_MFI_ERX, + TASK_FRAMEWORK_HOST_RX, + TASK_FRAMEWORK_HOST_TX, + TASK_FRAMEWORK_MFIA_ERX, + TASK_ATI_ATC, + + TASK_MDMNGR_START = 100, + TASK_MDMNGR1, + TASK_MDMNGR2, + TASK_MDMNGR3, + TASK_MDMNGR4, + TASK_MDMNGR5, + + TASK_RILPROXY_START = 200, + TASK_RILPROXY, + + TASK_SIMMNGR_START = 300, + TASK_SIMMNGR, + TASK_SIMMNGR_CHECK, + TASK_SIMMNGR_NOTIFY, + + TASK_DATAMNGR_START = 400, + TASK_DATAMNGR, + TASK_DATAMNGR_DATI_HDL, + TASK_DATAMNGR_NETLINK, + + TASK_IMSMNGR_START = 500, + TASK_IMSMNGR, + + TASK_RDS_START = 600, + TASK_RB, + TASK_RU, + TASK_RRA, + TASK_RDS_UT, + + TASK_EPDGA_START = 700, + TASK_EPDGA_REQ, + TASK_EPDGA_SIM, + TASK_EPDGA_QUERY, + + TASK_NWMNGR_START = 800, + TASK_NWMNGR, + + TASK_MAX_ID // for control +}task_id_t; + +// => Service ID +typedef enum srv_id +{ + SRV_INVAL_ID = TASK_MAX_ID + 1, // for control + + // => HOST entity + SRV_FRAMEWORK_HOST_MAIN, + + // ePDGa + SRV_EPDGA_MAIN, + SRV_EPDGA_SIM, + SRV_EPDGA_INIT, + + SRV_MAX_ID // for control +}srv_id_t; + +// => Event ID +typedef enum event_id +{ + EVENT_INVAL_ID, // for control + + // => Main entity + // N/A + + // => MFI entity + // N/A + + // => MFIA entity + EVENT_MFIA_CHNL_INIT, + EVENT_MFIA_CHNL_EXIT, + // N/A + + // => ATI entity + EVENT_ATI_REG, + EVENT_ATI_ATC_REQ, + EVENT_ATI_BYPASS_ATC_REQ, + EVENT_ATI_ATC_RESP, + EVENT_ATI_URC, + EVENT_ATI_BYPASS_URC, + EVENT_ATI_HIJACK, + +/* + EVENT_ATI_ATC_CFUN, + EVENT_ATI_ATC_CGDCONT, + EVENT_ATI_ATC_CGSDCONT, + EVENT_ATI_ATC_CGQREQ, + EVENT_ATI_ATC_CGQMIN, + EVENT_ATI_ATC_CGEQREQ, + EVENT_ATI_ATC_CGEQMIN, + EVENT_ATI_ATC_CGATT, + EVENT_ATI_ATC_CGACT, + EVENT_ATI_ATC_CGCMOD, + EVENT_ATI_ATC_CGDATA, + EVENT_ATI_ATC_CGPADDR, + EVENT_ATI_ATC_CGCONTRDP, + EVENT_ATI_ATC_CGSCONTRDPT, + EVENT_ATI_ATC_CGREG, + EVENT_ATI_ATC_CGPRCO, + EVENT_ATI_ATC_EREP, + EVENT_ATI_ATC_CGANS, + EVENT_ATI_ATC_CGSDATA, + EVENT_ATI_ATC_ACTTEST, + EVENT_ATI_ATC_EGCH, + EVENT_ATI_ATC_EGTYPE, + EVENT_ATI_ATC_MBPC, + EVENT_ATI_ATC_VZWAPNE, + EVENT_ATI_ATC_EFUN, + EVENT_ATI_URC_CME, +*/ + + // => Modem Manager event + EVENT_MDMNGR_START = 100, + EVENT_MDMNGR_ATCMD_REQ, /* mdmngr_atcmd_req_t */ + EVENT_MDMNGR_ATCMD_RESP, /* mdmngr_atcmd_resp_t */ + EVENT_MDMNGR_ATURC_REGISTER, + EVENT_MDMNGR_ATURC_NOTIFY, /* mdmngr_aturc_notify_t */ + EVENT_MDMNGR_ATCMD_REQ_EX, /* mdmngr_atcmd_req_t */ + EVENT_MDMNGR_STATE_NOTIFY, /* mdmngr_state_t */ + + // => SIM Manager event + EVENT_SIMMNGR_START = 200, + EVENT_SIMMNGR_QUERY_CSQ, + EVENT_SIMMNGR_CSQ_NOTIFY, + EVENT_SIMMNGR_NOTIFY_CHECKIN, + EVENT_SIMMNGR_NOTIFY_CHECKOUT, + EVENT_SIMMNGR_CHECK_SIM_TYPE_REQ, + EVENT_SIMMNGR_QUERY_SIM_INFO_REQ, + EVENT_SIMMNGR_AKA_REQ, + EVENT_SIMMNGR_SIM_INSERT_STATE_NOTIFY, + EVENT_SIMMNGR_SIM_USIM_DETECT_NOTIFY, + EVENT_SIMMNGR_SIM_ISIM_CH_NOTIFY, + EVENT_SIMMNGR_SIM_STK_NOTIFY, + EVENT_SIMMNGR_INSERT_CHECK_NOTIFY, + EVENT_SIMMNGR_SIM_STATE_CHECK, + EVENT_SIMMNGR_SIM_INSERT_CHECK, + EVENT_SIMMNGR_IMS_ENABLE_REQ, + EVENT_SIMMNGR_IMS_DISABLE_REQ, + EVENT_SIMMNGR_MNC_LEN_REQ, + EVENT_SIMMNGR_SIM_STATE_REG_REQ, + EVENT_SIMMNGR_SIM_STATE_REG_RESP, + + // => Data Manager event + EVENT_DATAMNGR_START = 300, + EVENT_DATAMNGR_NOTIFICATION, + EVENT_SETUP_DATA_CALL_REQ, + EVENT_SETUP_DATA_CALL_RESP, + EVENT_DEACTIVATE_DATA_CALL_REQ, + EVENT_DEACTIVATE_DATA_CALL_RESP, + EVENT_SETUP_DEDICATE_DATA_CALL_REQ, + EVENT_SETUP_DEDICATE_DATA_CALL_RESP, + EVENT_MODIFY_DATA_CALL_REQ, + EVENT_MODIFY_DATA_CALL_RESP, + EVENT_DEACTIVATE_DEDICATE_DATA_CALL_REQ, + EVENT_DEACTIVATE_DEDICATE_DATA_CALL_RESP, + EVENT_ABORT_SETUP_DATA_CALL_REQ, + EVENT_ABORT_SETUP_DATA_CALL_RESP, + EVENT_PCSCF_DISCOVERY_PCO_REQ, + EVENT_PCSCF_DISCOVERY_PCO_RESP, + EVENT_LAST_DATA_CALL_FAIL_CAUSE_REQ, + EVENT_LAST_DATA_CALL_FAIL_CAUSE_RESP, + EVENT_DATA_CALL_LIST_REQ, + EVENT_DATA_CALL_LIST_RESP, + EVENT_DATA_CALL_LIST_CHANGED_URC, + EVENT_DEFAULT_BEARER_MODIFIED_URC, + EVENT_DEDICATE_BEARER_ACTIVATED_URC, + EVENT_DEDICATE_BEARER_MODIFIED_URC, + EVENT_DEDICATE_BEARER_DEACTIVATED_URC, + EVENT_APN_EDIT_REQ, + EVENT_APN_EDIT_PARA_REQ, + EVENT_APN_SET_MODE_REQ, + EVENT_SET_INITIAL_ATTACH_APN_REQ, + EVENT_SET_INITIAL_ATTACH_APN_RESP, + EVENT_RADIO_POWER_REQ, + EVENT_RADIO_POWER_DO_REQ, + EVENT_RADIO_POWER_RESP, + EVENT_IF_STATUS_REQ, + EVENT_IF_STATUS_RESP, + EVENT_ALLOW_DATA_REQ, + EVENT_ALLOW_DATA_RESP, + EVENT_IF_RAT_CELL_INFO_REQ, + EVENT_IF_RAT_CELL_INFO_RESP, + EVENT_BEARER_REQ, + EVENT_BEARER_RESP, + EVENT_PASS_IMS_PDN_REQ, + EVENT_PASS_IMS_PDN_RESP, + EVENT_GET_IMS_PDN_REQ, + EVENT_GET_IMS_PDN_RESP, + EVENT_GET_IMS_PARA_REQ, + EVENT_GET_IMS_PARA_RESP, + EVENT_SETUP_DATA_CALL_IND, + EVENT_SETUP_DATA_CALL_IND_FAIL, + EVENT_DM_HO_RESP, + + + // => => DATI + EVENT_DATAMNGR_ATCMD_REQ, + EVENT_DATAMNGR_ATCMD_RESP, + EVENT_DATAMNGR_ATCMD_REG, + + // => Netlink + EVENT_NETLINK_LISTEN_REQ, + + // => RIL Proxy event + EVENT_RILPROXY_START = 400, + EVENT_RILPROXY_ATCMD_REQ, /* rilproxy_atcmd_req_t */ + EVENT_RILPROXY_ATCMD_RESP, /* rilproxy_atcmd_resp_t */ + EVENT_RILPROXY_CONNECT, /* rilproxy_ril_connect_req_t */ + EVENT_RILPROXY_DISCONNECT, + + // => IMS Manager event + EVENT_IMSMNGR_START = 500, + EVENT_IMSMNGR_REQ, /* imsmngr_req_t / imsmngr_resp_t */ + EVENT_IMSMNGR_NOTIFY, /* imsmngr_notify_t */ + + // => RDS event + EVENT_RDS_START = 600, + EVENT_RDS_RU = EVENT_RDS_START, + /* RU IF */ + EVENT_MFI_RU_SET_UIPARAM_REQ, /* 1: UI setting request */ + EVENT_MFI_RU_SET_WIFISTATUS_REQ, /* 2: wifi status update request */ + EVENT_MFI_RU_SET_SST_REQ, /* 3: UI(?) RDS threshold request */ + EVENT_RU_WS_WIFI_STATUS_IND, /* 4: WPA Supplicant WiFi status indication */ + EVENT_RU_DM_3GPP_STATUS_IND, /* 5: Data Manager(?) 3GPP status indication */ + EVENT_RU_RB_WSL_CFG_IND, /* 6: WPA Supplicant Lisener config */ + EVENT_MFI_RU_SET_CALLSTATUS_REQ, /* 7: IMS in call status update request */ + EVENT_RU_RB_WIFI_RVOUT_IND, /* 8: Wifi roveout indication */ + EVENT_MFI_RU_SET_MDSTATUS_REQ, /* 9: FWK set MD status */ + EVENT_RU_NM_CGREG_REQ, /* 10: CGREG request to NM */ + EVENT_RU_NM_CGREG_CNF, /* 11: CGREG confirm from NM */ + + EVENT_RDS_RB = EVENT_RDS_START+30, + /* RB IF */ + EVENT_MFI_RB_SETUP_DATA_CALL_REQ, /* 31: MFI RB setup data call request */ + EVENT_MFI_RB_SETUP_DATA_CALL_CNF, /* 32: MFI RB setup data call confirm */ + EVENT_RB_DM_SETUP_DATA_CALL_IND, /* 33: RB DM setup data call indication */ + EVENT_MFI_RB_DEACT_DATA_CALL_REQ, /* 34: RB deactive data call request */ + EVENT_MFI_RB_DEACT_DATA_CALL_CNF, /* 35: RB deactive data call confirm */ + EVENT_RB_DM_DDC_REQ, /* 36: RB data call disconnect request */ + EVENT_RU_RB_SET_RPL_REQ, /* 37: RPL Update*/ + EVENT_MFI_RB_GET_RANTYPE_REQ, /* 38: */ + EVENT_MFI_RB_GET_RANTYPE_RSP, /* 39: */ + EVENT_MFI_RB_GET_LASTERR_REQ, /* 40: */ + EVENT_MFI_RB_GET_LASTERR_RSP, /* 41: */ + EVENT_RRA_RB_RETRY_HO_REQ, /* 42: */ + EVENT_RB_DM_SETUP_DATA_CALL_REQ, /* 43: Mobile HO PDN setup request (rr_sdc_req_t)*/ + EVENT_RB_DM_SETUP_DATA_CALL_CNF, /* 44: Mobile HO PDN setup confirm (dm_resp_setup_data_call_t)*/ + EVENT_RB_DM_DEACT_DATA_CALL_REQ, /* 45: Interface ID (RILD_Req-1, aka real)*//*[20150924]: ifid btween MAL/rild => keep TRUE ifid*/ + EVENT_RB_DM_DEACT_DATA_CALL_IND, /* 46: Interface ID (RILD_Req-1, aka real)*//*[20150924]: ifid btween MAL/rild => keep TRUE ifid*/ + EVENT_RB_DM_HO_REQ, /* 47: H.O request rds_ho_status_t*/ + EVENT_RB_HO2RAN_REQ, /* 48: RB H.O 2 RAN request */ + EVENT_RB_EA_HOLIST_IND, /* 49: New HO apn info update IND from EA */ + EVENT_RB_EA_HO_REQ, /* 50: */ + EVENT_RB_DM_EPDG_PDN_DETACT_REQ, /* 51: */ + EVENT_RB_SYSHO_TO_IND, /* 52: H.O. timeout indication */ + EVENT_MFI_RB_WIFI_RVOUT_IND, /* 53: wifi rove out indication */ + EVENT_MFI_RB_WIFIPDN_ACT_IND, /* 54: wifi PDN State indication */ + + EVENT_RDS_RRA = EVENT_RDS_START+60, + /* RRA IF */ + EVENT_RRA_RB_HO_RETRY_IND, /* 61: */ + EVENT_RRA_SYS_RETRY_TO_IND, /* 62: */ + EVENT_RRA_SYSTATE_UPADTE_IND, /* 63: */ + + EVENT_RDS_EA = EVENT_RDS_START+70, + /* for RB & EA */ + EVENT_RB_EA_ATTACH_REQ, /* 71: attach request to EA*/ + EVENT_RB_EA_ATTACH_CNF, /* 72: */ + EVENT_RB_EA_DETACH_REQ, /* 73: dettach request to EA*/ + EVENT_RB_EA_DETACH_CNF, /* 74: */ + EVENT_RB_EA_HOL2W_REQ, /* 75: H.O. request to EA*/ + EVENT_RB_EA_HOL2W_CNF, /* 76: */ + EVENT_RB_EA_DISCONN_IND, /* 77: disconnect indication from EA2RB*/ + + EVENT_RDS_MISC = EVENT_RDS_START+80, + /* To UT IF */ + EVENT_RU_RB_UT_RPL_UPDATE_REQ, /* 81: */ + /* To outside MAL */ + EVENT_MFI_RB_HO_STATUS_IND, /* 82: handover status indication */ + /* To RDS Common */ + EVENT_MAL_RDS_REG_REQ, /* 83: register task */ + EVENT_MAL_RDS_DEREG_REQ, /* 84: deregister task */ + EVENT_MAL_RDS_DEREG_RSP, /* 85: */ + EVENT_MFI_RB_URC_TEST_REQ, /* 86: ut only removed in OF*/ + EVENT_RDS_INTERNAL_ERR_RSP, /* 87: for error response */ + /* Timer to RDS */ + EVENT_RU_TM_WSL_TIMER_IND, /* 88: WPA Supplicant timer indication */ + EVENT_RU_TM_WFC_TIMER_IND, /* 89: WPA Supplicant timer indication */ + EVENT_UT_RU_CONIF_REQ, /* 90: UT purpose */ + EVENT_UT_RB_DUMPDNI4, /* 91: */ + EVENT_UT_RB_NWDDCIND, /* 92: */ + + EVENT_RDS_RB_SKIP1IMS_UT, + EVENT_RDS_RB_MOBILE_DDC_UT, + EVENT_RDS_RB_WIFI_DDC_UT, + EVENT_MFI_RDS_UT_CMD, + + /* epdga event */ + EVENT_EPDGA_START = 700, + EVENT_EPDGA_QUERY_WO_SUP_REQ, + EVENT_EPDGA_QUERY_WO_SUP_RSP, + + EVENT_EPDGA_QUERY_WIFI_PCSCFS_REQ, + EVENT_EPDGA_QUERY_WIFI_PCSCFS_RSP, + + EVENT_EPDGA_QUERY_AP_MAC_REQ, + EVENT_EPDGA_QUERY_AP_MAC_RSP, + + + // => Network Manager event + EVENT_NWMNGR_START = 800, + + EVENT_NWMNGR_SET_PS_REG_STATE_MODE, + EVENT_NWMNGR_GET_PS_REG_STATE, + EVENT_NWMNGR_NOTIFY_PS_REG_STATE, + + EVENT_MAX_ID // for control +}event_id_t; + + + + +/* ------------------------------------ */ +/* SIM Manager */ +/* ------------------------------------ */ + +typedef struct _simmngr_csq_result { + int result; + int rssi; + int ber; +} simmngr_csq_result_t; + + +#endif diff --git a/mtklibs/libmdfx/include/task.h b/mtklibs/libmdfx/include/task.h new file mode 100755 index 0000000000000000000000000000000000000000..c7841170345d85403e1b17ced475f6241a57b51e --- /dev/null +++ b/mtklibs/libmdfx/include/task.h @@ -0,0 +1,218 @@ +/* + Here is an interface of task to hide implementation. + The task_exec() passively waits for an event from the corresponding mailbox and than passes the event to user-defined handler. +*/ + +#ifndef __TASK_H__ +#define __TASK_H__ + +#include "sys_info.h" +#include "event.h" +#include "compiler.h" +#include "ctnr/queue.h" +#include "io/mailbox.h" +#include "thrd.h" +#include "thrd/thrd_lock.h" + + +// Compiler flags, NEED_TO_BE_NOTICED, set by the compiler +// N/A + +// Type definitions +typedef struct task task_t; +typedef struct task* task_ptr_t; +typedef struct task_init_arg task_init_arg_t; +typedef struct task_init_arg* task_init_arg_ptr_t; +typedef void* (*task_hdl_t) (task_ptr_t task_ptr, event_ptr_t event_ptr, void *arg); +typedef bool (*task_rx_cond_t) (task_ptr_t task_ptr, event_ptr_t event_ptr, void *arg); + +// Macros +// => Thread task +// N/A +// => MFI task +#define MFI_TASK_LISTEN_BACKLOG 8 +#ifdef __ANDROID__ +#define MFI_TASK_PATH "mal-mfi" +#else +#define MFI_TASK_PATH "/data/mal/tmp/mfi_task" +#endif +// => MFIA task +#define MFIA_TASK_LISTEN_BACKLOG 8 +#define MFIA_PATH_LEN 64 +#ifndef __ANDROID__ +#define MFIA_TASK_PATH_PREFIX "/data/mal/tmp/mfia_task_" +#endif +// => ATI task +#define ATI_TASK_LISTEN_BACKLOG 8 +#define ATI_TASK_ATC_BUF_SIZE 4096 +#define ATI_TASK_UART_PATH_1 "/dev/radio/malcmd1" +#define ATI_TASK_UART_PATH_2 "/dev/radio/malcmd2" +#define ATI_TASK_UART_PATH_3 "/dev/radio/malcmd3" +#define ATI_TASK_UART_PATH_4 "/dev/radio/malcmd4" +#define ATI_TASK_UART_PATH_URC "/dev/radio/malurc" +#ifndef __ANDROID__ +#define ATI_TASK_PATH "/data/mal/tmp/ati_task" +#endif + +// Functions +#define task_init(task_ptr, arg_ptr) (unlikely((task_ptr) == NULL || (task_ptr)->init_fp == NULL) ? NULL : (task_ptr)->init_fp((task_ptr), (arg_ptr))) +#define task_exit(task_ptr) (unlikely((task_ptr) == NULL || (task_ptr)->exit_fp == NULL) ? NULL : (task_ptr)->exit_fp((task_ptr))) +#define task_exec(task_ptr, hdl, arg) (unlikely((task_ptr) == NULL || (task_ptr)->exec_fp == NULL) ? SYS_FAIL : (task_ptr)->exec_fp((task_ptr), (hdl), (arg))) +#define task_get_id(task_ptr) (unlikely((task_ptr) == NULL) ? TASK_INVAL_ID : (task_ptr)->id) +// => Thread task +#define task_get_mailbox(task_ptr) (unlikely((task_ptr) == NULL) ? NULL : &((task_ptr)->mailbox)) +// => MFI task +// N/A +// => MFIA task +// N/A + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the task_ptr were given as a value, a compile-time error would be given +// => Default task +#define default_task_employ(task_ptr) thrd_task_employ(task_ptr) +#define default_task_dismiss(task_ptr) thrd_task_dismiss(task_ptr) +// => Thread task +#define thrd_task_employ(task_ptr) (unlikely((task_ptr) == NULL) ? NULL : \ + (((task_ptr)->init_fp = thrd_task_init), \ + ((task_ptr)->exit_fp = thrd_task_exit), \ + ((task_ptr)->exec_fp = thrd_task_exec), \ + (task_ptr))) +#define thrd_task_dismiss(task_ptr) (unlikely((task_ptr) == NULL) ? NULL : \ + (((task_ptr)->init_fp = NULL), \ + ((task_ptr)->exit_fp = NULL), \ + ((task_ptr)->exec_fp = NULL), \ + (task_ptr))) +// => MFI task +#define mfi_task_employ(task_ptr) (unlikely((task_ptr) == NULL) ? NULL : \ + (((task_ptr)->init_fp = mfi_task_init), \ + ((task_ptr)->exit_fp = mfi_task_exit), \ + ((task_ptr)->exec_fp = mfi_task_exec), \ + (task_ptr))) +#define mfi_task_dismiss(task_ptr) (unlikely((task_ptr) == NULL) ? NULL : \ + (((task_ptr)->init_fp = NULL), \ + ((task_ptr)->exit_fp = NULL), \ + ((task_ptr)->exec_fp = NULL), \ + (task_ptr))) + +// => ATI task +#define ati_task_employ(task_ptr) (unlikely((task_ptr) == NULL) ? NULL : \ + (((task_ptr)->init_fp = ati_task_init), \ + ((task_ptr)->exit_fp = ati_task_exit), \ + ((task_ptr)->exec_fp = ati_task_exec), \ + (task_ptr))) +#define ati_task_dismiss(task_ptr) (unlikely((task_ptr) == NULL) ? NULL : \ + (((task_ptr)->init_fp = NULL), \ + ((task_ptr)->exit_fp = NULL), \ + ((task_ptr)->exec_fp = NULL), \ + (task_ptr))) + +// => MFIA task +#define mfia_task_employ(task_ptr) (unlikely((task_ptr) == NULL) ? NULL : \ + (((task_ptr)->init_fp = mfia_task_init), \ + ((task_ptr)->exit_fp = mfia_task_exit), \ + ((task_ptr)->exec_fp = mfia_task_exec), \ + (task_ptr))) +#define mfia_task_dismiss(task_ptr) (unlikely((task_ptr) == NULL) ? NULL : \ + (((task_ptr)->init_fp = NULL), \ + ((task_ptr)->exit_fp = NULL), \ + ((task_ptr)->exec_fp = NULL), \ + (task_ptr))) + +// Implementation +// => initialization arguments for tasks +struct task_init_arg +{ + // General variables + task_id_t id; + // Individual variables which must be private + union + { + // Thread task + struct + { + // N/A + }thrd; + + // MFI task + struct + { + // N/A + }mfi; + + // ATI task + struct + { + // N/A + }ati; + + // MFIA task + struct + { + char *chnl_name; + }mfia; + }idv; +}; + +// => Abstract data type +struct task +{ + // General variables + // => Public + task_ptr_t (*init_fp) (task_ptr_t task_ptr, const task_init_arg_ptr_t arg_ptr); + task_ptr_t (*exit_fp) (task_ptr_t task_ptr); + int (*exec_fp) (task_ptr_t task_ptr, task_hdl_t hdl, void *arg); + // => Private + task_id_t id; + task_hdl_t hdl; + mailbox_t mailbox; + // Individual variables which must be private + union + { + // Thread task + struct + { + thrd_t thrd; + queue_t event_buf; + task_rx_cond_t rx_cond; + void *rx_cond_arg; // NEED_TO_BE_MOTICED, dangerous! need to be maintain by the user + thrd_lock_t rx_cond_mutex; + }thrd; + + // MFI task + struct + { + thrd_t thrd; + }mfi; + + // ATI task + struct + { + thrd_t thrd; + }ati; + + // MFIA task + struct + { + char path[MFIA_PATH_LEN]; + thrd_t thrd; + }mfia; + }idv; +}; + +// => Thread task +extern task_ptr_t thrd_task_init (task_ptr_t task_ptr, const task_init_arg_ptr_t arg_ptr); +extern task_ptr_t thrd_task_exit (task_ptr_t task_ptr); +extern int thrd_task_exec (task_ptr_t task_ptr, task_hdl_t hdl, void *arg); +// => MFI task +extern task_ptr_t mfi_task_init (task_ptr_t task_ptr, const task_init_arg_ptr_t arg_ptr); +extern task_ptr_t mfi_task_exit (task_ptr_t task_ptr); +extern int mfi_task_exec (task_ptr_t task_ptr, task_hdl_t hdl, void *arg); +// => ATI task +extern task_ptr_t ati_task_init (task_ptr_t task_ptr, const task_init_arg_ptr_t arg_ptr); +extern task_ptr_t ati_task_exit (task_ptr_t task_ptr); +extern int ati_task_exec (task_ptr_t task_ptr, task_hdl_t hdl, void *arg); +// => MFIA task +extern task_ptr_t mfia_task_init (task_ptr_t task_ptr, const task_init_arg_ptr_t arg_ptr); +extern task_ptr_t mfia_task_exit (task_ptr_t task_ptr); +extern int mfia_task_exec (task_ptr_t task_ptr, task_hdl_t hdl, void *arg); + +#endif diff --git a/mtklibs/libmdfx/include/thrd.h b/mtklibs/libmdfx/include/thrd.h new file mode 100755 index 0000000000000000000000000000000000000000..ba466629561111eb6d8b63f0e9bc6060f3edff74 --- /dev/null +++ b/mtklibs/libmdfx/include/thrd.h @@ -0,0 +1,118 @@ +/* + Here is an interface of the thread to hide the platform-dependent libraries. + The thrd_init function initializes the thread. + The thrd_exit function uninitializes the thread. + The thrd_exec function assigns a task to a initialized thread. + Please notice that the arg is a local variable which would be popped after calling the thrd_exec(). + If necessary, you should copy the arg in the handler. +*/ + +#ifndef __THRD_H__ +#define __THRD_H__ + +#include "sys_info.h" +#include "compiler.h" +#include +#ifdef __LINUX_PLAT__ +#include +#include +#endif + +// Compiler flags, NEED_TO_BE_NOTICED, set by the compiler +// => POSIX thread +// N/A + +// Type definitions +typedef struct thrd thrd_t; +typedef struct thrd* thrd_ptr_t; +typedef struct thrd_init_arg thrd_init_arg_t; +typedef struct thrd_init_arg* thrd_init_arg_ptr_t; +typedef enum thrd_status {thrd_status_fail, thrd_status_busy, thrd_status_idle} thrd_status_t; +typedef void* (*thrd_hdl_t) (void *arg); + +// Macros +#define THRD_BUSY (EBUSY) +#ifdef __LINUX_PLAT__ +// => POSIX thread +//#define __POSIX_THRD_CANCEL_ENABLE__ +#endif + +// Functions +#define thrd_init(thrd_ptr, arg_ptr) (unlikely((thrd_ptr) == NULL || (thrd_ptr)->init_fp == NULL) ? NULL : (thrd_ptr)->init_fp((thrd_ptr), (arg_ptr))) +#define thrd_exit(thrd_ptr) (unlikely((thrd_ptr) == NULL || (thrd_ptr)->exit_fp == NULL) ? NULL : (thrd_ptr)->exit_fp((thrd_ptr))) +#define thrd_exec(thrd_ptr, hdl, arg) (unlikely((thrd_ptr) == NULL || (thrd_ptr)->exec_fp == NULL) ? SYS_FAIL : (thrd_ptr)->exec_fp((thrd_ptr), (hdl), (arg))) + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the thrd_ptr were given as a value, a compile-time error would be given +// => Default thread: POSIX thread +#define default_thrd_employ(thrd_ptr) posix_thrd_employ(thrd_ptr) +#define default_thrd_dismiss(thrd_ptr) posix_thrd_dismiss(thrd_ptr) +#ifdef __LINUX_PLAT__ +// => POSIX thread +#define posix_thrd_employ(thrd_ptr) (unlikely((thrd_ptr) == NULL) ? NULL : \ + (((thrd_ptr)->init_fp = posix_thrd_init), \ + ((thrd_ptr)->exit_fp = posix_thrd_exit), \ + ((thrd_ptr)->exec_fp = posix_thrd_exec), \ + (thrd_ptr))) +#define posix_thrd_dismiss(thrd_ptr) (unlikely((thrd_ptr) == NULL) ? NULL : \ + (((thrd_ptr)->init_fp = NULL), \ + ((thrd_ptr)->exit_fp = NULL), \ + ((thrd_ptr)->exec_fp = NULL), \ + (thrd_ptr))) +#endif + +// Implementation +// => initialization the argument for thread +struct thrd_init_arg +{ + // General variables + // N/A + // Individual variables which must be private + union + { +#ifdef __LINUX_PLAT__ + // POSIX thread + struct + { + // N/A + }posix; +#endif + }idv; +}; + +// => Abstract data type +struct thrd +{ + // General variables + // => Public + thrd_ptr_t (*init_fp) (thrd_ptr_t thrd_ptr, const thrd_init_arg_ptr_t arg_ptr); + thrd_ptr_t (*exit_fp) (thrd_ptr_t thrd_ptr); + int (*exec_fp) (thrd_ptr_t thrd_ptr, thrd_hdl_t hdl, void *arg); + // => Private + thrd_status_t status; + thrd_hdl_t hdl; + void *arg; + void *ret; + // Individual variables which must be private + union + { +#ifdef __LINUX_PLAT__ + // POSIX thread + struct + { + pthread_t thrd; + pthread_mutex_t exec_mutex; + pthread_cond_t exec_cond_var; + pid_t tid; + }posix; +#endif + }idv; +}; + +#ifdef __LINUX_PLAT__ +// => POSIX thread +extern thrd_ptr_t posix_thrd_init (thrd_ptr_t thrd_ptr, const thrd_init_arg_ptr_t arg_ptr); +extern thrd_ptr_t posix_thrd_exit (thrd_ptr_t thrd_ptr); +extern int posix_thrd_exec (thrd_ptr_t thrd_ptr, thrd_hdl_t hdl, void *arg); +#endif + +#endif diff --git a/mtklibs/libmdfx/include/thrd/thrd_lock.h b/mtklibs/libmdfx/include/thrd/thrd_lock.h new file mode 100755 index 0000000000000000000000000000000000000000..dd55d6387f07d7b19e4acc58584a2ffa0f47fbef --- /dev/null +++ b/mtklibs/libmdfx/include/thrd/thrd_lock.h @@ -0,0 +1,149 @@ +/* + Here is an interface of the thread lock to hide the platform-dependent libraries. + + The mutex lock allows only one thread entering the critical section, and only the thread setting the lock can unlock the mutex. + No additional argument is needed for the thrd_lock_init, thrd_lock_on, and thrd_lock_off when using the mutex lock. + thrd_lock_init(thrd_lock_ptr, thrd_lock_type_mutex); + + The semphore allows only N threads entering the critical section. + The thrd_lock_init requires the capacity and the initial value of avail_rsc when using the semephore. + thrd_lock_init(thrd_lock_ptr, thrd_lock_type_sem, capacity, avail_rsc); + + The producer-consumer model controls a bounded buffer. + The thrd_lock_init requires the capacity when using the producer-consumer model. + The thrd_lock_on requires the is_prod when using the producer-consumer model. + The thrd_lock_off requires the is_prod when using the producer-consumer model, and the is_done to specify if it was completed. + thrd_lock_init(thrd_lock_ptr, thrd_lock_type_prod_cons, capacity); + thrd_lock_prod_off(thrd_lock_ptr, is_done); + thrd_lock_cons_off(thrd_lock_ptr, is_done); +*/ + +#ifndef __THRD_THRD_LOCK_H__ +#define __THRD_THRD_LOCK_H__ + +#include "sys_info.h" +#include +#include +#ifdef __LINUX_PLAT__ +#include +#include +#endif + +// Compiler flags, NEED_TO_BE_NOTICED, set by the compiler +#ifdef __LINUX_PLAT__ +// => POSIX thread lock +// N/A +#endif + +// Type definitions +typedef struct thrd_lock thrd_lock_t; +typedef struct thrd_lock* thrd_lock_ptr_t; +typedef enum thrd_lock_type +{ + thrd_lock_type_none, + thrd_lock_type_mutex, + thrd_lock_type_sem, + thrd_lock_type_prod_cons +}thrd_lock_type_t; + +// Macros +// => Mutex +// N/A +// => Semphore +#define THRD_LOCK_SEM_MAX_CAPACITY (((size_t)(~0) << 1) >> 1) +// => Producer-consumer model +#define THRD_LOCK_PROD_CONS_MAX_CAPACITY ((size_t)(~0)) +#define THRD_LOCK_PROD (true) +#define THRD_LOCK_CONS (false) + +// Functions +#define thrd_lock_init(thrd_lock_ptr, type, args ...) (unlikely((thrd_lock_ptr) == NULL || (thrd_lock_ptr)->init_fp == NULL) ? NULL : (thrd_lock_ptr)->init_fp((thrd_lock_ptr), (type), ## args)) +#define thrd_lock_exit(thrd_lock_ptr) (unlikely((thrd_lock_ptr) == NULL || (thrd_lock_ptr)->exit_fp == NULL) ? NULL : (thrd_lock_ptr)->exit_fp((thrd_lock_ptr))) +#define thrd_lock_on(thrd_lock_ptr, args ...) (unlikely((thrd_lock_ptr) == NULL || (thrd_lock_ptr)->on_fp == NULL) ? SYS_FAIL : (thrd_lock_ptr)->on_fp((thrd_lock_ptr), ## args)) +#define thrd_lock_off(thrd_lock_ptr, args ...) (unlikely((thrd_lock_ptr) == NULL || (thrd_lock_ptr)->off_fp == NULL) ? SYS_FAIL : (thrd_lock_ptr)->off_fp((thrd_lock_ptr), ## args)) +#define thrd_lock_get_type(thrd_lock_ptr) (unlikely((thrd_lock_ptr) == NULL) ? thrd_lock_type_none : (const thrd_lock_type_t)((thrd_lock_ptr)->type)) // NEED_TO_BE_NOTICED, the type might be modified +// => Semphore +#define thrd_lock_sem_wait(thrd_lock_ptr) thrd_lock_on((thrd_lock_ptr)) +#define thrd_lock_sem_signal(thrd_lock_ptr) thrd_lock_off((thrd_lock_ptr)) +// => Producer-consumer model +#define thrd_lock_prod_on(thrd_lock_ptr) thrd_lock_on((thrd_lock_ptr), THRD_LOCK_PROD) +#define thrd_lock_prod_off(thrd_lock_ptr, num_of_done) thrd_lock_off((thrd_lock_ptr), THRD_LOCK_PROD, (num_of_done)) +#define thrd_lock_cons_on(thrd_lock_ptr) thrd_lock_on((thrd_lock_ptr), THRD_LOCK_CONS) +#define thrd_lock_cons_off(thrd_lock_ptr, num_of_done) thrd_lock_off((thrd_lock_ptr), THRD_LOCK_CONS, (num_of_done)) + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the thrd_lock_ptr were given as a value, a compile-time error would be given +// => Default thread lock: POSIX thread lock +#define default_thrd_lock_employ(thrd_lock_ptr) posix_thrd_lock_employ(thrd_lock_ptr) +#define default_thrd_lock_dismiss(thrd_lock_ptr) posix_thrd_lock_dismiss(thrd_lock_ptr) +#ifdef __LINUX_PLAT__ +// => POSIX thread lock +#define posix_thrd_lock_employ(thrd_lock_ptr) (unlikely((thrd_lock_ptr) == NULL) ? NULL : \ + (((thrd_lock_ptr)->init_fp = posix_thrd_lock_init), \ + ((thrd_lock_ptr)->exit_fp = posix_thrd_lock_exit), \ + ((thrd_lock_ptr)->on_fp = posix_thrd_lock_on), \ + ((thrd_lock_ptr)->off_fp = posix_thrd_lock_off), \ + (thrd_lock_ptr))) +#define posix_thrd_lock_dismiss(thrd_lock_ptr) (unlikely((thrd_lock_ptr) == NULL) ? NULL : \ + (((thrd_lock_ptr)->init_fp = NULL), \ + ((thrd_lock_ptr)->exit_fp = NULL), \ + ((thrd_lock_ptr)->on_fp = NULL), \ + ((thrd_lock_ptr)->off_fp = NULL), \ + (thrd_lock_ptr))) +#endif + +// Implementation +// => Abstract data type +struct thrd_lock +{ + // General variables + // => Public + thrd_lock_ptr_t (*init_fp) (thrd_lock_ptr_t thrd_lock_ptr, thrd_lock_type_t type, ...); + thrd_lock_ptr_t (*exit_fp) (thrd_lock_ptr_t thrd_lock_ptr); + int (*on_fp) (thrd_lock_ptr_t thrd_lock_ptr, ...); + int (*off_fp) (thrd_lock_ptr_t thrd_lock_ptr, ...); + // => Private + thrd_lock_type_t type; + // Individual variables which must be private + union + { +#ifdef __LINUX_PLAT__ + union + { + // Mutex lock + struct + { + pthread_mutex_t mutex; + }mutex; + + // Semphore + struct + { + ssize_t avail_rsc; + size_t capacity; + pthread_mutex_t cond_mutex; + pthread_cond_t cond_var; + }sem; + + // Producer-consumer model + struct + { + size_t avail_rsc; + size_t capacity; + pthread_mutex_t mutex; + pthread_mutex_t cond_mutex; + pthread_cond_t cond_var; + }prod_cons; + }posix; +#endif + }idv; +}; + +#ifdef __LINUX_PLAT__ +// => POSIX thread lock +extern thrd_lock_ptr_t posix_thrd_lock_init (thrd_lock_ptr_t thrd_lock_ptr, thrd_lock_type_t type, ...); +extern thrd_lock_ptr_t posix_thrd_lock_exit (thrd_lock_ptr_t thrd_lock_ptr); +extern int posix_thrd_lock_on (thrd_lock_ptr_t thrd_lock_ptr, ...); +extern int posix_thrd_lock_off (thrd_lock_ptr_t thrd_lock_ptr, ...); +#endif + +#endif diff --git a/mtklibs/libmdfx/include/tmr.h b/mtklibs/libmdfx/include/tmr.h new file mode 100755 index 0000000000000000000000000000000000000000..ffa21864b0f827436f726e60a1666971c8f0aba9 --- /dev/null +++ b/mtklibs/libmdfx/include/tmr.h @@ -0,0 +1,153 @@ +/* + Here is an interface of the timer to hide the platform-dependent libraries. + The tmr_init function initializes the timer with a spcified signalling method. + The tmr_exit function uninitializes the timer. + The tmr_set_time function one-shot arms or disarms the timer with a used-defined callback function. + The tmr_get_time function (NEED_TO_BE_NOTICED, NOT yet to implement) the remaining time to the next expiration. + Please notice that the arg is a local variable which would be popped after calling the used-defined callback function(). + If necessary, you should copy the arg in the handler. +*/ + +#ifndef __TMR_H__ +#define __TMR_H__ + +#include "sys_info.h" +#include "compiler.h" +#include "thrd/thrd_lock.h" +#include +#ifdef __LINUX_PLAT__ +#include +#include +#include +#include +#endif + +// Compiler flags, NEED_TO_BE_NOTICED, set by the compiler +// => POSIX timer +// N/A + +// Type definitions +typedef struct tmr tmr_t; +typedef struct tmr* tmr_ptr_t; +typedef struct tmr** tmr_ptr2_t; +typedef struct tmr_init_arg tmr_init_arg_t; +typedef struct tmr_init_arg* tmr_init_arg_ptr_t; +typedef struct tmr_time tmr_time_t; +typedef struct tmr_time* tmr_time_ptr_t; +typedef enum tmr_sig {tmr_sig_none, tmr_sig_block, tmr_sig_nonblock, tmr_sig_agent} tmr_sig_t; +typedef void (*tmr_sig_hdl_t) (tmr_ptr_t tmr_ptr, void *arg); // SHOULD be an async-signal-safe function for POSIX + +// Macros +#ifdef __LINUX_PLAT__ +// => POSIX timer +#define TMR_INVAL_TID (0) +#define TMR_SIG_BLOCK ((SIGRTMIN + SIGRTMAX) >> 1) +#define TMR_SIG_NONBLOCK ((SIGRTMIN + SIGRTMAX) >> 2) +#endif + +// Functions +#define tmr_init(tmr_ptr, arg_ptr) (unlikely((tmr_ptr) == NULL || (tmr_ptr)->init_fp == NULL) ? NULL : (tmr_ptr)->init_fp((tmr_ptr), (arg_ptr))) +#define tmr_exit(tmr_ptr) (unlikely((tmr_ptr) == NULL || (tmr_ptr)->exit_fp == NULL) ? NULL : (tmr_ptr)->exit_fp((tmr_ptr))) +#define tmr_set_time(tmr_ptr, time, hdl, arg) (unlikely((tmr_ptr) == NULL || (tmr_ptr)->set_time_fp == NULL) ? SYS_FAIL : (tmr_ptr)->set_time_fp((tmr_ptr), (time), (hdl), (arg))) +#define tmr_get_time(tmr_ptr) (unlikely((tmr_ptr) == NULL || (tmr_ptr)->get_time_fp == NULL) ? 0 : (tmr_ptr)->get_time_fp((tmr_ptr))) + +// Interface-implementation binding, NEED_TO_BE_NOTICED, if the tmr_ptr were given as a value, a compile-time error would be given +// => Default timer: POSIX timer +#define default_tmr_employ(tmr_ptr) posix_tmr_employ(tmr_ptr) +#define default_tmr_dismiss(tmr_ptr) posix_tmr_dismiss(tmr_ptr) +#ifdef __LINUX_PLAT__ +// => POSIX timer +#define posix_tmr_employ(tmr_ptr) (unlikely((tmr_ptr) == NULL) ? NULL : \ + (((tmr_ptr)->init_fp = posix_tmr_init), \ + ((tmr_ptr)->exit_fp = posix_tmr_exit), \ + ((tmr_ptr)->set_time_fp = posix_tmr_set_time), \ + ((tmr_ptr)->get_time_fp = posix_tmr_get_time), \ + (tmr_ptr))) +#define posix_tmr_dismiss(tmr_ptr) (unlikely((tmr_ptr) == NULL) ? NULL : \ + (((tmr_ptr)->init_fp = NULL), \ + ((tmr_ptr)->exit_fp = NULL), \ + ((tmr_ptr)->set_time_fp = NULL), \ + ((tmr_ptr)->get_time_fp = NULL), \ + (tmr_ptr))) +#endif + +// Implementation +// => initialization the argument for timer +struct tmr_init_arg +{ + // General variables + tmr_sig_t sig; + // Individual variables which must be private + union + { +#ifdef __LINUX_PLAT__ + // POSIX timer + struct + { + pid_t tid; + }posix; +#endif + }idv; +}; + +// => tmr time +struct tmr_time +{ + // General variables + size_t sec; + size_t nsec; // for 32-bit variables, a scalable unit is come out between every 1 * 10^9 + // Individual variables which must be private + union + { + // POSIX timer + struct + { + // N/A + }posix; + }idv; +}; + +// => Abstract data type +struct tmr +{ + // General variables + // => Public + tmr_ptr_t (*init_fp) (tmr_ptr_t tmr_ptr, const tmr_init_arg_ptr_t arg_ptr); + tmr_ptr_t (*exit_fp) (tmr_ptr_t tmr_ptr); + int (*set_time_fp) (tmr_ptr_t tmr_ptr, const tmr_time_ptr_t time_ptr, tmr_sig_hdl_t hdl, void *arg); + time_t (*get_time_fp) (tmr_ptr_t tmr_ptr); + // => Private + tmr_sig_t sig; + tmr_sig_hdl_t hdl; // SHOULD be an async-signal-safe function for POSIX + void *arg; + // Individual variables which must be private + union + { +#ifdef __LINUX_PLAT__ + // POSIX timer + struct + { + thrd_lock_t mutex; + + // for tmr_sig_block + pthread_t thrd; + + // for tmr_sig_nonblock + timer_t id; // also for tmr_sig_agent + size_t num_of_req; + size_t count; + pid_t tid; + }posix; +#endif + }idv; +}; + +#ifdef __LINUX_PLAT__ +// => POSIX timer +extern tmr_ptr_t posix_tmr_init (tmr_ptr_t tmr_ptr, const tmr_init_arg_ptr_t arg_ptr); +extern tmr_ptr_t posix_tmr_exit (tmr_ptr_t tmr_ptr); +extern int posix_tmr_set_time (tmr_ptr_t tmr_ptr, const tmr_time_ptr_t time_ptr, tmr_sig_hdl_t hdl, void *arg); +extern time_t posix_tmr_get_time (tmr_ptr_t tmr_ptr); +#endif + +#endif diff --git a/mtklibs/libmdfx/libmdfx.so b/mtklibs/libmdfx/libmdfx.so new file mode 100755 index 0000000000000000000000000000000000000000..a8b7636019a1e94fccf5ee51053e8f14d883d863 Binary files /dev/null and b/mtklibs/libmdfx/libmdfx.so differ diff --git a/mtklibs/libmfbllsw/Android.mk_ b/mtklibs/libmfbllsw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..180ca60533859edac3ae07dc2a71fdddf8065c0d --- /dev/null +++ b/mtklibs/libmfbllsw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmfbllsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmfbllsw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmfbllsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmfbllsw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmfbllsw/README b/mtklibs/libmfbllsw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libmfbllsw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libmfbllsw/arm/libmfbllsw.a b/mtklibs/libmfbllsw/arm/libmfbllsw.a new file mode 100755 index 0000000000000000000000000000000000000000..2b925151e8a1d084f892296560a13786f797f1e0 Binary files /dev/null and b/mtklibs/libmfbllsw/arm/libmfbllsw.a differ diff --git a/mtklibs/libmfbllsw/libmfbllsw.a b/mtklibs/libmfbllsw/libmfbllsw.a new file mode 100755 index 0000000000000000000000000000000000000000..7f4fda9995283b8a29b08e2da946a6ca67165683 Binary files /dev/null and b/mtklibs/libmfbllsw/libmfbllsw.a differ diff --git a/mtklibs/libmfbmm/Android.mk_ b/mtklibs/libmfbmm/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..fb47f4fc3e728fe5bc214ae29bd4ca2602c08eb8 --- /dev/null +++ b/mtklibs/libmfbmm/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmfbmm +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmfbmm.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmfbmm +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmfbmm.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmfbmm/README b/mtklibs/libmfbmm/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libmfbmm/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libmfbmm/arm/libmfbmm.a b/mtklibs/libmfbmm/arm/libmfbmm.a new file mode 100755 index 0000000000000000000000000000000000000000..613880a00fcd7b5e10d22aec15e6cc75e7fb8d51 Binary files /dev/null and b/mtklibs/libmfbmm/arm/libmfbmm.a differ diff --git a/mtklibs/libmfbmm/libmfbmm.a b/mtklibs/libmfbmm/libmfbmm.a new file mode 100755 index 0000000000000000000000000000000000000000..c103f49e4354c256681d35465f0b33a41a5054d1 Binary files /dev/null and b/mtklibs/libmfbmm/libmfbmm.a differ diff --git a/mtklibs/libmhalImageCodec/Android.mk_ b/mtklibs/libmhalImageCodec/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..c4357160b7eb584658596ec9b84ed76707a50d9d --- /dev/null +++ b/mtklibs/libmhalImageCodec/Android.mk_ @@ -0,0 +1,27 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmhalImageCodec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libJpgDecPipe libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmhalImageCodec.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmhalImageCodec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libJpgDecPipe libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmhalImageCodec.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmhalImageCodec/NOTICE b/mtklibs/libmhalImageCodec/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..d1fd6e92d3bb8452b5bd07ce771d3101d1a5689d --- /dev/null +++ b/mtklibs/libmhalImageCodec/NOTICE @@ -0,0 +1,22 @@ + * Copyright (C) 2010 The Android Open Source Project: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/libmhalImageCodec/README b/mtklibs/libmhalImageCodec/README new file mode 100755 index 0000000000000000000000000000000000000000..33cd73489a5f719a192ea042a4895a89d5d2c50b --- /dev/null +++ b/mtklibs/libmhalImageCodec/README @@ -0,0 +1,33 @@ +Library of MTK JPEG Decode feature. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libJpgDecPipe.so controls the MTK JPEG Decode flow and dispatch the decode tasks and parameters +to either SW or HW encoder to do the JPEG Decode tasks. This library also controls MTK HW resizing, +rotating and Image quality tuning functions for Image postprocessing. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libutils.so +3. libcutils.so +4. libion.so + +and the following libs from MediaTek: +1. libion_mtk.so +2. libm4u.so +3. libSwJpgCodec.so +4. libGdmaScalerPipe.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== +Provide api for JPEG Decode feature called from libmHalImageCodec.so. +all api interfaces are at (vendor\mediatek\proprietary\platform\mt6752\hardware\jpeg\inc) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libmhalImageCodec/arm/libmhalImageCodec.so b/mtklibs/libmhalImageCodec/arm/libmhalImageCodec.so new file mode 100755 index 0000000000000000000000000000000000000000..680d9ec4e722877205f018e6dc9880331ecbf859 Binary files /dev/null and b/mtklibs/libmhalImageCodec/arm/libmhalImageCodec.so differ diff --git a/mtklibs/libmhalImageCodec/include/enc/jpeg_hal.h b/mtklibs/libmhalImageCodec/include/enc/jpeg_hal.h new file mode 100755 index 0000000000000000000000000000000000000000..b470334e612fbe14d2f5955cc62499472bf759a1 --- /dev/null +++ b/mtklibs/libmhalImageCodec/include/enc/jpeg_hal.h @@ -0,0 +1,339 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + */ +/* MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + */ + +#ifndef __JPEG_HAL_H__ +#define __JPEG_HAL_H__ + +#include "m4u_lib.h" + +#if 0 //def JENC_LOCK_VIDEO +#include +#include +#endif +/******************************************************************************* +* +********************************************************************************/ +#ifndef JUINT32 +typedef unsigned int JUINT32; +#endif + +#ifndef JINT32 +typedef int JINT32; +#endif + +#define JPEG_MAX_ENC_SIZE (128*1024*1024) + + + + +/******************************************************************************* +* class JpgEncHal +********************************************************************************/ +class JpgEncHal { +public: + JpgEncHal(); + virtual ~JpgEncHal(); + + //enum SrcFormat { + // kRGB_565_Format, + // kRGB_888_Format, + // kARGB_8888_Format, + // kABGR_8888_Format, + // kYUY2_Pack_Format, // YUYV + // kUYVY_Pack_Format, // UYVY + // kYVU9_Planar_Format, // YUV411, 4x4 sub sample U/V plane + // kYV16_Planar_Format, // YUV422, 2x1 subsampled U/V planes + // kYV12_Planar_Format, // YUV420, 2x2 subsampled U/V planes + // kNV12_Format, // YUV420, 2x2 subsampled , interleaved U/V plane + // kNV21_Format, // YUV420, 2x2 subsampled , interleaved V/U plane + // + // kSrcFormatCount + //}; + + //enum JPEG_ENC_RESULT { + // JPEG_ENC_RST_CFG_ERR, + // JPEG_ENC_RST_DONE, + // JPEG_ENC_RST_ROW_DONE, + // JPEG_ENC_RST_HUFF_ERROR, + // JPEG_ENC_RST_DECODE_FAIL, + // JPEG_ENC_RST_BS_UNDERFLOW + // + //}; + + + enum EncFormat { + //kYUV_444_Format, + //kYUV_422_Format, + //kYUV_411_Format, + //kYUV_420_Format, + //kYUV_400_Format, + + kENC_YUY2_Format, // YUYV + kENC_UYVY_Format, // UYVY + kENC_NV12_Format, // YUV420, 2x2 subsampled , interleaved U/V plane + kENC_NV21_Format, // YUV420, 2x2 subsampled , interleaved V/U plane + kENC_YV12_Format, /// YUV420, 2x2 subsampled, 3 plan + + + kEncFormatCount + }; + + enum { + JPEG_ENC_MEM_PHY, + JPEG_ENC_MEM_PMEM, + JPEG_ENC_MEM_M4U, + JPEG_ENC_MEM_ION + + }; + + enum { + JPEG_ENC_HW, + JPEG_ENC_SW + }; + + enum EncLockType{ + JPEG_ENC_LOCK_HW_FIRST, + JPEG_ENC_LOCK_SW_ONLY, + JPEG_ENC_LOCK_HW_ONLY + }; + + + // lock with enum + bool LevelLock(EncLockType type); + + //lock hw first + bool lock(); + bool unlock(); + bool start(JUINT32 *encSize); + + /* set image actual width, height and encode format */ + bool setEncSize(JUINT32 width, JUINT32 height, EncFormat encformat, bool isSrcBufNeedFlush = true) ; + + /* get requirement of minimum source buffer size and stride after setEncSize */ + JUINT32 getSrcBufMinSize() { return fSrcMinBufferSize ; }; + JUINT32 getSrcCbCrBufMinSize() { return fSrcMinCbCrSize ; }; + JUINT32 getSrcBufMinStride() { return fSrcMinBufferStride ; }; + + /* Set source buffer virtual address. + The srcChromaAddr should be NULL in YUV422. + */ + bool setSrcAddr(void *srcAddr, void *srcChromaAddr); + + /* Set source buffer physical address. + The srcChromaAddr should be NULL in YUV422. + */ + bool setSrcPAddr(void *srcPAddr, void *srcChromaPAddr); + + /* Set source buffer virtual address. + The srcChromaAddr should be NULL in YUV422. + For YUV420(3P), the Y, U, V can be different plan and non-continuous physically + */ + bool setSrcAddr(void *srcAddr, void *srcCb, void *srcCr); + + /* Set source size of buffer1(srcSize) and buffer2(srcSize2) and stride. + The buffer size and stride should be at least minimum buffer size and stride. + The buffer1 and buffer2 share the buffer stride. + Stride should be align to 32(YUV422) or 16 (YUV420). + */ + bool setSrcBufSize(JUINT32 srcStride,JUINT32 srcSize, JUINT32 srcSize2); + + bool setSrcBufSize(JUINT32 srcStride,JUINT32 srcSize, JUINT32 srcSize2, JUINT32 srcSize3, JUINT32 srcUVStride = 0); + /* set encoding quality , range should be [100:1] */ + bool setQuality(JUINT32 quality) { if( quality > 100) return false ; else fQuality = quality; return true ;} + + /* set distination buffer virtual address and size */ + bool setDstAddr(void *dstAddr) { if(dstAddr == NULL) return false; + else fDstAddr = dstAddr; return true;} + + /* set distination buffer physical address and size */ + bool setDstPAddr(void *dstPAddr) { if(dstPAddr == NULL) return false; + else fDstM4uPA = fDstIonPA = ((unsigned long)dstPAddr & 0xFFFFFFFFL); return true;} + + /* set bitstream buffer size , should at least 624 bytes */ + bool setDstSize(JUINT32 size) { if(size<624)return false; + else fDstSize = size; return true ;} + + /* set Normal/Exif mode, 1:Normal,0:Exif, default is Normal mode */ + void enableSOI(bool b) { fIsAddSOI = b; } + + + void setIonMode(bool ionEn) { if( ionEn ) fMemType = JPEG_ENC_MEM_ION; + else fMemType = fMemTypeDefault ; } + + void setSrcFD( JINT32 srcFD, JINT32 srcFD2 ) { fSrcFD = srcFD; fSrcFD2 = srcFD2; } + + void setDstFD( JINT32 dstFD ) { fDstFD = dstFD ; } + + //bool setSrcAddrPA( JUINT32 srcAddrPA, JUINT32 srcChromaAddrPA); + + //bool setDstAddrPA( JUINT32 dstAddrPA){ if(dstAddrPA == NULL) return false; + // else fDstAddrPA = dstAddrPA; return true; + // } + void setDRI( JINT32 dri ) { fDRI = dri ; } + + + +private: + + bool allocPMEM(); + bool alloc_m4u(); + + bool free_m4u(); + + bool alloc_ion(); + bool free_ion(); + bool islock; + bool onSwEncode(JUINT32 *encSize); + + bool fEncoderType; /// to identify current HAL use HW or SW + + bool lockVideo() ; + bool unlockVideo(); + + + + MTKM4UDrv *pM4uDrv ; + M4U_MODULE_ID_ENUM fm4uJpegInputID ; + M4U_MODULE_ID_ENUM fm4uJpegOutputID ; + + JUINT32 fMemType ; + JUINT32 fMemTypeDefault ; + + JUINT32 fSrcWidth; + JUINT32 fSrcHeight; + JUINT32 fDstWidth; + JUINT32 fDstHeight; + JUINT32 fQuality; + JUINT32 fROIX; + JUINT32 fROIY; + JUINT32 fROIWidth; + JUINT32 fROIHeight; + + JUINT32 fSrcMinBufferSize ; + JUINT32 fSrcMinCbCrSize ; + JUINT32 fSrcMinBufferStride; + JUINT32 fSrcMinCbCrStride; + + JUINT32 fEncSrcBufSize ; + JUINT32 fSrcBufStride; + JUINT32 fSrcBufHeight; + + JUINT32 fEncCbCrBufSize ; + JUINT32 fSrcCbCrBufStride; + JUINT32 fSrcCbCrBufHeight; + + //SrcFormat fSrcFormat; + EncFormat fEncFormat; + + void *fSrcAddr; + void *fSrcChromaAddr; + + //JUINT32 fEncDstBufSize ; + + + void *fSrcCb; + void *fSrcCr; + void *fDstAddr; + int fDstSize; + bool fIsAddSOI; + + + + JUINT32 fSrcAddrPA ; + JUINT32 fSrcChromaAddrPA; + JUINT32 fDstAddrPA ; + + JUINT32 fDstM4uPA; + JUINT32 fSrcM4uPA; + JUINT32 fSrcChromaM4uPA; + JUINT32 fIsSrc2p; + JINT32 fSrcPlaneNumber; + + //ION + + bool fIonEn ; + //bool fSrcIonEn ; + //bool fDstIonEn ; + JINT32 fSrcFD; + JINT32 fSrcFD2; + JINT32 fDstFD ; + + JUINT32 fSrcIonPA ; + JUINT32 fSrcChromaIonPA ; + JUINT32 fDstIonPA ; + + void* fSrcIonVA ; + void* fSrcChromaIonVA ; + void* fDstIonVA ; + + JINT32 fSrcIonHdle ; + JINT32 fSrcChromaIonHdle ; + JINT32 fDstIonHdle ; + + + + JINT32 fIonDevFD ; + JUINT32 fDRI ; + bool fIsSelfAlloc; + bool fIsSrcBufNeedFlush; + + + +#if 1 //def JPEG_ENC_USE_PMEM + + unsigned char *fEncSrcPmemVA ; + unsigned char *fEncSrcCbCrPmemVA ; + unsigned char *fEncDstPmemVA ; + + JUINT32 fEncSrcPmemPA ; + JUINT32 fEncSrcCbCrPmemPA ; + JUINT32 fEncDstPmemPA ; + + int fEncSrcPmemFD ; + int fEncSrcCbCrPmemFD ; + int fEncDstPmemFD ; +#endif + int encID; + unsigned long fResTable; + +#if 0 //def JENC_LOCK_VIDEO + VAL_UINT32_T fVDriverType ; + VAL_HW_LOCK_T fVLock; +#endif + + +}; + +#endif diff --git a/mtklibs/libmhalImageCodec/include/mhal/MediaHal.h b/mtklibs/libmhalImageCodec/include/mhal/MediaHal.h new file mode 100755 index 0000000000000000000000000000000000000000..8a08a49e04848045274f7af968ab1e25ca289810 --- /dev/null +++ b/mtklibs/libmhalImageCodec/include/mhal/MediaHal.h @@ -0,0 +1,886 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + */ +/* MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + */ + +/******************************************************************************************** + * LEGAL DISCLAIMER + * + * (Header of MediaTek Software/Firmware Release or Documentation) + * + * BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") RECEIVED + * FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON AN "AS-IS" BASIS + * ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR + * A PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY + * WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, + * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK + * ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO + * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION + * OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. + * + * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE LIABILITY WITH + * RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, +TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE + * FEES OR SERVICE CHARGE PAID BY BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS + * OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF LAWS PRINCIPLES. + ************************************************************************************************/ + +/** + * @file + * MediaHal.h + * + * @par Project: + * Yusu + * + * @par Description:: + * MHAL definitions and function prototypes, this layer manager all multimedia module + * MHAL stands for Mediatek Hardware Abstract Layer + * + * @par Author: + * Wilson Lu (mtk01780) + * Tzu-Meng Chung (mtk02529) + * + * @par $Revision: #12 $ + * @par $Modtime:$ + * @par $Log:$ + * + */ + +#ifndef MEDIA_HAL_H +#define MEDIA_HAL_H + +#include "MediaTypes.h" + +/*============================================================================= + * Type definition + *===========================================================================*/ + + +/******************************************************************************* +* IO Control Mask +********************************************************************************/ +#define MHAL_IOCTL_CAMERA_GROUP_MASK 0x1000 ///< Camera group mask +#define MHAL_IOCTL_JPEG_GROUP_MASK 0x2000 ///< JPEG group mask +#define MHAL_IOCTL_VIDEO_GROUP_MASK 0x4000 ///< VIDEO group mask + +/******************************************************************************* +* IO Control Code +********************************************************************************/ +#define MHAL_IOCTL_LOCK_RESOURCE 0x0001 ///< To query and lock resource (IDP and DCT) +#define MHAL_IOCTL_UNLOCK_RESOURCE 0x0002 ///< To unlock resource (IDP and DCT) +// +#define MHAL_IOCTL_JPEG_ENC 0x2001 ///< To encode JPEG file +#define MHAL_IOCTL_JPEG_DEC_SET_READ_FUNC 0x2002 ///< To set the jpeg decode read functon +#define MHAL_IOCTL_JPEG_DEC_START 0x2003 ///< To start jpeg decode +#define MHAL_IOCTL_JPEG_DEC_GET_INFO 0x2004 ///< To get the jpeg file information +#define MHAL_IOCTL_JPEG_DEC_PARSER 0x2005 ///< To parser the jpeg file information +#define MHAL_IOCTL_JPEG_DEC_CANCEL 0x2006 ///< To cancel the jpeg decoder +#define MHAL_IOCTL_WEBP_DEC_START 0x2011 ///< To start webp decode +#define MHAL_IOCTL_WEBP_DEC_GET_INFO 0x2012 ///< To get the webp file information +#define MHAL_IOCTL_WEBP_DEC_PARSER 0x2013 ///< To parser the webp file information +#define MHAL_IOCTL_WEBP_DEC_CANCEL 0x2014 ///< To cancel the webp decoder +#define MHAL_IOCTL_MJPEG_DEC_PARSER 0x2021 ///< To parser the mjpeg file information +#define MHAL_IOCTL_MJPEG_DEC_GET_INFO 0x2022 ///< To get the mjpeg file information +#define MHAL_IOCTL_MJPEG_DEC_START 0x2023 ///< To start mjpeg decode +#define MHAL_IOCTL_MJPEG_DEC_CANCEL 0x2024 ///< To cancel the mjpeg decoder + + +#define MHAL_IOCTL_MP4_PLAYBACK_OPEN 0x4001 ///< To open MP4 decoder driver +#define MHAL_IOCTL_MP4_PLAYBACK_INIT 0x4002 ///< To init MP4 decoder driver +#define MHAL_IOCTL_MP4_PLAYBACK_RST 0x4003 ///< To reset MP4 decoder driver +#define MHAL_IOCTL_MP4_PLAYBACK_PARSE_H263_HEADER 0x4004 ///< To parse h263 header +#define MHAL_IOCTL_MP4_PLAYBACK_DECODE 0x4005 ///< To parse header and set HW configuration +#define MHAL_IOCTL_MP4_PLAYBACK_TRIGGER_HW_START 0x4006 ///< To trigger MP4 decoder driver start to decode +#define MHAL_IOCTL_MP4_PLAYBACK_CLOSE 0x4007 ///< To close MP4 decoder driver +#define MHAL_IOCTL_MP4_PLAYBACK_GET_PARAM 0x4008 ///< To get parameter +#define MHAL_IOCTL_MP4_PLAYBACK_SET_PARAM 0x4009 ///< To set parameter + +#define MHAL_IOCTL_MP4_RECORD_INIT 0x4101 ///< To initial MPEG4 record +#define MHAL_IOCTL_MP4_RECORD_ENCODE_ONE_FRAME 0x4102 ///< To encode MPEG4 frame +#define MHAL_IOCTL_MP4_RECORD_DEINIT 0x4103 ///< To deinitial MPEG4 record + +#define MHAL_IOCTL_H264_PLAYBACK_INIT 0x4201 ///< To initial H264 playback +#define MHAL_IOCTL_H264_PLAYBACK_DECODE_ONE_FRAME 0x4202 ///< To decode H264 frame +#define MHAL_IOCTL_H264_PLAYBACK_DEINIT 0x4203 ///< To deinitial H264 playback +#define MHAL_IOCTL_H264_PLAYBACK_GET_PARAM 0x4204 ///< To get parameter +#define MHAL_IOCTL_H264_PLAYBACK_SET_PARAM 0x4205 ///< To set parameter +#define MHAL_IOCTL_H264_PLAYBACK_INSERT_BUF 0x4206 ///< To insert buffer +#define MHAL_IOCTL_H264_PLAYBACK_RELEASE_BUF 0x4207 ///< To release buffer +#define MHAL_IOCTL_H264_PLAYBACK_CHECK_BUF 0x4208 ///< To check buffer +#define MHAL_IOCTL_H264_PLAYBACK_SHOW_BUF 0x4209 ///< To show buffer + +#define MHAL_IOCTL_BITBLT 0x8001 ///< To bitblt +#define MHAL_IOCTL_DIRECT_BITBLT_PREPARE 0x8002 ///< To direct link bitblt +#define MHAL_IOCTL_DIRECT_BITBLT_END 0x8003 ///< To release direct link resources + +#define MHAL_IOCTL_FACTORY 0x8100 ///< To run factory mode +#define MHAL_IOCTL_FB_CONFIG_IMEDIATE_UPDATE 0x8101 ///< To config fb immediate update + +/******************************************************************************* +* Lock Resource Mode +********************************************************************************/ +#define MHAL_MODE_JPEG_DECODE 0x0001 ///< Record now scenario of jpeg decode +#define MHAL_MODE_JPEG_ENCODE 0x0002 ///< Record now scenario of jpeg encode +#define MHAL_MODE_CAM_PREVIEW 0x0004 ///< Record now scenario of camera preview +#define MHAL_MODE_CAM_CAPTURE 0x0008 ///< Record now scenario of camera capture +#define MHAL_MODE_MP4_PLAYBACK 0x0010 ///< Record now scenario of MPEG4 playback +#define MHAL_MODE_H264_PLAYBACK 0x0010 ///< Record now scenario of H264 playback +#define MHAL_MODE_MP4_RECORD 0x0020 ///< Record now scenario of MPEG4 record +#define MHAL_MODE_BITBLT 0x0040 ///< Record now scenario of Bitblt + +#define MHAL_MODE_ALL 0x00FF + +/******************************************************************************* +* Query Memory Mode +********************************************************************************/ +#define MHAL_MEM_MODE_PREVIEW 0x0001 ///< The query memory mode of camera preview +#define MHAL_MEM_MODE_CAPTURE 0x0002 ///< The query memory mode of camera capture + +/******************************************************************************* +* Lock Resource Interface +********************************************************************************/ +typedef struct mHalLockParam_s +{ + MUINT32 mode; + MUINT32 waitMilliSec; + MUINT32 waitMode; +} MHalLockParam_t; + +/***************************************************************************** +* Video Encoder Interface +*****************************************************************************/ +typedef enum +{ + VDO_ENC_FORMAT_H263 = 0, + VDO_ENC_FORMAT_MPEG4, + VDO_ENC_FORMAT_AVC, + + VDO_ENC_FORMAT_MAX = 0xFFFFFFFF +}VDO_ENC_FORMAT; + + +/***************************************************************************** +* JPEG Decoder Interface +*****************************************************************************/ + +typedef unsigned int (*pfReadStreamCallback)(MUINT8* srcStream, MUINT32 size); + +typedef enum +{ + JPEG_ERROR_NONE = 0, + JPEG_ERROR_INVALID_DRIVER, + JPEG_ERROR_INVALID_CTRL_CODE, + JPEG_ERROR_INVALID_PARA, + JPEG_ERROR_INVALID_MEMORY, + JPEG_ERROR_INVALID_FORMAT, + + JPEG_ERROR_ALL = 0xFFFFFFFF +}MHAL_JPEG_ERROR_ENUM; + +typedef enum +{ + JPEG_RESULT_DONE = 0, + JPEG_RESULT_PAUSE, + JPEG_RESULT_OVERFLOW, + JPEG_RESULT_HALT, + + RESULT_ALL = 0xFFFFFFFF +}MHAL_JPEG_DEC_RESULT_ENUM; + +typedef enum { + JPEG_OUT_FORMAT_RGB565 = 0, + JPEG_OUT_FORMAT_RGB888, + JPEG_OUT_FORMAT_ARGB8888, + JPEG_OUT_FORMAT_YUY2, // YUYV + JPEG_OUT_FORMAT_UYVY, // UYVY + JPEG_OUT_FORMAT_I420, // YVU420 3 plane + JPEG_OUT_FORMAT_YV12, // YVU420 3 plane + JPEG_OUT_FORMAT_ALL = 0xFFFFFFFF +}JPEG_OUT_FORMAT_ENUM; + +typedef struct +{ + void *imageDCParam; + MUINT32 ISOSpeedRatings; +}MHAL_JPEG_POST_PROC_PARAM; + +typedef struct +{ + + MINT32 timeout; // time for wait IRQ, unit : millisecond + MUINT8 *srcBuffer; // avoid reset error, copy src file back + MUINT32 srcBufSize; + MUINT32 srcLength; + MINT32 srcFD; + + // destination information + MUINT8 *dstPhysAddr; // if set NULL, mhal will allocate memory + MUINT8 *dstVirAddr; + MUINT32 dstWidth; + MUINT32 dstHeight; + MUINT32 doDithering; // 1: do HW dithering + MUINT32 doPostProcessing; // 1: do HW PostProcessing + MHAL_JPEG_POST_PROC_PARAM *postProcessingParam; + MUINT32 PreferQualityOverSpeed; // 1: do SLOW_IDCT + + // Range Decode Infor + MUINT32 doRangeDecode; // 1: do Range Decode, 0: disable + MUINT32 rangeLeft; + MUINT32 rangeTop; + MUINT32 rangeRight; + MUINT32 rangeBottom; + + JPEG_OUT_FORMAT_ENUM dstFormat; + + void* jpgDecHandle ; + MUINT32 fCancelDecoderFlag; + +}MHAL_JPEG_DEC_START_IN; + +typedef struct +{ + MUINT8 *srcBuffer; + MUINT32 srcLength; + MINT32 srcFD; + void* jpgDecHandle ; + +}MHAL_JPEG_DEC_SRC_IN; + +typedef struct +{ + MUINT32 srcWidth; + MUINT32 srcHeight; + void* jpgDecHandle ; + +}MHAL_JPEG_DEC_INFO_OUT; + + +/***************************************************************************** +* JPEG Encoder Interface +*****************************************************************************/ +typedef enum { + JPEG_IN_FORMAT_RGB565 = 0, + JPEG_IN_FORMAT_RGB888, + JPEG_IN_FORMAT_ARGB8888, + + JPEG_IN_FORMAT_ALL = 0xFFFFFFFF +}JPEG_IN_FORMAT_ENUM; + +/** + * @par Enumeration + * JPEG_SAMPLING_FORMAT + * @par Description + * The JPEG sampling format you want to encode + */ +typedef enum { + JPEG_ENC_YUV444 = 444, + JPEG_ENC_YUV422 = 422, + JPEG_ENC_YUV411 = 411, + JPEG_ENC_YUV420 = 420, + JPEG_ENC_GRAYLEVEL = 400, + + JPEG_ENC_ALL = 0xFFFFFFFF + +} JPEG_ENC_FORMAT_ENUM; + +/** + * @par Enumeration + * JPEG_ENCODE_QUALITY_ENUM + * @par Description + * The JPEG quality you want to encode + */ + +typedef struct +{ + MINT32 timeout; // time for wait IRQ, unit : millisecond + + MUINT8 *srcAddr; + MUINT8 *dstAddr; + + MUINT32 srcWidth; + MUINT32 srcHeight; + + MUINT32 dstWidth; + MUINT32 dstHeight; + + MUINT32 quality; + MUINT32 dstSize; + MUINT32 *encSize; + + JPEG_IN_FORMAT_ENUM inFormat; + JPEG_ENC_FORMAT_ENUM outFormat; + +}MHAL_JPEG_ENC_START_IN; + +/******************************************************************************* +* Bitblt Interface +********************************************************************************/ +typedef enum +{ + MHAL_FORMAT_RGB_565 = 0, + MHAL_FORMAT_BGR_565, + MHAL_FORMAT_RGB_888, + MHAL_FORMAT_BGR_888, + MHAL_FORMAT_ARGB_8888, + MHAL_FORMAT_ABGR_8888, + MHAL_FORMAT_BGRA_8888, + MHAL_FORMAT_RGBA_8888, + MHAL_FORMAT_YUV_420, + MHAL_FORMAT_YUV_420_SP, + MHAL_FORMAT_MTK_YUV, + MHAL_FORMAT_YUY2, + MHAL_FORMAT_UYVY, + MHAL_FORMAT_Y800, + MHAL_FORMAT_YUV_422_PL, //422 Planar,i.e YV16 Planar + MHAL_FORMAT_ANDROID_YV12, //Androdi YV12.YVU stride all 16 pixel align + MHAL_FORMAT_IMG_YV12, //Imagination YV12.YVU stride all 32 pixel align + + + MHAL_FORMAT_ERROR, + + MHAL_FORMAT_ALL = 0xFFFFFFFF +} MHAL_BITBLT_FORMAT_ENUM; + +typedef enum +{ + MHAL_BITBLT_ROT_0 = 0, + MHAL_BITBLT_ROT_90 = 0x1, + MHAL_BITBLT_ROT_180 = 0x2, + MHAL_BITBLT_ROT_270 = 0x3,// (90 + 180) + MHAL_BITBLT_FLIP_H = 0x4, + + MHAL_BITBLT_ALL = 0xFFFFFFFF +} MHAL_BITBLT_ROT_ENUM; + +typedef struct mHalBltParam_s +{ + MUINT32 m4u_handle; //NULL imply VA exist in current process + + MUINT32 srcX; + MUINT32 srcY; + MUINT32 srcW; + MUINT32 srcWStride; + MUINT32 srcH; + MUINT32 srcHStride; + MUINT32 srcAddr; + MUINT32 srcFormat; + + MUINT32 dstW; + MUINT32 dstH; + MUINT32 dstAddr; + MUINT32 dstFormat; + MUINT32 pitch; + + MUINT32 orientation; + MUINT32 doImageProcess;// 0:disable, 0x1:color process+EE, 0x2:do color process only , 0x3:face beautify, bit[4]: 0-do bitblt if isp is N.A , 1-skip if isp is N.A. + MUINT32 favor_flags; /*Image Transform favor flags,this is a low level flags. default is 0*/ + + + MUINT32 u4SrcOffsetXFloat;//0x100 stands for 1, 0x40 stands for 0.25 , etc... + MUINT32 u4SrcOffsetYFloat;//0x100 stands for 1, 0x40 stands for 0.25 , etc... + + + /*Resizer coeff if can apply*/ + MUINT32 resz_up_scale_coeff; //0:linear interpolation 1:most blur 19:sharpest 8:recommeneded >12:undesirable + MUINT32 resz_dn_scale_coeff; //0:linear interpolation 1:most blur 19:sharpest 15:recommeneded + MUINT32 resz_ee_h_str; //down scale only/0~15 + MUINT32 resz_ee_v_str; //down scale only/0~15 +} mHalBltParam_t; + + +typedef struct mHalBltExParam_s +{ + /*Source*/ + MHAL_BITBLT_FORMAT_ENUM src_color_format; + + MUINT32 src_img_size_w; + MUINT32 src_img_size_h; + + MUINT32 src_img_roi_x; + MUINT32 src_img_roi_y; + MUINT32 src_img_roi_w; + MUINT32 src_img_roi_h; + + MUINT32 src_yuv_img_addr; + + + /*For HDMI : RGB*/ + MINT32 en_hdmi_port; //enable hdmi port + MHAL_BITBLT_FORMAT_ENUM hdmi_color_format; + + MUINT32 hdmi_img_size_w; + MUINT32 hdmi_img_size_h; + + + MUINT32 hdmi_img_roi_x; + MUINT32 hdmi_img_roi_y; + MUINT32 hdmi_img_roi_w; + MUINT32 hdmi_img_roi_h; + + MUINT32 hdmi_yuv_img_addr; + MUINT32 hdmi_rotate_angle; + + /*For Display : 422 Pack*/ + MINT32 en_disp_port; //enable disp port + MHAL_BITBLT_FORMAT_ENUM disp_color_format; + + MUINT32 disp_img_size_w; + MUINT32 disp_img_size_h; + + MUINT32 disp_img_roi_x; + MUINT32 disp_img_roi_y; + MUINT32 disp_img_roi_w; + MUINT32 disp_img_roi_h; + + MUINT32 disp_yuv_img_addr; + MUINT32 disp_rotate_angle; + + /*Resizer coeff if can apply*/ + MUINT32 resz_up_scale_coeff; //0:linear interpolation 1:most blur 19:sharpest 8:recommeneded >12:undesirable + MUINT32 resz_dn_scale_coeff; //0:linear interpolation 1:most blur 19:sharpest 15:recommeneded + MUINT32 resz_ee_h_str; //down scale only/0~15 + MUINT32 resz_ee_v_str; //down scale only/0~15 +} mHalBltParamEx_t; + + + +typedef enum +{ + MHAL_MLM_CLIENT_SFTEX, //Surface flinger Texture + MHAL_MLM_CLIENT_MTKOVERLAY, + MHAL_MLM_CLIENT_PV2ND, //Preview 2nd path + MHAL_MLM_CLIENT_ELEMENT, //MDP Element + MHAL_MLM_CLIENT_PVCPY, //Camera preview path extra-copy + MHAL_MLM_CLIENT_GRALLOC, //Graphic Buffer Allocator + + MHAL_MLM_CLIENT_MAX = 19, //MAX (for test) + +} mHalMVALOOPMEM_CLIENT; + +typedef enum +{ + MHAL_MEM_TYPE_INPUT, + MHAL_MEM_TYPE_OUTPUT + +} mHalREGLOOPMEM_TYPE; + + + +#ifdef __cplusplus + +class mHalMdpSize +{ +public: + unsigned long w; + unsigned long h; + +public: + mHalMdpSize(): + w(0),h(0) + {}; + + + mHalMdpSize(unsigned long _w, unsigned long _h ) + { + w = _w; h = _h; + }; + + + mHalMdpSize& operator=( const mHalMdpSize& rhs ) + { + w = rhs.w; h = rhs.h; + return *this; + } + + bool operator==(const mHalMdpSize& rhs) const + { + return ( ( w == rhs.w ) && ( h == rhs.h ) ); + } + + bool operator!=(const mHalMdpSize& rhs) const + { + return !( *this == rhs ); + } + +}; + +class mHalMdpRect +{ +public: + long x; + long y; + unsigned long w; + unsigned long h; + +public: + mHalMdpRect(): + x(0),y(0),w(0),h(0) + {}; + + mHalMdpRect(long _x, long _y, unsigned long _w, unsigned long _h ) + { + x = _x; y = _y; w = _w; h = _h; + }; + + mHalMdpRect(const mHalMdpSize& size ) + { + x = 0; y = 0; w = size.w; h = size.h; + }; + + mHalMdpRect& operator=( const mHalMdpRect& rhs ) + { + x = rhs.x; y = rhs.y; w = rhs.w; h = rhs.h; + return *this; + } + + bool operator==(const mHalMdpRect& rhs) const + { + return ( (x == rhs.x) && ( y == rhs.y) && ( w == rhs.w ) && ( h == rhs.h ) ); + } + + bool operator!=(const mHalMdpRect& rhs) const + { + return !( *this == rhs ); + } + + +}; + +class mHalMdpYuvAddr +{ +public: + unsigned long y; + unsigned long u; + unsigned long v; + + /*User need not fill in the data below!-----------------------------------------------------------*/ + /*Below data is auto fill by MDP driver calculation!----------------------------------------------*/ + + unsigned long y_buffer_size; + unsigned long u_buffer_size; + unsigned long v_buffer_size; + +public: + mHalMdpYuvAddr(): + y(0), u(0), v(0), + y_buffer_size(0), u_buffer_size(0), v_buffer_size(0) + {}; +}; + + + +class mHalRegisterLoopMemory_t +{ +public: + mHalREGLOOPMEM_TYPE mem_type; + unsigned long addr; + unsigned long buffer_size; + MHAL_BITBLT_FORMAT_ENUM mhal_color; + mHalMdpSize img_size; + mHalMdpRect img_roi; + unsigned long rotate; //0:0 1:90 2:180 3:270.rotate always 0 when used by RDMA(input memory) + +public: + mHalRegisterLoopMemory_t(): + mem_type(MHAL_MEM_TYPE_INPUT), + addr(0), + buffer_size(0), + mhal_color(MHAL_FORMAT_RGB_565), + rotate(0) //0:0 1:90 2:180 3:270.rotate always 0 when used by RDMA(input memory) + {}; + +}; + +class mHalRegisterLoopMemoryObj_t +{ +public: + unsigned long mdp_id; + mHalMdpYuvAddr calc_addr[1]; + mHalMdpYuvAddr adapt_addr[1]; + unsigned long adapt_m4u_flag_bit; + unsigned long alloc_mva_flag_bit; + +public: + mHalRegisterLoopMemoryObj_t(): + mdp_id(0), + adapt_m4u_flag_bit(0), + alloc_mva_flag_bit(0) + {}; +}; + +#else /*#ifdef __cplusplus*/ + +typedef struct mHalMdpSize_s +{ + unsigned long w; + unsigned long h; +} mHalMdpSize; + + +typedef struct mHalMdpRect_s +{ + long x; + long y; + unsigned long w; + unsigned long h; +} mHalMdpRect; + +typedef struct mHalMdpYuvAddr_s +{ + unsigned long y; + unsigned long u; + unsigned long v; + + /*User need not fill in the data below!-----------------------------------------------------------*/ + /*Below data is auto fill by MDP driver calculation!----------------------------------------------*/ + + unsigned long y_buffer_size; + unsigned long u_buffer_size; + unsigned long v_buffer_size; + +} mHalMdpYuvAddr; + +typedef struct mHalRegisterLoopMemory_s +{ + mHalREGLOOPMEM_TYPE mem_type; + unsigned long addr; + unsigned long buffer_size; + MHAL_BITBLT_FORMAT_ENUM mhal_color; + mHalMdpSize img_size; + mHalMdpRect img_roi; + unsigned long rotate; //0:0 1:90 2:180 3:270.rotate always 0 when used by RDMA(input memory) +} mHalRegisterLoopMemory_t; + +typedef struct mHalRegisterLoopMemoryObj_s +{ + unsigned long mdp_id; + mHalMdpYuvAddr calc_addr[1]; + mHalMdpYuvAddr adapt_addr[1]; + unsigned long adapt_m4u_flag_bit; + unsigned long alloc_mva_flag_bit; +} mHalRegisterLoopMemoryObj_t; + + +#endif /*#ifdef __cplusplus*/ + + + +/******************************************************************************* +* Camera Interface +********************************************************************************/ + +/** + * @par Structure + * mhalCamParam_t + * @par Description + * This is a structure which store camera configuration + */ +typedef struct mhalCamVdoParam_s { + MUINT32 u4YUVWidth; + MUINT32 u4YUVHeight; + MUINT32 u4VEncBitrate; // Video encode bitrate + VDO_ENC_FORMAT eVEncFormat; // Video encode format + MUINT32 u4PrvFps; +}mhalCamVdoParam_t; + +// +typedef struct priority_data { + MHAL_CHAR name[20]; + MHAL_INT32 policy; + MHAL_INT32 priority; +} mhalPriorityData_t; + +typedef struct mHalMp4VEncParam_s +{ + void *pObj; + void *pInputBuf; +}mHalMp4VEncParam_t; + +/*============================================================================= + * Function Declaration + *===========================================================================*/ + +/** + * @par Function + * mHalOpen + * @par Description + * Open a mHal instance + * @par Returns + * return a created instance. + */ +void* +mHalOpen(); + + +/** + * @par Function + * mHalClose + * @par Description + * Close a mHal instance + * @param + * fd [I] file descriptor returned from mHalOpen() + + * @par Returns + * none. + */ +void +mHalClose(void* fd); + + +/** + * @par Function + * mHalIoctl + * @par Description + * mHal ioctl function with fd + * @param + * uCtrlCode [I] The IO Control Code + * @param + * pvInBuf [I] The input parameter + * @param + * uInBufSize [I] The size of input parameter structure + * @param + * pvOutBuf [O] The output parameter + * @param + * uOutBufSize [I] The size of output parameter structure + * @param + * puBytesReturned [O] The number of bytes of return value + * @par Returns + * error code + */ +int +mHalIoctl( + void* fd, + unsigned int uCtrlCode, + void* pvInBuf, + unsigned int uInBufSize, + void* pvOutBuf, + unsigned int uOutBufSize, + unsigned int* puBytesReturned +); + + +/** + * @par Function + * mHalIoCtrl + * @par Description + * The MHAL ioctrl function + * @param + * a_u4CtrlCode [IN] The IO Control Code + * @param + * a_pInBuffer [IN] The input parameter + * @param + * a_u4InBufSize [IN] The size of input parameter structure + * @param + * a_pOutBuffer [OUT] The output parameter + * @param + * a_u4OutBufSize [IN] The size of output parameter structure + * @param + * pBytesReturned [OUT] The number of bytes of return value + * @par Returns + * MINT32 + */ +#ifdef __cplusplus +extern "C"{ +#endif + +MINT32 +mHalIoCtrl( + MUINT32 a_u4CtrlCode, + MVOID *a_pInBuffer, + MUINT32 a_u4InBufSize, + MVOID *a_pOutBuffer, + MUINT32 a_u4OutBufSize, + MUINT32 *pBytesReturned +); + +MINT32 +mHalJpeg( + MUINT32 a_u4CtrlCode, + MVOID *a_pInBuffer, + MUINT32 a_u4InBufSize, + MVOID *a_pOutBuffer, + MUINT32 a_u4OutBufSize, + MUINT32 *pBytesReturned +); + + +#ifdef __cplusplus +} +#endif + + +#ifdef __cplusplus +extern "C"{ +#endif +MINT32 +mtk_AdjustPrio( + MHAL_CHAR *name +); +#ifdef __cplusplus +} +#endif + + +/******************************************************************************* +* MDP mHal Interface +********************************************************************************/ +#ifdef __cplusplus +extern "C"{ +#endif + +signed int mHalMdp_BitBlt( void *a_pInBuffer ); +signed int mHalMdpIpc_BitBlt( mHalBltParam_t* bltParam ); +signed int mHalMdpLocal_BitBlt( mHalBltParam_t* bltParam ); + +signed int mHalMdp_BitBltEx( mHalBltParamEx_t* p_param ); +signed int mHalMdp_BitbltSlice( void *a_pInBuffer ); + + + + +int mHalMdp_RegisterLoopMemory( mHalMVALOOPMEM_CLIENT client_id, mHalRegisterLoopMemory_t* p_param, mHalRegisterLoopMemoryObj_t* p_out_obj ); +int mHalMdp_UnRegisterLoopMemory( mHalMVALOOPMEM_CLIENT client_id, mHalRegisterLoopMemoryObj_t* p_obj ); + + +#ifdef __cplusplus +} +#endif + + +#endif // MEDIA_HAL_H + + diff --git a/mtklibs/libmhalImageCodec/include/mhal/MediaTypes.h b/mtklibs/libmhalImageCodec/include/mhal/MediaTypes.h new file mode 100755 index 0000000000000000000000000000000000000000..90ac46a6a665c9119844a68896c00cb34a0b4d40 --- /dev/null +++ b/mtklibs/libmhalImageCodec/include/mhal/MediaTypes.h @@ -0,0 +1,176 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + */ +/* MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + */ + +/******************************************************************************************** + * LEGAL DISCLAIMER + * + * (Header of MediaTek Software/Firmware Release or Documentation) + * + * BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") RECEIVED + * FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON AN "AS-IS" BASIS + * ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR + * A PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY + * WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, + * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK + * ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO + * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION + * OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. + * + * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE LIABILITY WITH + * RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, +TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE + * FEES OR SERVICE CHARGE PAID BY BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS + * OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF LAWS PRINCIPLES. + ************************************************************************************************/ + +#ifndef _MEDIA_TYPES_H +#define _MEDIA_TYPES_H + +/******************************************************************************* +* +********************************************************************************/ +// +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +// +typedef void MHAL_VOID; +typedef char MHAL_BOOL; +typedef char MHAL_CHAR; +typedef signed char MHAL_INT8; +typedef signed short MHAL_INT16; +typedef signed int MHAL_INT32; +typedef unsigned char MHAL_UCHAR; +typedef unsigned char MHAL_UINT8; +typedef unsigned short MHAL_UINT16; +typedef unsigned int MHAL_UINT32; +#if __LP64__ +typedef unsigned long MHAL_UINT64; +#else +typedef unsigned long long MHAL_UINT64; +#endif + +// +typedef MHAL_VOID MVOID; +typedef MHAL_UINT8 MUINT8; +typedef MHAL_UINT16 MUINT16; +typedef MHAL_UINT32 MUINT32; +typedef MHAL_UINT64 MUINT64; +typedef MHAL_INT32 MINT32; + +/******************************************************************************* +* +********************************************************************************/ +#define READ32(addr) *(MUINT32 *) (addr) +#define WRITE32(addr, val) *(MUINT32 *) (addr) = (val) + +#define MHAL_TRUE 1 +#define MHAL_FALSE 0 + +/******************************************************************************* +* +********************************************************************************/ +//typedef signed char CHAR; +//typedef char UCHAR; +#define CHAR signed char +#define UCHAR char +typedef signed char INT8; +typedef unsigned char UINT8; +typedef unsigned short UINT16; +typedef signed short INT16; +//typedef signed int BOOL; +#define BOOL signed int +//typedef signed int INT32; +#define INT32 signed int +typedef unsigned int UINT32; +typedef long long INT64; + +#if !defined(UINT64) + +#ifndef VCODEC_INC +typedef unsigned long long UINT64; +#define VCODEC_INC +#endif + +#endif + +typedef float FLOAT; +typedef double DOUBLE; +typedef void VOID; + +typedef INT32 MRESULT; + +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef NULL +#define NULL 0 +#endif + +/******************************************************************************* +* +********************************************************************************/ + +/** + * @par Enumeration + * MHAL_ERROR_ENUM + * @par Description + * This is the return status of each MHAL function + */ +typedef enum +{ + MHAL_NO_ERROR = 0, ///< The function work successfully + MHAL_INVALID_DRIVER, ///< Error due to invalid driver + MHAL_INVALID_CTRL_CODE, ///< Error due to invalid control code + MHAL_INVALID_PARA, ///< Error due to invalid parameter + MHAL_INVALID_MEMORY, ///< Error due to invalid memory + MHAL_INVALID_FORMAT, ///< Error due to invalid file format + MHAL_INVALID_RESOURCE, ///< Error due to invalid resource, like IDP + + MHAL_UNKNOWN_ERROR = 0x80000000, ///< Unknown error + MHAL_ALL = 0xFFFFFFFF +} MHAL_ERROR_ENUM; + + +#endif // _MEDIA_TYPES_H + + diff --git a/mtklibs/libmhalImageCodec/include/mhal/mhal_jpeg.h b/mtklibs/libmhalImageCodec/include/mhal/mhal_jpeg.h new file mode 100755 index 0000000000000000000000000000000000000000..8c14678c9e69ae4aba5c20654809f6a44c71fa8f --- /dev/null +++ b/mtklibs/libmhalImageCodec/include/mhal/mhal_jpeg.h @@ -0,0 +1,75 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + * + * MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + */ + + +#ifndef _MHAL_JPEG_H_ +#define _MHAL_JPEG_H_ + +/***************************************************************************** +* Include Header File +*****************************************************************************/ + +#include "MediaHal.h" + +#define MHAL_IMAGE_TYPE_JPEG 0x0000 +#define MHAL_IMAGE_TYPE_WEBP 0x0001 + +/***************************************************************************** +* MHAL Jpeg Decoder API +*****************************************************************************/ + +int mHalJpgDecParser(unsigned char* srcAddr, unsigned int srcSize, int srcFD, unsigned int img_type); + +int mHalJpgDecGetInfo(MHAL_JPEG_DEC_INFO_OUT *decOutInfo); + +int mHalJpgDecStart(MHAL_JPEG_DEC_START_IN *decInParams, void* procHandler = NULL); + + +int mi_mHalJpgDecParser(MHAL_JPEG_DEC_SRC_IN *srcInParams,unsigned char* srcAddr, unsigned int srcSize, int srcFD, unsigned int img_type); + +int mi_mHalJpgDecGetInfo(MHAL_JPEG_DEC_INFO_OUT *decOutInfo); + +int mi_mHalJpgDecStart(MHAL_JPEG_DEC_START_IN *decInParams, void* procHandler = NULL); + +/***************************************************************************** +* MHAL Jpeg Encoder API +*****************************************************************************/ + +int mHalJpgEncStart(MHAL_JPEG_ENC_START_IN *encInParams); + +int mHalScaler_BitBlt( mHalBltParam_t* bltParam ); + +#endif + diff --git a/mtklibs/libmhalImageCodec/libmhalImageCodec.so b/mtklibs/libmhalImageCodec/libmhalImageCodec.so new file mode 100755 index 0000000000000000000000000000000000000000..bf4be5ff4a01241753e06239232fd66f735f50f1 Binary files /dev/null and b/mtklibs/libmhalImageCodec/libmhalImageCodec.so differ diff --git a/mtklibs/libmmprofile/Android.mk_ b/mtklibs/libmmprofile/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d5ade87a20ff8e1a9cc0dc4926a337816052679a --- /dev/null +++ b/mtklibs/libmmprofile/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmmprofile +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmmprofile.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmmprofile +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmmprofile.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmmprofile/README b/mtklibs/libmmprofile/README new file mode 100755 index 0000000000000000000000000000000000000000..6eca6798a75366abdffb6c4772c23ef7fe0d7317 --- /dev/null +++ b/mtklibs/libmmprofile/README @@ -0,0 +1,32 @@ +This module creates the MMProfile libraries. + +This library is pre-built by MediaTek internally (dummy librariy which has no +actual implementation). + + +WHAT IT DOES? +============= +MMProfile is an Multi-Media profiling tool. + +libmmprofile.so contains Multi-Media profiling APIs. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +libcutils and libc + +and the following libs from MediaTek: + + + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +The MMProfile libraries should not be used directly by an application developer. + +The majority of source code for this library were written by MediaTek. Various +open source libraries are also used and contained in this folder. diff --git a/mtklibs/libmmprofile/arm/libmmprofile.so b/mtklibs/libmmprofile/arm/libmmprofile.so new file mode 100755 index 0000000000000000000000000000000000000000..139d162811453d6db4a3e462bbb88f76f6185945 Binary files /dev/null and b/mtklibs/libmmprofile/arm/libmmprofile.so differ diff --git a/mtklibs/libmmprofile/libmmprofile.so b/mtklibs/libmmprofile/libmmprofile.so new file mode 100755 index 0000000000000000000000000000000000000000..34b268b2ba4c1d5087df5851bdbef4f508e72dcf Binary files /dev/null and b/mtklibs/libmmprofile/libmmprofile.so differ diff --git a/mtklibs/libmotionsw/Android.mk_ b/mtklibs/libmotionsw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..514b816f560b1b1fa592c0a86f2ea694e670bf6c --- /dev/null +++ b/mtklibs/libmotionsw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmotionsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmotionsw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmotionsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmotionsw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmotionsw/README b/mtklibs/libmotionsw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libmotionsw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libmotionsw/arm/libmotionsw.a b/mtklibs/libmotionsw/arm/libmotionsw.a new file mode 100755 index 0000000000000000000000000000000000000000..2e9d7c003d3b3afb27ae64d32301658c45fa688a Binary files /dev/null and b/mtklibs/libmotionsw/arm/libmotionsw.a differ diff --git a/mtklibs/libmotionsw/libmotionsw.a b/mtklibs/libmotionsw/libmotionsw.a new file mode 100755 index 0000000000000000000000000000000000000000..94b88928556dc1c0121e6873bcd16683f9ea3051 Binary files /dev/null and b/mtklibs/libmotionsw/libmotionsw.a differ diff --git a/mtklibs/libmp4com/Android.mk_ b/mtklibs/libmp4com/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..83c53fe7b59860591a7d56db97e9909357148cd2 --- /dev/null +++ b/mtklibs/libmp4com/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmp4com +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmp4com.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmp4com/README b/mtklibs/libmp4com/README new file mode 100755 index 0000000000000000000000000000000000000000..896bd1095c114169356a77e81541cd1e528f9151 --- /dev/null +++ b/mtklibs/libmp4com/README @@ -0,0 +1,18 @@ +The module creates 3G VT video decoder library +This library is pre-built by MediaTek internally. + +WHAT IT DOES? +============= +3G VT decoder offers best decoding quality and error resilient tools for telephony transmission + +libuvtswdec.a contains the 3G VT decoder core +libmp4com.a contains the common decoder core + +HOW IT WAS BUILT? +================== +These two libraries are released as static library, and should be built with VTMAL module. + +HOW TO USE IT? +============== +This library should be used with VTMAL module and cannot be used directly by an +application developer. \ No newline at end of file diff --git a/mtklibs/libmp4com/arm/libmp4com.a b/mtklibs/libmp4com/arm/libmp4com.a new file mode 100755 index 0000000000000000000000000000000000000000..2759ed267631effbfda0056f5576c38dae6936b4 Binary files /dev/null and b/mtklibs/libmp4com/arm/libmp4com.a differ diff --git a/mtklibs/libmpeg2dec_hw/Android.mk_ b/mtklibs/libmpeg2dec_hw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..65d432f8bc52eb5756c44101469ddea72986b8e3 --- /dev/null +++ b/mtklibs/libmpeg2dec_hw/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmpeg2dec_hw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmpeg2dec_hw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmpeg2dec_hw/NOTICE b/mtklibs/libmpeg2dec_hw/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libmpeg2dec_hw/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libmpeg2dec_hw/README b/mtklibs/libmpeg2dec_hw/README new file mode 100755 index 0000000000000000000000000000000000000000..d340cb750f65cba466c5d379280a6f045b180ed5 --- /dev/null +++ b/mtklibs/libmpeg2dec_hw/README @@ -0,0 +1,29 @@ +Library of MTK mpeg2 codec driver. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libmpeg2dec_hw contains MediaTek developed mpeg2 hardware video decoder related functions. +Without them, mpeg2 video playback will not work¡¨ + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. llibcutils libc.so + + +and the following libs from MediaTek: +NA + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +Provide mpeg2 decoder api invoked by common decoder interface, +those api are all internal-used and are invisible to customer. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libmpeg2dec_hw/arm/libmpeg2dec_hw.a b/mtklibs/libmpeg2dec_hw/arm/libmpeg2dec_hw.a new file mode 100755 index 0000000000000000000000000000000000000000..a3919d009f98ca3460208e145c51386b76837754 Binary files /dev/null and b/mtklibs/libmpeg2dec_hw/arm/libmpeg2dec_hw.a differ diff --git a/mtklibs/libmpeg4dec_hw/Android.mk_ b/mtklibs/libmpeg4dec_hw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..2afa07b5caacc67f6f1e3c4d480b497951b22e26 --- /dev/null +++ b/mtklibs/libmpeg4dec_hw/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmpeg4dec_hw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmpeg4dec_hw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmpeg4dec_hw/NOTICE b/mtklibs/libmpeg4dec_hw/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libmpeg4dec_hw/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libmpeg4dec_hw/README b/mtklibs/libmpeg4dec_hw/README new file mode 100755 index 0000000000000000000000000000000000000000..7de76d7b90958c5935ad90e9433dc6284b9d9009 --- /dev/null +++ b/mtklibs/libmpeg4dec_hw/README @@ -0,0 +1,29 @@ +Library of MTK mpeg4 codec driver. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libmpeg4dec_hw contains MediaTek developed mpeg4 hardware video decoder related functions. +Without them, mpeg4 video playback will not work¡¨ + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. llibcutils libc.so + + +and the following libs from MediaTek: +NA + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +Provide mpeg4 decoder api invoked by common decoder interface, +those api are all internal-used and are invisible to customer. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libmpeg4dec_hw/arm/libmpeg4dec_hw.a b/mtklibs/libmpeg4dec_hw/arm/libmpeg4dec_hw.a new file mode 100755 index 0000000000000000000000000000000000000000..18bc80b1485a2d5dfa661c07d77801b943fa9a4b Binary files /dev/null and b/mtklibs/libmpeg4dec_hw/arm/libmpeg4dec_hw.a differ diff --git a/mtklibs/libmpeg4enc_sw/Android.mk_ b/mtklibs/libmpeg4enc_sw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..948b1d0c0ac2af053bd1da66669730534c65ab2c --- /dev/null +++ b/mtklibs/libmpeg4enc_sw/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmpeg4enc_sw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmpeg4enc_sw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmpeg4enc_sw/NOTICE b/mtklibs/libmpeg4enc_sw/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libmpeg4enc_sw/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libmpeg4enc_sw/README b/mtklibs/libmpeg4enc_sw/README new file mode 100755 index 0000000000000000000000000000000000000000..d731d62c91abaa4c2c4f7e99ba8d44b6647adc70 --- /dev/null +++ b/mtklibs/libmpeg4enc_sw/README @@ -0,0 +1,17 @@ +Library of MTK provided SW/HW video codec, including encoder and decoder. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libmpeg4enc_sw.a is sw mpeg4 encoder + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libc.so +2. libcutils.so + +HOW TO USE IT? +============== +It is used to encode YUV frame to mpeg4 bitstream \ No newline at end of file diff --git a/mtklibs/libmpeg4enc_sw/arm/libmpeg4enc_sw.a b/mtklibs/libmpeg4enc_sw/arm/libmpeg4enc_sw.a new file mode 100755 index 0000000000000000000000000000000000000000..008407775a2ae0f91eb20c6bce43a4d85e759510 Binary files /dev/null and b/mtklibs/libmpeg4enc_sw/arm/libmpeg4enc_sw.a differ diff --git a/mtklibs/libmtcloader/Android.mk_ b/mtklibs/libmtcloader/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..c69ecf5b3a4c4fbee6b7ec97c29c16cd33a0a7da --- /dev/null +++ b/mtklibs/libmtcloader/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtcloader +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtcloader.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtcloader/README b/mtklibs/libmtcloader/README new file mode 100755 index 0000000000000000000000000000000000000000..9a3dae0b935d505e142ba15e09da67a0fee59869 --- /dev/null +++ b/mtklibs/libmtcloader/README @@ -0,0 +1,40 @@ +libmtcloader + +WHAT IT DOES? +============= +libmtcloader provides an API function to set a thermal configuration file and +to make it applied as current thermal policy. + +HOW IT WAS BUILT? +================== +libmtcloader is built as 32bit. It dynamic links to the following library from +AOSP: +1. libcutils +2. libc + +HOW TO USE IT? +============== +1. Dynamically link to libmtcloader. +2. Use API function loadmtc() with the file path of a thermal configuration + file. + +############## + +thermal_manager + +WHAT IT DOES? +============= +It uses libmtcloader to apply a thermal configuration file when system +initialized or when it is executed from shell. + +HOW IT WAS BUILT? +================== +thermal_manager is built as 32bit. It dynamic links to the following library from +AOSP: +1. libcutils +2. libc +It requires libmtcloader from MTK. + +HOW TO USE IT? +============== +1. /system/bin/thermal_manager \ No newline at end of file diff --git a/mtklibs/libmtcloader/arm/libmtcloader.so b/mtklibs/libmtcloader/arm/libmtcloader.so new file mode 100755 index 0000000000000000000000000000000000000000..741b73c14a103eefb42efa33cdb7220c61957de0 Binary files /dev/null and b/mtklibs/libmtcloader/arm/libmtcloader.so differ diff --git a/mtklibs/libmtk-art-runtime/Android.mk_ b/mtklibs/libmtk-art-runtime/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..aa92b045409339a91a6d8a5063fb12829bfb99f3 --- /dev/null +++ b/mtklibs/libmtk-art-runtime/Android.mk_ @@ -0,0 +1,45 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = true +LOCAL_MODULE = libmtk-art-runtime +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = host/libmtk-art-runtime.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = true +LOCAL_MODULE = libmtk-art-runtime +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = x86/libmtk-art-runtime.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk-art-runtime +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtk-art-runtime.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk-art-runtime +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtk-art-runtime.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtk-art-runtime/NOTICE b/mtklibs/libmtk-art-runtime/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..c7dec7f2c5973b985c22ed0f20cf8ee2f9cba909 --- /dev/null +++ b/mtklibs/libmtk-art-runtime/NOTICE @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/mtklibs/libmtk-art-runtime/README b/mtklibs/libmtk-art-runtime/README new file mode 100755 index 0000000000000000000000000000000000000000..99c831de5d47b458287a63f7c6282217e73ace14 --- /dev/null +++ b/mtklibs/libmtk-art-runtime/README @@ -0,0 +1,28 @@ +This module creates the ART optimizaton library. + +This library is pre-built by MediaTek internally. + + +WHAT IT DOES? +============= +ART optimization is used to optimize ART AOT result. +It is a static library, and will link to libart.so when build. + + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +liblog + + +All source/dependency modules of this module are already put in 'vendor/mediatek/' folder. + +HOW TO USE IT? +============== + +This library is transparent for framework and applicattion developers. +They don't need to do any modification to use it. + +The majority of source code for this library were written by MediaTek. Various +open source libraries are also used and contained in this folder. diff --git a/mtklibs/libmtk-art-runtime/arm/libmtk-art-runtime.a b/mtklibs/libmtk-art-runtime/arm/libmtk-art-runtime.a new file mode 100755 index 0000000000000000000000000000000000000000..e24edaf903acbdd45e903b78502fc2a92f164970 Binary files /dev/null and b/mtklibs/libmtk-art-runtime/arm/libmtk-art-runtime.a differ diff --git a/mtklibs/libmtk-art-runtime/host/libmtk-art-runtime.a b/mtklibs/libmtk-art-runtime/host/libmtk-art-runtime.a new file mode 100755 index 0000000000000000000000000000000000000000..4c54352aa042f82d75d7c83a4273f25f78e6c7ad Binary files /dev/null and b/mtklibs/libmtk-art-runtime/host/libmtk-art-runtime.a differ diff --git a/mtklibs/libmtk-art-runtime/libmtk-art-runtime.a b/mtklibs/libmtk-art-runtime/libmtk-art-runtime.a new file mode 100755 index 0000000000000000000000000000000000000000..d9a0edf477b2ea699381bac0a15dfa670794ab1d Binary files /dev/null and b/mtklibs/libmtk-art-runtime/libmtk-art-runtime.a differ diff --git a/mtklibs/libmtk-art-runtime/x86/libmtk-art-runtime.a b/mtklibs/libmtk-art-runtime/x86/libmtk-art-runtime.a new file mode 100755 index 0000000000000000000000000000000000000000..9ffd0bb00b657f1c4dca6edc570beefc4a25ce52 Binary files /dev/null and b/mtklibs/libmtk-art-runtime/x86/libmtk-art-runtime.a differ diff --git a/mtklibs/libmtk-art-runtimed/Android.mk_ b/mtklibs/libmtk-art-runtimed/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..e64c5670b08cb4fbbeb97ccdc74de5fab1d73700 --- /dev/null +++ b/mtklibs/libmtk-art-runtimed/Android.mk_ @@ -0,0 +1,45 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = true +LOCAL_MODULE = libmtk-art-runtimed +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = host/libmtk-art-runtimed.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = true +LOCAL_MODULE = libmtk-art-runtimed +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = x86/libmtk-art-runtimed.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk-art-runtimed +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtk-art-runtimed.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk-art-runtimed +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtk-art-runtimed.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtk-art-runtimed/NOTICE b/mtklibs/libmtk-art-runtimed/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..c7dec7f2c5973b985c22ed0f20cf8ee2f9cba909 --- /dev/null +++ b/mtklibs/libmtk-art-runtimed/NOTICE @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/mtklibs/libmtk-art-runtimed/README b/mtklibs/libmtk-art-runtimed/README new file mode 100755 index 0000000000000000000000000000000000000000..99c831de5d47b458287a63f7c6282217e73ace14 --- /dev/null +++ b/mtklibs/libmtk-art-runtimed/README @@ -0,0 +1,28 @@ +This module creates the ART optimizaton library. + +This library is pre-built by MediaTek internally. + + +WHAT IT DOES? +============= +ART optimization is used to optimize ART AOT result. +It is a static library, and will link to libart.so when build. + + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +liblog + + +All source/dependency modules of this module are already put in 'vendor/mediatek/' folder. + +HOW TO USE IT? +============== + +This library is transparent for framework and applicattion developers. +They don't need to do any modification to use it. + +The majority of source code for this library were written by MediaTek. Various +open source libraries are also used and contained in this folder. diff --git a/mtklibs/libmtk-art-runtimed/arm/libmtk-art-runtimed.a b/mtklibs/libmtk-art-runtimed/arm/libmtk-art-runtimed.a new file mode 100755 index 0000000000000000000000000000000000000000..868c9ef819656ad334f96bd57925a54a6d248f53 Binary files /dev/null and b/mtklibs/libmtk-art-runtimed/arm/libmtk-art-runtimed.a differ diff --git a/mtklibs/libmtk-art-runtimed/host/libmtk-art-runtimed.a b/mtklibs/libmtk-art-runtimed/host/libmtk-art-runtimed.a new file mode 100755 index 0000000000000000000000000000000000000000..398010684db0239df0dc17c63493f020f6f79cfb Binary files /dev/null and b/mtklibs/libmtk-art-runtimed/host/libmtk-art-runtimed.a differ diff --git a/mtklibs/libmtk-art-runtimed/libmtk-art-runtimed.a b/mtklibs/libmtk-art-runtimed/libmtk-art-runtimed.a new file mode 100755 index 0000000000000000000000000000000000000000..2bee00b901fcdebb099b172e2818166531f225d0 Binary files /dev/null and b/mtklibs/libmtk-art-runtimed/libmtk-art-runtimed.a differ diff --git a/mtklibs/libmtk-art-runtimed/x86/libmtk-art-runtimed.a b/mtklibs/libmtk-art-runtimed/x86/libmtk-art-runtimed.a new file mode 100755 index 0000000000000000000000000000000000000000..dc63fd6299e54c886a18c40985115ada47bff355 Binary files /dev/null and b/mtklibs/libmtk-art-runtimed/x86/libmtk-art-runtimed.a differ diff --git a/mtklibs/libmtk-art/Android.mk_ b/mtklibs/libmtk-art/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..08305e3d8b02e0372756ae87c9dc9c42d95ab0cd --- /dev/null +++ b/mtklibs/libmtk-art/Android.mk_ @@ -0,0 +1,45 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = true +LOCAL_MODULE = libmtk-art +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = host/libmtk-art.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = true +LOCAL_MODULE = libmtk-art +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = x86/libmtk-art.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk-art +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtk-art.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk-art +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtk-art.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtk-art/NOTICE b/mtklibs/libmtk-art/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..c7dec7f2c5973b985c22ed0f20cf8ee2f9cba909 --- /dev/null +++ b/mtklibs/libmtk-art/NOTICE @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/mtklibs/libmtk-art/README b/mtklibs/libmtk-art/README new file mode 100755 index 0000000000000000000000000000000000000000..99c831de5d47b458287a63f7c6282217e73ace14 --- /dev/null +++ b/mtklibs/libmtk-art/README @@ -0,0 +1,28 @@ +This module creates the ART optimizaton library. + +This library is pre-built by MediaTek internally. + + +WHAT IT DOES? +============= +ART optimization is used to optimize ART AOT result. +It is a static library, and will link to libart.so when build. + + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +liblog + + +All source/dependency modules of this module are already put in 'vendor/mediatek/' folder. + +HOW TO USE IT? +============== + +This library is transparent for framework and applicattion developers. +They don't need to do any modification to use it. + +The majority of source code for this library were written by MediaTek. Various +open source libraries are also used and contained in this folder. diff --git a/mtklibs/libmtk-art/arm/readme.txt b/mtklibs/libmtk-art/arm/readme.txt new file mode 100755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/mtklibs/libmtk-art/host/libmtk-art.a b/mtklibs/libmtk-art/host/libmtk-art.a new file mode 100755 index 0000000000000000000000000000000000000000..5fee98821190430a6a9647599ba5c1f3c721d8a5 Binary files /dev/null and b/mtklibs/libmtk-art/host/libmtk-art.a differ diff --git a/mtklibs/libmtk-art/x86/libmtk-art.a b/mtklibs/libmtk-art/x86/libmtk-art.a new file mode 100755 index 0000000000000000000000000000000000000000..22ba22f8de2d325fd99228eb316c487320affb65 Binary files /dev/null and b/mtklibs/libmtk-art/x86/libmtk-art.a differ diff --git a/mtklibs/libmtk-artd/Android.mk_ b/mtklibs/libmtk-artd/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..3b9b0a8bb539d73a10f0bb552ff914c48011da2c --- /dev/null +++ b/mtklibs/libmtk-artd/Android.mk_ @@ -0,0 +1,45 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = true +LOCAL_MODULE = libmtk-artd +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = host/libmtk-artd.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = true +LOCAL_MODULE = libmtk-artd +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = x86/libmtk-artd.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk-artd +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtk-artd.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk-artd +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtk-artd.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtk-artd/NOTICE b/mtklibs/libmtk-artd/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..c7dec7f2c5973b985c22ed0f20cf8ee2f9cba909 --- /dev/null +++ b/mtklibs/libmtk-artd/NOTICE @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/mtklibs/libmtk-artd/README b/mtklibs/libmtk-artd/README new file mode 100755 index 0000000000000000000000000000000000000000..99c831de5d47b458287a63f7c6282217e73ace14 --- /dev/null +++ b/mtklibs/libmtk-artd/README @@ -0,0 +1,28 @@ +This module creates the ART optimizaton library. + +This library is pre-built by MediaTek internally. + + +WHAT IT DOES? +============= +ART optimization is used to optimize ART AOT result. +It is a static library, and will link to libart.so when build. + + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +liblog + + +All source/dependency modules of this module are already put in 'vendor/mediatek/' folder. + +HOW TO USE IT? +============== + +This library is transparent for framework and applicattion developers. +They don't need to do any modification to use it. + +The majority of source code for this library were written by MediaTek. Various +open source libraries are also used and contained in this folder. diff --git a/mtklibs/libmtk-artd/arm/readme.txt b/mtklibs/libmtk-artd/arm/readme.txt new file mode 100755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/mtklibs/libmtk-artd/host/libmtk-artd.a b/mtklibs/libmtk-artd/host/libmtk-artd.a new file mode 100755 index 0000000000000000000000000000000000000000..5981d1240d3e7272a67672208de42990e31de422 Binary files /dev/null and b/mtklibs/libmtk-artd/host/libmtk-artd.a differ diff --git a/mtklibs/libmtk-artd/x86/libmtk-artd.a b/mtklibs/libmtk-artd/x86/libmtk-artd.a new file mode 100755 index 0000000000000000000000000000000000000000..8a90f8ef3341b34c35feeed2a153058398647777 Binary files /dev/null and b/mtklibs/libmtk-artd/x86/libmtk-artd.a differ diff --git a/mtklibs/libmtk_drvb/Android.mk_ b/mtklibs/libmtk_drvb/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..b6240f46d1406dd78465e8dc94c0eef87da3569a --- /dev/null +++ b/mtklibs/libmtk_drvb/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk_drvb +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtk_drvb.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk_drvb +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtk_drvb.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtk_drvb/README b/mtklibs/libmtk_drvb/README new file mode 100755 index 0000000000000000000000000000000000000000..8c7883ae83be8a9f43983715dafe42470a37368c --- /dev/null +++ b/mtklibs/libmtk_drvb/README @@ -0,0 +1,16 @@ +This module is for multimedia thermal management to avoid system from working improperly. + +WHAT IT DOES? +============= +drvb is a module for multimedia module to detect system load status and adjust accordingly +to avoid system from working improperly. + +HOW IT WAS BUILT? +================== +It is a binary release shared library. + +HOW TO USE IT? +============== +This is part of Mediatek solution. +No need to setup or customization. + diff --git a/mtklibs/libmtk_drvb/arm/libmtk_drvb.so b/mtklibs/libmtk_drvb/arm/libmtk_drvb.so new file mode 100755 index 0000000000000000000000000000000000000000..fdd84727ae466cf5ac54b090960292e3d04f882e Binary files /dev/null and b/mtklibs/libmtk_drvb/arm/libmtk_drvb.so differ diff --git a/mtklibs/libmtk_drvb/libmtk_drvb.so b/mtklibs/libmtk_drvb/libmtk_drvb.so new file mode 100755 index 0000000000000000000000000000000000000000..d853d61e942d2d9bcbe98dab9d5eea83d4f7a934 Binary files /dev/null and b/mtklibs/libmtk_drvb/libmtk_drvb.so differ diff --git a/mtklibs/libmtk_drvb_base/Android.mk_ b/mtklibs/libmtk_drvb_base/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..1bc180fdd2b367da97bf77d31edf04bcc9d61255 --- /dev/null +++ b/mtklibs/libmtk_drvb_base/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk_drvb_base +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtk_drvb_base.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk_drvb_base +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtk_drvb_base.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtk_drvb_base/README b/mtklibs/libmtk_drvb_base/README new file mode 100755 index 0000000000000000000000000000000000000000..8c7883ae83be8a9f43983715dafe42470a37368c --- /dev/null +++ b/mtklibs/libmtk_drvb_base/README @@ -0,0 +1,16 @@ +This module is for multimedia thermal management to avoid system from working improperly. + +WHAT IT DOES? +============= +drvb is a module for multimedia module to detect system load status and adjust accordingly +to avoid system from working improperly. + +HOW IT WAS BUILT? +================== +It is a binary release shared library. + +HOW TO USE IT? +============== +This is part of Mediatek solution. +No need to setup or customization. + diff --git a/mtklibs/libmtk_drvb_base/arm/libmtk_drvb_base.a b/mtklibs/libmtk_drvb_base/arm/libmtk_drvb_base.a new file mode 100755 index 0000000000000000000000000000000000000000..012cee9ad872d6ba0d09b8f0e72945827e82045f Binary files /dev/null and b/mtklibs/libmtk_drvb_base/arm/libmtk_drvb_base.a differ diff --git a/mtklibs/libmtk_drvb_base/libmtk_drvb_base.a b/mtklibs/libmtk_drvb_base/libmtk_drvb_base.a new file mode 100755 index 0000000000000000000000000000000000000000..18f4a3fa78b6ffc84dc4c8ee81891de6f526ca39 Binary files /dev/null and b/mtklibs/libmtk_drvb_base/libmtk_drvb_base.a differ diff --git a/mtklibs/libmtk_mali_user/Android.mk_ b/mtklibs/libmtk_mali_user/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..abbcb58809d5d8630d3a2ac5d134dd98a44f9f27 --- /dev/null +++ b/mtklibs/libmtk_mali_user/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk_mali_user +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtk_mali_user.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk_mali_user +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtk_mali_user.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtk_mali_user/NOTICE b/mtklibs/libmtk_mali_user/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..090fb862dcee02e8e85ffec7413c818b98d38691 --- /dev/null +++ b/mtklibs/libmtk_mali_user/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/libmtk_mali_user/README b/mtklibs/libmtk_mali_user/README new file mode 100755 index 0000000000000000000000000000000000000000..b473632ef287a611c34ffbe09e246ef5bc2158b6 --- /dev/null +++ b/mtklibs/libmtk_mali_user/README @@ -0,0 +1,13 @@ +WHAT IT DOES? +============= +The core extension implementation used to GPU plogin. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libgralloc_extra +2. libdpframework + +HOW TO USE IT? +============== +This module is responsible for preparing extension jobs to GPU. diff --git a/mtklibs/libmtk_mali_user/arm/libmtk_mali_user.a b/mtklibs/libmtk_mali_user/arm/libmtk_mali_user.a new file mode 100755 index 0000000000000000000000000000000000000000..32556a4626a3a2f8e802c13ca8705a565803610b Binary files /dev/null and b/mtklibs/libmtk_mali_user/arm/libmtk_mali_user.a differ diff --git a/mtklibs/libmtk_mali_user/libmtk_mali_user.a b/mtklibs/libmtk_mali_user/libmtk_mali_user.a new file mode 100755 index 0000000000000000000000000000000000000000..db92a7d2a1bf195f3f94b1662f8a6c6a0cd33c34 Binary files /dev/null and b/mtklibs/libmtk_mali_user/libmtk_mali_user.a differ diff --git a/mtklibs/libmtk_vt_service/Android.mk b/mtklibs/libmtk_vt_service/Android.mk new file mode 100755 index 0000000000000000000000000000000000000000..8632a3ee2f861ac2981ae88c2010d05f08830e05 --- /dev/null +++ b/mtklibs/libmtk_vt_service/Android.mk @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk_vt_service +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH_64 = $(PRODUCT_OUT)/system/vendor/lib64 +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libandroid_runtime libbinder libnativehelper libui libgui libmedia libimsma libvtmal libsource libimsma_rtp libmtk_vt_swip libvt_avsync libvt_socketbind libmtk_vt_utils libstagefright_foundation libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtk_vt_service.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk_vt_service +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH_32 = $(PRODUCT_OUT)/system/vendor/lib +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libandroid_runtime libbinder libnativehelper libui libgui libmedia libimsma libvtmal libsource libimsma_rtp libmtk_vt_swip libvt_avsync libvt_socketbind libmtk_vt_utils libstagefright_foundation libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtk_vt_service.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtk_vt_service/README b/mtklibs/libmtk_vt_service/README new file mode 100755 index 0000000000000000000000000000000000000000..dfb854870f9e1ff45e78d851a5d2eb79110cc83a --- /dev/null +++ b/mtklibs/libmtk_vt_service/README @@ -0,0 +1,44 @@ +This module creates the VT (Video Telephony) libraries. + +This library is pre-built by MediaTek internally. + +WHAT IT DOES? +============= +VT is a native service which serves the video telephony functionality. +The service work on both 3G/4G network. +For 3G network, the serivce implement 3g324m stack and pass the media package to Modem. +For 4G network, the service communicate between Phone APK, Multimedia, IMS module. + +libmtk_vt_swip.so contain the 3g324m stack. +libmtk_vt_utils.so contain the utility API for VT module usage. +libmtk_vt_service.so contain the main interface for Phone APK & the module to handle the communication interface between IMS & Multimedia. +libvtmal.so contain the dummy interface for 64 bit project. +libvt_socketbind.so contain interface for data transfer functionality from media to Modem. +libvt_avsync.so contain interface for AV sync functionality when receiving data. +vtservice bin file is the entry of the video telephony service. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +libutils, libcutils, libstagefright, libandroid_runtime, libbinder, +libnativehelper, libui, libgui, libmedia, libstagefright_foundation, +libcamera_client, libskia and libblisrc + +libEGL, libGLESv2, libandroid, libcutils, liblog, libstlport and libutils + +and the following libs from MediaTek: + +libimsma.so +libsource.so +libimsma_rtp.so + +HOW TO USE IT? +============== + +The VT libraries should not be used directly by an application developer. +The AOSP video call provider framework provides a more suitable API. +(frameworks\base\telecomm\java\android\telecom). + +The majority of source code for this library were written by MediaTek. +Various open source libraries are also used and contained in this folder. diff --git a/mtklibs/libmtk_vt_service/arm/libmtk_vt_service.so b/mtklibs/libmtk_vt_service/arm/libmtk_vt_service.so new file mode 100755 index 0000000000000000000000000000000000000000..c7bd233cba75f7c5f70bf9448122a739446f8e94 Binary files /dev/null and b/mtklibs/libmtk_vt_service/arm/libmtk_vt_service.so differ diff --git a/mtklibs/libmtk_vt_service/libmtk_vt_service.so b/mtklibs/libmtk_vt_service/libmtk_vt_service.so new file mode 100755 index 0000000000000000000000000000000000000000..41178d762e4c428af83d5c9a09466d3465079a9a Binary files /dev/null and b/mtklibs/libmtk_vt_service/libmtk_vt_service.so differ diff --git a/mtklibs/libmtk_vt_swip/Android.mk_ b/mtklibs/libmtk_vt_swip/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..bfa03d8f5d3a47f8b37b9dbe6b368308c9c9b73c --- /dev/null +++ b/mtklibs/libmtk_vt_swip/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk_vt_swip +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libmtk_vt_utils libstagefright libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtk_vt_swip.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk_vt_swip +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmtk_vt_utils libstagefright libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtk_vt_swip.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtk_vt_swip/README b/mtklibs/libmtk_vt_swip/README new file mode 100755 index 0000000000000000000000000000000000000000..dfb854870f9e1ff45e78d851a5d2eb79110cc83a --- /dev/null +++ b/mtklibs/libmtk_vt_swip/README @@ -0,0 +1,44 @@ +This module creates the VT (Video Telephony) libraries. + +This library is pre-built by MediaTek internally. + +WHAT IT DOES? +============= +VT is a native service which serves the video telephony functionality. +The service work on both 3G/4G network. +For 3G network, the serivce implement 3g324m stack and pass the media package to Modem. +For 4G network, the service communicate between Phone APK, Multimedia, IMS module. + +libmtk_vt_swip.so contain the 3g324m stack. +libmtk_vt_utils.so contain the utility API for VT module usage. +libmtk_vt_service.so contain the main interface for Phone APK & the module to handle the communication interface between IMS & Multimedia. +libvtmal.so contain the dummy interface for 64 bit project. +libvt_socketbind.so contain interface for data transfer functionality from media to Modem. +libvt_avsync.so contain interface for AV sync functionality when receiving data. +vtservice bin file is the entry of the video telephony service. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +libutils, libcutils, libstagefright, libandroid_runtime, libbinder, +libnativehelper, libui, libgui, libmedia, libstagefright_foundation, +libcamera_client, libskia and libblisrc + +libEGL, libGLESv2, libandroid, libcutils, liblog, libstlport and libutils + +and the following libs from MediaTek: + +libimsma.so +libsource.so +libimsma_rtp.so + +HOW TO USE IT? +============== + +The VT libraries should not be used directly by an application developer. +The AOSP video call provider framework provides a more suitable API. +(frameworks\base\telecomm\java\android\telecom). + +The majority of source code for this library were written by MediaTek. +Various open source libraries are also used and contained in this folder. diff --git a/mtklibs/libmtk_vt_swip/arm/libmtk_vt_swip.so b/mtklibs/libmtk_vt_swip/arm/libmtk_vt_swip.so new file mode 100755 index 0000000000000000000000000000000000000000..c9d1d00fd25685fc2730fefb5227cfea578086a5 Binary files /dev/null and b/mtklibs/libmtk_vt_swip/arm/libmtk_vt_swip.so differ diff --git a/mtklibs/libmtk_vt_swip/libmtk_vt_swip.so b/mtklibs/libmtk_vt_swip/libmtk_vt_swip.so new file mode 100755 index 0000000000000000000000000000000000000000..c46a05c6917f8f6de2d3ab407182fde456614a25 Binary files /dev/null and b/mtklibs/libmtk_vt_swip/libmtk_vt_swip.so differ diff --git a/mtklibs/libmtk_vt_utils/Android.mk_ b/mtklibs/libmtk_vt_utils/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..eac302c81724a9082ad588864c5a55ed1b6f29bf --- /dev/null +++ b/mtklibs/libmtk_vt_utils/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk_vt_utils +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtk_vt_utils.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtk_vt_utils +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtk_vt_utils.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtk_vt_utils/README b/mtklibs/libmtk_vt_utils/README new file mode 100755 index 0000000000000000000000000000000000000000..dfb854870f9e1ff45e78d851a5d2eb79110cc83a --- /dev/null +++ b/mtklibs/libmtk_vt_utils/README @@ -0,0 +1,44 @@ +This module creates the VT (Video Telephony) libraries. + +This library is pre-built by MediaTek internally. + +WHAT IT DOES? +============= +VT is a native service which serves the video telephony functionality. +The service work on both 3G/4G network. +For 3G network, the serivce implement 3g324m stack and pass the media package to Modem. +For 4G network, the service communicate between Phone APK, Multimedia, IMS module. + +libmtk_vt_swip.so contain the 3g324m stack. +libmtk_vt_utils.so contain the utility API for VT module usage. +libmtk_vt_service.so contain the main interface for Phone APK & the module to handle the communication interface between IMS & Multimedia. +libvtmal.so contain the dummy interface for 64 bit project. +libvt_socketbind.so contain interface for data transfer functionality from media to Modem. +libvt_avsync.so contain interface for AV sync functionality when receiving data. +vtservice bin file is the entry of the video telephony service. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +libutils, libcutils, libstagefright, libandroid_runtime, libbinder, +libnativehelper, libui, libgui, libmedia, libstagefright_foundation, +libcamera_client, libskia and libblisrc + +libEGL, libGLESv2, libandroid, libcutils, liblog, libstlport and libutils + +and the following libs from MediaTek: + +libimsma.so +libsource.so +libimsma_rtp.so + +HOW TO USE IT? +============== + +The VT libraries should not be used directly by an application developer. +The AOSP video call provider framework provides a more suitable API. +(frameworks\base\telecomm\java\android\telecom). + +The majority of source code for this library were written by MediaTek. +Various open source libraries are also used and contained in this folder. diff --git a/mtklibs/libmtk_vt_utils/arm/libmtk_vt_utils.so b/mtklibs/libmtk_vt_utils/arm/libmtk_vt_utils.so new file mode 100755 index 0000000000000000000000000000000000000000..ec953671cbdfe1684cbdddefa78ce12e59a450d8 Binary files /dev/null and b/mtklibs/libmtk_vt_utils/arm/libmtk_vt_utils.so differ diff --git a/mtklibs/libmtk_vt_utils/libmtk_vt_utils.so b/mtklibs/libmtk_vt_utils/libmtk_vt_utils.so new file mode 100755 index 0000000000000000000000000000000000000000..f9e189c09e61ae6f9c1d9cf8382e03b31e1a0402 Binary files /dev/null and b/mtklibs/libmtk_vt_utils/libmtk_vt_utils.so differ diff --git a/mtklibs/libmtkjpeg/Android.mk_ b/mtklibs/libmtkjpeg/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..33b6319948b27bfc9d2e792f77f22e08ab81dcd7 --- /dev/null +++ b/mtklibs/libmtkjpeg/Android.mk_ @@ -0,0 +1,27 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtkjpeg +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtkjpeg.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtkjpeg +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtkjpeg.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtkjpeg/NOTICE b/mtklibs/libmtkjpeg/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..88aa9819da4b6135036e7d9d4e93b66b6a373a15 --- /dev/null +++ b/mtklibs/libmtkjpeg/NOTICE @@ -0,0 +1,220 @@ +This software is copyright (C) 1991-1998, Thomas G. Lane.: +# Copyright 2010 Google Inc. All Rights Reserved.: + Copyright (C) 1988 Richard M. Stallman: +notice "Copyright (C) 1989 Aladdin Enterprises. All rights reserved.: + * Copyright (C) 2010 The Android Open Source Project: + * Copyright (C) 1991-1997, Thomas G. Lane.: + * Copyright (C) 1991-1998, Thomas G. Lane.: + * Copyright (C) 1991-1994, Thomas G. Lane.: +Copyright (C) 1991-1996, Thomas G. Lane.: +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.: +Copyright (C) 1994-1998, Thomas G. Lane.: + * Copyright (C) 1994-1997, Thomas G. Lane.: + * Copyright (C) 1994-1996, Thomas G. Lane.: + * Copyright (C) 2010-2011, D. R. Commander.: + * Copyright (C) 1992-1997, Thomas G. Lane.: +#define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane": + * Copyright (C) 1997, Thomas G. Lane.: +Copyright (C) 1991-1998, Thomas G. Lane.: + * Copyright (C) 1994-1998, Thomas G. Lane.: + * Copyright (C) 1999-2006, MIYASAKA Masaru.: + * Copyright 2009 Pierre Ossman for Cendio AB: + * Copyright (C) 2011 D. R. Commander: + * Copyright (C) 2009-2011, D. R. Commander.: + * "How to Optimize for the Pentium Processors", Copyright (c) 1996, 1997 by: + * Copyright (C) 1995-1997, Thomas G. Lane.: + * Copyright (C) 1991-1996, Thomas G. Lane.: + * Copyright (C) 2007-2008 The Android Open Source Project: + * Copyright (C) 1992-1996, Thomas G. Lane.: +; Copyright (C) 1992, Thomas G. Lane.: +# Copyright (C) 1996-1998 Free Software Foundation, Inc.: +** Copyright (C) 1988 by Jef Poskanzer.: + * Copyright 2011 D. R. Commander: + * Copyright 2009-2011 D. R. Commander: + * Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies).: +Copyright (C) 1991-1995, Thomas G. Lane.: + * Copyright (C) 1989 by Jef Poskanzer.: + + + +Libjpeg License + +The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, +accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, +assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-1998, Thomas G. Lane. All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, +without fee, subject to these conditions: + +(1) If any part of the source code for this software is distributed, then this README file must be included, with this +copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be +clearly indicated in accompanying documentation. + +(2) If only executable code is distributed, then the accompanying documentation must state that "this software is based +in part on the work of the Independent JPEG Group". + +(3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable +consequences; the authors accept NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you +use our work, you ought to acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to +this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of commercial products, provided that all +warranty or liability claims are assumed by the product vendor. + +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, sole proprietor of its copyright holder, +Aladdin Enterprises of Menlo Park, CA. ansi2knr.c is NOT covered by the above copyright and conditions, but instead by +the usual distribution terms of the Free Software Foundation; principally, that you must include source code if you +redistribute it. (See the file ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part of any +program generated from the IJG code, this does not limit you more than the foregoing paragraphs do. + +The Unix configuration script "configure" was produced with GNU Autoconf. It is copyright by the Free Software +Foundation but is freely distributable. The same holds for its supporting scripts (config.guess, config.sub, ltconfig, +ltmain.sh). Another support script, install-sh, is copyright by M.I.T. but is also freely distributable. + +It appears that the arithmetic coding option of the JPEG spec is covered by patents owned by IBM, AT&T, and Mitsubishi. +Hence arithmetic coding cannot legally be used without obtaining one or more licenses. For this reason, support for +arithmetic coding has been removed from the free JPEG software. (Since arithmetic coding provides only a marginal gain +over the unpatented Huffman mode, it is unlikely that very many implementations will support it.) So far as we are +aware, there are no patent restrictions on the remaining code. + +The IJG distribution formerly included code to read and write GIF files. To avoid entanglement with the Unisys LZW +patent, GIF reading support has been removed altogether, and the GIF writer has been simplified to produce "uncompressed +GIFs". This technique does not use the LZW algorithm; the resulting GIF files are larger than usual, but are readable by +all standard GIF decoders. +We are required to state that + + "The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark +property of CompuServe Incorporated." + + + The Independent JPEG Group's JPEG software + +README for release 6b of 27-Mar-1998 +==================================== + +This distribution contains the sixth public release of the Independent JPEG Group's free JPEG software. You are welcome +to redistribute this software and to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. + +Serious users of this software (particularly those incorporating it into larger programs) should contact IJG at +jpeg-info@uunet.uu.net to be added to our electronic mailing list. Mailing list members are notified of updates and have +a chance to participate in technical discussions, etc. + +This software is the work of Tom Lane, Philip Gladstone, Jim Boucher, Lee Crocker, Julian Minguillon, Luis Ortiz, George +Phillips, Davide Rossi, Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG Group. + +IJG is not affiliated with the official ISO JPEG standards committee. +LEGAL ISSUES +============ + +In plain English: + + 1. We don't promise that this software works. (But if you find any bugs, please let us know!) + 2. You can use this software for whatever you want. You don't have to pay us. + 3. You may not pretend that you wrote this software. If you use it in a program, you must acknowledge somewhere in +your documentation that you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, +accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, +assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-1998, Thomas G. Lane. All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, +without fee, subject to these conditions: + +(1) If any part of the source code for this software is distributed, then this README file must be included, with this +copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be +clearly indicated in accompanying documentation. + +(2) If only executable code is distributed, then the accompanying documentation must state that "this software is based +in part on the work of the Independent JPEG Group". + +(3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable +consequences; the authors accept NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you +use our work, you ought to acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to +this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of commercial products, provided that all +warranty or liability claims are assumed by the product vendor. + +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, sole proprietor of its copyright holder, +Aladdin Enterprises of Menlo Park, CA. ansi2knr.c is NOT covered by the above copyright and conditions, but instead by +the usual distribution terms of the Free Software Foundation; principally, that you must include source code if you +redistribute it. (See the file ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part of any +program generated from the IJG code, this does not limit you more than the foregoing paragraphs do. + +The Unix configuration script "configure" was produced with GNU Autoconf. It is copyright by the Free Software +Foundation but is freely distributable. The same holds for its supporting scripts (config.guess, config.sub, ltconfig, +ltmain.sh). Another support script, install-sh, is copyright by M.I.T. but is also freely distributable. + +It appears that the arithmetic coding option of the JPEG spec is covered by patents owned by IBM, AT&T, and Mitsubishi. +Hence arithmetic coding cannot legally be used without obtaining one or more licenses. For this reason, support for +arithmetic coding has been removed from the free JPEG software. (Since arithmetic coding provides only a marginal gain +over the unpatented Huffman mode, it is unlikely that very many implementations will support it.) So far as we are +aware, there are no patent restrictions on the remaining code. + +The IJG distribution formerly included code to read and write GIF files. To avoid entanglement with the Unisys LZW +patent, GIF reading support has been removed altogether, and the GIF writer has been simplified to produce "uncompressed +GIFs". This technique does not use the LZW algorithm; the resulting GIF files are larger than usual, but are readable by +all standard GIF decoders. +We are required to state that + + "The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark +property of CompuServe Incorporated." + + + + /* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* This program is free software: you can redistribute it and/or modify it under the terms of the +* GNU General Public License version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See the GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License along with this program. +* If not, see . +*/ + + + Copyright (c) , +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of the nor the names of its contributors may be used to endorse or promote +products derived from this software without specific prior written permission. + + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + + \ No newline at end of file diff --git a/mtklibs/libmtkjpeg/README b/mtklibs/libmtkjpeg/README new file mode 100755 index 0000000000000000000000000000000000000000..86cc20669d6123ee2999fd0c8f6c21641825fda6 --- /dev/null +++ b/mtklibs/libmtkjpeg/README @@ -0,0 +1,385 @@ +The Independent JPEG Group's JPEG software +========================================== + +README for release 6b of 27-Mar-1998 +==================================== + +This distribution contains the sixth public release of the Independent JPEG +Group's free JPEG software. You are welcome to redistribute this software and +to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. + +Serious users of this software (particularly those incorporating it into +larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to +our electronic mailing list. Mailing list members are notified of updates +and have a chance to participate in technical discussions, etc. + +This software is the work of Tom Lane, Philip Gladstone, Jim Boucher, +Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, +Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG +Group. + +IJG is not affiliated with the official ISO JPEG standards committee. + + +DOCUMENTATION ROADMAP +===================== + +This file contains the following sections: + +OVERVIEW General description of JPEG and the IJG software. +LEGAL ISSUES Copyright, lack of warranty, terms of distribution. +REFERENCES Where to learn more about JPEG. +ARCHIVE LOCATIONS Where to find newer versions of this software. +RELATED SOFTWARE Other stuff you should get. +FILE FORMAT WARS Software *not* to get. +TO DO Plans for future IJG releases. + +Other documentation files in the distribution are: + +User documentation: + install.doc How to configure and install the IJG software. + usage.doc Usage instructions for cjpeg, djpeg, jpegtran, + rdjpgcom, and wrjpgcom. + *.1 Unix-style man pages for programs (same info as usage.doc). + wizard.doc Advanced usage instructions for JPEG wizards only. + change.log Version-to-version change highlights. +Programmer and internal documentation: + libjpeg.doc How to use the JPEG library in your own programs. + example.c Sample code for calling the JPEG library. + structure.doc Overview of the JPEG library's internal structure. + filelist.doc Road map of IJG files. + coderules.doc Coding style rules --- please read if you contribute code. + +Please read at least the files install.doc and usage.doc. Useful information +can also be found in the JPEG FAQ (Frequently Asked Questions) article. See +ARCHIVE LOCATIONS below to find out where to obtain the FAQ article. + +If you want to understand how the JPEG code works, we suggest reading one or +more of the REFERENCES, then looking at the documentation files (in roughly +the order listed) before diving into the code. + + +OVERVIEW +======== + +This package contains C software to implement JPEG image compression and +decompression. JPEG (pronounced "jay-peg") is a standardized compression +method for full-color and gray-scale images. JPEG is intended for compressing +"real-world" scenes; line drawings, cartoons and other non-realistic images +are not its strong suit. JPEG is lossy, meaning that the output image is not +exactly identical to the input image. Hence you must not use JPEG if you +have to have identical output bits. However, on typical photographic images, +very good compression levels can be obtained with no visible change, and +remarkably high compression levels are possible if you can tolerate a +low-quality image. For more details, see the references, or just experiment +with various compression settings. + +This software implements JPEG baseline, extended-sequential, and progressive +compression processes. Provision is made for supporting all variants of these +processes, although some uncommon parameter settings aren't implemented yet. +For legal reasons, we are not distributing code for the arithmetic-coding +variants of JPEG; see LEGAL ISSUES. We have made no provision for supporting +the hierarchical or lossless processes defined in the standard. + +We provide a set of library routines for reading and writing JPEG image files, +plus two sample applications "cjpeg" and "djpeg", which use the library to +perform conversion between JPEG and some other popular image file formats. +The library is intended to be reused in other applications. + +In order to support file conversion and viewing software, we have included +considerable functionality beyond the bare JPEG coding/decoding capability; +for example, the color quantization modules are not strictly part of JPEG +decoding, but they are essential for output to colormapped file formats or +colormapped displays. These extra functions can be compiled out of the +library if not required for a particular application. We have also included +"jpegtran", a utility for lossless transcoding between different JPEG +processes, and "rdjpgcom" and "wrjpgcom", two simple applications for +inserting and extracting textual comments in JFIF files. + +The emphasis in designing this software has been on achieving portability and +flexibility, while also making it fast enough to be useful. In particular, +the software is not intended to be read as a tutorial on JPEG. (See the +REFERENCES section for introductory material.) Rather, it is intended to +be reliable, portable, industrial-strength code. We do not claim to have +achieved that goal in every aspect of the software, but we strive for it. + +We welcome the use of this software as a component of commercial products. +No royalty is required, but we do ask for an acknowledgement in product +documentation, as described under LEGAL ISSUES. + + +LEGAL ISSUES +============ + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-1998, Thomas G. Lane. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + + +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, +sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. +ansi2knr.c is NOT covered by the above copyright and conditions, but instead +by the usual distribution terms of the Free Software Foundation; principally, +that you must include source code if you redistribute it. (See the file +ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part +of any program generated from the IJG code, this does not limit you more than +the foregoing paragraphs do. + +The Unix configuration script "configure" was produced with GNU Autoconf. +It is copyright by the Free Software Foundation but is freely distributable. +The same holds for its supporting scripts (config.guess, config.sub, +ltconfig, ltmain.sh). Another support script, install-sh, is copyright +by M.I.T. but is also freely distributable. + +It appears that the arithmetic coding option of the JPEG spec is covered by +patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot +legally be used without obtaining one or more licenses. For this reason, +support for arithmetic coding has been removed from the free JPEG software. +(Since arithmetic coding provides only a marginal gain over the unpatented +Huffman mode, it is unlikely that very many implementations will support it.) +So far as we are aware, there are no patent restrictions on the remaining +code. + +The IJG distribution formerly included code to read and write GIF files. +To avoid entanglement with the Unisys LZW patent, GIF reading support has +been removed altogether, and the GIF writer has been simplified to produce +"uncompressed GIFs". This technique does not use the LZW algorithm; the +resulting GIF files are larger than usual, but are readable by all standard +GIF decoders. + +We are required to state that + "The Graphics Interchange Format(c) is the Copyright property of + CompuServe Incorporated. GIF(sm) is a Service Mark property of + CompuServe Incorporated." + + +REFERENCES +========== + +We highly recommend reading one or more of these references before trying to +understand the innards of the JPEG software. + +The best short technical introduction to the JPEG compression algorithm is + Wallace, Gregory K. "The JPEG Still Picture Compression Standard", + Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44. +(Adjacent articles in that issue discuss MPEG motion picture compression, +applications of JPEG, and related topics.) If you don't have the CACM issue +handy, a PostScript file containing a revised version of Wallace's article is +available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz. The file (actually +a preprint for an article that appeared in IEEE Trans. Consumer Electronics) +omits the sample images that appeared in CACM, but it includes corrections +and some added material. Note: the Wallace article is copyright ACM and IEEE, +and it may not be used for commercial purposes. + +A somewhat less technical, more leisurely introduction to JPEG can be found in +"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by +M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides +good explanations and example C code for a multitude of compression methods +including JPEG. It is an excellent source if you are comfortable reading C +code but don't know much about data compression in general. The book's JPEG +sample code is far from industrial-strength, but when you are ready to look +at a full implementation, you've got one here... + +The best full description of JPEG is the textbook "JPEG Still Image Data +Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published +by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. Price US$59.95, 638 pp. +The book includes the complete text of the ISO JPEG standards (DIS 10918-1 +and draft DIS 10918-2). This is by far the most complete exposition of JPEG +in existence, and we highly recommend it. + +The JPEG standard itself is not available electronically; you must order a +paper copy through ISO or ITU. (Unless you feel a need to own a certified +official copy, we recommend buying the Pennebaker and Mitchell book instead; +it's much cheaper and includes a great deal of useful explanatory material.) +In the USA, copies of the standard may be ordered from ANSI Sales at (212) +642-4900, or from Global Engineering Documents at (800) 854-7179. (ANSI +doesn't take credit card orders, but Global does.) It's not cheap: as of +1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7% +shipping/handling. The standard is divided into two parts, Part 1 being the +actual specification, while Part 2 covers compliance testing methods. Part 1 +is titled "Digital Compression and Coding of Continuous-tone Still Images, +Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS +10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of +Continuous-tone Still Images, Part 2: Compliance testing" and has document +numbers ISO/IEC IS 10918-2, ITU-T T.83. + +Some extensions to the original JPEG standard are defined in JPEG Part 3, +a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84. IJG +currently does not support any Part 3 extensions. + +The JPEG standard does not specify all details of an interchangeable file +format. For the omitted details we follow the "JFIF" conventions, revision +1.02. A copy of the JFIF spec is available from: + Literature Department + C-Cube Microsystems, Inc. + 1778 McCarthy Blvd. + Milpitas, CA 95035 + phone (408) 944-6300, fax (408) 944-6314 +A PostScript version of this document is available by FTP at +ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz. There is also a plain text +version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing +the figures. + +The TIFF 6.0 file format specification can be obtained by FTP from +ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme +found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems. +IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6). +Instead, we recommend the JPEG design proposed by TIFF Technical Note #2 +(Compression tag 7). Copies of this Note can be obtained from ftp.sgi.com or +from ftp://ftp.uu.net/graphics/jpeg/. It is expected that the next revision +of the TIFF spec will replace the 6.0 JPEG design with the Note's design. +Although IJG's own code does not support TIFF/JPEG, the free libtiff library +uses our library to implement TIFF/JPEG per the Note. libtiff is available +from ftp://ftp.sgi.com/graphics/tiff/. + + +ARCHIVE LOCATIONS +================= + +The "official" archive site for this software is ftp.uu.net (Internet +address 192.48.96.9). The most recent released version can always be found +there in directory graphics/jpeg. This particular version will be archived +as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz. If you don't have +direct Internet access, UUNET's archives are also available via UUCP; contact +help@uunet.uu.net for information on retrieving files that way. + +Numerous Internet sites maintain copies of the UUNET files. However, only +ftp.uu.net is guaranteed to have the latest official version. + +You can also obtain this software in DOS-compatible "zip" archive format from +the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or +on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12 +"JPEG Tools". Again, these versions may sometimes lag behind the ftp.uu.net +release. + +The JPEG FAQ (Frequently Asked Questions) article is a useful source of +general information about JPEG. It is updated constantly and therefore is +not included in this distribution. The FAQ is posted every two weeks to +Usenet newsgroups comp.graphics.misc, news.answers, and other groups. +It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/ +and other news.answers archive sites, including the official news.answers +archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/. +If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu +with body + send usenet/news.answers/jpeg-faq/part1 + send usenet/news.answers/jpeg-faq/part2 + + +RELATED SOFTWARE +================ + +Numerous viewing and image manipulation programs now support JPEG. (Quite a +few of them use this library to do so.) The JPEG FAQ described above lists +some of the more popular free and shareware viewers, and tells where to +obtain them on Internet. + +If you are on a Unix machine, we highly recommend Jef Poskanzer's free +PBMPLUS software, which provides many useful operations on PPM-format image +files. In particular, it can convert PPM images to and from a wide range of +other formats, thus making cjpeg/djpeg considerably more useful. The latest +version is distributed by the NetPBM group, and is available from numerous +sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/. +Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is; +you are likely to have difficulty making it work on any non-Unix machine. + +A different free JPEG implementation, written by the PVRG group at Stanford, +is available from ftp://havefun.stanford.edu/pub/jpeg/. This program +is designed for research and experimentation rather than production use; +it is slower, harder to use, and less portable than the IJG code, but it +is easier to read and modify. Also, the PVRG code supports lossless JPEG, +which we do not. (On the other hand, it doesn't do progressive JPEG.) + + +FILE FORMAT WARS +================ + +Some JPEG programs produce files that are not compatible with our library. +The root of the problem is that the ISO JPEG committee failed to specify a +concrete file format. Some vendors "filled in the blanks" on their own, +creating proprietary formats that no one else could read. (For example, none +of the early commercial JPEG implementations for the Macintosh were able to +exchange compressed files.) + +The file format we have adopted is called JFIF (see REFERENCES). This format +has been agreed to by a number of major commercial JPEG vendors, and it has +become the de facto standard. JFIF is a minimal or "low end" representation. +We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF +Technical Note #2) for "high end" applications that need to record a lot of +additional data about an image. TIFF/JPEG is fairly new and not yet widely +supported, unfortunately. + +The upcoming JPEG Part 3 standard defines a file format called SPIFF. +SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should +be able to read the most common variant of SPIFF. SPIFF has some technical +advantages over JFIF, but its major claim to fame is simply that it is an +official standard rather than an informal one. At this point it is unclear +whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto +standard. IJG intends to support SPIFF once the standard is frozen, but we +have not decided whether it should become our default output format or not. +(In any case, our decoder will remain capable of reading JFIF indefinitely.) + +Various proprietary file formats incorporating JPEG compression also exist. +We have little or no sympathy for the existence of these formats. Indeed, +one of the original reasons for developing this free software was to help +force convergence on common, open format standards for JPEG files. Don't +use a proprietary file format! + + +TO DO +===== + +The major thrust for v7 will probably be improvement of visual quality. +The current method for scaling the quantization tables is known not to be +very good at low Q values. We also intend to investigate block boundary +smoothing, "poor man's variable quantization", and other means of improving +quality-vs-file-size performance without sacrificing compatibility. + +In future versions, we are considering supporting some of the upcoming JPEG +Part 3 extensions --- principally, variable quantization and the SPIFF file +format. + +As always, speeding things up is of great interest. + +Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net. diff --git a/mtklibs/libmtkjpeg/arm/libmtkjpeg.so b/mtklibs/libmtkjpeg/arm/libmtkjpeg.so new file mode 100755 index 0000000000000000000000000000000000000000..9fb5dfd99b8ea8e75f8dd96f792e62b803cda5b5 Binary files /dev/null and b/mtklibs/libmtkjpeg/arm/libmtkjpeg.so differ diff --git a/mtklibs/libmtkjpeg/include/cderror.h b/mtklibs/libmtkjpeg/include/cderror.h new file mode 100755 index 0000000000000000000000000000000000000000..a5038667d3541ca064bb82d63a12cc5a408f444c --- /dev/null +++ b/mtklibs/libmtkjpeg/include/cderror.h @@ -0,0 +1,125 @@ +/* + * cderror.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the error and message codes for the cjpeg/djpeg + * applications. These strings are not needed as part of the JPEG library + * proper. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef CDERROR_H +#define CDERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code, string) +#endif /* CDERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code, string) code , + +#endif /* JMAKE_ENUM_LIST */ + + JMESSAGE(JMSG_FIRSTADDONCODE = 1000, NULL) + /* Must be first entry! */ +#ifdef BMP_SUPPORTED + JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format") + JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported") + JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length") + JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1") + JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB") + JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported") + JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM") + JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image") + JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image") + JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image") + JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image") +#endif /* BMP_SUPPORTED */ +#ifdef GIF_SUPPORTED + JMESSAGE(JERR_GIF_BUG, "GIF output got confused") + JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d") + JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB") + JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file") + JMESSAGE(JERR_GIF_NOT, "Not a GIF file") + JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image") + JMESSAGE(JTRC_GIF_BADVERSION, + "Warning: unexpected GIF version number '%c%c%c'") + JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x") + JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input") + JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file") + JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring") + JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image") + JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits") +#endif /* GIF_SUPPORTED */ +#ifdef PPM_SUPPORTED + JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB") + JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file") + JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file") + JMESSAGE(JTRC_PGM, "%ux%u PGM image") + JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image") + JMESSAGE(JTRC_PPM, "%ux%u PPM image") + JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image") +#endif /* PPM_SUPPORTED */ +#ifdef RLE_SUPPORTED + JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library") + JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB") + JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE") + JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file") + JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header") + JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header") + JMESSAGE(JERR_RLE_NOT, "Not an RLE file") + JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE") + JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup") + JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file") + JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d") + JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file") + JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d") + JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d") +#endif /* RLE_SUPPORTED */ +#ifdef TARGA_SUPPORTED + JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format") + JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file") + JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB") + JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image") + JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image") + JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image") +#else + JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled") +#endif /* TARGA_SUPPORTED */ + JMESSAGE(JERR_BAD_CMAP_FILE, + "Color map file is invalid or of unsupported format") + JMESSAGE(JERR_TOO_MANY_COLORS, + "Output file format cannot handle %d colormap entries") + JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed") +#ifdef TARGA_SUPPORTED + JMESSAGE(JERR_UNKNOWN_FORMAT, + "Unrecognized input file format --- perhaps you need -targa") +#else + JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format") +#endif + JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format") +#ifdef JMAKE_ENUM_LIST + JMSG_LASTADDONCODE +} ADDON_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE diff --git a/mtklibs/libmtkjpeg/include/cdjpeg.h b/mtklibs/libmtkjpeg/include/cdjpeg.h new file mode 100755 index 0000000000000000000000000000000000000000..5e9e732321768fb3dcf4caf1e08e6dc59ed939ea --- /dev/null +++ b/mtklibs/libmtkjpeg/include/cdjpeg.h @@ -0,0 +1,197 @@ +/* + * cdjpeg.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains common declarations for the sample applications + * cjpeg and djpeg. It is NOT used by the core JPEG library. + */ + +#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ +#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" /* get library error codes too */ +#include "cderror.h" /* get application-specific error codes */ + + +/* + * Object interface for cjpeg's source file decoding modules + */ + +typedef struct cjpeg_source_struct *cjpeg_source_ptr; + +struct cjpeg_source_struct { + JMETHOD(void, start_input, (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); + JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); + JMETHOD(void, finish_input, (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); + + FILE *input_file; + + JSAMPARRAY buffer; + JDIMENSION buffer_height; +}; + + +/* + * Object interface for djpeg's output file encoding modules + */ + +typedef struct djpeg_dest_struct *djpeg_dest_ptr; + +struct djpeg_dest_struct { + /* start_output is called after jpeg_start_decompress finishes. + * The color map will be ready at this time, if one is needed. + */ + JMETHOD(void, start_output, (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)); + /* Emit the specified number of pixel rows from the buffer. */ + JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo, JDIMENSION rows_supplied)); + /* Finish up at the end of the image. */ + JMETHOD(void, finish_output, (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo)); + + /* Target file spec; filled in by djpeg.c after object is created. */ + FILE *output_file; + + /* Output pixel-row buffer. Created by module init or start_output. + * Width is cinfo->output_width * cinfo->output_components; + * height is buffer_height. + */ + JSAMPARRAY buffer; + JDIMENSION buffer_height; +}; + + +/* + * cjpeg/djpeg may need to perform extra passes to convert to or from + * the source/destination file format. The JPEG library does not know + * about these passes, but we'd like them to be counted by the progress + * monitor. We use an expanded progress monitor object to hold the + * additional pass count. + */ + +struct cdjpeg_progress_mgr { + struct jpeg_progress_mgr pub; /* fields known to JPEG library */ + int completed_extra_passes; /* extra passes completed */ + int total_extra_passes; /* total extra */ + /* last printed percentage stored here to avoid multiple printouts */ + int percent_done; +}; + +typedef struct cdjpeg_progress_mgr *cd_progress_ptr; + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jinit_read_bmp jIRdBMP +#define jinit_write_bmp jIWrBMP +#define jinit_read_gif jIRdGIF +#define jinit_write_gif jIWrGIF +#define jinit_read_ppm jIRdPPM +#define jinit_write_ppm jIWrPPM +#define jinit_read_rle jIRdRLE +#define jinit_write_rle jIWrRLE +#define jinit_read_targa jIRdTarga +#define jinit_write_targa jIWrTarga +#define read_quant_tables RdQTables +#define read_scan_script RdScnScript +#define set_quant_slots SetQSlots +#define set_sample_factors SetSFacts +#define read_color_map RdCMap +#define enable_signal_catcher EnSigCatcher +#define start_progress_monitor StProgMon +#define end_progress_monitor EnProgMon +#define read_stdin RdStdin +#define write_stdout WrStdout +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Module selection routines for I/O modules. */ + +EXTERN(cjpeg_source_ptr) +jinit_read_bmp JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) +jinit_write_bmp JPP((j_decompress_ptr cinfo, boolean is_os2)); +EXTERN(cjpeg_source_ptr) +jinit_read_gif JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) +jinit_write_gif JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) +jinit_read_ppm JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) +jinit_write_ppm JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) +jinit_read_rle JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) +jinit_write_rle JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) +jinit_read_targa JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) +jinit_write_targa JPP((j_decompress_ptr cinfo)); + +/* cjpeg support routines (in rdswitch.c) */ + +EXTERN(boolean) +read_quant_tables JPP((j_compress_ptr cinfo, char *filename, + int scale_factor, boolean force_baseline)); +EXTERN(boolean) +read_scan_script JPP((j_compress_ptr cinfo, char *filename)); +EXTERN(boolean) +set_quant_slots JPP((j_compress_ptr cinfo, char *arg)); +EXTERN(boolean) +set_sample_factors JPP((j_compress_ptr cinfo, char *arg)); + +/* djpeg support routines (in rdcolmap.c) */ + +EXTERN(void) +read_color_map JPP((j_decompress_ptr cinfo, FILE *infile)); + +/* common support routines (in cdjpeg.c) */ + +EXTERN(void) +enable_signal_catcher JPP((j_common_ptr cinfo)); +EXTERN(void) +start_progress_monitor JPP((j_common_ptr cinfo, cd_progress_ptr progress)); +EXTERN(void) +end_progress_monitor JPP((j_common_ptr cinfo)); +EXTERN(boolean) +keymatch JPP((char *arg, const char *keyword, int minchars)); +EXTERN(FILE *) +read_stdin JPP((void)); +EXTERN(FILE *) +write_stdout JPP((void)); + +/* miscellaneous useful macros */ + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#define WRITE_BINARY "w" +#else +#ifdef VMS /* VMS is very nonstandard */ +#define READ_BINARY "rb", "ctx=stm" +#define WRITE_BINARY "wb", "ctx=stm" +#else /* standard ANSI-compliant case */ +#define READ_BINARY "rb" +#define WRITE_BINARY "wb" +#endif +#endif + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif +#ifndef EXIT_SUCCESS +#ifdef VMS +#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ +#else +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef EXIT_WARNING +#ifdef VMS +#define EXIT_WARNING 1 /* VMS is very nonstandard */ +#else +#define EXIT_WARNING 2 +#endif +#endif diff --git a/mtklibs/libmtkjpeg/include/jchuff.h b/mtklibs/libmtkjpeg/include/jchuff.h new file mode 100755 index 0000000000000000000000000000000000000000..1ec06706eaac94d986addf28b393c0998040ee09 --- /dev/null +++ b/mtklibs/libmtkjpeg/include/jchuff.h @@ -0,0 +1,45 @@ +/* + * jchuff.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains declarations for Huffman entropy encoding routines + * that are shared between the sequential encoder (jchuff.c) and the + * progressive encoder (jcphuff.c). No other modules need to see these. + */ + +/* The legal range of a DCT coefficient is + * -1024 .. +1023 for 8-bit data; + * -16384 .. +16383 for 12-bit data. + * Hence the magnitude should always fit in 10 or 14 bits respectively. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MAX_COEF_BITS 10 +#else +#define MAX_COEF_BITS 14 +#endif + +/* Derived data constructed for each Huffman table */ + +typedef struct { + unsigned int ehufco[256]; /* code for each symbol */ + char ehufsi[256]; /* length of code for each symbol */ + /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ +} c_derived_tbl; + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_make_c_derived_tbl jMkCDerived +#define jpeg_gen_optimal_table jGenOptTbl +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Expand a Huffman table definition into the derived format */ +EXTERN(void) jpeg_make_c_derived_tbl_MTK +JPP((j_compress_ptr cinfo, boolean isDC, int tblno, c_derived_tbl * *pdtbl)); + +/* Generate an optimal table definition given the specified counts */ +EXTERN(void) jpeg_gen_optimal_table_MTK JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])); diff --git a/mtklibs/libmtkjpeg/include/jconfig.h b/mtklibs/libmtkjpeg/include/jconfig.h new file mode 100755 index 0000000000000000000000000000000000000000..378d1d496d9685c141332f9fda9c87c1baf982e9 --- /dev/null +++ b/mtklibs/libmtkjpeg/include/jconfig.h @@ -0,0 +1,156 @@ +/* android jconfig.h */ +/* + * jconfig.doc + * + * Copyright (C) 1991-1994, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file documents the configuration options that are required to + * customize the JPEG software for a particular system. + * + * The actual configuration options for a particular installation are stored + * in jconfig.h. On many machines, jconfig.h can be generated automatically + * or copied from one of the "canned" jconfig files that we supply. But if + * you need to generate a jconfig.h file by hand, this file tells you how. + * + * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING. + * EDIT A COPY NAMED JCONFIG.H. + */ + + +/* + * These symbols indicate the properties of your machine or compiler. + * #define the symbol if yes, #undef it if no. + */ + +/* Does your compiler support function prototypes? + * (If not, you also need to use ansi2knr, see install.doc) + */ +#define HAVE_PROTOTYPES + +/* Does your compiler support the declaration "unsigned char" ? + * How about "unsigned short" ? + */ +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT + +/* Define "void" as "char" if your compiler doesn't know about type void. + * NOTE: be sure to define void such that "void *" represents the most general + * pointer type, e.g., that returned by malloc(). + */ +/* #define void char */ + +/* Define "const" as empty if your compiler doesn't know the "const" keyword. + */ +/* #define const */ + +/* Define this if an ordinary "char" type is unsigned. + * If you're not sure, leaving it undefined will work at some cost in speed. + * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal. + */ +#undef CHAR_IS_UNSIGNED + +/* Define this if your system has an ANSI-conforming file. + */ +#define HAVE_STDDEF_H + +/* Define this if your system has an ANSI-conforming file. + */ +#define HAVE_STDLIB_H + +/* Define this if your system does not have an ANSI/SysV , + * but does have a BSD-style . + */ +#undef NEED_BSD_STRINGS + +/* Define this if your system does not provide typedef size_t in any of the + * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in + * instead. + */ +#undef NEED_SYS_TYPES_H + +/* For 80x86 machines, you need to define NEED_FAR_POINTERS, + * unless you are using a large-data memory model or 80386 flat-memory mode. + * On less brain-damaged CPUs this symbol must not be defined. + * (Defining this symbol causes large data structures to be referenced through + * "far" pointers and to be allocated with a special version of malloc.) + */ +#undef NEED_FAR_POINTERS + +/* Define this if your linker needs global names to be unique in less + * than the first 15 characters. + */ +#undef NEED_SHORT_EXTERNAL_NAMES + +/* Although a real ANSI C compiler can deal perfectly well with pointers to + * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI + * and pseudo-ANSI compilers get confused. To keep one of these bozos happy, + * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you + * actually get "missing structure definition" warnings or errors while + * compiling the JPEG code. + */ +#undef INCOMPLETE_TYPES_BROKEN + + +/* + * The following options affect code selection within the JPEG library, + * but they don't need to be visible to applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS has been defined. + */ + +#ifdef JPEG_INTERNALS + +/* Define this if your compiler implements ">>" on signed values as a logical + * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift, + * which is the normal and rational definition. + */ +#undef RIGHT_SHIFT_IS_UNSIGNED + + +#endif /* JPEG_INTERNALS */ + + +/* + * The remaining options do not affect the JPEG library proper, + * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c). + * Other applications can ignore these. + */ + +#ifdef JPEG_CJPEG_DJPEG + +/* These defines indicate which image (non-JPEG) file formats are allowed. */ + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +/* Define this if you want to name both input and output files on the command + * line, rather than using stdout and optionally stdin. You MUST do this if + * your system can't cope with binary I/O to stdin/stdout. See comments at + * head of cjpeg.c or djpeg.c. + */ +#undef TWO_FILE_COMMANDLINE + +/* Define this if your system needs explicit cleanup of temporary files. + * This is crucial under MS-DOS, where the temporary "files" may be areas + * of extended memory; on most other systems it's not as important. + */ +#undef NEED_SIGNAL_CATCHER + +/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb"). + * This is necessary on systems that distinguish text files from binary files, + * and is harmless on most systems that don't. If you have one of the rare + * systems that complains about the "b" spec, define this symbol. + */ +#undef DONT_USE_B_MODE + +/* Define this if you want percent-done progress reports from cjpeg/djpeg. + */ +#undef PROGRESS_REPORT + + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/mtklibs/libmtkjpeg/include/jdct.h b/mtklibs/libmtkjpeg/include/jdct.h new file mode 100755 index 0000000000000000000000000000000000000000..f0b8227bb013582d46f6d73f94d4654e531db674 --- /dev/null +++ b/mtklibs/libmtkjpeg/include/jdct.h @@ -0,0 +1,189 @@ +/* + * jdct.h + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This include file contains common declarations for the forward and + * inverse DCT modules. These declarations are private to the DCT managers + * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. + * The individual DCT algorithms are kept in separate files to ease + * machine-dependent tuning (e.g., assembly coding). + */ + + +/* + * A forward DCT routine is given a pointer to a work area of type DCTELEM[]; + * the DCT is to be performed in-place in that buffer. Type DCTELEM is int + * for 8-bit samples, INT32 for 12-bit samples. (NOTE: Floating-point DCT + * implementations use an array of type FAST_FLOAT, instead.) + * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE). + * The DCT outputs are returned scaled up by a factor of 8; they therefore + * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This + * convention improves accuracy in integer implementations and saves some + * work in floating-point ones. + * Quantization of the output coefficients is done by jcdctmgr.c. + */ + +#if BITS_IN_JSAMPLE == 8 +#if !defined(FAST_JDCT_ENCODE) && !defined(FAST_JDCT_DECODE) +typedef int DCTELEM; /* 16 or 32 bits is fine */ +typedef unsigned int UDCTELEM; +typedef unsigned long long UDCTELEM2; +#else +typedef short DCTELEM; /* prefer 16 bit with SIMD for parellelism */ +typedef unsigned short UDCTELEM; +typedef unsigned int UDCTELEM2; +#endif +#else +typedef INT32 DCTELEM; /* must have 32 bits */ +typedef UINT32 UDCTELEM; +typedef unsigned long long UDCTELEM2; +#endif + +typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data)); +typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data)); + + +/* + * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer + * to an output sample array. The routine must dequantize the input data as + * well as perform the IDCT; for dequantization, it uses the multiplier table + * pointed to by compptr->dct_table. The output data is to be placed into the + * sample array starting at a specified column. (Any row offset needed will + * be applied to the array pointer before it is passed to the IDCT code.) + * Note that the number of samples emitted by the IDCT routine is + * DCT_scaled_size * DCT_scaled_size. + */ + +/* typedef inverse_DCT_method_ptr is declared in jpegint.h */ + +/* + * Each IDCT routine has its own ideas about the best dct_table element type. + */ + +typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ +#if BITS_IN_JSAMPLE == 8 +typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ +#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ +#else +typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ +#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ +#endif +typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ + + +/* + * Each IDCT routine is responsible for range-limiting its results and + * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could + * be quite far out of range if the input data is corrupt, so a bulletproof + * range-limiting step is required. We use a mask-and-table-lookup method + * to do the combined operations quickly. See the comments with + * prepare_range_limit_table (in jdmaster.c) for more info. + */ + +#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE) + +#define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_fdct_islow_MTK jFDislow +#define jpeg_fdct_ifast_MTK jFDifast +#define jpeg_fdct_float jFDfloat +#define jpeg_idct_islow jRDislow +#define jpeg_idct_ifast jRDifast +#define jpeg_idct_float jRDfloat +#define jpeg_idct_4x4 jRD4x4 +#define jpeg_idct_2x2 jRD2x2 +#define jpeg_idct_1x1 jRD1x1 +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Extern declarations for the forward and inverse DCT routines. */ + +EXTERN(void) +jpeg_fdct_islow_MTK JPP((DCTELEM * data)); +EXTERN(void) +jpeg_fdct_ifast_MTK JPP((DCTELEM * data)); +EXTERN(void) +jpeg_fdct_float JPP((FAST_FLOAT * data)); + +EXTERN(void) jpeg_idct_islow_MTK +JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_ifast_MTK +JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_float_MTK +JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_4x4_MTK +JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_2x2_MTK +JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_1x1_MTK +JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); + + +/* + * Macros for handling fixed-point arithmetic; these are used by many + * but not all of the DCT/IDCT modules. + * + * All values are expected to be of type INT32. + * Fractional constants are scaled left by CONST_BITS bits. + * CONST_BITS is defined within each module using these macros, + * and may differ from one module to the next. + */ + +#define ONE ((INT32) 1) +#define CONST_SCALE (ONE << CONST_BITS) + +/* Convert a positive real constant to an integer scaled by CONST_SCALE. + * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, + * thus causing a lot of useless floating-point operations at run time. + */ + +#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) + +/* Descale and correctly round an INT32 value that's scaled by N bits. + * We assume RIGHT_SHIFT rounds towards minus infinity, so adding + * the fudge factor is correct for either sign of X. + */ + +#define DESCALE(x, n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * This macro is used only when the two inputs will actually be no more than + * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a + * full 32x32 multiply. This provides a useful speedup on many machines. + * Unfortunately there is no way to specify a 16x16->32 multiply portably + * in C, but some C compilers will do the right thing if you provide the + * correct combination of casts. + */ + +#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ +#define MULTIPLY16C16(var, const) (((INT16) (var)) * ((INT16) (const))) +#endif +#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ +#define MULTIPLY16C16(var, const) (((INT16) (var)) * ((INT32) (const))) +#endif + +#ifndef MULTIPLY16C16 /* default definition */ +#define MULTIPLY16C16(var, const) ((var) * (const)) +#endif + +/* Same except both inputs are variables. */ + +#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ +#define MULTIPLY16V16(var1, var2) (((INT16) (var1)) * ((INT16) (var2))) +#endif + +#ifndef MULTIPLY16V16 /* default definition */ +#define MULTIPLY16V16(var1, var2) ((var1) * (var2)) +#endif diff --git a/mtklibs/libmtkjpeg/include/jdhuff.h b/mtklibs/libmtkjpeg/include/jdhuff.h new file mode 100755 index 0000000000000000000000000000000000000000..75f46d0e84b285764d56bb7fe99b2f90ec788c78 --- /dev/null +++ b/mtklibs/libmtkjpeg/include/jdhuff.h @@ -0,0 +1,264 @@ +/* + * jdhuff.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Copyright (C) 2010-2011, D. R. Commander. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains declarations for Huffman entropy decoding routines + * that are shared between the sequential decoder (jdhuff.c) and the + * progressive decoder (jdphuff.c). No other modules need to see these. + */ + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_make_d_derived_tbl jMkDDerived +#define jpeg_fill_bit_buffer jFilBitBuf +#define jpeg_huff_decode jHufDecode +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Derived data constructed for each Huffman table */ + +#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */ + +typedef struct { + /* Basic tables: (element [0] of each array is unused) */ + INT32 maxcode[18]; /* largest code of length k (-1 if none) */ + /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */ +#if defined(FAST_HUFFMAN_DECODE) + INT32 valoffset[18]; /* huffval[] offset for codes of length k */ +#else + INT32 valoffset[17]; /* huffval[] offset for codes of length k */ +#endif + /* valoffset[k] = huffval[] index of 1st symbol of code length k, less + * the smallest code of length k; so given a code of length k, the + * corresponding symbol is huffval[code + valoffset[k]] + */ + + /* Link to public Huffman table (needed only in jpeg_huff_decode) */ + JHUFF_TBL *pub; + + /* Lookahead table: indexed by the next HUFF_LOOKAHEAD bits of + * the input data stream. If the next Huffman code is no more + * than HUFF_LOOKAHEAD bits long, we can obtain its length and + * the corresponding symbol directly from these tables. + */ +#if defined(FAST_HUFFMAN_DECODE) + /* + * The lower 8 bits of each table entry contain the number of + * bits in the corresponding Huffman code, or HUFF_LOOKAHEAD + 1 + * if too long. The next 8 bits of each entry contain the + * symbol. + */ + int lookup[1 << HUFF_LOOKAHEAD]; +#else + int look_nbits[1 << HUFF_LOOKAHEAD]; /* # bits, or 0 if too long */ + UINT8 look_sym[1 << HUFF_LOOKAHEAD]; /* symbol, or unused */ +#endif +} d_derived_tbl; + +/* Expand a Huffman table definition into the derived format */ +EXTERN(void) jpeg_make_d_derived_tbl_MTK +JPP((j_decompress_ptr cinfo, boolean isDC, int tblno, d_derived_tbl * *pdtbl)); + + +/* + * Fetching the next N bits from the input stream is a time-critical operation + * for the Huffman decoders. We implement it with a combination of inline + * macros and out-of-line subroutines. Note that N (the number of bits + * demanded at one time) never exceeds 15 for JPEG use. + * + * We read source bytes into get_buffer and dole out bits as needed. + * If get_buffer already contains enough bits, they are fetched in-line + * by the macros CHECK_BIT_BUFFER and GET_BITS. When there aren't enough + * bits, jpeg_fill_bit_buffer is called; it will attempt to fill get_buffer + * as full as possible (not just to the number of bits needed; this + * prefetching reduces the overhead cost of calling jpeg_fill_bit_buffer). + * Note that jpeg_fill_bit_buffer may return FALSE to indicate suspension. + * On TRUE return, jpeg_fill_bit_buffer guarantees that get_buffer contains + * at least the requested number of bits --- dummy zeroes are inserted if + * necessary. + */ + +typedef INT32 bit_buf_type; /* type of bit-extraction buffer */ +#define BIT_BUF_SIZE 32 /* size of buffer in bits */ +#define LOG_TWO_BIT_BUF_SIZE 5 /* log_2(BIT_BUF_SIZE) */ + +/* If long is > 32 bits on your machine, and shifting/masking longs is + * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE + * appropriately should be a win. Unfortunately we can't define the size + * with something like #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8) + * because not all machines measure sizeof in 8-bit bytes. + */ + +typedef struct { /* Bitreading state saved across MCUs */ + bit_buf_type get_buffer; /* current bit-extraction buffer */ + int bits_left; /* # of unused bits in it */ +} bitread_perm_state; + +typedef struct { /* Bitreading working state within an MCU */ + /* Current data source location */ + /* We need a copy, rather than munging the original, in case of suspension */ + const JOCTET *next_input_byte; /* => next byte to read from source */ + size_t bytes_in_buffer; /* # of bytes remaining in source buffer */ + /* Bit input buffer --- note these values are kept in register variables, + * not in this struct, inside the inner loops. + */ + bit_buf_type get_buffer; /* current bit-extraction buffer */ + int bits_left; /* # of unused bits in it */ + /* Pointer needed by jpeg_fill_bit_buffer. */ + j_decompress_ptr cinfo; /* back link to decompress master record */ +} bitread_working_state; + +/* Macros to declare and load/save bitread local variables. */ +#define BITREAD_STATE_VARS \ + register bit_buf_type get_buffer; \ + register int bits_left; \ + bitread_working_state br_state + +#define BITREAD_LOAD_STATE(cinfop, permstate) \ + br_state.cinfo = cinfop; \ + br_state.next_input_byte = cinfop->src->next_input_byte; \ + br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \ + get_buffer = permstate.get_buffer; \ + bits_left = permstate.bits_left; + +#define BITREAD_SAVE_STATE(cinfop, permstate) \ + cinfop->src->next_input_byte = br_state.next_input_byte; \ + cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \ + permstate.get_buffer = get_buffer; \ + permstate.bits_left = bits_left + +/* + * These macros provide the in-line portion of bit fetching. + * Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer + * before using GET_BITS, PEEK_BITS, or DROP_BITS. + * The variables get_buffer and bits_left are assumed to be locals, + * but the state struct might not be (jpeg_huff_decode needs this). + * CHECK_BIT_BUFFER(state,n,action); + * Ensure there are N bits in get_buffer; if suspend, take action. + * val = GET_BITS(n); + * Fetch next N bits. + * val = PEEK_BITS(n); + * Fetch next N bits without removing them from the buffer. + * DROP_BITS(n); + * Discard next N bits. + * The value N should be a simple variable, not an expression, because it + * is evaluated multiple times. + */ + +#define CHECK_BIT_BUFFER(state, nbits, action) \ + { if (bits_left < (nbits)) { \ + if (!jpeg_fill_bit_buffer_MTK(&(state), get_buffer, bits_left, nbits)) \ + { action; } \ + get_buffer = (state).get_buffer; bits_left = (state).bits_left; } } + +#define GET_BITS(nbits) \ + (((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1)) + +#define PEEK_BITS(nbits) \ + (((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1)) + +#define DROP_BITS(nbits) \ + (bits_left -= (nbits)) + +/* Load up the bit buffer to a depth of at least nbits */ +#define jpeg_fill_bit_buffer(state, get_buffer, bits_left, nbits) \ + jpeg_fill_bit_buffer_MTK(state, get_buffer, bits_left, nbits) + +EXTERN(boolean) jpeg_fill_bit_buffer_MTK +JPP((bitread_working_state * state, register bit_buf_type get_buffer, + register int bits_left, int nbits)); + + +/* + * Code for extracting next Huffman-coded symbol from input bit stream. + * Again, this is time-critical and we make the main paths be macros. + * + * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits + * without looping. Usually, more than 95% of the Huffman codes will be 8 + * or fewer bits long. The few overlength codes are handled with a loop, + * which need not be inline code. + * + * Notes about the HUFF_DECODE macro: + * 1. Near the end of the data segment, we may fail to get enough bits + * for a lookahead. In that case, we do it the hard way. + * 2. If the lookahead table contains no entry, the next code must be + * more than HUFF_LOOKAHEAD bits long. + * 3. jpeg_huff_decode returns -1 if forced to suspend. + */ + +#if defined(FAST_HUFFMAN_DECODE) +#define HUFF_DECODE(result, state, htbl, failaction, slowlabel) \ +{ register int nb, look; \ + if (bits_left < HUFF_LOOKAHEAD) { \ + if (!jpeg_fill_bit_buffer_MTK(&state, get_buffer, bits_left, 0)) {failaction; } \ + get_buffer = state.get_buffer; bits_left = state.bits_left; \ + if (bits_left < HUFF_LOOKAHEAD) { \ + nb = 1; goto slowlabel; \ + } \ + } \ + look = PEEK_BITS(HUFF_LOOKAHEAD); \ + if ((nb = (htbl->lookup[look] >> HUFF_LOOKAHEAD)) <= HUFF_LOOKAHEAD) { \ + DROP_BITS(nb); \ + result = htbl->lookup[look] & ((1 << HUFF_LOOKAHEAD) - 1); \ + } else { \ +slowlabel: \ + if ((result = jpeg_huff_decode_MTK(&state, get_buffer, bits_left, htbl, nb)) < 0) \ + { failaction; } \ + get_buffer = state.get_buffer; bits_left = state.bits_left; \ + } \ +} + +#define HUFF_DECODE_FAST(s, nb, htbl) \ + FILL_BIT_BUFFER_FAST; \ + s = PEEK_BITS(HUFF_LOOKAHEAD); \ + s = htbl->lookup[s]; \ + nb = s >> HUFF_LOOKAHEAD; \ + /* Pre-execute the common case of nb <= HUFF_LOOKAHEAD */ \ + DROP_BITS(nb); \ + s = s & ((1 << HUFF_LOOKAHEAD) - 1); \ + if (nb > HUFF_LOOKAHEAD) { \ + /* Equivalent of jpeg_huff_decode() */ \ + /* Don't use GET_BITS() here because we don't want to modify bits_left */ \ + s = (get_buffer >> bits_left) & ((1 << (nb)) - 1); \ + while (s > htbl->maxcode[nb]) { \ + s <<= 1; \ + s |= GET_BITS(1); \ + nb++; \ + } \ + s = htbl->pub->huffval[(int) (s + htbl->valoffset[nb]) & 0xFF]; \ + } +#else +#define HUFF_DECODE(result, state, htbl, failaction, slowlabel) \ +{ register int nb, look; \ + if (bits_left < HUFF_LOOKAHEAD) { \ + if (!jpeg_fill_bit_buffer_MTK(&state, get_buffer, bits_left, 0)) {failaction; } \ + get_buffer = state.get_buffer; bits_left = state.bits_left; \ + if (bits_left < HUFF_LOOKAHEAD) { \ + nb = 1; goto slowlabel; \ + } \ + } \ + look = PEEK_BITS(HUFF_LOOKAHEAD); \ + if ((nb = htbl->look_nbits[look]) != 0) { \ + DROP_BITS(nb); \ + result = htbl->look_sym[look]; \ + } else { \ + nb = HUFF_LOOKAHEAD+1; \ +slowlabel: \ + if ((result = jpeg_huff_decode_MTK(&state, get_buffer, bits_left, htbl, nb)) < 0) \ + { failaction; } \ + get_buffer = state.get_buffer; bits_left = state.bits_left; \ + } \ +} +#endif +/* Out-of-line case for Huffman code fetching */ +#define jpeg_huff_decode(state, get_buffer, bits_left, htbl, min_bits) \ + jpeg_huff_decode_MTK(state, get_buffer, bits_left, htbl, min_bits) + +EXTERN(int) jpeg_huff_decode_MTK +JPP((bitread_working_state * state, register bit_buf_type get_buffer, + register int bits_left, d_derived_tbl * htbl, int min_bits)); diff --git a/mtklibs/libmtkjpeg/include/jerror.h b/mtklibs/libmtkjpeg/include/jerror.h new file mode 100755 index 0000000000000000000000000000000000000000..ba8942249189471309754eaff3a23fbfc5548918 --- /dev/null +++ b/mtklibs/libmtkjpeg/include/jerror.h @@ -0,0 +1,290 @@ +/* + * jerror.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the error and message codes for the JPEG library. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + * A set of error-reporting macros are defined too. Some applications using + * the JPEG library may wish to include this file to get the error codes + * and/or the macros. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef JERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code, string) +#endif /* JERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code, string) code , + +#endif /* JMAKE_ENUM_LIST */ + + JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") + + /* Must be first entry! */ + /* For maintenance convenience, list is alphabetical by message code name */ + JMESSAGE(JERR_ARITH_NOTIMPL, + "Sorry, there are legal restrictions on arithmetic coding") + JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") + JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") + JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") + JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") + JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") + JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") + JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") + JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") + JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") + JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") + JMESSAGE(JERR_BAD_LIB_VERSION, + "Wrong JPEG library version: library is %d, caller expects %d") + JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") + JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") + JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") + JMESSAGE(JERR_BAD_PROGRESSION, + "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") + JMESSAGE(JERR_BAD_PROG_SCRIPT, + "Invalid progressive parameters at scan script entry %d") + JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") + JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") + JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") + JMESSAGE(JERR_BAD_STRUCT_SIZE, + "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") + JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") + JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") + JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") + JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") + JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") + JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") + JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") + JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") + JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") + JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") + JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") + JMESSAGE(JERR_EMS_READ, "Read from EMS failed") + JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") + JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") + JMESSAGE(JERR_FILE_READ, "Input file read error") + JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") + JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") + JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") + JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") + JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") + JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") + JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") + JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, + "Cannot transcode due to multiple use of quantization table %d") + JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") + JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") + JMESSAGE(JERR_NOTIMPL, "Not implemented yet") + JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") + JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") + JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") + JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") + JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") + JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") + JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") + JMESSAGE(JERR_QUANT_COMPONENTS, + "Cannot quantize more than %d color components") + JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") + JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") + JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") + JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") + JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") + JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") + JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") + JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") + JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") + JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") + JMESSAGE(JERR_TFILE_WRITE, + "Write failed on temporary file --- out of disk space?") + JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") + JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") + JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") + JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") + JMESSAGE(JERR_XMS_READ, "Read from XMS failed") + JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") + JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) + JMESSAGE(JMSG_VERSION, JVERSION) + JMESSAGE(JTRC_16BIT_TABLES, + "Caution: quantization tables are too coarse for baseline JPEG") + JMESSAGE(JTRC_ADOBE, + "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") + JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") + JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") + JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") + JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") + JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") + JMESSAGE(JTRC_DRI, "Define Restart Interval %u") + JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") + JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") + JMESSAGE(JTRC_EOI, "End Of Image") + JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") + JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") + JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, + "Warning: thumbnail image size does not match data length %u") + JMESSAGE(JTRC_JFIF_EXTENSION, + "JFIF extension marker: type 0x%02x, length %u") + JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") + JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") + JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") + JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") + JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") + JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") + JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") + JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") + JMESSAGE(JTRC_RST, "RST%d") + JMESSAGE(JTRC_SMOOTH_NOTIMPL, + "Smoothing not supported with nonstandard sampling ratios") + JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") + JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") + JMESSAGE(JTRC_SOI, "Start of Image") + JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") + JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") + JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") + JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") + JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") + JMESSAGE(JTRC_THUMB_JPEG, + "JFIF extension marker: JPEG-compressed thumbnail image, length %u") + JMESSAGE(JTRC_THUMB_PALETTE, + "JFIF extension marker: palette thumbnail image, length %u") + JMESSAGE(JTRC_THUMB_RGB, + "JFIF extension marker: RGB thumbnail image, length %u") + JMESSAGE(JTRC_UNKNOWN_IDS, + "Unrecognized component IDs %d %d %d, assuming YCbCr") + JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") + JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") + JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") + JMESSAGE(JWRN_BOGUS_PROGRESSION, + "Inconsistent progression sequence for component %d coefficient %d") + JMESSAGE(JWRN_EXTRANEOUS_DATA, + "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") + JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") + JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") + JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") + JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") + JMESSAGE(JWRN_MUST_RESYNC, + "Corrupt JPEG data: found marker 0x%02x instead of RST%d") + JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") + JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") +#ifdef JMAKE_ENUM_LIST + JMSG_LASTMSGCODE +} J_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE + + +#ifndef JERROR_H +#define JERROR_H + +/* Macros to simplify using the error and trace message stuff */ +/* The first parameter is either type of cinfo pointer */ + +/* Fatal errors (print message and exit) */ +#define ERREXIT(cinfo, code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT1(cinfo, code, p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT2(cinfo, code, p1, p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT3(cinfo, code, p1, p2, p3) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT4(cinfo, code, p1, p2, p3, p4) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXITS(cinfo, code, str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) + +#define MAKESTMT(stuff) do { stuff } while (0) + +/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ +#define WARNMS(cinfo, code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS1(cinfo, code, p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS2(cinfo, code, p1, p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) + +/* Informational/debugging messages */ +#define TRACEMS(cinfo, lvl, code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS1(cinfo, lvl, code, p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS2(cinfo, lvl, code, p1, p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS3(cinfo, lvl, code, p1, p2, p3) \ + MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl));) +#define TRACEMS4(cinfo, lvl, code, p1, p2, p3, p4) \ + MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl));) +#define TRACEMS5(cinfo, lvl, code, p1, p2, p3, p4, p5) \ + MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl));) +#define TRACEMS8(cinfo, lvl, code, p1, p2, p3, p4, p5, p6, p7, p8) \ + MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl));) +#define TRACEMSS(cinfo, lvl, code, str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) + +#endif /* JERROR_H */ diff --git a/mtklibs/libmtkjpeg/include/jinclude.h b/mtklibs/libmtkjpeg/include/jinclude.h new file mode 100755 index 0000000000000000000000000000000000000000..dc069c03cdaf0553f8535106d4f4a0e80677d802 --- /dev/null +++ b/mtklibs/libmtkjpeg/include/jinclude.h @@ -0,0 +1,91 @@ +/* + * jinclude.h + * + * Copyright (C) 1991-1994, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file exists to provide a single place to fix any problems with + * including the wrong system include files. (Common problems are taken + * care of by the standard jconfig symbols, but on really weird systems + * you may have to edit this file.) + * + * NOTE: this file is NOT intended to be included by applications using the + * JPEG library. Most applications need only include jpeglib.h. + */ + + +/* Include auto-config file to find out which system include files we need. */ + +#include "jconfig.h" /* auto configuration options */ +#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ + +/* + * We need the NULL macro and size_t typedef. + * On an ANSI-conforming system it is sufficient to include . + * Otherwise, we get them from or ; we may have to + * pull in as well. + * Note that the core JPEG library does not require ; + * only the default error handler and data source/destination modules do. + * But we must pull it in because of the references to FILE in jpeglib.h. + * You can remove those references if you want to compile without . + */ + +#ifdef HAVE_STDDEF_H +#include +#endif + +#ifdef HAVE_STDLIB_H +#include +#endif + +#ifdef NEED_SYS_TYPES_H +#include +#endif + +#include + +/* + * We need memory copying and zeroing functions, plus strncpy(). + * ANSI and System V implementations declare these in . + * BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). + * Some systems may declare memset and memcpy in . + * + * NOTE: we assume the size parameters to these functions are of type size_t. + * Change the casts in these macros if not! + */ + +#ifdef NEED_BSD_STRINGS + +#include +#define MEMZERO(target, size) bzero((void *)(target), (size_t)(size)) +#define MEMCOPY(dest, src, size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) + +#else /* not BSD, assume ANSI/SysV string lib */ + +#include +#define MEMZERO(target, size) memset((void *)(target), 0, (size_t)(size)) +#define MEMCOPY(dest, src, size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) + +#endif + +/* + * In ANSI C, and indeed any rational implementation, size_t is also the + * type returned by sizeof(). However, it seems there are some irrational + * implementations out there, in which sizeof() returns an int even though + * size_t is defined as long or unsigned long. To ensure consistent results + * we always use this SIZEOF() macro in place of using sizeof() directly. + */ + +#define SIZEOF(object) ((size_t) sizeof(object)) + +/* + * The modules that use fread() and fwrite() always invoke them through + * these macros. On some systems you may need to twiddle the argument casts. + * CAUTION: argument order is different from underlying functions! + */ + +#define JFREAD(file, buf, sizeofbuf) \ + ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) +#define JFWRITE(file, buf, sizeofbuf) \ + ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) diff --git a/mtklibs/libmtkjpeg/include/jmemsys.h b/mtklibs/libmtkjpeg/include/jmemsys.h new file mode 100755 index 0000000000000000000000000000000000000000..23c8c6420a843569bb37b571834bcf45386fd190 --- /dev/null +++ b/mtklibs/libmtkjpeg/include/jmemsys.h @@ -0,0 +1,204 @@ +/* + * jmemsys.h + * + * Copyright (C) 1992-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This include file defines the interface between the system-independent + * and system-dependent portions of the JPEG memory manager. No other + * modules need include it. (The system-independent portion is jmemmgr.c; + * there are several different versions of the system-dependent portion.) + * + * This file works as-is for the system-dependent memory managers supplied + * in the IJG distribution. You may need to modify it if you write a + * custom memory manager. If system-dependent changes are needed in + * this file, the best method is to #ifdef them based on a configuration + * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR + * and USE_MAC_MEMMGR. + */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_get_small jGetSmall +#define jpeg_free_small jFreeSmall +#define jpeg_get_large jGetLarge +#define jpeg_free_large jFreeLarge +#define jpeg_mem_available jMemAvail +#define jpeg_open_backing_store jOpenBackStore +#define jpeg_mem_init jMemInit +#define jpeg_mem_term jMemTerm +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* + * These two functions are used to allocate and release small chunks of + * memory. (Typically the total amount requested through jpeg_get_small is + * no more than 20K or so; this will be requested in chunks of a few K each.) + * Behavior should be the same as for the standard library functions malloc + * and free; in particular, jpeg_get_small must return NULL on failure. + * On most systems, these ARE malloc and free. jpeg_free_small is passed the + * size of the object being freed, just in case it's needed. + * On an 80x86 machine using small-data memory model, these manage near heap. + */ + +EXTERN(void *) +jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject)); +EXTERN(void) +jpeg_free_small JPP((j_common_ptr cinfo, void *object, size_t sizeofobject)); + +/* + * These two functions are used to allocate and release large chunks of + * memory (up to the total free space designated by jpeg_mem_available). + * The interface is the same as above, except that on an 80x86 machine, + * far pointers are used. On most other machines these are identical to + * the jpeg_get/free_small routines; but we keep them separate anyway, + * in case a different allocation strategy is desirable for large chunks. + */ + +EXTERN(void FAR * ) +jpeg_get_large JPP((j_common_ptr cinfo, size_t sizeofobject)); +EXTERN(void) +jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object, size_t sizeofobject)); + +/* + * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may + * be requested in a single call to jpeg_get_large (and jpeg_get_small for that + * matter, but that case should never come into play). This macro is needed + * to model the 64Kb-segment-size limit of far addressing on 80x86 machines. + * On those machines, we expect that jconfig.h will provide a proper value. + * On machines with 32-bit flat address spaces, any large constant may be used. + * + * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type + * size_t and will be a multiple of sizeof(align_type). + */ + +#ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */ +#define MAX_ALLOC_CHUNK 1000000000L +#endif + +/* + * This routine computes the total space still available for allocation by + * jpeg_get_large. If more space than this is needed, backing store will be + * used. NOTE: any memory already allocated must not be counted. + * + * There is a minimum space requirement, corresponding to the minimum + * feasible buffer sizes; jmemmgr.c will request that much space even if + * jpeg_mem_available returns zero. The maximum space needed, enough to hold + * all working storage in memory, is also passed in case it is useful. + * Finally, the total space already allocated is passed. If no better + * method is available, cinfo->mem->max_memory_to_use - already_allocated + * is often a suitable calculation. + * + * It is OK for jpeg_mem_available to underestimate the space available + * (that'll just lead to more backing-store access than is really necessary). + * However, an overestimate will lead to failure. Hence it's wise to subtract + * a slop factor from the true available space. 5% should be enough. + * + * On machines with lots of virtual memory, any large constant may be returned. + * Conversely, zero may be returned to always use the minimum amount of memory. + */ + +EXTERN(long) +jpeg_mem_available JPP((j_common_ptr cinfo, + long min_bytes_needed, long max_bytes_needed, long already_allocated)); + + +/* + * This structure holds whatever state is needed to access a single + * backing-store object. The read/write/close method pointers are called + * by jmemmgr.c to manipulate the backing-store object; all other fields + * are private to the system-dependent backing store routines. + */ + +#define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */ + + +#ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */ + +typedef unsigned short XMSH; /* type of extended-memory handles */ +typedef unsigned short EMSH; /* type of expanded-memory handles */ + +typedef union { + short file_handle; /* DOS file handle if it's a temp file */ + XMSH xms_handle; /* handle if it's a chunk of XMS */ + EMSH ems_handle; /* handle if it's a chunk of EMS */ +} handle_union; + +#endif /* USE_MSDOS_MEMMGR */ + +#ifdef USE_MAC_MEMMGR /* Mac-specific junk */ +#include +#endif /* USE_MAC_MEMMGR */ + + +typedef struct backing_store_struct *backing_store_ptr; + +typedef struct backing_store_struct { + /* Methods for reading/writing/closing this backing-store object */ + JMETHOD(void, read_backing_store, (j_common_ptr cinfo, + backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count)); + JMETHOD(void, write_backing_store, (j_common_ptr cinfo, + backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count)); + JMETHOD(void, close_backing_store, (j_common_ptr cinfo, backing_store_ptr info)); + + /* Private fields for system-dependent backing-store management */ +#ifdef USE_MSDOS_MEMMGR + /* For the MS-DOS manager (jmemdos.c), we need: */ + handle_union handle; /* reference to backing-store storage object */ + char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ +#else +#ifdef USE_MAC_MEMMGR + /* For the Mac manager (jmemmac.c), we need: */ + short temp_file; /* file reference number to temp file */ + FSSpec tempSpec; /* the FSSpec for the temp file */ + char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ +#else +#ifdef USE_ANDROID_ASHMEM + short temp_file; /* file reference number to temp file */ + unsigned char *addr; /* the memory address mapped to ashmem */ + long size; /* the requested ashmem size */ +#else + /* For a typical implementation with temp files, we need: */ + FILE *temp_file; /* stdio reference to temp file */ + char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */ +#endif +#endif +#endif +} backing_store_info; + + +/* + * Initial opening of a backing-store object. This must fill in the + * read/write/close pointers in the object. The read/write routines + * may take an error exit if the specified maximum file size is exceeded. + * (If jpeg_mem_available always returns a large value, this routine can + * just take an error exit.) + */ + +EXTERN(void) +jpeg_open_backing_store JPP((j_common_ptr cinfo, backing_store_ptr info, long total_bytes_needed)); + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. jpeg_mem_init will be called before anything is + * allocated (and, therefore, nothing in cinfo is of use except the error + * manager pointer). It should return a suitable default value for + * max_memory_to_use; this may subsequently be overridden by the surrounding + * application. (Note that max_memory_to_use is only important if + * jpeg_mem_available chooses to consult it ... no one else will.) + * jpeg_mem_term may assume that all requested memory has been freed and that + * all opened backing-store objects have been closed. + */ + +EXTERN(long) +jpeg_mem_init JPP((j_common_ptr cinfo)); +EXTERN(void) +jpeg_mem_term JPP((j_common_ptr cinfo)); diff --git a/mtklibs/libmtkjpeg/include/jmorecfg.h b/mtklibs/libmtkjpeg/include/jmorecfg.h new file mode 100755 index 0000000000000000000000000000000000000000..bb8fd4b0ca12f33a13d66075148076e97af603e1 --- /dev/null +++ b/mtklibs/libmtkjpeg/include/jmorecfg.h @@ -0,0 +1,393 @@ +/* + * jmorecfg.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains additional configuration options that customize the + * JPEG software for special applications or support machine-dependent + * optimizations. Most users will not need to touch this file. + */ + +/* + * Define ANDROID_RGB to enable specific optimizations for Android + * JCS_RGBA_8888 support + * JCS_RGB_565 support + * + */ + +#define ANDROID_RGB + +#ifdef ANDROID_RGB +#define PACK_SHORT_565(r, g, b) ((((r)<<8)&0xf800)|(((g)<<3)&0x7E0)|((b)>>3)) +#define PACK_TWO_PIXELS(l, r) ((r<<16) | l) +#define PACK_NEED_ALIGNMENT(ptr) (((uintptr_t)(ptr))&3) +#define WRITE_TWO_PIXELS(addr, pixels) do { \ + ((INT16 *)(addr))[0] = (pixels); \ + ((INT16 *)(addr))[1] = (pixels)>>16; \ + } while (0) +#define WRITE_TWO_ALIGNED_PIXELS(addr, pixels) ((*(INT32 *)(addr)) = pixels) +#define DITHER_565_R(r, dither) ((r) + ((dither)&0xFF)) +#define DITHER_565_G(g, dither) ((g) + (((dither)&0xFF)>>1)) +#define DITHER_565_B(b, dither) ((b) + ((dither)&0xFF)) +#endif + +/* + * Define BITS_IN_JSAMPLE as either + * 8 for 8-bit sample values (the usual setting) + * 12 for 12-bit sample values + * Only 8 and 12 are legal data precisions for lossy JPEG according to the + * JPEG standard, and the IJG code does not support anything else! + * We do not support run-time selection of data precision, sorry. + */ + +#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ + + +/* + * Maximum number of components (color channels) allowed in JPEG image. + * To meet the letter of the JPEG spec, set this to 255. However, darn + * few applications need more than 4 channels (maybe 5 for CMYK + alpha + * mask). We recommend 10 as a reasonable compromise; use 4 if you are + * really short on memory. (Each allowed component costs a hundred or so + * bytes of storage, whether actually used in an image or not.) + */ + +#define MAX_COMPONENTS 10 /* maximum number of image components */ + + +/* + * Basic data types. + * You may need to change these if you have a machine with unusual data + * type sizes; for example, "char" not 8 bits, "short" not 16 bits, + * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, + * but it had better be at least 16. + */ + +/* Representation of a single sample (pixel element value). + * We frequently allocate large arrays of these, so it's important to keep + * them small. But if you have memory to burn and access to char or short + * arrays is very slow on your hardware, you might want to change these. + */ + +#if BITS_IN_JSAMPLE == 8 +/* JSAMPLE should be the smallest type that will hold the values 0..255. + * You can use a signed char by having GETJSAMPLE mask it with 0xFF. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JSAMPLE; +#ifdef CHAR_IS_UNSIGNED +#define GETJSAMPLE(value) ((int) (value)) +#else +#define GETJSAMPLE(value) ((int) (value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 + +#endif /* BITS_IN_JSAMPLE == 8 */ + + +#if BITS_IN_JSAMPLE == 12 +/* JSAMPLE should be the smallest type that will hold the values 0..4095. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 4095 +#define CENTERJSAMPLE 2048 + +#endif /* BITS_IN_JSAMPLE == 12 */ + + +/* Representation of a DCT frequency coefficient. + * This should be a signed value of at least 16 bits; "short" is usually OK. + * Again, we allocate large arrays of these, but you can change to int + * if you have memory to burn and "short" is really slow. + */ + +typedef short JCOEF; + + +/* Compressed datastreams are represented as arrays of JOCTET. + * These must be EXACTLY 8 bits wide, at least once they are written to + * external storage. Note that when using the stdio data source/destination + * managers, this is also the data type passed to fread/fwrite. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JOCTET; +#define GETJOCTET(value) (value) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JOCTET; +#ifdef CHAR_IS_UNSIGNED +#define GETJOCTET(value) (value) +#else +#define GETJOCTET(value) ((value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + + +/* These typedefs are used for various table entries and so forth. + * They must be at least as wide as specified; but making them too big + * won't cost a huge amount of memory, so we don't provide special + * extraction code like we did for JSAMPLE. (In other words, these + * typedefs live at a different point on the speed/space tradeoff curve.) + */ + +/* UINT8 must hold at least the values 0..255. */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char UINT8; +#else /* not HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char UINT8; +#else /* not CHAR_IS_UNSIGNED */ +typedef short UINT8; +#endif /* CHAR_IS_UNSIGNED */ +#endif /* HAVE_UNSIGNED_CHAR */ + +/* UINT16 must hold at least the values 0..65535. */ + +#ifdef HAVE_UNSIGNED_SHORT +typedef unsigned short UINT16; +#else /* not HAVE_UNSIGNED_SHORT */ +typedef unsigned int UINT16; +#endif /* HAVE_UNSIGNED_SHORT */ + +/* INT16 must hold at least the values -32768..32767. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ +typedef short INT16; +#endif + +/* INT32 must hold at least signed 32-bit values. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ +#ifndef FOR_FACOTRY_MODE +typedef long INT32; +#endif +#endif + +/* Datatype used for image dimensions. The JPEG standard only supports + * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore + * "unsigned int" is sufficient on all machines. However, if you need to + * handle larger images and you don't mind deviating from the spec, you + * can change this datatype. + */ + +typedef unsigned int JDIMENSION; + +#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ + + +/* These macros are used in all function definitions and extern declarations. + * You could modify them if you need to change function linkage conventions; + * in particular, you'll need to do that to make the library a Windows DLL. + * Another application is to make all functions global for use with debuggers + * or code profilers that require it. + */ + +/* a function called through method pointers: */ +#define METHODDEF(type) static type +/* a function used only in its module: */ +#define LOCAL(type) static type +/* a function referenced thru EXTERNs: */ +#define GLOBAL(type) type +/* a reference to a GLOBAL function: */ +#define EXTERN(type) extern type + + +/* This macro is used to declare a "method", that is, a function pointer. + * We want to supply prototype parameters if the compiler can cope. + * Note that the arglist parameter must be parenthesized! + * Again, you can customize this if you need special linkage keywords. + */ + +#ifdef HAVE_PROTOTYPES +#define JMETHOD(type, methodname, arglist) type (*methodname) arglist +#else +#define JMETHOD(type, methodname, arglist) type (*methodname) () +#endif + + +/* Here is the pseudo-keyword for declaring pointers that must be "far" + * on 80x86 machines. Most of the specialized coding for 80x86 is handled + * by just saying "FAR *" where such a pointer is needed. In a few places + * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. + */ + +#ifdef NEED_FAR_POINTERS +#define FAR far +#else +#define FAR +#endif + + +/* + * On a few systems, type boolean and/or its values FALSE, TRUE may appear + * in standard header files. Or you may have conflicts with application- + * specific header files that you want to include together with these files. + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. + */ + +#ifndef HAVE_BOOLEAN +typedef int boolean; +#endif +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif + + +/* + * The remaining options affect code selection within the JPEG library, + * but they don't need to be visible to most applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. + */ + +#ifdef JPEG_INTERNALS +#define JPEG_INTERNAL_OPTIONS +#endif + +#ifdef JPEG_INTERNAL_OPTIONS + + +/* + * These defines indicate whether to include various optional functions. + * Undefining some of these symbols will produce a smaller but less capable + * library. Note that you can leave certain source files out of the + * compilation/linking process if you've #undef'd the corresponding symbols. + * (You may HAVE to do that if your compiler doesn't like null source files.) + */ + +/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */ + +/* Capability options common to encoder and decoder: */ + +#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ +#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ +#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ + +/* Encoder capability options: */ + +#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN) */ +#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ +/* Note: if you selected 12-bit data precision, it is dangerous to turn off + * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit + * precision, so jchuff.c normally uses entropy optimization to compute + * usable tables for higher precision. If you don't want to do optimization, + * you'll have to supply different default Huffman tables. + * The exact same statements apply for progressive JPEG: the default tables + * don't work for progressive mode. (This may get fixed, however.) + */ +#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ + +/* Decoder capability options: */ + +#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN) */ +#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ +#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ +#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ +#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ +#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ +#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ +#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ + +/* more capability options later, no doubt */ + + +/* + * Ordering of RGB data in scanlines passed to or from the application. + * If your application wants to deal with data in the order B,G,R, just + * change these macros. You can also deal with formats such as R,G,B,X + * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing + * the offsets will also change the order in which colormap data is organized. + * RESTRICTIONS: + * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. + * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not + * useful if you are using JPEG color spaces other than YCbCr or grayscale. + * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE + * is not 3 (they don't understand about dummy color components!). So you + * can't use color quantization if you change that value. + */ + +#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ +#define RGB_GREEN 1 /* Offset of Green */ +#define RGB_BLUE 2 /* Offset of Blue */ +#ifdef ANDROID_RGB +#define RGB_ALPHA 3 /* Offset of Alpha */ +#endif +#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ + +/* Definitions for speed-related optimizations. */ + + +/* If your compiler supports inline functions, define INLINE + * as the inline keyword; otherwise define it as empty. + */ + +#ifndef INLINE +#ifdef __GNUC__ /* for instance, GNU C knows about inline */ +#define INLINE inline +#endif +#ifndef INLINE +#define INLINE /* default is to define it as empty */ +#endif +#endif + + +/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying + * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER + * as short on such a machine. MULTIPLIER must be at least 16 bits wide. + */ + +#ifndef MULTIPLIER +#if defined(FAST_JDCT_ENCODE) || defined(FAST_JDCT_DECODE) || defined(ANDROID_INTELSSE2_IDCT) +#define MULTIPLIER short /* prefer 16-bit with SIMD for parellelism */ +#else +#define MULTIPLIER int /* type for fastest integer multiply */ +#endif +#endif + + +/* FAST_FLOAT should be either float or double, whichever is done faster + * by your compiler. (Note that this type is only used in the floating point + * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) + * Typically, float is faster in ANSI C compilers, while double is faster in + * pre-ANSI compilers (because they insist on converting to double anyway). + * The code below therefore chooses float if we have ANSI-style prototypes. + */ + +#ifndef FAST_FLOAT +#ifdef HAVE_PROTOTYPES +#define FAST_FLOAT float +#else +#define FAST_FLOAT double +#endif +#endif + +#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/mtklibs/libmtkjpeg/include/jpegint.h b/mtklibs/libmtkjpeg/include/jpegint.h new file mode 100755 index 0000000000000000000000000000000000000000..f6e4a19878350dd3d4eca04154bdc6e353ecb257 --- /dev/null +++ b/mtklibs/libmtkjpeg/include/jpegint.h @@ -0,0 +1,523 @@ +/* + * jpegint.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides common declarations for the various JPEG modules. + * These declarations are considered internal to the JPEG library; most + * applications using the library shouldn't need to include this file. + */ + + +/* Declarations for both compression & decompression */ + +typedef enum { /* Operating modes for buffer controllers */ + JBUF_PASS_THRU, /* Plain stripwise operation */ + /* Remaining modes require a full-image buffer to have been created */ + JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ + JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ + JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ +} J_BUF_MODE; + +/* Values of global_state field (jdapi.c has some dependencies on ordering!) */ +#define CSTATE_START 100 /* after create_compress */ +#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ +#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ +#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ +#define DSTATE_START 200 /* after create_decompress */ +#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ +#define DSTATE_READY 202 /* found SOS, ready for start_decompress */ +#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress */ +#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ +#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ +#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ +#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ +#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ +#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ +#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ + + +/* Declarations for compression modules */ + +/* Master control module */ +struct jpeg_comp_master { + JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); + JMETHOD(void, pass_startup, (j_compress_ptr cinfo)); + JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean call_pass_startup; /* True if pass_startup must be called */ + boolean is_last_pass; /* True during last pass */ +}; + +/* Main buffer control (downsampled-data buffer) */ +struct jpeg_c_main_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, process_data, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION * in_row_ctr, + JDIMENSION in_rows_avail)); +}; + +/* Compression preprocessing (downsampling input buffer control) */ +struct jpeg_c_prep_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, pre_process_data, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, + JDIMENSION * in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, + JDIMENSION * out_row_group_ctr, + JDIMENSION out_row_groups_avail)); +}; + +/* Coefficient buffer control */ +struct jpeg_c_coef_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(boolean, compress_data, (j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +#if 1 /* def JPEG_THREAD_SUPPORT */ + JMETHOD(void, compress_data_thread_with_output, (void *arg)); + JMETHOD(void, compress_data_thread_no_output, (void *arg)); +#endif +}; + +/* Colorspace conversion */ +struct jpeg_color_converter { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JMETHOD(void, color_convert, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows)); +}; + +/* Downsampling */ +struct jpeg_downsampler { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JMETHOD(void, downsample, (j_compress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_index, + JSAMPIMAGE output_buf, JDIMENSION out_row_group_index)); + + boolean need_context_rows; /* TRUE if need rows above & below */ +}; + +/* Forward DCT (also controls coefficient quantization) */ +struct jpeg_forward_dct { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + /* perhaps this should be an array??? */ + JMETHOD(void, forward_DCT, (j_compress_ptr cinfo, + jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_row, JDIMENSION start_col, + JDIMENSION num_blocks, int *last_coffs_zero)); +}; + +/* Entropy encoding */ +struct jpeg_entropy_encoder { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics)); + JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW * MCU_data)); + JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); +#if 1 /* def JPEG_THREAD_SUPPORT */ + JMETHOD(boolean, encode_mcu_thread, + (j_compress_ptr cinfo, JBLOCKROW * MCU_data, int index)); + JMETHOD(boolean, emit_restart_thread, + (j_compress_ptr cinfo, int index, int restart_flag, int restart)); +#endif +}; + +/* Marker writing */ +struct jpeg_marker_writer { + JMETHOD(void, write_file_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_frame_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_scan_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo)); + JMETHOD(void, write_tables_only, (j_compress_ptr cinfo)); + /* These routines are exported to allow insertion of extra markers */ + /* Probably only COM and APPn markers should be written this way */ + JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker, + unsigned int datalen)); + JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val)); +}; + + +/* Declarations for decompression modules */ + +/* Master control module */ +struct jpeg_decomp_master { + JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ +}; + +/* Input control module */ +struct jpeg_input_controller { + JMETHOD(int, consume_input, (j_decompress_ptr cinfo)); + JMETHOD(int, consume_input_build_huffman_index, (j_decompress_ptr cinfo, + huffman_index * index, int scan_count)); + JMETHOD(int, consume_markers, (j_decompress_ptr cinfo, + huffman_index * index, int scan_count)); + JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); + JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean has_multiple_scans; /* True if file has multiple scans */ + boolean eoi_reached; /* True when EOI has been consumed */ +}; + +/* Main buffer control (downsampled-data buffer) */ +struct jpeg_d_main_controller { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, process_data, (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION * out_row_ctr, + JDIMENSION out_rows_avail)); +}; + +/* Coefficient buffer control */ +struct jpeg_d_coef_controller { + JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); + JMETHOD(int, consume_data_build_huffman_index, (j_decompress_ptr cinfo, + huffman_index * index, int scan_count)); + JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); + JMETHOD(int, decompress_data, (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); + /* Pointer to array of coefficient virtual arrays, or NULL if none */ + jvirt_barray_ptr *coef_arrays; + + /* column number of the first and last tile, respectively */ + int column_left_boundary; + int column_right_boundary; + + /* column number of the first and last MCU, respectively */ + int MCU_column_left_boundary; + int MCU_column_right_boundary; + + /* the number of MCU columns to skip from the indexed MCU, iM, + * to the requested MCU boundary, rM, where iM is the MCU that we sample + * into our index and is the nearest one to the left of rM. + */ + int MCU_columns_to_skip; +}; + +/* Decompression postprocessing (color quantization buffer control) */ +struct jpeg_d_post_controller { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, post_process_data, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, + JDIMENSION * in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, + JDIMENSION * out_row_ctr, JDIMENSION out_rows_avail)); +}; + +/* Marker reading & parsing */ +struct jpeg_marker_reader { + JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); + /* Read markers until SOS or EOI. + * Returns same codes as are defined for jpeg_consume_input: + * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + */ + JMETHOD(int, read_markers, (j_decompress_ptr cinfo)); + JMETHOD(void, get_sos_marker_position, (j_decompress_ptr cinfo, huffman_index * index)); + /* Read a restart marker --- exported for use by entropy decoder only */ + jpeg_marker_parser_method read_restart_marker; + + /* State of marker reader --- nominally internal, but applications + * supplying COM or APPn handlers might like to know the state. + */ + boolean saw_SOI; /* found SOI? */ + boolean saw_SOF; /* found SOF? */ + int next_restart_num; /* next restart number expected (0-7) */ + int current_sos_marker_position; + unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ +}; + +/* Entropy decoding */ +struct jpeg_entropy_decoder { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, JBLOCKROW * MCU_data)); + JMETHOD(boolean, decode_mcu_discard_coef, (j_decompress_ptr cinfo)); + JMETHOD(void, configure_huffman_decoder, (j_decompress_ptr cinfo, + huffman_offset_data offset)); + JMETHOD(void, get_huffman_decoder_configuration, (j_decompress_ptr cinfo, + huffman_offset_data * offset)); + + /* This is here to share code between baseline and progressive decoders; */ + /* other modules probably should not use it */ + boolean insufficient_data; /* set TRUE after emitting warning */ + + huffman_index *index; +}; + +/* Inverse DCT (also performs dequantization) */ +typedef JMETHOD(void, inverse_DCT_method_ptr, + (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); + +struct jpeg_inverse_dct { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + /* It is useful to allow each component to have a separate IDCT method. */ + inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; +}; + +/* Upsampling (note that upsampler must also call color converter) */ +struct jpeg_upsampler { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, upsample, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, + JDIMENSION * in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, + JDIMENSION * out_row_ctr, JDIMENSION out_rows_avail)); + + boolean need_context_rows; /* TRUE if need rows above & below */ +}; + +/* Colorspace conversion */ +struct jpeg_color_deconverter { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, color_convert, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows)); +}; + +/* Color quantization or color precision reduction */ +struct jpeg_color_quantizer { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan)); + JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows)); + JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); +}; + + +/* Miscellaneous useful macros */ + +#undef MAX +#define MAX(a, b) ((a) > (b) ? (a) : (b)) +#undef MIN +#define MIN(a, b) ((a) < (b) ? (a) : (b)) + + +/* We assume that right shift corresponds to signed division by 2 with + * rounding towards minus infinity. This is correct for typical "arithmetic + * shift" instructions that shift in copies of the sign bit. But some + * C compilers implement >> with an unsigned shift. For these machines you + * must define RIGHT_SHIFT_IS_UNSIGNED. + * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. + * It is only applied with constant shift counts. SHIFT_TEMPS must be + * included in the variables of any routine using RIGHT_SHIFT. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define SHIFT_TEMPS INT32 shift_temp; +#define RIGHT_SHIFT(x, shft) \ + ((shift_temp = (x)) < 0 ? \ + (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \ + (shift_temp >> (shft))) +#else +#define SHIFT_TEMPS +#define RIGHT_SHIFT(x, shft) ((x) >> (shft)) +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jinit_compress_master jICompress +#define jinit_c_master_control jICMaster +#define jinit_c_main_controller jICMainC +#define jinit_c_prep_controller jICPrepC +#define jinit_c_coef_controller jICCoefC +#define jinit_color_converter jICColor +#define jinit_downsampler jIDownsampler +#define jinit_forward_dct jIFDCT +#define jinit_huff_encoder jIHEncoder +#define jinit_phuff_encoder jIPHEncoder +#define jinit_marker_writer jIMWriter +#define jinit_master_decompress jIDMaster +#define jinit_d_main_controller jIDMainC +#define jinit_d_coef_controller jIDCoefC +#define jinit_d_post_controller jIDPostC +#define jinit_input_controller jIInCtlr +#define jinit_marker_reader jIMReader +#define jinit_huff_decoder jIHDecoder +#define jinit_phuff_decoder jIPHDecoder +#define jinit_inverse_dct jIIDCT +#define jinit_upsampler jIUpsampler +#define jinit_color_deconverter jIDColor +#define jinit_1pass_quantizer jI1Quant +#define jinit_2pass_quantizer jI2Quant +#define jinit_merged_upsampler jIMUpsampler +#define jinit_memory_mgr jIMemMgr +#define jdiv_round_up jDivRound +#define jround_up jRound +#define jcopy_sample_rows jCopySamples +#define jcopy_block_row jCopyBlocks +#define jzero_far jZeroFar +#define jpeg_zigzag_order jZIGTable +#define jpeg_natural_order jZAGTable +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +#define jinit_compress_master(cinfo) \ + jinit_compress_master_MTK(cinfo) +#define jinit_c_master_control(cinfo, transcode_only) \ + jinit_c_master_control_MTK(cinfo, transcode_only) +#define jinit_c_main_controller(cinfo, need_full_buffer) \ + jinit_c_main_controller_MTK(cinfo, need_full_buffer) +#define jinit_c_prep_controller(cinfo, need_full_buffer) \ + jinit_c_prep_controller_MTK(cinfo, need_full_buffer) +#define jinit_c_coef_controller(cinfo, need_full_buffer) \ + jinit_c_coef_controller_MTK(cinfo, need_full_buffer) +#define jinit_color_converter(cinfo) \ + jinit_color_converter_MTK(cinfo) +#define jinit_downsampler(cinfo) \ + jinit_downsampler_MTK(cinfo) +#define jinit_forward_dct(cinfo) \ + jinit_forward_dct_MTK(cinfo) +#define jinit_huff_encoder(cinfo) \ + jinit_huff_encoder_MTK(cinfo) +#define jinit_phuff_encoder(cinfo) \ + jinit_phuff_encoder_MTK(cinfo) +#define jinit_marker_writer(cinfo) \ + jinit_marker_writer_MTK(cinfo) +#define jinit_master_decompress(cinfo) \ + jinit_master_decompress_MTK(cinfo) +#define jinit_d_main_controller_MTK(cinfo, need_full_buffer) \ + jinit_d_main_controller_MTK(cinfo, need_full_buffer) +#define jinit_d_coef_controller(cinfo, need_full_buffer) \ + jinit_d_coef_controller_MTK(cinfo, need_full_buffer) +#define jinit_d_post_controller(cinfo, need_full_buffer) \ + jinit_d_post_controller_MTK(cinfo, need_full_buffer) +#define jinit_input_controller(cinfo) \ + jinit_input_controller_MTK(cinfo) +#define jinit_marker_reader(cinfo) \ + jinit_marker_reader_MTK(cinfo) +#define jinit_huff_decoder(cinfo) \ + jinit_huff_decoder_MTK(cinfo) +#define jinit_phuff_decoder(cinfo) \ + jinit_phuff_decoder_MTK(cinfo) +#define jinit_inverse_dct(cinfo) \ + jinit_inverse_dct_MTK(cinfo) +#define jinit_upsampler(cinfo) \ + jinit_upsampler_MTK(cinfo) +#define jinit_color_deconverter(cinfo) \ + jinit_color_deconverter_MTK(cinfo) +#define jinit_1pass_quantizer(cinfo) \ + jinit_1pass_quantizer_MTK(cinfo) +#define jinit_2pass_quantizer(cinfo) \ + jinit_2pass_quantizer_MTK(cinfo) +#define jinit_merged_upsampler(cinfo) \ + jinit_merged_upsampler_MTK(cinfo) +#define jinit_memory_mgr(cinfo) \ + jinit_memory_mgr_MTK(cinfo) +#define jcopy_block_row(cinfo, output_row, num_blocks) \ + jcopy_block_row_MTK(cinfo, output_row, num_blocks) +#define jset_input_stream_position(cinfo, offset) \ + jset_input_stream_position_MTK(cinfo, offset) +#define jset_input_stream_position_bit(cinfo, byte_offset, bit_left, buf) \ + jset_input_stream_position_bit_MTK(cinfo, byte_offset, bit_left, buf) +#define jget_input_stream_position(cinfo) \ + jget_input_stream_position_MTK(cinfo) + +/* Compression module initialization routines */ +EXTERN(void) +jinit_compress_master_MTK JPP((j_compress_ptr cinfo)); +EXTERN(void) +jinit_c_master_control_MTK JPP((j_compress_ptr cinfo, boolean transcode_only)); +EXTERN(void) +jinit_c_main_controller_MTK JPP((j_compress_ptr cinfo, boolean need_full_buffer)); +EXTERN(void) +jinit_c_prep_controller_MTK JPP((j_compress_ptr cinfo, boolean need_full_buffer)); +EXTERN(void) +jinit_c_coef_controller_MTK JPP((j_compress_ptr cinfo, boolean need_full_buffer)); +EXTERN(void) +jinit_color_converter_MTK JPP((j_compress_ptr cinfo)); +EXTERN(void) +jinit_downsampler_MTK JPP((j_compress_ptr cinfo)); +EXTERN(void) +jinit_forward_dct_MTK JPP((j_compress_ptr cinfo)); +EXTERN(void) +jinit_huff_encoder_MTK JPP((j_compress_ptr cinfo)); +EXTERN(void) +jinit_phuff_encoder_MTK JPP((j_compress_ptr cinfo)); +EXTERN(void) +jinit_marker_writer_MTK JPP((j_compress_ptr cinfo)); +/* Decompression module initialization routines */ +EXTERN(void) +jinit_master_decompress_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(void) +jinit_d_main_controller_MTK JPP((j_decompress_ptr cinfo, boolean need_full_buffer)); +EXTERN(void) +jinit_d_coef_controller_MTK JPP((j_decompress_ptr cinfo, boolean need_full_buffer)); +EXTERN(void) +jinit_d_post_controller_MTK JPP((j_decompress_ptr cinfo, boolean need_full_buffer)); +EXTERN(void) +jinit_input_controller_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(void) +jinit_marker_reader_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(void) +jinit_huff_decoder_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(void) +jinit_huff_decoder_no_data JPP((j_decompress_ptr cinfo)); +EXTERN(void) +jinit_phuff_decoder_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(void) +jinit_inverse_dct_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(void) +jinit_upsampler_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(void) +jinit_color_deconverter_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(void) +jinit_1pass_quantizer_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(void) +jinit_2pass_quantizer_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(void) +jinit_merged_upsampler_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_decompress_per_scan_setup(j_decompress_ptr cinfo); +/* Memory manager initialization */ +EXTERN(void) +jinit_memory_mgr_MTK JPP((j_common_ptr cinfo)); + +/* Utility routines in jutils.c */ +EXTERN(long) +jdiv_round_up JPP((long a, long b)); +EXTERN(long) +jround_up JPP((long a, long b)); +EXTERN(long) +jmin JPP((long a, long b)); +EXTERN(void) +jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row, + JSAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols)); +EXTERN(void) +jcopy_block_row_MTK JPP((JBLOCKROW input_row, JBLOCKROW output_row, JDIMENSION num_blocks)); +EXTERN(void) +jzero_far JPP((void FAR * target, size_t bytestozero)); + +EXTERN(void) +jset_input_stream_position_MTK JPP((j_decompress_ptr cinfo, int offset)); +EXTERN(void) +jset_input_stream_position_bit_MTK JPP((j_decompress_ptr cinfo, + int byte_offset, int bit_left, INT32 buf)); + +EXTERN(int) +jget_input_stream_position_MTK JPP((j_decompress_ptr cinfo)); +/* Constant tables in jutils.c */ +#if 0 /* This table is not actually needed in v6a */ +extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ +#endif +extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ + +/* Suppress undefined-structure complaints if necessary. */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */ +struct jvirt_sarray_control { + long dummy; +}; +struct jvirt_barray_control { + long dummy; +}; +#endif +#endif /* INCOMPLETE_TYPES_BROKEN */ diff --git a/mtklibs/libmtkjpeg/include/jpeglib.h b/mtklibs/libmtkjpeg/include/jpeglib.h new file mode 100755 index 0000000000000000000000000000000000000000..df1bc69578bc9f2e549ee334a263a96f0cdc8afe --- /dev/null +++ b/mtklibs/libmtkjpeg/include/jpeglib.h @@ -0,0 +1,1360 @@ +/* + * jpeglib.h + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * Modified 2002-2011 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the application interface for the JPEG library. + * Most applications using the library need only include this file, + * and perhaps jerror.h if they want to know the exact error codes. + */ + +#ifndef JPEGLIB_H +#define JPEGLIB_H + +/* + * First we include the configuration files that record how this + * installation of the JPEG library is set up. jconfig.h can be + * generated automatically for many systems. jmorecfg.h contains + * manual configuration options that most people need not worry about. + */ + +#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ +#include "jconfig.h" /* widely used configuration options */ +#endif +#include "jmorecfg.h" /* seldom changed options */ + +#if 1 /* def JPEG_THREAD_SUPPORT */ +#include "jthread.h" +#define MAX_CORE_NUM 4 + +/* Encode speed options for Multi core algorithm */ +typedef enum { + SLOW, + FAST, + ULTRA_FAST +} J_ENCODE_SPEED; + +struct jpeg_output_table { + int size; + JOCTET *address; +}; +#endif + +/* Version ID for the JPEG library. + * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". + */ + +#define JPEG_LIB_VERSION 62 /* Version 6b */ + + +/* Various constants determining the sizes of things. + * All of these are specified by the JPEG standard, so don't change them + * if you want to be compatible. + */ + +#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ +#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ +#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ +#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ +#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ +#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ +#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ +/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; + * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. + * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU + * to handle it. We even let you do this from the jconfig.h file. However, + * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe + * sometimes emits noncompliant files doesn't mean you should too. + */ +#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ +#ifndef D_MAX_BLOCKS_IN_MCU +#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ +#endif + + +/* Data structures for images (arrays of samples and of DCT coefficients). + * On 80x86 machines, the image arrays are too big for near pointers, + * but the pointer arrays can fit in near memory. + */ + +typedef JSAMPLE FAR * JSAMPROW; /* ptr to one image row of pixel samples. */ +typedef JSAMPROW * JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ +typedef JSAMPARRAY * JSAMPIMAGE; /* a 3-D sample array: top index is color */ + +typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ +typedef JBLOCK FAR * JBLOCKROW; /* pointer to one row of coefficient blocks */ +typedef JBLOCKROW * JBLOCKARRAY; /* a 2-D array of coefficient blocks */ +typedef JBLOCKARRAY * JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ + +typedef JCOEF FAR * JCOEFPTR; /* useful in a couple of places */ + + +/* Types for JPEG compression parameters and working tables. */ + + +/* DCT coefficient quantization tables. */ + +typedef struct { + /* This array gives the coefficient quantizers in natural array order + * (not the zigzag order in which they are stored in a JPEG DQT marker). + * CAUTION: IJG versions prior to v6a kept this array in zigzag order. + */ + UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JQUANT_TBL; + + +/* Huffman coding tables. */ + +typedef struct { + /* These two fields directly represent the contents of a JPEG DHT marker */ + UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ + /* length k bits; bits[0] is unused */ + UINT8 huffval[256]; /* The symbols, in order of incr code length */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JHUFF_TBL; + + +/* Basic info about one component (color channel). */ + +typedef struct { + /* These values are fixed over the whole image. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOF marker. */ + int component_id; /* identifier for this component (0..255) */ + int component_index; /* its index in SOF or cinfo->comp_info[] */ + int h_samp_factor; /* horizontal sampling factor (1..4) */ + int v_samp_factor; /* vertical sampling factor (1..4) */ + int quant_tbl_no; /* quantization table selector (0..3) */ + /* These values may vary between scans. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOS marker. */ + /* The decompressor output side may not use these variables. */ + int dc_tbl_no; /* DC entropy table selector (0..3) */ + int ac_tbl_no; /* AC entropy table selector (0..3) */ + + /* Remaining fields should be treated as private by applications. */ + + /* These values are computed during compression or decompression startup: */ + /* Component's size in DCT blocks. + * Any dummy blocks added to complete an MCU are not counted; therefore + * these values do not depend on whether a scan is interleaved or not. + */ + JDIMENSION width_in_blocks; + JDIMENSION height_in_blocks; + /* Size of a DCT block in samples. Always DCTSIZE for compression. + * For decompression this is the size of the output from one DCT block, + * reflecting any scaling we choose to apply during the IDCT step. + * Values of 1,2,4,8 are likely to be supported. Note that different + * components may receive different IDCT scalings. + */ + int DCT_scaled_size; + /* The downsampled dimensions are the component's actual, unpadded number + * of samples at the main buffer (preprocessing/compression interface), thus + * downsampled_width = ceil(image_width * Hi/Hmax) + * and similarly for height. For decompression, IDCT scaling is included, so + * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE) + */ + JDIMENSION downsampled_width; /* actual width in samples */ + JDIMENSION downsampled_height; /* actual height in samples */ + /* This flag is used only for decompression. In cases where some of the + * components will be ignored (eg grayscale output from YCbCr image), + * we can skip most computations for the unused components. + */ + boolean component_needed; /* do we need the value of this component? */ + + /* These values are computed before starting a scan of the component. */ + /* The decompressor output side may not use these variables. */ + int MCU_width; /* number of blocks per MCU, horizontally */ + int MCU_height; /* number of blocks per MCU, vertically */ + int MCU_blocks; /* MCU_width * MCU_height */ + int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_scaled_size */ + int last_col_width; /* # of non-dummy blocks across in last MCU */ + int last_row_height; /* # of non-dummy blocks down in last MCU */ + + /* Saved quantization table for component; NULL if none yet saved. + * See jdinput.c comments about the need for this information. + * This field is currently used only for decompression. + */ + JQUANT_TBL *quant_table; + + /* Private per-component storage for DCT or IDCT subsystem. */ + void *dct_table; +} jpeg_component_info; + + +/* The script for encoding a multiple-scan file is an array of these: */ + +typedef struct { + int comps_in_scan; /* number of components encoded in this scan */ + int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ + int Ss, Se; /* progressive JPEG spectral selection parms */ + int Ah, Al; /* progressive JPEG successive approx. parms */ +} jpeg_scan_info; + +/* The decompressor can save APPn and COM markers in a list of these: */ + +typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr; + +struct jpeg_marker_struct { + jpeg_saved_marker_ptr next; /* next in list, or NULL */ + UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ + unsigned int original_length; /* # bytes of data in the file */ + unsigned int data_length; /* # bytes of data saved at data[] */ + JOCTET FAR *data; /* the data contained in the marker */ + /* the marker length word is not counted in data_length or original_length */ +}; + +/* Known color spaces. */ + +typedef enum { + JCS_UNKNOWN, /* error/unspecified */ + JCS_GRAYSCALE, /* monochrome */ + JCS_RGB, /* red/green/blue */ + JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ + JCS_CMYK, /* C/M/Y/K */ + JCS_YCCK, /* Y/Cb/Cr/K */ +#ifdef ANDROID_RGB + JCS_RGBA_8888, /* red/green/blue/alpha */ + JCS_RGB_565 /* red/green/blue in 565 format */ +#endif +} J_COLOR_SPACE; + +/* DCT/IDCT algorithm options. */ + +typedef enum { + JDCT_ISLOW, /* slow but accurate integer algorithm */ + JDCT_IFAST, /* faster, less accurate integer method */ + JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ +} J_DCT_METHOD; + +#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ +#define JDCT_DEFAULT JDCT_ISLOW +#endif +#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ +#define JDCT_FASTEST JDCT_IFAST +#endif + +/* Dithering options for decompression. */ + +typedef enum { + JDITHER_NONE, /* no dithering */ + JDITHER_ORDERED, /* simple ordered dither */ + JDITHER_FS /* Floyd-Steinberg error diffusion dither */ +} J_DITHER_MODE; + +/* Common fields between JPEG compression and decompression master structs. */ + +#define jpeg_common_fields \ + struct jpeg_error_mgr *err; /* Error handler module */\ + struct jpeg_memory_mgr *mem; /* Memory manager module */\ + struct jpeg_progress_mgr *progress; /* Progress monitor, or NULL if none */\ + void *client_data; /* Available for use by application */\ + boolean is_decompressor; /* So common code can tell which is which */\ + int global_state /* For checking call sequence validity */ + +/* Routines that are to be used by both halves of the library are declared + * to receive a pointer to this structure. There are no actual instances of + * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. + */ +struct jpeg_common_struct { + jpeg_common_fields; /* Fields common to both master struct types */ + /* Additional fields follow in an actual jpeg_compress_struct or + * jpeg_decompress_struct. All three structs must agree on these + * initial fields! (This would be a lot cleaner in C++.) + */ +}; + +typedef struct jpeg_common_struct *j_common_ptr; +typedef struct jpeg_compress_struct *j_compress_ptr; +typedef struct jpeg_decompress_struct *j_decompress_ptr; + +/* Master record for a compression instance */ + +struct jpeg_compress_struct { + jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ + + /* Destination for compressed data */ + struct jpeg_destination_mgr *dest; + + /* Description of source image --- these fields must be filled in by + * outer application before starting compression. in_color_space must + * be correct before you can even call jpeg_set_defaults(). + */ + + JDIMENSION image_width; /* input image width */ + JDIMENSION image_height; /* input image height */ + int input_components; /* # of color components in input image */ + J_COLOR_SPACE in_color_space; /* colorspace of input image */ + + double input_gamma; /* image gamma of input image */ + + /* Compression parameters --- these fields must be set before calling + * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to + * initialize everything to reasonable defaults, then changing anything + * the application specifically wants to change. That way you won't get + * burnt when new parameters are added. Also note that there are several + * helper routines to simplify changing parameters. + */ + + int data_precision; /* bits of precision in image data */ + + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + jpeg_component_info *comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + int num_scans; /* # of entries in scan_info array */ + const jpeg_scan_info *scan_info; /* script for multi-scan file, or NULL */ + /* The default value of scan_info is NULL, which causes a single-scan + * sequential JPEG file to be emitted. To create a multi-scan file, + * set num_scans and scan_info to point to an array of scan definitions. + */ + + boolean raw_data_in; /* TRUE=caller supplies downsampled data */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + int smoothing_factor; /* 1..100, or 0 for no input smoothing */ + J_DCT_METHOD dct_method; /* DCT algorithm selector */ + + /* The restart interval can be specified in absolute MCUs by setting + * restart_interval, or in MCU rows by setting restart_in_rows + * (in which case the correct restart_interval will be figured + * for each scan). + */ + unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ + int restart_in_rows; /* if > 0, MCU rows per restart interval */ + + /* Parameters controlling emission of special markers. */ + + boolean write_JFIF_header; /* should a JFIF marker be written? */ + UINT8 JFIF_major_version; /* What to write for the JFIF version number */ + UINT8 JFIF_minor_version; + /* These three values are not used by the JPEG code, merely copied */ + /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ + /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ + /* ratio is defined by X_density/Y_density even when density_unit=0. */ + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean write_Adobe_marker; /* should an Adobe marker be written? */ + + /* State variable: index of next scanline to be written to + * jpeg_write_scanlines(). Application may use this to control its + * processing loop, e.g., "while (next_scanline < image_height)". + */ + + JDIMENSION next_scanline; /* 0 .. image_height-1 */ + + /* Remaining fields are known throughout compressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during compression startup + */ + boolean progressive_mode; /* TRUE if scan script uses progressive mode */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ + /* The coefficient controller receives data in units of MCU rows as defined + * for fully interleaved scans (whether the JPEG file is interleaved or not). + * There are v_samp_factor * DCTSIZE sample rows of each component in an + * "iMCU" (interleaved MCU) row. + */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info *cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[C_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* + * Links to compression subobjects (methods and private variables of modules) + */ + struct jpeg_comp_master *master; + struct jpeg_c_main_controller *main; + struct jpeg_c_prep_controller *prep; + struct jpeg_c_coef_controller *coef; + struct jpeg_marker_writer *marker; + struct jpeg_color_converter *cconvert; + struct jpeg_downsampler *downsample; + struct jpeg_forward_dct *fdct; + struct jpeg_entropy_encoder *entropy; + jpeg_scan_info *script_space; /* workspace for jpeg_simple_progression */ + int script_space_size; + + int for_huff_opt[MAX_COMPS_IN_SCAN]; + int last_coffs_zero[C_MAX_BLOCKS_IN_MCU]; +#if 1 /* def JPEG_THREAD_SUPPORT */ + J_ENCODE_SPEED encode_speed; + int core_num; + int thread_num; + int cur_iMCU_row; + + JSAMPIMAGE data_in; + int last_coffs_zero_thread[MAX_CORE_NUM][C_MAX_BLOCKS_IN_MCU]; + struct jpeg_destination_mgr *dest_thread[MAX_CORE_NUM]; + struct jpeg_output_table *output_table; + + ThreadContext_t thrcnxt[MAX_CORE_NUM]; + Thread_t pthread[MAX_CORE_NUM]; + Thread_mutex_t mutex_input; + Thread_mutex_t mutex_state[MAX_CORE_NUM]; + Thread_cond_t cond_state[2 * MAX_CORE_NUM]; + int en_soi; +#endif +}; + + +/* Master record for a decompression instance */ + +struct jpeg_decompress_struct { + jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ + + /* Source of compressed data */ + struct jpeg_source_mgr *src; + + /* Basic description of image --- filled in by jpeg_read_header(). */ + /* Application may inspect these values to decide how to process image. */ + + JDIMENSION original_image_width; /* nominal image width (from SOF marker) */ + + JDIMENSION image_width; /* nominal image width (from SOF marker) + may be changed by tile decode */ + JDIMENSION image_height; /* nominal image height */ + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + /* Decompression processing parameters --- these fields must be set before + * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes + * them to default values. + */ + + J_COLOR_SPACE out_color_space; /* colorspace for output */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + double output_gamma; /* image gamma wanted in output */ + + boolean buffered_image; /* TRUE=multiple output passes */ + boolean raw_data_out; /* TRUE=downsampled data wanted */ + + J_DCT_METHOD dct_method; /* IDCT algorithm selector */ + boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ + boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ + + boolean quantize_colors; /* TRUE=colormapped output wanted */ + /* the following are ignored if not quantize_colors: */ + J_DITHER_MODE dither_mode; /* type of color dithering to use */ + boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ + int desired_number_of_colors; /* max # colors to use in created colormap */ + /* these are significant only in buffered-image mode: */ + boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ + boolean enable_external_quant; /* enable future use of external colormap */ + boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ + + /* Description of actual output image that will be returned to application. + * These fields are computed by jpeg_start_decompress(). + * You can also use jpeg_calc_output_dimensions() to determine these values + * in advance of calling jpeg_start_decompress(). + */ + + JDIMENSION output_width; /* scaled image width */ + JDIMENSION output_height; /* scaled image height */ + int out_color_components; /* # of color components in out_color_space */ + int output_components; /* # of color components returned */ + /* output_components is 1 (a colormap index) when quantizing colors; + * otherwise it equals out_color_components. + */ + int rec_outbuf_height; /* min recommended height of scanline buffer */ + /* If the buffer passed to jpeg_read_scanlines() is less than this many rows + * high, space and time will be wasted due to unnecessary data copying. + * Usually rec_outbuf_height will be 1 or 2, at most 4. + */ + + /* When quantizing colors, the output colormap is described by these fields. + * The application can supply a colormap by setting colormap non-NULL before + * calling jpeg_start_decompress; otherwise a colormap is created during + * jpeg_start_decompress or jpeg_start_output. + * The map has out_color_components rows and actual_number_of_colors columns. + */ + int actual_number_of_colors; /* number of entries in use */ + JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ + + /* State variables: these variables indicate the progress of decompression. + * The application may examine these but must not modify them. + */ + + /* Row index of next scanline to be read from jpeg_read_scanlines(). + * Application may use this to control its processing loop, e.g., + * "while (output_scanline < output_height)". + */ + JDIMENSION output_scanline; /* 0 .. output_height-1 */ + + /* Current input scan number and number of iMCU rows completed in scan. + * These indicate the progress of the decompressor input side. + */ + int input_scan_number; /* Number of SOS markers seen so far */ + JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ + + /* The "output scan number" is the notional scan being displayed by the + * output side. The decompressor will not allow output scan/row number + * to get ahead of input scan/row, but it can fall arbitrarily far behind. + */ + int output_scan_number; /* Nominal scan number being displayed */ + JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ + + /* Current progression status. coef_bits[c][i] indicates the precision + * with which component c's DCT coefficient i (in zigzag order) is known. + * It is -1 when no data has yet been received, otherwise it is the point + * transform (shift) value for the most recent scan of the coefficient + * (thus, 0 at completion of the progression). + * This pointer is NULL when reading a non-progressive file. + */ + int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ + + /* Internal JPEG parameters --- the application usually need not look at + * these fields. Note that the decompressor output side may not use + * any parameters that can change between scans. + */ + + /* Quantization and Huffman tables are carried forward across input + * datastreams when processing abbreviated JPEG datastreams. + */ + + JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + /* These parameters are never carried across datastreams, since they + * are given in SOF/SOS markers or defined to be reset by SOI. + */ + + int data_precision; /* bits of precision in image data */ + + jpeg_component_info *comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + boolean tile_decode; /* TRUE if using tile based decoding */ + boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ + + /* These fields record data obtained from optional markers recognized by + * the JPEG library. + */ + boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ + /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ + UINT8 JFIF_major_version; /* JFIF version number */ + UINT8 JFIF_minor_version; + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ + UINT8 Adobe_transform; /* Color transform code from Adobe marker */ + + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + + /* Aside from the specific data retained from APPn markers known to the + * library, the uninterpreted contents of any or all APPn and COM markers + * can be saved in a list for examination by the application. + */ + jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ + + /* Remaining fields are known throughout decompressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during decompression startup + */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ + /* The coefficient controller's input and output progress is measured in + * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows + * in fully interleaved JPEG scans, but are used whether the scan is + * interleaved or not. We define an iMCU row as v_samp_factor DCT block + * rows of each component. Therefore, the IDCT output contains + * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row. + */ + + JSAMPLE *sample_range_limit; /* table for fast range-limiting */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + * Note that the decompressor output side must not use these fields. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info *cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[D_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* This field is shared between entropy decoder and marker parser. + * It is either zero or the code of a JPEG marker that has been + * read from the data source, but has not yet been processed. + */ + int unread_marker; +#if 1 /* def USE_SW_JPEG_3PLANE */ + int isUseMtk3plane; + int isUseIdctBuffer; + int isUseUpsampleBuffer; + int comp_id; + int yindex; + unsigned char *dstBufAddr[3]; + unsigned int dstBufStride[3]; + unsigned int dstBufHeight[3]; + unsigned int dstBufSize[3]; + + unsigned char *upSampleBufAddr[3]; + unsigned char *idctBufAddr[3]; + unsigned int idctBufStride[3]; + unsigned int idctBufSize[3]; + unsigned int idctBufHeight[3]; + unsigned int idctBufBlkCnt[3]; + unsigned int idctBufRowNum; + unsigned int idctBufRowSize[3]; + unsigned char *idctBufRowAddrY0[3][16]; + unsigned char *idctBufRowAddrY1[3][16]; +#endif + /* + * Links to decompression subobjects (methods, private variables of modules) + */ + struct jpeg_decomp_master *master; + struct jpeg_d_main_controller *main; + struct jpeg_d_coef_controller *coef; + struct jpeg_d_post_controller *post; + struct jpeg_input_controller *inputctl; + struct jpeg_marker_reader *marker; + struct jpeg_entropy_decoder *entropy; + struct jpeg_inverse_dct *idct; + struct jpeg_upsampler *upsample; + struct jpeg_color_deconverter *cconvert; + struct jpeg_color_quantizer *cquantize; +}; + +typedef struct { + + /* |--- byte_offset ---|- bit_left -| */ + /* \------ 27 -------/ \---- 5 ----/ */ + unsigned int bitstream_offset; + short prev_dc[3]; + + /* remaining EOBs in EOBRUN */ + unsigned short EOBRUN; + + /* save the decoder current bit buffer, entropy->bitstate.get_buffer. */ + INT32 get_buffer; + + /* save the restart info. */ + unsigned short restarts_to_go; + unsigned char next_restart_num; + boolean insufficient_data; /* set TRUE after emitting warning */ + int unread_marker; +} huffman_offset_data; + +typedef struct { + + /* The header starting position of this scan */ + unsigned int bitstream_offset; + + /* Number of components in this scan */ + int comps_in_scan; + + /* Number of MCUs in each row */ + int MCUs_per_row; + int MCU_rows_per_iMCU_row; + + /* The last MCU position and its dc value in this scan */ + huffman_offset_data prev_MCU_offset; + + huffman_offset_data **offset; +} huffman_scan_header; + +#define DEFAULT_MCU_SAMPLE_SIZE 16 + +typedef struct { + + /* The number of MCUs that we sample each time as an index point */ + int MCU_sample_size; + + /* Number of scan in this image */ + int scan_count; + + /* Number of iMCUs rows in this image */ + int total_iMCU_rows; + + /* Memory used by scan struct */ + size_t mem_used; + huffman_scan_header *scan; +} huffman_index; + +/* "Object" declarations for JPEG modules that may be supplied or called + * directly by the surrounding application. + * As with all objects in the JPEG library, these structs only define the + * publicly visible methods and state variables of a module. Additional + * private fields may exist after the public ones. + */ + + +/* Error handler object */ + +struct jpeg_error_mgr { + /* Error exit handler: does not return to caller */ + JMETHOD(void, error_exit, (j_common_ptr cinfo)); + /* Conditionally emit a trace or warning message */ + JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level)); + /* Routine that actually outputs a trace or error message */ + JMETHOD(void, output_message, (j_common_ptr cinfo)); + /* Format a message string for the most recent JPEG error or message */ + JMETHOD(void, format_message, (j_common_ptr cinfo, char *buffer)); +#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ + /* Reset error state variables at start of a new image */ + JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo)); + + /* The message ID code and any parameters are saved here. + * A message can have one string parameter or up to 8 int parameters. + */ + int msg_code; +#define JMSG_STR_PARM_MAX 80 + union { + int i[8]; + char s[JMSG_STR_PARM_MAX]; + } msg_parm; + + /* Standard state variables for error facility */ + + int trace_level; /* max msg_level that will be displayed */ + + /* For recoverable corrupt-data errors, we emit a warning message, + * but keep going unless emit_message chooses to abort. emit_message + * should count warnings in num_warnings. The surrounding application + * can check for bad data by seeing if num_warnings is nonzero at the + * end of processing. + */ + long num_warnings; /* number of corrupt-data warnings */ + + /* These fields point to the table(s) of error message strings. + * An application can change the table pointer to switch to a different + * message list (typically, to change the language in which errors are + * reported). Some applications may wish to add additional error codes + * that will be handled by the JPEG library error mechanism; the second + * table pointer is used for this purpose. + * + * First table includes all errors generated by JPEG library itself. + * Error code 0 is reserved for a "no such error string" message. + */ + const char *const *jpeg_message_table; /* Library errors */ + int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ + /* Second table can be added by application (see cjpeg/djpeg for example). + * It contains strings numbered first_addon_message..last_addon_message. + */ + const char *const *addon_message_table; /* Non-library errors */ + int first_addon_message; /* code for first string in addon table */ + int last_addon_message; /* code for last string in addon table */ +}; + + +/* Progress monitor object */ + +struct jpeg_progress_mgr { + JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); + + long pass_counter; /* work units completed in this pass */ + long pass_limit; /* total number of work units in this pass */ + int completed_passes; /* passes completed so far */ + int total_passes; /* total number of passes expected */ +}; + + +/* Data destination object for compression */ + +struct jpeg_destination_mgr { + JOCTET *next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + + JMETHOD(void, init_destination, (j_compress_ptr cinfo)); + JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo)); + JMETHOD(void, term_destination, (j_compress_ptr cinfo)); +#if 1 /* def JPEG_THREAD_SUPPORT */ + JMETHOD(boolean, output_buffer_thread, + (j_compress_ptr cinfo, JOCTET *output_addr, int output_size)); + JMETHOD(JOCTET *, memcpy_buffer_thread, + (j_compress_ptr cinfo, JOCTET *last_addr, int index)); +#endif +}; + + +/* Data source object for decompression */ + +struct jpeg_source_mgr { + const JOCTET *next_input_byte; /* => next byte to read from buffer */ + const JOCTET *start_input_byte; /* => first byte to read from input */ + size_t bytes_in_buffer; /* # of bytes remaining in buffer */ + size_t current_offset; /* current readed input offset */ + + JMETHOD(void, init_source, (j_decompress_ptr cinfo)); + JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo)); + JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes)); + JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired)); + JMETHOD(void, term_source, (j_decompress_ptr cinfo)); + JMETHOD(boolean, seek_input_data, (j_decompress_ptr cinfo, long byte_offset)); +}; + + +/* Memory manager object. + * Allocates "small" objects (a few K total), "large" objects (tens of K), + * and "really big" objects (virtual arrays with backing store if needed). + * The memory manager does not allow individual objects to be freed; rather, + * each created object is assigned to a pool, and whole pools can be freed + * at once. This is faster and more convenient than remembering exactly what + * to free, especially where malloc()/free() are not too speedy. + * NB: alloc routines never return NULL. They exit to error_exit if not + * successful. + */ + +#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ +#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ +#define JPOOL_NUMPOOLS 2 + +typedef struct jvirt_sarray_control *jvirt_sarray_ptr; +typedef struct jvirt_barray_control *jvirt_barray_ptr; + + +struct jpeg_memory_mgr { + /* Method pointers */ + JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, size_t sizeofobject)); + JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id, size_t sizeofobject)); + JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, JDIMENSION numrows)); + JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, JDIMENSION numrows)); + JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION samplesperrow, + JDIMENSION numrows, JDIMENSION maxaccess)); + JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION blocksperrow, + JDIMENSION numrows, JDIMENSION maxaccess)); + JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo)); + JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo, + jvirt_sarray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, boolean writable)); + JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo, + jvirt_barray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, boolean writable)); + JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id)); + JMETHOD(void, self_destruct, (j_common_ptr cinfo)); + + /* Limit on memory allocation for this JPEG object. (Note that this is + * merely advisory, not a guaranteed maximum; it only affects the space + * used for virtual-array buffers.) May be changed by outer application + * after creating the JPEG object. + */ + long max_memory_to_use; + + /* Maximum allocation request accepted by alloc_large. */ + long max_alloc_chunk; +}; + + +/* Routine signature for application-supplied marker processing methods. + * Need not pass marker code since it is stored in cinfo->unread_marker. + */ +typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); + + +/* Declarations for routines called by application. + * The JPP macro hides prototype parameters from compilers that can't cope. + * Note JPP requires double parentheses. + */ + +#ifdef HAVE_PROTOTYPES +#define JPP(arglist) arglist +#else +#define JPP(arglist) () +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. + * We shorten external names to be unique in the first six letters, which + * is good enough for all known systems. + * (If your compiler itself needs names to be unique in less than 15 + * characters, you are out of luck. Get a better compiler.) + */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_std_error jStdError +#define jpeg_CreateCompress jCreaCompress +#define jpeg_CreateDecompress jCreaDecompress +#define jpeg_destroy_compress jDestCompress +#define jpeg_destroy_decompress jDestDecompress +#define jpeg_stdio_dest jStdDest +#define jpeg_stdio_src jStdSrc +#define jpeg_mem_dest jMemDest +#define jpeg_mem_src jMemSrc +#define jpeg_set_defaults jSetDefaults +#define jpeg_set_colorspace jSetColorspace +#define jpeg_default_colorspace jDefColorspace +#define jpeg_set_quality jSetQuality +#define jpeg_set_linear_quality jSetLQuality +#define jpeg_add_quant_table jAddQuantTable +#define jpeg_quality_scaling jQualityScaling +#define jpeg_simple_progression jSimProgress +#define jpeg_suppress_tables jSuppressTables +#define jpeg_alloc_quant_table jAlcQTable +#define jpeg_alloc_huff_table jAlcHTable +#define jpeg_start_compress jStrtCompress +#define jpeg_write_scanlines jWrtScanlines +#define jpeg_finish_compress jFinCompress +#define jpeg_write_raw_data jWrtRawData +#define jpeg_write_marker jWrtMarker +#define jpeg_write_m_header jWrtMHeader +#define jpeg_write_m_byte jWrtMByte +#define jpeg_write_tables jWrtTables +#define jpeg_read_header jReadHeader +#define jpeg_start_decompress jStrtDecompress +#define jpeg_read_scanlines jReadScanlines +#define jpeg_finish_decompress jFinDecompress +#define jpeg_read_raw_data jReadRawData +#define jpeg_has_multiple_scans jHasMultScn +#define jpeg_start_output jStrtOutput +#define jpeg_finish_output jFinOutput +#define jpeg_input_complete jInComplete +#define jpeg_new_colormap jNewCMap +#define jpeg_consume_input jConsumeInput +#define jpeg_calc_output_dimensions jCalcDimensions +#define jpeg_save_markers jSaveMarkers +#define jpeg_set_marker_processor jSetMarker +#define jpeg_read_coefficients jReadCoefs +#define jpeg_write_coefficients jWrtCoefs +#define jpeg_copy_critical_parameters jCopyCrit +#define jpeg_abort_compress jAbrtCompress +#define jpeg_abort_decompress jAbrtDecompress +#define jpeg_abort jAbort +#define jpeg_destroy jDestroy +#define jpeg_resync_to_restart jResyncRestart +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +#define jpeg_std_error(err) \ + jpeg_std_error_MTK(err) + +/* Default error-management setup */ +EXTERN(struct jpeg_error_mgr *) jpeg_std_error_MTK JPP((struct jpeg_error_mgr *err)); + +/* Initialization of JPEG compression objects. + * jpeg_create_compress() and jpeg_create_decompress() are the exported + * names that applications should call. These expand to calls on + * jpeg_CreateCompress and jpeg_CreateDecompress with additional information + * passed for version mismatch checking. + * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. + */ +#define jpeg_create_compress(cinfo) \ + jpeg_CreateCompress_MTK((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_compress_struct)) +#define jpeg_create_decompress(cinfo) \ + jpeg_CreateDecompress_MTK((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_decompress_struct)) +#define jpeg_destroy_compress(cinfo) \ + jpeg_destroy_compress_MTK(cinfo) +#define jpeg_destroy_decompress(cinfo) \ + jpeg_destroy_decompress_MTK(cinfo) +#define jpeg_mem_dest(cinfo, outbuffer, outsize) \ + jpeg_mem_dest_MTK(cinfo, outbuffer, outsize) +#define jpeg_set_defaults(cinfo) \ + jpeg_set_defaults_MTK(cinfo) +#define jpeg_default_colorspace(cinfo) \ + jpeg_default_colorspace_MTK(cinfo) +#define jpeg_set_quality(cinfo, quality, force_baseline) \ + jpeg_set_quality_MTK(cinfo, quality, force_baseline) +#define jpeg_alloc_huff_table(cinfo) \ + jpeg_alloc_huff_table_MTK(cinfo) +#define jpeg_start_compress(cinfo, write_all_tables) \ + jpeg_start_compress_MTK(cinfo, write_all_tables) +#define jpeg_finish_compress(cinfo) \ + jpeg_finish_compress_MTK(cinfo) +#define jpeg_write_raw_data(cinfo, data, num_lines) \ + jpeg_write_raw_data_MTK(cinfo, data, num_lines) +#define jpeg_write_tables(cinfo) \ + jpeg_write_tables_MTK(cinfo) +#define jpeg_read_header(cinfo, require_image) \ + jpeg_read_header_MTK(cinfo, require_image) +#define jpeg_start_decompress(cinfo) \ + jpeg_start_decompress_MTK(cinfo) +#define jpeg_start_tile_decompress(cinfo) \ + jpeg_start_tile_decompress_MTK(cinfo) +#define jpeg_read_scanlines(cinfo, scanlines, max_lines) \ + jpeg_read_scanlines_MTK(cinfo, scanlines, max_lines) +#define jpeg_read_coefficients(cinfo) \ + jpeg_read_coefficients_MTK(cinfo) +#define jpeg_build_huffman_index(cinfo, index) \ + jpeg_build_huffman_index_MTK(cinfo, index) +#define jpeg_init_read_tile_scanline(cinfo, index, start_x, start_y, width, height) \ + jpeg_init_read_tile_scanline_MTK(cinfo, index, start_x, start_y, width, height) +#define jpeg_finish_decompress(cinfo) \ + jpeg_finish_decompress_MTK(cinfo) +#define jpeg_consume_input(cinfo) \ + jpeg_consume_input_MTK(cinfo) +#define jpeg_calc_output_dimensions(cinfo) \ + jpeg_calc_output_dimensions_MTK(cinfo) +#define jpeg_read_header(cinfo, require_image) \ + jpeg_read_header_MTK(cinfo, require_image) +#define jpeg_configure_huffman_decoder(cinfo, offset) \ + jpeg_configure_huffman_decoder_MTK(cinfo, offset) +#define jpeg_get_huffman_decoder_configuration(cinfo, offset) \ + jpeg_get_huffman_decoder_configuration_MTK(cinfo, offset) +#define jpeg_create_huffman_index(cinfo, index) \ + jpeg_create_huffman_index_MTK(cinfo, index) +#define jpeg_configure_huffman_index_scan(cinfo, index, scan_no, offset) \ + jpeg_configure_huffman_index_scan_MTK(cinfo, index, scan_no, offset) +#define jpeg_destroy_huffman_index(index) \ + jpeg_destroy_huffman_index_MTK(index) + +EXTERN(void) +jpeg_CreateCompress_MTK JPP((j_compress_ptr cinfo, int version, size_t structsize)); +EXTERN(void) +jpeg_CreateDecompress_MTK JPP((j_decompress_ptr cinfo, int version, size_t structsize)); +/* Destruction of JPEG compression objects */ +EXTERN(void) +jpeg_destroy_compress_MTK JPP((j_compress_ptr cinfo)); +EXTERN(void) +jpeg_destroy_decompress_MTK JPP((j_decompress_ptr cinfo)); + +/* Standard data source and destination managers: stdio streams. */ +/* Caller is responsible for opening the file before and closing after. */ +EXTERN(void) +jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); +EXTERN(void) +jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); + +/* Data source and destination managers: memory buffers. */ +EXTERN(void) +jpeg_mem_dest_MTK JPP((j_compress_ptr cinfo, unsigned char **outbuffer, unsigned long *outsize)); +EXTERN(void) +jpeg_mem_src JPP((j_decompress_ptr cinfo, unsigned char *inbuffer, unsigned long insize)); + +/* Default parameter setup for compression */ +EXTERN(void) +jpeg_set_defaults_MTK JPP((j_compress_ptr cinfo)); +/* Compression parameter setup aids */ +EXTERN(void) +jpeg_set_colorspace JPP((j_compress_ptr cinfo, J_COLOR_SPACE colorspace)); +EXTERN(void) +jpeg_default_colorspace_MTK JPP((j_compress_ptr cinfo)); +EXTERN(void) +jpeg_set_quality_MTK JPP((j_compress_ptr cinfo, int quality, boolean force_baseline)); +EXTERN(void) +jpeg_set_linear_quality JPP((j_compress_ptr cinfo, int scale_factor, boolean force_baseline)); +EXTERN(void) +jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, boolean force_baseline)); +EXTERN(int) +jpeg_quality_scaling JPP((int quality)); +EXTERN(void) +jpeg_simple_progression JPP((j_compress_ptr cinfo)); +EXTERN(void) +jpeg_suppress_tables JPP((j_compress_ptr cinfo, boolean suppress)); +EXTERN(JQUANT_TBL *) +jpeg_alloc_quant_table JPP((j_common_ptr cinfo)); +EXTERN(JHUFF_TBL *) +jpeg_alloc_huff_table_MTK JPP((j_common_ptr cinfo)); + +/* Main entry points for compression */ +EXTERN(void) +jpeg_start_compress_MTK JPP((j_compress_ptr cinfo, boolean write_all_tables)); +EXTERN(JDIMENSION) +jpeg_write_scanlines JPP((j_compress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION num_lines)); +EXTERN(void) +jpeg_finish_compress_MTK JPP((j_compress_ptr cinfo)); + +/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ +EXTERN(JDIMENSION) +jpeg_write_raw_data_MTK JPP((j_compress_ptr cinfo, JSAMPIMAGE data, JDIMENSION num_lines)); + +/* Write a special marker. See libjpeg.doc concerning safe usage. */ +EXTERN(void) jpeg_write_marker +JPP((j_compress_ptr cinfo, int marker, const JOCTET *dataptr, unsigned int datalen)); +/* Same, but piecemeal. */ +EXTERN(void) jpeg_write_m_header JPP((j_compress_ptr cinfo, int marker, unsigned int datalen)); +EXTERN(void) jpeg_write_m_byte JPP((j_compress_ptr cinfo, int val)); + +/* Alternate compression function: just write an abbreviated table file */ +EXTERN(void) +jpeg_write_tables_MTK JPP((j_compress_ptr cinfo)); + +/* Decompression startup: read start of JPEG datastream to see what's there */ +EXTERN(int) +jpeg_read_header_MTK JPP((j_decompress_ptr cinfo, boolean require_image)); +/* Return value is one of: */ +#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ +#define JPEG_HEADER_OK 1 /* Found valid image datastream */ +#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ +/* If you pass require_image = TRUE (normal case), you need not check for + * a TABLES_ONLY return code; an abbreviated file will cause an error exit. + * JPEG_SUSPENDED is only possible if you use a data source module that can + * give a suspension return (the stdio source module doesn't). + */ + +/* Main entry points for decompression */ +EXTERN(boolean) +jpeg_start_decompress_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) +jpeg_start_tile_decompress_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(JDIMENSION) +jpeg_read_scanlines_MTK JPP((j_decompress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION max_lines)); +EXTERN(JDIMENSION) +jpeg_read_scanlines_from JPP((j_decompress_ptr cinfo, + JSAMPARRAY scanlines, int line_offset, JDIMENSION max_lines)); +EXTERN(JDIMENSION) +jpeg_read_tile_scanline JPP((j_decompress_ptr cinfo, huffman_index * index, JSAMPARRAY scanlines)); +EXTERN(void) +jpeg_init_read_tile_scanline_MTK JPP((j_decompress_ptr cinfo, + huffman_index * index, + int *start_x, int *start_y, int *width, int *height)); +EXTERN(boolean) +jpeg_finish_decompress_MTK JPP((j_decompress_ptr cinfo)); + +/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ +EXTERN(JDIMENSION) +jpeg_read_raw_data JPP((j_decompress_ptr cinfo, JSAMPIMAGE data, JDIMENSION max_lines)); + +/* Additional entry points for buffered-image mode. */ +EXTERN(boolean) +jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) +jpeg_start_output JPP((j_decompress_ptr cinfo, int scan_number)); +EXTERN(boolean) +jpeg_finish_output JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) +jpeg_input_complete JPP((j_decompress_ptr cinfo)); +EXTERN(void) +jpeg_new_colormap JPP((j_decompress_ptr cinfo)); +EXTERN(int) +jpeg_consume_input_MTK JPP((j_decompress_ptr cinfo)); +/* Return value is one of: */ +/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ +#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ +#define JPEG_REACHED_EOI 2 /* Reached end of image */ +#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ +#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ + +/* Precalculate output dimensions for current decompression parameters. */ +EXTERN(void) +jpeg_calc_output_dimensions_MTK JPP((j_decompress_ptr cinfo)); + +/* Control saving of COM and APPn markers into marker_list. */ +EXTERN(void) jpeg_save_markers +JPP((j_decompress_ptr cinfo, int marker_code, unsigned int length_limit)); + +/* Install a special processing method for COM or APPn markers. */ +EXTERN(void) jpeg_set_marker_processor +JPP((j_decompress_ptr cinfo, int marker_code, jpeg_marker_parser_method routine)); + +/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ +EXTERN(jvirt_barray_ptr *) +jpeg_read_coefficients_MTK JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_build_huffman_index_MTK JPP((j_decompress_ptr cinfo, huffman_index * index)); +EXTERN(void) +jpeg_write_coefficients JPP((j_compress_ptr cinfo, jvirt_barray_ptr *coef_arrays)); +EXTERN(void) +jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo)); + +/* If you choose to abort compression or decompression before completing + * jpeg_finish_(de)compress, then you need to clean up to release memory, + * temporary files, etc. You can just call jpeg_destroy_(de)compress + * if you're done with the JPEG object, but if you want to clean it up and + * reuse it, call this: + */ +EXTERN(void) +jpeg_abort_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) +jpeg_abort_decompress JPP((j_decompress_ptr cinfo)); + +/* Generic versions of jpeg_abort and jpeg_destroy that work on either + * flavor of JPEG object. These may be more convenient in some places. + */ +EXTERN(void) +jpeg_abort JPP((j_common_ptr cinfo)); +EXTERN(void) +jpeg_destroy JPP((j_common_ptr cinfo)); + +/* Default restart-marker-resync procedure for use by data source modules */ +EXTERN(boolean) +jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, int desired)); + +EXTERN(void) jpeg_configure_huffman_decoder_MTK(j_decompress_ptr cinfo, huffman_offset_data offset); +EXTERN(void) jpeg_get_huffman_decoder_configuration_MTK(j_decompress_ptr cinfo, + huffman_offset_data *offset); +EXTERN(void) jpeg_create_huffman_index_MTK(j_decompress_ptr cinfo, huffman_index * index); +EXTERN(void) jpeg_configure_huffman_index_scan_MTK(j_decompress_ptr cinfo, + huffman_index * index, int scan_no, int offset); +EXTERN(void) jpeg_destroy_huffman_index_MTK(huffman_index * index); + + +/* These marker codes are exported since applications and data source modules + * are likely to want to use them. + */ + +#define JPEG_RST0 0xD0 /* RST0 marker code */ +#define JPEG_EOI 0xD9 /* EOI marker code */ +#define JPEG_APP0 0xE0 /* APP0 marker code */ +#define JPEG_COM 0xFE /* COM marker code */ + + +/* If we have a brain-damaged compiler that emits warnings (or worse, errors) + * for structure definitions that are never filled in, keep it quiet by + * supplying dummy definitions for the various substructures. + */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ +struct jvirt_sarray_control { + long dummy; +}; +struct jvirt_barray_control { + long dummy; +}; +struct jpeg_comp_master { + long dummy; +}; +struct jpeg_c_main_controller { + long dummy; +}; +struct jpeg_c_prep_controller { + long dummy; +}; +struct jpeg_c_coef_controller { + long dummy; +}; +struct jpeg_marker_writer { + long dummy; +}; +struct jpeg_color_converter { + long dummy; +}; +struct jpeg_downsampler { + long dummy; +}; +struct jpeg_forward_dct { + long dummy; +}; +struct jpeg_entropy_encoder { + long dummy; +}; +struct jpeg_decomp_master { + long dummy; +}; +struct jpeg_d_main_controller { + long dummy; +}; +struct jpeg_d_coef_controller { + long dummy; +}; +struct jpeg_d_post_controller { + long dummy; +}; +struct jpeg_input_controller { + long dummy; +}; +struct jpeg_marker_reader { + long dummy; +}; +struct jpeg_entropy_decoder { + long dummy; +}; +struct jpeg_inverse_dct { + long dummy; +}; +struct jpeg_upsampler { + long dummy; +}; +struct jpeg_color_deconverter { + long dummy; +}; +struct jpeg_color_quantizer { + long dummy; +}; +#endif /* JPEG_INTERNALS */ +#endif /* INCOMPLETE_TYPES_BROKEN */ + + +/* + * The JPEG library modules define JPEG_INTERNALS before including this file. + * The internal structure declarations are read only when that is true. + * Applications using the library should not include jpegint.h, but may wish + * to include jerror.h. + */ + +#ifdef JPEG_INTERNALS +#include "jpegint.h" /* fetch private declarations */ +#include "jerror.h" /* fetch error codes too */ +#endif + +#endif /* JPEGLIB_H */ diff --git a/mtklibs/libmtkjpeg/include/jthread.h b/mtklibs/libmtkjpeg/include/jthread.h new file mode 100755 index 0000000000000000000000000000000000000000..7d188f51199e7970a454a9556283a1a35562f7aa --- /dev/null +++ b/mtklibs/libmtkjpeg/include/jthread.h @@ -0,0 +1,96 @@ +#if 1 /* def JPEG_THREAD_SUPPORT */ +#ifdef USE_WIN32_THREAD +#define _WIN32_WINNT 0x500 +#include +#endif /* USE_WIN32_THREAD */ + +#define MCU_ROWS_IN_PER_THREAD 1 + +enum { + RUNNING, + RUNNING_IDLE, + STOP_DONE, + STOP_DIE +}; + +#ifdef USE_WIN32_THREAD +typedef struct { + void *handle; + void *(*func) (void *arg); + void *arg; + void *ret; +} Thread_t; +#define Thread_attr_t int + +/* the conditional variable api for windows 6.0+ uses critical sections and not mutexes */ +typedef CRITICAL_SECTION Thread_mutex_t; +#define JPEGTHREAD_MUTEX_INITIALIZER {0} +#define Thread_mutexattr_t int + +/* This is the CONDITIONAL_VARIABLE typedef for using Window's native conditional variables on kernels 6.0+. + * MinGW does not currently have this typedef. */ +typedef struct { + void *ptr; +} Thread_cond_t; +#define Thread_condattr_t int +#else /* USE_WIN32_THREAD */ +/****** Pthread define******/ +typedef long Thread_t; +typedef struct { + unsigned int flags; + void *stack_base; + unsigned int stack_size; + unsigned int guard_size; + unsigned int sched_policy; + unsigned int sched_priority; +} Thread_attr_t; + +typedef struct { + int volatile value; +} Thread_mutex_t; +typedef long Thread_mutexattr_t; + +typedef struct { + int volatile value; +} Thread_cond_t; +typedef long Thread_condattr_t; +/****** End of Pthread define******/ +#endif /* USE_WIN32_THREAD */ + +typedef struct { + Thread_t *self; + Thread_mutex_t *mutex[2]; + Thread_cond_t *cond[2]; + void *parent; + int index; + int state; + /* int rows_num; */ + /* u32 loading; */ + /* u32 retval; */ +} ThreadContext_t; + +int JPEGThreading_init(void); +void JPEGThreading_destroy(void); +int JPEGThread_create(Thread_t *thread, const Thread_attr_t *attr, + void *(*start_routine) (void *), void *arg); +int JPEGThread_join(Thread_t thread, void **value_ptr); +int JPEGThread_mutex_init(Thread_mutex_t *mutex, const Thread_mutexattr_t *attr); +int JPEGThread_mutex_destroy(Thread_mutex_t *mutex); +int JPEGThread_mutex_lock(Thread_mutex_t *mutex); +int JPEGThread_mutex_unlock(Thread_mutex_t *mutex); +int JPEGThread_cond_init(Thread_cond_t *cond, const Thread_condattr_t *attr); +int JPEGThread_cond_destroy(Thread_cond_t *cond); +int JPEGThread_cond_broadcast(Thread_cond_t *cond); +int JPEGThread_cond_wait(Thread_cond_t *cond, Thread_mutex_t *mutex); +int JPEGThread_cond_signal(Thread_cond_t *cond); + +#ifdef USE_WIN32_THREAD +#define JPEGThread_attr_init(a) 0 +#define JPEGThread_attr_destroy(a) 0 +#else /* USE_WIN32_THREAD */ +int JPEGthread_attr_init(Thread_attr_t *attr); +int JPEGthread_attr_destroy(Thread_attr_t *attr); +int JPEGBindingCore(Thread_t ThreadHandle, int CPUid); +#endif /* USE_WIN32_THREAD */ + +#endif /* JPEG_THREAD_SUPPORT */ diff --git a/mtklibs/libmtkjpeg/include/jversion.h b/mtklibs/libmtkjpeg/include/jversion.h new file mode 100755 index 0000000000000000000000000000000000000000..6472c58d351ac6a286443f692a8ec07a4a752877 --- /dev/null +++ b/mtklibs/libmtkjpeg/include/jversion.h @@ -0,0 +1,14 @@ +/* + * jversion.h + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains software version identification. + */ + + +#define JVERSION "6b 27-Mar-1998" + +#define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" diff --git a/mtklibs/libmtkjpeg/include/transupp.h b/mtklibs/libmtkjpeg/include/transupp.h new file mode 100755 index 0000000000000000000000000000000000000000..229ff498eaaa591877a8301504dff5eb01a8345b --- /dev/null +++ b/mtklibs/libmtkjpeg/include/transupp.h @@ -0,0 +1,131 @@ +/* + * transupp.h + * + * Copyright (C) 1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains declarations for image transformation routines and + * other utility code used by the jpegtran sample application. These are + * NOT part of the core JPEG library. But we keep these routines separate + * from jpegtran.c to ease the task of maintaining jpegtran-like programs + * that have other user interfaces. + * + * NOTE: all the routines declared here have very specific requirements + * about when they are to be executed during the reading and writing of the + * source and destination files. See the comments in transupp.c, or see + * jpegtran.c for an example of correct usage. + */ + +/* If you happen not to want the image transform support, disable it here */ +#ifndef TRANSFORMS_SUPPORTED +#define TRANSFORMS_SUPPORTED 1 /* 0 disables transform code */ +#endif + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jtransform_request_workspace jTrRequest +#define jtransform_adjust_parameters jTrAdjust +#define jtransform_execute_transformation jTrExec +#define jcopy_markers_setup jCMrkSetup +#define jcopy_markers_execute jCMrkExec +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* + * Codes for supported types of image transformations. + */ + +typedef enum { + JXFORM_NONE, /* no transformation */ + JXFORM_FLIP_H, /* horizontal flip */ + JXFORM_FLIP_V, /* vertical flip */ + JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */ + JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */ + JXFORM_ROT_90, /* 90-degree clockwise rotation */ + JXFORM_ROT_180, /* 180-degree rotation */ + JXFORM_ROT_270 /* 270-degree clockwise (or 90 ccw) */ +} JXFORM_CODE; + +/* + * Although rotating and flipping data expressed as DCT coefficients is not + * hard, there is an asymmetry in the JPEG format specification for images + * whose dimensions aren't multiples of the iMCU size. The right and bottom + * image edges are padded out to the next iMCU boundary with junk data; but + * no padding is possible at the top and left edges. If we were to flip + * the whole image including the pad data, then pad garbage would become + * visible at the top and/or left, and real pixels would disappear into the + * pad margins --- perhaps permanently, since encoders & decoders may not + * bother to preserve DCT blocks that appear to be completely outside the + * nominal image area. So, we have to exclude any partial iMCUs from the + * basic transformation. + * + * Transpose is the only transformation that can handle partial iMCUs at the + * right and bottom edges completely cleanly. flip_h can flip partial iMCUs + * at the bottom, but leaves any partial iMCUs at the right edge untouched. + * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched. + * The other transforms are defined as combinations of these basic transforms + * and process edge blocks in a way that preserves the equivalence. + * + * The "trim" option causes untransformable partial iMCUs to be dropped; + * this is not strictly lossless, but it usually gives the best-looking + * result for odd-size images. Note that when this option is active, + * the expected mathematical equivalences between the transforms may not hold. + * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim + * followed by -rot 180 -trim trims both edges.) + * + * We also offer a "force to grayscale" option, which simply discards the + * chrominance channels of a YCbCr image. This is lossless in the sense that + * the luminance channel is preserved exactly. It's not the same kind of + * thing as the rotate/flip transformations, but it's convenient to handle it + * as part of this package, mainly because the transformation routines have to + * be aware of the option to know how many components to work on. + */ + +typedef struct { + /* Options: set by caller */ + JXFORM_CODE transform; /* image transform operator */ + boolean trim; /* if TRUE, trim partial MCUs as needed */ + boolean force_grayscale; /* if TRUE, convert color image to grayscale */ + + /* Internal workspace: caller should not touch these */ + int num_components; /* # of components in workspace */ + jvirt_barray_ptr *workspace_coef_arrays; /* workspace for transformations */ +} jpeg_transform_info; + + +#if TRANSFORMS_SUPPORTED + +/* Request any required workspace */ +EXTERN(void) jtransform_request_workspace +JPP((j_decompress_ptr srcinfo, jpeg_transform_info * info)); +/* Adjust output image parameters */ +EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters +JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, jpeg_transform_info * info)); +/* Execute the actual transformation, if any */ +EXTERN(void) jtransform_execute_transformation +JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, jpeg_transform_info * info)); + +#endif /* TRANSFORMS_SUPPORTED */ + + +/* + * Support for copying optional markers from source to destination file. + */ + +typedef enum { + JCOPYOPT_NONE, /* copy no optional markers */ + JCOPYOPT_COMMENTS, /* copy only comment (COM) markers */ + JCOPYOPT_ALL /* copy all optional markers */ +} JCOPY_OPTION; + +#define JCOPYOPT_DEFAULT JCOPYOPT_COMMENTS /* recommended default */ + +/* Setup decompression object to save desired markers in memory */ +EXTERN(void) jcopy_markers_setup JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option)); +/* Copy markers saved in the given source object to the destination object */ +EXTERN(void) jcopy_markers_execute +JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, JCOPY_OPTION option)); diff --git a/mtklibs/libmtkjpeg/libmtkjpeg.so b/mtklibs/libmtkjpeg/libmtkjpeg.so new file mode 100755 index 0000000000000000000000000000000000000000..1b89e9bbe17557f7a5f364f99f51f1471504b2d8 Binary files /dev/null and b/mtklibs/libmtkjpeg/libmtkjpeg.so differ diff --git a/mtklibs/libmtkjpeg_rvct.NEON/Android.mk_ b/mtklibs/libmtkjpeg_rvct.NEON/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..6931438135badcc3b44670be1a63cad25d181c76 --- /dev/null +++ b/mtklibs/libmtkjpeg_rvct.NEON/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtkjpeg_rvct.NEON +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtkjpeg_rvct.NEON.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtkjpeg_rvct.NEON/NOTICE b/mtklibs/libmtkjpeg_rvct.NEON/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..88aa9819da4b6135036e7d9d4e93b66b6a373a15 --- /dev/null +++ b/mtklibs/libmtkjpeg_rvct.NEON/NOTICE @@ -0,0 +1,220 @@ +This software is copyright (C) 1991-1998, Thomas G. Lane.: +# Copyright 2010 Google Inc. All Rights Reserved.: + Copyright (C) 1988 Richard M. Stallman: +notice "Copyright (C) 1989 Aladdin Enterprises. All rights reserved.: + * Copyright (C) 2010 The Android Open Source Project: + * Copyright (C) 1991-1997, Thomas G. Lane.: + * Copyright (C) 1991-1998, Thomas G. Lane.: + * Copyright (C) 1991-1994, Thomas G. Lane.: +Copyright (C) 1991-1996, Thomas G. Lane.: +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.: +Copyright (C) 1994-1998, Thomas G. Lane.: + * Copyright (C) 1994-1997, Thomas G. Lane.: + * Copyright (C) 1994-1996, Thomas G. Lane.: + * Copyright (C) 2010-2011, D. R. Commander.: + * Copyright (C) 1992-1997, Thomas G. Lane.: +#define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane": + * Copyright (C) 1997, Thomas G. Lane.: +Copyright (C) 1991-1998, Thomas G. Lane.: + * Copyright (C) 1994-1998, Thomas G. Lane.: + * Copyright (C) 1999-2006, MIYASAKA Masaru.: + * Copyright 2009 Pierre Ossman for Cendio AB: + * Copyright (C) 2011 D. R. Commander: + * Copyright (C) 2009-2011, D. R. Commander.: + * "How to Optimize for the Pentium Processors", Copyright (c) 1996, 1997 by: + * Copyright (C) 1995-1997, Thomas G. Lane.: + * Copyright (C) 1991-1996, Thomas G. Lane.: + * Copyright (C) 2007-2008 The Android Open Source Project: + * Copyright (C) 1992-1996, Thomas G. Lane.: +; Copyright (C) 1992, Thomas G. Lane.: +# Copyright (C) 1996-1998 Free Software Foundation, Inc.: +** Copyright (C) 1988 by Jef Poskanzer.: + * Copyright 2011 D. R. Commander: + * Copyright 2009-2011 D. R. Commander: + * Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies).: +Copyright (C) 1991-1995, Thomas G. Lane.: + * Copyright (C) 1989 by Jef Poskanzer.: + + + +Libjpeg License + +The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, +accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, +assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-1998, Thomas G. Lane. All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, +without fee, subject to these conditions: + +(1) If any part of the source code for this software is distributed, then this README file must be included, with this +copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be +clearly indicated in accompanying documentation. + +(2) If only executable code is distributed, then the accompanying documentation must state that "this software is based +in part on the work of the Independent JPEG Group". + +(3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable +consequences; the authors accept NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you +use our work, you ought to acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to +this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of commercial products, provided that all +warranty or liability claims are assumed by the product vendor. + +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, sole proprietor of its copyright holder, +Aladdin Enterprises of Menlo Park, CA. ansi2knr.c is NOT covered by the above copyright and conditions, but instead by +the usual distribution terms of the Free Software Foundation; principally, that you must include source code if you +redistribute it. (See the file ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part of any +program generated from the IJG code, this does not limit you more than the foregoing paragraphs do. + +The Unix configuration script "configure" was produced with GNU Autoconf. It is copyright by the Free Software +Foundation but is freely distributable. The same holds for its supporting scripts (config.guess, config.sub, ltconfig, +ltmain.sh). Another support script, install-sh, is copyright by M.I.T. but is also freely distributable. + +It appears that the arithmetic coding option of the JPEG spec is covered by patents owned by IBM, AT&T, and Mitsubishi. +Hence arithmetic coding cannot legally be used without obtaining one or more licenses. For this reason, support for +arithmetic coding has been removed from the free JPEG software. (Since arithmetic coding provides only a marginal gain +over the unpatented Huffman mode, it is unlikely that very many implementations will support it.) So far as we are +aware, there are no patent restrictions on the remaining code. + +The IJG distribution formerly included code to read and write GIF files. To avoid entanglement with the Unisys LZW +patent, GIF reading support has been removed altogether, and the GIF writer has been simplified to produce "uncompressed +GIFs". This technique does not use the LZW algorithm; the resulting GIF files are larger than usual, but are readable by +all standard GIF decoders. +We are required to state that + + "The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark +property of CompuServe Incorporated." + + + The Independent JPEG Group's JPEG software + +README for release 6b of 27-Mar-1998 +==================================== + +This distribution contains the sixth public release of the Independent JPEG Group's free JPEG software. You are welcome +to redistribute this software and to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. + +Serious users of this software (particularly those incorporating it into larger programs) should contact IJG at +jpeg-info@uunet.uu.net to be added to our electronic mailing list. Mailing list members are notified of updates and have +a chance to participate in technical discussions, etc. + +This software is the work of Tom Lane, Philip Gladstone, Jim Boucher, Lee Crocker, Julian Minguillon, Luis Ortiz, George +Phillips, Davide Rossi, Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG Group. + +IJG is not affiliated with the official ISO JPEG standards committee. +LEGAL ISSUES +============ + +In plain English: + + 1. We don't promise that this software works. (But if you find any bugs, please let us know!) + 2. You can use this software for whatever you want. You don't have to pay us. + 3. You may not pretend that you wrote this software. If you use it in a program, you must acknowledge somewhere in +your documentation that you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, +accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, +assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-1998, Thomas G. Lane. All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, +without fee, subject to these conditions: + +(1) If any part of the source code for this software is distributed, then this README file must be included, with this +copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be +clearly indicated in accompanying documentation. + +(2) If only executable code is distributed, then the accompanying documentation must state that "this software is based +in part on the work of the Independent JPEG Group". + +(3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable +consequences; the authors accept NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you +use our work, you ought to acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to +this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of commercial products, provided that all +warranty or liability claims are assumed by the product vendor. + +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, sole proprietor of its copyright holder, +Aladdin Enterprises of Menlo Park, CA. ansi2knr.c is NOT covered by the above copyright and conditions, but instead by +the usual distribution terms of the Free Software Foundation; principally, that you must include source code if you +redistribute it. (See the file ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part of any +program generated from the IJG code, this does not limit you more than the foregoing paragraphs do. + +The Unix configuration script "configure" was produced with GNU Autoconf. It is copyright by the Free Software +Foundation but is freely distributable. The same holds for its supporting scripts (config.guess, config.sub, ltconfig, +ltmain.sh). Another support script, install-sh, is copyright by M.I.T. but is also freely distributable. + +It appears that the arithmetic coding option of the JPEG spec is covered by patents owned by IBM, AT&T, and Mitsubishi. +Hence arithmetic coding cannot legally be used without obtaining one or more licenses. For this reason, support for +arithmetic coding has been removed from the free JPEG software. (Since arithmetic coding provides only a marginal gain +over the unpatented Huffman mode, it is unlikely that very many implementations will support it.) So far as we are +aware, there are no patent restrictions on the remaining code. + +The IJG distribution formerly included code to read and write GIF files. To avoid entanglement with the Unisys LZW +patent, GIF reading support has been removed altogether, and the GIF writer has been simplified to produce "uncompressed +GIFs". This technique does not use the LZW algorithm; the resulting GIF files are larger than usual, but are readable by +all standard GIF decoders. +We are required to state that + + "The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark +property of CompuServe Incorporated." + + + + /* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* This program is free software: you can redistribute it and/or modify it under the terms of the +* GNU General Public License version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +* See the GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License along with this program. +* If not, see . +*/ + + + Copyright (c) , +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following +disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of the nor the names of its contributors may be used to endorse or promote +products derived from this software without specific prior written permission. + + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + + \ No newline at end of file diff --git a/mtklibs/libmtkjpeg_rvct.NEON/README b/mtklibs/libmtkjpeg_rvct.NEON/README new file mode 100755 index 0000000000000000000000000000000000000000..86cc20669d6123ee2999fd0c8f6c21641825fda6 --- /dev/null +++ b/mtklibs/libmtkjpeg_rvct.NEON/README @@ -0,0 +1,385 @@ +The Independent JPEG Group's JPEG software +========================================== + +README for release 6b of 27-Mar-1998 +==================================== + +This distribution contains the sixth public release of the Independent JPEG +Group's free JPEG software. You are welcome to redistribute this software and +to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. + +Serious users of this software (particularly those incorporating it into +larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to +our electronic mailing list. Mailing list members are notified of updates +and have a chance to participate in technical discussions, etc. + +This software is the work of Tom Lane, Philip Gladstone, Jim Boucher, +Lee Crocker, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, +Guido Vollbeding, Ge' Weijers, and other members of the Independent JPEG +Group. + +IJG is not affiliated with the official ISO JPEG standards committee. + + +DOCUMENTATION ROADMAP +===================== + +This file contains the following sections: + +OVERVIEW General description of JPEG and the IJG software. +LEGAL ISSUES Copyright, lack of warranty, terms of distribution. +REFERENCES Where to learn more about JPEG. +ARCHIVE LOCATIONS Where to find newer versions of this software. +RELATED SOFTWARE Other stuff you should get. +FILE FORMAT WARS Software *not* to get. +TO DO Plans for future IJG releases. + +Other documentation files in the distribution are: + +User documentation: + install.doc How to configure and install the IJG software. + usage.doc Usage instructions for cjpeg, djpeg, jpegtran, + rdjpgcom, and wrjpgcom. + *.1 Unix-style man pages for programs (same info as usage.doc). + wizard.doc Advanced usage instructions for JPEG wizards only. + change.log Version-to-version change highlights. +Programmer and internal documentation: + libjpeg.doc How to use the JPEG library in your own programs. + example.c Sample code for calling the JPEG library. + structure.doc Overview of the JPEG library's internal structure. + filelist.doc Road map of IJG files. + coderules.doc Coding style rules --- please read if you contribute code. + +Please read at least the files install.doc and usage.doc. Useful information +can also be found in the JPEG FAQ (Frequently Asked Questions) article. See +ARCHIVE LOCATIONS below to find out where to obtain the FAQ article. + +If you want to understand how the JPEG code works, we suggest reading one or +more of the REFERENCES, then looking at the documentation files (in roughly +the order listed) before diving into the code. + + +OVERVIEW +======== + +This package contains C software to implement JPEG image compression and +decompression. JPEG (pronounced "jay-peg") is a standardized compression +method for full-color and gray-scale images. JPEG is intended for compressing +"real-world" scenes; line drawings, cartoons and other non-realistic images +are not its strong suit. JPEG is lossy, meaning that the output image is not +exactly identical to the input image. Hence you must not use JPEG if you +have to have identical output bits. However, on typical photographic images, +very good compression levels can be obtained with no visible change, and +remarkably high compression levels are possible if you can tolerate a +low-quality image. For more details, see the references, or just experiment +with various compression settings. + +This software implements JPEG baseline, extended-sequential, and progressive +compression processes. Provision is made for supporting all variants of these +processes, although some uncommon parameter settings aren't implemented yet. +For legal reasons, we are not distributing code for the arithmetic-coding +variants of JPEG; see LEGAL ISSUES. We have made no provision for supporting +the hierarchical or lossless processes defined in the standard. + +We provide a set of library routines for reading and writing JPEG image files, +plus two sample applications "cjpeg" and "djpeg", which use the library to +perform conversion between JPEG and some other popular image file formats. +The library is intended to be reused in other applications. + +In order to support file conversion and viewing software, we have included +considerable functionality beyond the bare JPEG coding/decoding capability; +for example, the color quantization modules are not strictly part of JPEG +decoding, but they are essential for output to colormapped file formats or +colormapped displays. These extra functions can be compiled out of the +library if not required for a particular application. We have also included +"jpegtran", a utility for lossless transcoding between different JPEG +processes, and "rdjpgcom" and "wrjpgcom", two simple applications for +inserting and extracting textual comments in JFIF files. + +The emphasis in designing this software has been on achieving portability and +flexibility, while also making it fast enough to be useful. In particular, +the software is not intended to be read as a tutorial on JPEG. (See the +REFERENCES section for introductory material.) Rather, it is intended to +be reliable, portable, industrial-strength code. We do not claim to have +achieved that goal in every aspect of the software, but we strive for it. + +We welcome the use of this software as a component of commercial products. +No royalty is required, but we do ask for an acknowledgement in product +documentation, as described under LEGAL ISSUES. + + +LEGAL ISSUES +============ + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-1998, Thomas G. Lane. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + + +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, +sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. +ansi2knr.c is NOT covered by the above copyright and conditions, but instead +by the usual distribution terms of the Free Software Foundation; principally, +that you must include source code if you redistribute it. (See the file +ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part +of any program generated from the IJG code, this does not limit you more than +the foregoing paragraphs do. + +The Unix configuration script "configure" was produced with GNU Autoconf. +It is copyright by the Free Software Foundation but is freely distributable. +The same holds for its supporting scripts (config.guess, config.sub, +ltconfig, ltmain.sh). Another support script, install-sh, is copyright +by M.I.T. but is also freely distributable. + +It appears that the arithmetic coding option of the JPEG spec is covered by +patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot +legally be used without obtaining one or more licenses. For this reason, +support for arithmetic coding has been removed from the free JPEG software. +(Since arithmetic coding provides only a marginal gain over the unpatented +Huffman mode, it is unlikely that very many implementations will support it.) +So far as we are aware, there are no patent restrictions on the remaining +code. + +The IJG distribution formerly included code to read and write GIF files. +To avoid entanglement with the Unisys LZW patent, GIF reading support has +been removed altogether, and the GIF writer has been simplified to produce +"uncompressed GIFs". This technique does not use the LZW algorithm; the +resulting GIF files are larger than usual, but are readable by all standard +GIF decoders. + +We are required to state that + "The Graphics Interchange Format(c) is the Copyright property of + CompuServe Incorporated. GIF(sm) is a Service Mark property of + CompuServe Incorporated." + + +REFERENCES +========== + +We highly recommend reading one or more of these references before trying to +understand the innards of the JPEG software. + +The best short technical introduction to the JPEG compression algorithm is + Wallace, Gregory K. "The JPEG Still Picture Compression Standard", + Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44. +(Adjacent articles in that issue discuss MPEG motion picture compression, +applications of JPEG, and related topics.) If you don't have the CACM issue +handy, a PostScript file containing a revised version of Wallace's article is +available at ftp://ftp.uu.net/graphics/jpeg/wallace.ps.gz. The file (actually +a preprint for an article that appeared in IEEE Trans. Consumer Electronics) +omits the sample images that appeared in CACM, but it includes corrections +and some added material. Note: the Wallace article is copyright ACM and IEEE, +and it may not be used for commercial purposes. + +A somewhat less technical, more leisurely introduction to JPEG can be found in +"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by +M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides +good explanations and example C code for a multitude of compression methods +including JPEG. It is an excellent source if you are comfortable reading C +code but don't know much about data compression in general. The book's JPEG +sample code is far from industrial-strength, but when you are ready to look +at a full implementation, you've got one here... + +The best full description of JPEG is the textbook "JPEG Still Image Data +Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published +by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. Price US$59.95, 638 pp. +The book includes the complete text of the ISO JPEG standards (DIS 10918-1 +and draft DIS 10918-2). This is by far the most complete exposition of JPEG +in existence, and we highly recommend it. + +The JPEG standard itself is not available electronically; you must order a +paper copy through ISO or ITU. (Unless you feel a need to own a certified +official copy, we recommend buying the Pennebaker and Mitchell book instead; +it's much cheaper and includes a great deal of useful explanatory material.) +In the USA, copies of the standard may be ordered from ANSI Sales at (212) +642-4900, or from Global Engineering Documents at (800) 854-7179. (ANSI +doesn't take credit card orders, but Global does.) It's not cheap: as of +1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7% +shipping/handling. The standard is divided into two parts, Part 1 being the +actual specification, while Part 2 covers compliance testing methods. Part 1 +is titled "Digital Compression and Coding of Continuous-tone Still Images, +Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS +10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of +Continuous-tone Still Images, Part 2: Compliance testing" and has document +numbers ISO/IEC IS 10918-2, ITU-T T.83. + +Some extensions to the original JPEG standard are defined in JPEG Part 3, +a newer ISO standard numbered ISO/IEC IS 10918-3 and ITU-T T.84. IJG +currently does not support any Part 3 extensions. + +The JPEG standard does not specify all details of an interchangeable file +format. For the omitted details we follow the "JFIF" conventions, revision +1.02. A copy of the JFIF spec is available from: + Literature Department + C-Cube Microsystems, Inc. + 1778 McCarthy Blvd. + Milpitas, CA 95035 + phone (408) 944-6300, fax (408) 944-6314 +A PostScript version of this document is available by FTP at +ftp://ftp.uu.net/graphics/jpeg/jfif.ps.gz. There is also a plain text +version at ftp://ftp.uu.net/graphics/jpeg/jfif.txt.gz, but it is missing +the figures. + +The TIFF 6.0 file format specification can be obtained by FTP from +ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme +found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems. +IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6). +Instead, we recommend the JPEG design proposed by TIFF Technical Note #2 +(Compression tag 7). Copies of this Note can be obtained from ftp.sgi.com or +from ftp://ftp.uu.net/graphics/jpeg/. It is expected that the next revision +of the TIFF spec will replace the 6.0 JPEG design with the Note's design. +Although IJG's own code does not support TIFF/JPEG, the free libtiff library +uses our library to implement TIFF/JPEG per the Note. libtiff is available +from ftp://ftp.sgi.com/graphics/tiff/. + + +ARCHIVE LOCATIONS +================= + +The "official" archive site for this software is ftp.uu.net (Internet +address 192.48.96.9). The most recent released version can always be found +there in directory graphics/jpeg. This particular version will be archived +as ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz. If you don't have +direct Internet access, UUNET's archives are also available via UUCP; contact +help@uunet.uu.net for information on retrieving files that way. + +Numerous Internet sites maintain copies of the UUNET files. However, only +ftp.uu.net is guaranteed to have the latest official version. + +You can also obtain this software in DOS-compatible "zip" archive format from +the SimTel archives (ftp://ftp.simtel.net/pub/simtelnet/msdos/graphics/), or +on CompuServe in the Graphics Support forum (GO CIS:GRAPHSUP), library 12 +"JPEG Tools". Again, these versions may sometimes lag behind the ftp.uu.net +release. + +The JPEG FAQ (Frequently Asked Questions) article is a useful source of +general information about JPEG. It is updated constantly and therefore is +not included in this distribution. The FAQ is posted every two weeks to +Usenet newsgroups comp.graphics.misc, news.answers, and other groups. +It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/ +and other news.answers archive sites, including the official news.answers +archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/. +If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu +with body + send usenet/news.answers/jpeg-faq/part1 + send usenet/news.answers/jpeg-faq/part2 + + +RELATED SOFTWARE +================ + +Numerous viewing and image manipulation programs now support JPEG. (Quite a +few of them use this library to do so.) The JPEG FAQ described above lists +some of the more popular free and shareware viewers, and tells where to +obtain them on Internet. + +If you are on a Unix machine, we highly recommend Jef Poskanzer's free +PBMPLUS software, which provides many useful operations on PPM-format image +files. In particular, it can convert PPM images to and from a wide range of +other formats, thus making cjpeg/djpeg considerably more useful. The latest +version is distributed by the NetPBM group, and is available from numerous +sites, notably ftp://wuarchive.wustl.edu/graphics/graphics/packages/NetPBM/. +Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software is; +you are likely to have difficulty making it work on any non-Unix machine. + +A different free JPEG implementation, written by the PVRG group at Stanford, +is available from ftp://havefun.stanford.edu/pub/jpeg/. This program +is designed for research and experimentation rather than production use; +it is slower, harder to use, and less portable than the IJG code, but it +is easier to read and modify. Also, the PVRG code supports lossless JPEG, +which we do not. (On the other hand, it doesn't do progressive JPEG.) + + +FILE FORMAT WARS +================ + +Some JPEG programs produce files that are not compatible with our library. +The root of the problem is that the ISO JPEG committee failed to specify a +concrete file format. Some vendors "filled in the blanks" on their own, +creating proprietary formats that no one else could read. (For example, none +of the early commercial JPEG implementations for the Macintosh were able to +exchange compressed files.) + +The file format we have adopted is called JFIF (see REFERENCES). This format +has been agreed to by a number of major commercial JPEG vendors, and it has +become the de facto standard. JFIF is a minimal or "low end" representation. +We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF +Technical Note #2) for "high end" applications that need to record a lot of +additional data about an image. TIFF/JPEG is fairly new and not yet widely +supported, unfortunately. + +The upcoming JPEG Part 3 standard defines a file format called SPIFF. +SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should +be able to read the most common variant of SPIFF. SPIFF has some technical +advantages over JFIF, but its major claim to fame is simply that it is an +official standard rather than an informal one. At this point it is unclear +whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto +standard. IJG intends to support SPIFF once the standard is frozen, but we +have not decided whether it should become our default output format or not. +(In any case, our decoder will remain capable of reading JFIF indefinitely.) + +Various proprietary file formats incorporating JPEG compression also exist. +We have little or no sympathy for the existence of these formats. Indeed, +one of the original reasons for developing this free software was to help +force convergence on common, open format standards for JPEG files. Don't +use a proprietary file format! + + +TO DO +===== + +The major thrust for v7 will probably be improvement of visual quality. +The current method for scaling the quantization tables is known not to be +very good at low Q values. We also intend to investigate block boundary +smoothing, "poor man's variable quantization", and other means of improving +quality-vs-file-size performance without sacrificing compatibility. + +In future versions, we are considering supporting some of the upcoming JPEG +Part 3 extensions --- principally, variable quantization and the SPIFF file +format. + +As always, speeding things up is of great interest. + +Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net. diff --git a/mtklibs/libmtkjpeg_rvct.NEON/arm/libmtkjpeg_rvct.NEON.a b/mtklibs/libmtkjpeg_rvct.NEON/arm/libmtkjpeg_rvct.NEON.a new file mode 100755 index 0000000000000000000000000000000000000000..7d7e465ca99928e7def01af951c3fa70da63c337 Binary files /dev/null and b/mtklibs/libmtkjpeg_rvct.NEON/arm/libmtkjpeg_rvct.NEON.a differ diff --git a/mtklibs/libmtkplayer/Android.mk_ b/mtklibs/libmtkplayer/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..4d36e6adb12ab33227ce3d4c6350852e175f414b --- /dev/null +++ b/mtklibs/libmtkplayer/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtkplayer +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libbinder libmedia libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtkplayer.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtkplayer +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libmedia libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtkplayer.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtkplayer/NOTICE b/mtklibs/libmtkplayer/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..e013cecdaa1a3461294225057429accb7c12c99a --- /dev/null +++ b/mtklibs/libmtkplayer/NOTICE @@ -0,0 +1,65 @@ +SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) +Copyright (C) [dates of first publication] Silicon Graphics, Inc. All Rights +Reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: +The above copyright notice including the dates of first publication and either +this permission notice or a reference to http://oss.sgi.com/projects/FreeB/ +shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Except as contained in this notice, the name of Silicon Graphics, Inc. shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Silicon +Graphics, Inc. + + +Copyright (c) 2007-2009 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +Jean-loup Gailly Mark Adler +jloup@gzip.org madler@alumni.caltech.edu \ No newline at end of file diff --git a/mtklibs/libmtkplayer/README b/mtklibs/libmtkplayer/README new file mode 100755 index 0000000000000000000000000000000000000000..a023e54e472ff97a168e8f6011bef707866262b0 --- /dev/null +++ b/mtklibs/libmtkplayer/README @@ -0,0 +1,26 @@ +This module creates the FM/MATV/VIB Audio Player libraries. + +This library is pre-built by MediaTek internally. + + +WHAT IT DOES? +============= +FM/MATV/VIB Audio Player is used to render audio data. + + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +libcutils, libutils, libmedia, libaudiosetting + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +The file can not be be used directly by an application developer. + +The majority of source code for this library were written by MediaTek. Various +open source libraries are also used and contained in this folder. diff --git a/mtklibs/libmtkplayer/arm/libmtkplayer.so b/mtklibs/libmtkplayer/arm/libmtkplayer.so new file mode 100755 index 0000000000000000000000000000000000000000..acf3b45857e96eecbb1260592c7f02ee51041a93 Binary files /dev/null and b/mtklibs/libmtkplayer/arm/libmtkplayer.so differ diff --git a/mtklibs/libmtkplayer/libmtkplayer.so b/mtklibs/libmtkplayer/libmtkplayer.so new file mode 100755 index 0000000000000000000000000000000000000000..3ba8c50c8255b79653b765a11dde8279085c3183 Binary files /dev/null and b/mtklibs/libmtkplayer/libmtkplayer.so differ diff --git a/mtklibs/libmtksqlite3_android/Android.mk_ b/mtklibs/libmtksqlite3_android/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..7cd9e26bbeb3907159e5721a3f54e9f7c8f58ec3 --- /dev/null +++ b/mtklibs/libmtksqlite3_android/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtksqlite3_android +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libsqlite libmtksqlite3_custom libmtk_drvb libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libmtksqlite3_android.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libmtksqlite3_android +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libsqlite libmtksqlite3_custom libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libmtksqlite3_android.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libmtksqlite3_android/README b/mtklibs/libmtksqlite3_android/README new file mode 100755 index 0000000000000000000000000000000000000000..fa065dc9af399f4833993bd76f6899e569a45de2 --- /dev/null +++ b/mtklibs/libmtksqlite3_android/README @@ -0,0 +1,13 @@ +WHAT IT DOES? +============= +provides some fuctions for DialerSearch to query name or number. + + +HOW IT WAS BUILT? +================== +Same as other module. + + +HOW TO USE IT? +============== +Use with DialerSearch Query. diff --git a/mtklibs/libmtksqlite3_android/arm/libmtksqlite3_android.so b/mtklibs/libmtksqlite3_android/arm/libmtksqlite3_android.so new file mode 100755 index 0000000000000000000000000000000000000000..74b05345193fc5d033079d9536dc1dcbf0c4d5e1 Binary files /dev/null and b/mtklibs/libmtksqlite3_android/arm/libmtksqlite3_android.so differ diff --git a/mtklibs/libmtksqlite3_android/libmtksqlite3_android.so b/mtklibs/libmtksqlite3_android/libmtksqlite3_android.so new file mode 100755 index 0000000000000000000000000000000000000000..1105191f3ca05940c7516d7a302fa041bcdfe90a Binary files /dev/null and b/mtklibs/libmtksqlite3_android/libmtksqlite3_android.so differ diff --git a/mtklibs/libnativecheck-jni/Android.mk_ b/mtklibs/libnativecheck-jni/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d375a57e97725e901c7eaa3c08a733b2105e9e50 --- /dev/null +++ b/mtklibs/libnativecheck-jni/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnativecheck-jni +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libandroid_runtime libnativehelper libmtk_drvb libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libnativecheck-jni.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnativecheck-jni +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libandroid_runtime libnativehelper libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libnativecheck-jni.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libnativecheck-jni/README b/mtklibs/libnativecheck-jni/README new file mode 100755 index 0000000000000000000000000000000000000000..e5bc1c91baa10d9eb1249ba0eb9fe2d08ba2da20 --- /dev/null +++ b/mtklibs/libnativecheck-jni/README @@ -0,0 +1,25 @@ +Library of MTK JPE feature, icluding Anti-clone security mechanism. + + +WHAT IT DOES? +============= +It provides MTK Anti-clone security mechanism + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libandroid_runtime +2. libnativehelper +3. libcutils.so + +and the following libs from MediaTek: +1. libmtk_drvb.so + +All source/dependency modules of this module are already put in +'vendor\mediatek\proprietary\protect\frameworks\base\jpe\jni' folder. + +HOW TO USE IT? +============== +It is proprietary used and not opened interface for other modules. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libnativecheck-jni/arm/libnativecheck-jni.so b/mtklibs/libnativecheck-jni/arm/libnativecheck-jni.so new file mode 100755 index 0000000000000000000000000000000000000000..bfa0e6a6c580010e7d4b1ab6f0288cdca6e02449 Binary files /dev/null and b/mtklibs/libnativecheck-jni/arm/libnativecheck-jni.so differ diff --git a/mtklibs/libnativecheck-jni/libnativecheck-jni.so b/mtklibs/libnativecheck-jni/libnativecheck-jni.so new file mode 100755 index 0000000000000000000000000000000000000000..9c9b35b1558c810e318c93ea840bd3598e9a81d5 Binary files /dev/null and b/mtklibs/libnativecheck-jni/libnativecheck-jni.so differ diff --git a/mtklibs/libnr/Android.mk_ b/mtklibs/libnr/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a008ff75b4ebd44a02485be1ab19e8380400cb5e --- /dev/null +++ b/mtklibs/libnr/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnr +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libnr.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnr +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libnr.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libnr/README b/mtklibs/libnr/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libnr/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libnr/arm/libnr.a b/mtklibs/libnr/arm/libnr.a new file mode 100755 index 0000000000000000000000000000000000000000..8b3724aaa4f1d1cf6bcf872e70e9b472fc0506e6 Binary files /dev/null and b/mtklibs/libnr/arm/libnr.a differ diff --git a/mtklibs/libnr/libnr.a b/mtklibs/libnr/libnr.a new file mode 100755 index 0000000000000000000000000000000000000000..20d95b6b13b037b602a7e7a88ec0febe8dca2699 Binary files /dev/null and b/mtklibs/libnr/libnr.a differ diff --git a/mtklibs/libnrsw/Android.mk_ b/mtklibs/libnrsw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..2e087e77d77b944da1013c271e6302a2ce37f824 --- /dev/null +++ b/mtklibs/libnrsw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnrsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libnrsw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnrsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libnrsw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libnrsw/README b/mtklibs/libnrsw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libnrsw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libnrsw/arm/libnrsw.a b/mtklibs/libnrsw/arm/libnrsw.a new file mode 100755 index 0000000000000000000000000000000000000000..ce6a0775076db5e594cfe3c70954f2fc4bfc3d48 Binary files /dev/null and b/mtklibs/libnrsw/arm/libnrsw.a differ diff --git a/mtklibs/libnrsw/libnrsw.a b/mtklibs/libnrsw/libnrsw.a new file mode 100755 index 0000000000000000000000000000000000000000..d52ecd7f25acbe8444d0cd3443f55993a75d5814 Binary files /dev/null and b/mtklibs/libnrsw/libnrsw.a differ diff --git a/mtklibs/libnrswneon/Android.mk_ b/mtklibs/libnrswneon/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d15a26ae7094aa6e8e82ef1cc4fef9a913119f5a --- /dev/null +++ b/mtklibs/libnrswneon/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnrswneon +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libnrswneon.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnrswneon +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libnrswneon.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libnrswneon/README b/mtklibs/libnrswneon/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libnrswneon/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libnrswneon/arm/libnrswneon.a b/mtklibs/libnrswneon/arm/libnrswneon.a new file mode 100755 index 0000000000000000000000000000000000000000..e19c5d00d8c65ec112da7afd24eac9642a0e071d Binary files /dev/null and b/mtklibs/libnrswneon/arm/libnrswneon.a differ diff --git a/mtklibs/libnrswneon/libnrswneon.a b/mtklibs/libnrswneon/libnrswneon.a new file mode 100755 index 0000000000000000000000000000000000000000..05f2bcefd934f2bb6a7bd327a993e8f1265c6741 Binary files /dev/null and b/mtklibs/libnrswneon/libnrswneon.a differ diff --git a/mtklibs/libnvram/Android.mk_ b/mtklibs/libnvram/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..9b4ec647239b7fefd5a3d68d1e97dbb3c66bfdb4 --- /dev/null +++ b/mtklibs/libnvram/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnvram +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libcustom_nvram libnvram_platform libnvram_sec libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libnvram.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnvram +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libcustom_nvram libnvram_platform libnvram_sec libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libnvram.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libnvram/README b/mtklibs/libnvram/README new file mode 100755 index 0000000000000000000000000000000000000000..86068aefdb49a12eca03969fd164f6475a7bb2a2 --- /dev/null +++ b/mtklibs/libnvram/README @@ -0,0 +1,34 @@ +This directory contains NvRAM libnvram interface, which defines the interface of +libnvram and is used to build a libnvram shared library. + + +WHAT IT DOES? +============= +It provide interface to access NvRAM data which need by modules like WIFI/BT etc. + +HOW IT WAS BUILT? +================== + +It needs the following libs from AOSP: +1. libc.so +2. libcutils.so + +and the following libs from MediaTek: +1. libcustom_nvram.so +2. libnvram_sec.so +3. libnvram_platform.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a shared library 'libnvram.so'. + +The shared library 'libnvram.so' is called by +NvRAM user which like WIFI/BT modules to access coresponed factory data. + + diff --git a/mtklibs/libnvram/arm/libnvram.so b/mtklibs/libnvram/arm/libnvram.so new file mode 100755 index 0000000000000000000000000000000000000000..4bc6e7316fa83be309622804ceeb02b1ab689437 Binary files /dev/null and b/mtklibs/libnvram/arm/libnvram.so differ diff --git a/mtklibs/libnvram/libnvram.so b/mtklibs/libnvram/libnvram.so new file mode 100755 index 0000000000000000000000000000000000000000..30e0f088afe7529c7f9c3c9d106c6f036001cdba Binary files /dev/null and b/mtklibs/libnvram/libnvram.so differ diff --git a/mtklibs/libnvram_platform/Android.mk_ b/mtklibs/libnvram_platform/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..394c264217d12eaeb2d796ab33e724a5c5b4d7a4 --- /dev/null +++ b/mtklibs/libnvram_platform/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnvram_platform +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libnvram_platform.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnvram_platform +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libnvram_platform.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libnvram_platform/NOTICE b/mtklibs/libnvram_platform/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..f28eabd18ec9b922791142ecc0ec008f4e4c3057 --- /dev/null +++ b/mtklibs/libnvram_platform/NOTICE @@ -0,0 +1,3 @@ +This MediaTek software package contains software with the following notices and under the following licenses: + +============================================================================= diff --git a/mtklibs/libnvram_platform/README b/mtklibs/libnvram_platform/README new file mode 100755 index 0000000000000000000000000000000000000000..776e5942d48d6d51da298f3060815b1ce270d823 --- /dev/null +++ b/mtklibs/libnvram_platform/README @@ -0,0 +1,22 @@ +The library file nvram_platform is a share library. +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= + +libnvram_platform is a share library which offer a interface for querying nvram layout + + +HOW IT WAS BUILT? +================== +depend on library libc libcutils +need to include header file in +$(MTK_PATH_SOURCE)/external/meta/common/inc\ +$(MTK_PATH_SOURCE)/external/nvram/libnvram + +HOW TO USE IT? +============== + +use nvram_platform_callback(NVRAM_PLATFORM_T* pPlatform) to query nvram layout +include this share library by adding LOCAL_SHARED_LIBRARIES in your Android.mk diff --git a/mtklibs/libnvram_platform/arm/libnvram_platform.so b/mtklibs/libnvram_platform/arm/libnvram_platform.so new file mode 100755 index 0000000000000000000000000000000000000000..918e5bafa63233579aec41ceac6aa6568ddb568e Binary files /dev/null and b/mtklibs/libnvram_platform/arm/libnvram_platform.so differ diff --git a/mtklibs/libnvram_platform/libnvram_platform.so b/mtklibs/libnvram_platform/libnvram_platform.so new file mode 100755 index 0000000000000000000000000000000000000000..6fee3a644f073ec80b6cef5b827c87d1b243f335 Binary files /dev/null and b/mtklibs/libnvram_platform/libnvram_platform.so differ diff --git a/mtklibs/libnvram_sec/Android.mk_ b/mtklibs/libnvram_sec/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..67c38dc6d34e21e976249c54eb0925a908257248 --- /dev/null +++ b/mtklibs/libnvram_sec/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnvram_sec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libcustom_nvram libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libnvram_sec.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnvram_sec +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libcustom_nvram libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libnvram_sec.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libnvram_sec/NOTICE b/mtklibs/libnvram_sec/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..3a1cc4b82cfbc6a38722331575a59a837c7a9135 --- /dev/null +++ b/mtklibs/libnvram_sec/NOTICE @@ -0,0 +1,38 @@ +This MediaTek software package contains software with the following notices and under the following licenses: + +============================================================================= + +/***************************************************************************** + * Copyright Statement: + * -------------------- + * This software is protected by Copyright and the information contained + * herein is confidential. The software may not be copied and the information + * contained herein may not be used or disclosed except with the written + * permission of MediaTek Inc. (C) 2008 + * + * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO + * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S + * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. + * + * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE + * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE + * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF + * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND + * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER + * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). + * + *****************************************************************************/ diff --git a/mtklibs/libnvram_sec/README b/mtklibs/libnvram_sec/README new file mode 100755 index 0000000000000000000000000000000000000000..b988b94f6f9745ee987fbdb52b300fca7fc5b11a --- /dev/null +++ b/mtklibs/libnvram_sec/README @@ -0,0 +1,36 @@ +This directory contains NvRAM libfile_op interface, which defines the interface of +libfile_op and is used to build a libfile_op related shared library. + + +WHAT IT DOES? +============= +It provide interface to backup NvRAM data to backup partition. +and restore NvRAM partition when fielsystem is empty. +Without NvRAM backup or restore feature, factory data maybe lost in some +case. + + +HOW IT WAS BUILT? +================== + +It needs the following libs from AOSP: +1. libc.so +2. libcutils.so + +and the following libs from MediaTek: +1. libcustom_nvram.so + + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a shared library 'libnvram_sec.so'. + +The shared library 'libnvram_sec.so' is called by API of libnvram.so, is used to secure that data is correct. + + diff --git a/mtklibs/libnvram_sec/arm/libnvram_sec.so b/mtklibs/libnvram_sec/arm/libnvram_sec.so new file mode 100755 index 0000000000000000000000000000000000000000..b4a484cbb729d09c2b8981105a0034cb915698fc Binary files /dev/null and b/mtklibs/libnvram_sec/arm/libnvram_sec.so differ diff --git a/mtklibs/libnvram_sec/libnvram_sec.so b/mtklibs/libnvram_sec/libnvram_sec.so new file mode 100755 index 0000000000000000000000000000000000000000..2836fd897db53543e4037a2972dee012ed9f273a Binary files /dev/null and b/mtklibs/libnvram_sec/libnvram_sec.so differ diff --git a/mtklibs/libnvramagentclient/Android.mk_ b/mtklibs/libnvramagentclient/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..b34a75156938d78a5e5bbc9caf159bc493f084cb --- /dev/null +++ b/mtklibs/libnvramagentclient/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnvramagentclient +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libbinder libnvram libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libnvramagentclient.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libnvramagentclient +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libnvram libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libnvramagentclient.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libnvramagentclient/README b/mtklibs/libnvramagentclient/README new file mode 100755 index 0000000000000000000000000000000000000000..50ae09c1742d86a452c563b5d80449253e95138f --- /dev/null +++ b/mtklibs/libnvramagentclient/README @@ -0,0 +1,27 @@ +Library of Drm features, including read mac address. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libnvramagentclient will be used by drmutil, it contains get mac address. +Without them, drm can not get mac address, and drm will be fail. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils.so +2. libcutils.so +3. libdl.so +4. libbinder.so +5. libnvram.so +6. libcrypto.so + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libnvramagentclient provides read mac function of drm, it is used by libdrmmtkutil.so. diff --git a/mtklibs/libnvramagentclient/arm/libnvramagentclient.so b/mtklibs/libnvramagentclient/arm/libnvramagentclient.so new file mode 100755 index 0000000000000000000000000000000000000000..9d02182b07091733963630f0334ec975fe85747b Binary files /dev/null and b/mtklibs/libnvramagentclient/arm/libnvramagentclient.so differ diff --git a/mtklibs/libnvramagentclient/libnvramagentclient.so b/mtklibs/libnvramagentclient/libnvramagentclient.so new file mode 100755 index 0000000000000000000000000000000000000000..5fc81d411abf28b184e91e8bbf4bb60b45d4f56f Binary files /dev/null and b/mtklibs/libnvramagentclient/libnvramagentclient.so differ diff --git a/mtklibs/liboemcrypto_L1/Android.mk_ b/mtklibs/liboemcrypto_L1/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..44edf49e539d34bec9d91067de9af6b75387b1fe --- /dev/null +++ b/mtklibs/liboemcrypto_L1/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = liboemcrypto_L1 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/liboemcrypto_L1.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/liboemcrypto_L1/README b/mtklibs/liboemcrypto_L1/README new file mode 100755 index 0000000000000000000000000000000000000000..f55a559b77116548ddc6cf663c04d2ab80ff3de3 --- /dev/null +++ b/mtklibs/liboemcrypto_L1/README @@ -0,0 +1,22 @@ +Library of Drm features, including api to call tee. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +liboemcrypto_L1 will be used by liboemcrypto, it calls tee to implement functions. +Without them, classic drm will not work. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils.so + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +liboemcrypto_L1 provides interface of tee method, it is built library. diff --git a/mtklibs/liboemcrypto_L1/arm/liboemcrypto_L1.a b/mtklibs/liboemcrypto_L1/arm/liboemcrypto_L1.a new file mode 100755 index 0000000000000000000000000000000000000000..94ddc757fcc9e0b2d733cb99e6488cd2e751359d Binary files /dev/null and b/mtklibs/liboemcrypto_L1/arm/liboemcrypto_L1.a differ diff --git a/mtklibs/liboemcrypto_L3/Android.mk_ b/mtklibs/liboemcrypto_L3/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..7a7529a6073eef6a0c5640f73100e01c45ae4bb6 --- /dev/null +++ b/mtklibs/liboemcrypto_L3/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = liboemcrypto_L3 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/liboemcrypto_L3.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/liboemcrypto_L3/README b/mtklibs/liboemcrypto_L3/README new file mode 100755 index 0000000000000000000000000000000000000000..10727c0719f81c2115fdbaa59e9eac6a42772f55 --- /dev/null +++ b/mtklibs/liboemcrypto_L3/README @@ -0,0 +1,23 @@ +Library of Drm features, including api to implement functions. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +liboemcrypto_L3 will be used by liboemcrypto, it implement crypto functions. +Without them, classic drm will not work. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils.so + +and the following libs from MediaTek: +1. libdrmmtkutil.so + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +liboemcrypto_L3 provides interface of crypto method, it is built library. diff --git a/mtklibs/liboemcrypto_L3/arm/liboemcrypto_L3.a b/mtklibs/liboemcrypto_L3/arm/liboemcrypto_L3.a new file mode 100755 index 0000000000000000000000000000000000000000..aa43d33c0f131bec0d4d1f95fbe78ecd4574a2c4 Binary files /dev/null and b/mtklibs/liboemcrypto_L3/arm/liboemcrypto_L3.a differ diff --git a/mtklibs/liboemcrypto_static/Android.mk_ b/mtklibs/liboemcrypto_static/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..bd3c4ff057e54a59aa9ac955b59b9ea46fcd532c --- /dev/null +++ b/mtklibs/liboemcrypto_static/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = liboemcrypto_static +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/liboemcrypto_static.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/liboemcrypto_static/README b/mtklibs/liboemcrypto_static/README new file mode 100755 index 0000000000000000000000000000000000000000..de93c3c3738f157269acea2555730510e1298762 --- /dev/null +++ b/mtklibs/liboemcrypto_static/README @@ -0,0 +1,28 @@ +Library of Drm features, including oemcrypt api for DRM L1. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +liboemcrypto will be used by drm, including mtk in-house tee & trustonic tee. +Without them, classic drm L1 will not work. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libcrypto.so +2. libcutils.so +3. libdl.so +4. liblog.so +5. libstlport.so +6. libutils.so +7. libz.so + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +liboemcrypto provides interface of drm L1, it is built library. diff --git a/mtklibs/liboemcrypto_static/arm/liboemcrypto_static.a b/mtklibs/liboemcrypto_static/arm/liboemcrypto_static.a new file mode 100755 index 0000000000000000000000000000000000000000..64e4968443f74960837839ed90d35b516be78310 Binary files /dev/null and b/mtklibs/liboemcrypto_static/arm/liboemcrypto_static.a differ diff --git a/mtklibs/libot/Android.mk_ b/mtklibs/libot/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a57730bd78b0ee8af4a2d6c8e36fdc08adbb7cb9 --- /dev/null +++ b/mtklibs/libot/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libot +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libot.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libot +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libot.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libot/README b/mtklibs/libot/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libot/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libot/arm/libot.a b/mtklibs/libot/arm/libot.a new file mode 100755 index 0000000000000000000000000000000000000000..feff96fd54d4889f07df904e2539e9fbcf803451 Binary files /dev/null and b/mtklibs/libot/arm/libot.a differ diff --git a/mtklibs/libot/libot.a b/mtklibs/libot/libot.a new file mode 100755 index 0000000000000000000000000000000000000000..8b9be443ab308382f254e4d09d30e8233f587bac Binary files /dev/null and b/mtklibs/libot/libot.a differ diff --git a/mtklibs/libpano3dsw/Android.mk_ b/mtklibs/libpano3dsw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..3c9ca00c3133987e42043c79e132b32506a139e3 --- /dev/null +++ b/mtklibs/libpano3dsw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libpano3dsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libpano3dsw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libpano3dsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libpano3dsw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libpano3dsw/README b/mtklibs/libpano3dsw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libpano3dsw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libpano3dsw/arm/libpano3dsw.a b/mtklibs/libpano3dsw/arm/libpano3dsw.a new file mode 100755 index 0000000000000000000000000000000000000000..6ed8adb3fa9daa12b8926174d9d327465b52e613 Binary files /dev/null and b/mtklibs/libpano3dsw/arm/libpano3dsw.a differ diff --git a/mtklibs/libpano3dsw/libpano3dsw.a b/mtklibs/libpano3dsw/libpano3dsw.a new file mode 100755 index 0000000000000000000000000000000000000000..d186d7b3943fab595d1388ba222accadf3a2c097 Binary files /dev/null and b/mtklibs/libpano3dsw/libpano3dsw.a differ diff --git a/mtklibs/libperfservice/Android.mk_ b/mtklibs/libperfservice/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..86b6af90b27f6ed767edea4bb34f9b9cd48359e8 --- /dev/null +++ b/mtklibs/libperfservice/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libperfservice +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libperfservice.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libperfservice +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libperfservice.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libperfservice/README b/mtklibs/libperfservice/README new file mode 100755 index 0000000000000000000000000000000000000000..d14a71c01ecb0dabe68335ab3bce6d34559e83e6 --- /dev/null +++ b/mtklibs/libperfservice/README @@ -0,0 +1,23 @@ +Library of MTK performance feature. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libperservice.so contains MediaTek developed performance enhancement. +User can control cpu core, cpu freq and gpu freq + +HOW IT WAS BUILT? +================== +It needs the following libs from AOSP: +1. libc.so +2. libcutils.so +3. libdl.so + +HOW TO USE IT? +============== +Provide api for user space to control cpu core, cpu freq and gpu freq +all api interface are at (vendor/mediatek/proprietary/external/perfservicenative/) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libperfservice/arm/libperfservice.so b/mtklibs/libperfservice/arm/libperfservice.so new file mode 100755 index 0000000000000000000000000000000000000000..e0b32632cc232eccb1dffb9485acb3ddcebb4ef6 Binary files /dev/null and b/mtklibs/libperfservice/arm/libperfservice.so differ diff --git a/mtklibs/libperfservice/libperfservice.so b/mtklibs/libperfservice/libperfservice.so new file mode 100755 index 0000000000000000000000000000000000000000..b41c8fe40c103c49fc57ddf73e829a3ca7633471 Binary files /dev/null and b/mtklibs/libperfservice/libperfservice.so differ diff --git a/mtklibs/libpq_prot/Android.mk_ b/mtklibs/libpq_prot/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a6a1727c92dc0ddbe4dfcce82a5fc12df8a6efd1 --- /dev/null +++ b/mtklibs/libpq_prot/Android.mk_ @@ -0,0 +1,27 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libpq_prot +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libpq_prot.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libpq_prot +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libc++ +LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)/include +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libpq_prot.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libpq_prot/README b/mtklibs/libpq_prot/README new file mode 100755 index 0000000000000000000000000000000000000000..df0feb0c8f89184ac0a07b9044d4d0ab70f0154e --- /dev/null +++ b/mtklibs/libpq_prot/README @@ -0,0 +1,16 @@ +WHAT IT DOES? +============= +libpq_prot.so is the core library of MediaTek PQ implementation. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libutils.so +2. libcutils.so +3. libdl.so + +HOW TO USE IT? +============== +Will be linked with the pq executable and any other modules need to +control PQ. + diff --git a/mtklibs/libpq_prot/arm/libpq_prot.so b/mtklibs/libpq_prot/arm/libpq_prot.so new file mode 100755 index 0000000000000000000000000000000000000000..6e6c5ed85193715bad2dd96ea08178bfb22ff077 Binary files /dev/null and b/mtklibs/libpq_prot/arm/libpq_prot.so differ diff --git a/mtklibs/libpq_prot/include/BluLight_Defender.h b/mtklibs/libpq_prot/include/BluLight_Defender.h new file mode 100755 index 0000000000000000000000000000000000000000..415786da9da93a501bc4f1442b5d374b7a7f22c8 --- /dev/null +++ b/mtklibs/libpq_prot/include/BluLight_Defender.h @@ -0,0 +1,72 @@ +#ifndef __BLULIGHT_DEFENDER_H__ +#define __BLULIGHT_DEFENDER_H__ + +#define CLR_PARTIAL_Y_SIZE 16 +#define CLR_PQ_PARTIALS_CONTROL 5 +#define CLR_PURP_TONE_SIZE 3 +#define CLR_SKIN_TONE_SIZE 8 +#define CLR_GRASS_TONE_SIZE 6 +#define CLR_SKY_TONE_SIZE 3 + +struct ColorRegisters { + unsigned short GLOBAL_SAT ; + unsigned short CONTRAST ; + unsigned short BRIGHTNESS ; + unsigned char PARTIAL_Y [CLR_PARTIAL_Y_SIZE]; + unsigned char PURP_TONE_S [CLR_PQ_PARTIALS_CONTROL][CLR_PURP_TONE_SIZE]; + unsigned char SKIN_TONE_S [CLR_PQ_PARTIALS_CONTROL][CLR_SKIN_TONE_SIZE]; + unsigned char GRASS_TONE_S [CLR_PQ_PARTIALS_CONTROL][CLR_GRASS_TONE_SIZE]; + unsigned char SKY_TONE_S [CLR_PQ_PARTIALS_CONTROL][CLR_SKY_TONE_SIZE]; + unsigned char PURP_TONE_H [CLR_PURP_TONE_SIZE]; + unsigned char SKIN_TONE_H [CLR_SKIN_TONE_SIZE]; + unsigned char GRASS_TONE_H [CLR_GRASS_TONE_SIZE]; + unsigned char SKY_TONE_H [CLR_SKY_TONE_SIZE]; + unsigned int CCORR_COEF [3][3]; +}; + +struct BluLightInitParam { + unsigned int reserved; // not used +}; + +struct BluLightReg; + +class BluLightDefender { +private: + bool m_isEnabled; + int m_strength; + unsigned int m_debugFlag; + + BluLightReg *BLReg; +public: + + BluLightDefender(); + ~BluLightDefender(); + + void setEnabled(bool enabled) { + m_isEnabled = enabled; + } + + bool isEnabled() { + return m_isEnabled; + } + + void setStrength(int strength); // 0 ~ 255 + + int getStrength() { + return m_strength; + } + void onInitCommon(const BluLightInitParam &initParam); + void onInitPlatform(const BluLightInitParam &initParam); + void onCalculate(const ColorRegisters &input, ColorRegisters *output); + + void setDebugFlag(unsigned int debugFlag) { + m_debugFlag = debugFlag; + } + + // Return true if success + bool setTuningField(int field, unsigned int value); + bool getTuningField(int field, unsigned int *value); + +}; + +#endif diff --git a/mtklibs/libpq_prot/include/PQDCHistogram.h b/mtklibs/libpq_prot/include/PQDCHistogram.h new file mode 100755 index 0000000000000000000000000000000000000000..e3679c9f68357f65fea5d78e20b44e2a6e2ade52 --- /dev/null +++ b/mtklibs/libpq_prot/include/PQDCHistogram.h @@ -0,0 +1,48 @@ +#ifndef DYNCHIST_H_ +#define DYNCHIST_H_ + +#include + +#define ADL_ANDROID_PLATFORM + +#define DCHIST_INFO_NUM 20 + +// Input structure of Dynamic Contrast for still image +struct DynCInput { + unsigned char * pSrcFB; // Input frame (1D array) + int iWidth; // Input frame width + int iHeight; // Input frame height +}; + +// Output structure of Dynamic Contrast for still image +struct DynCOutput { + unsigned int Info[DCHIST_INFO_NUM]; +}; +// Dynamic Contrast FW registers +struct DynCReg { + int w1_param1; + int w1_param2; + int w1_param3; + int w1_param4; +}; + +class CPQDCHistogram +{ +private: + void Initialize(); + + bool DebugEnable; + +public: + CPQDCHistogram(); + ~CPQDCHistogram(); + void Main(const DynCInput &input, DynCOutput * output); + + DynCReg * pDynCReg; + +#ifndef ADL_ANDROID_PLATFORM + FILE * ifp1; +#endif + +}; +#endif diff --git a/mtklibs/libpq_prot/include/PQDCImpl.h b/mtklibs/libpq_prot/include/PQDCImpl.h new file mode 100755 index 0000000000000000000000000000000000000000..68245808e020e266f44282d6c1835644ab6e87f0 --- /dev/null +++ b/mtklibs/libpq_prot/include/PQDCImpl.h @@ -0,0 +1,272 @@ +#ifndef __PQDCIMPL_H__ +#define __PQDCIMPL_H__ + +/* +* header files +*/ + +#define ADL_ANDROID_PLATFORM + +#define DYN_CONTRAST_VERSION 1 //0:Jade, 1:Everest + + +#define LUMA_BIT 9 +#define LUMA_POINT_BIT 4 // For ( 17 = 2^4 + 1 ) points +#define LUMA_INTERVAL_BIT ((LUMA_BIT)-(LUMA_POINT_BIT)) // For 17 points +#define LUMA_INTERVAL ( 1 << ( LUMA_INTERVAL_BIT ) ) // For 17 points +#define LUMA_MAX (1<<(LUMA_BIT)) + +#define LUMA_HIST_NUM ( 1 << ( LUMA_POINT_BIT ) ) +#define LUMA_HIST_NUM_WEIGHT ( LUMA_HIST_NUM + 1 ) +#define LUMA_CURVE_NUM ( LUMA_HIST_NUM + 1 ) + +#define LUMA_HIST_NORM_BASE_BIT 9 +#define LUMA_HIST_NORM_BASE ( 1 << LUMA_HIST_NORM_BASE_BIT ) +#define LUMA_HIST_NUM_TRUNCATE LUMA_HIST_NUM + +#define BLACK_WHITE_NUM ( LUMA_HIST_NUM / 2 ) + +#define FIR_NUM 9 +#define FIR_NUM_WEIGHT 8 + +#define Y_GAMMA_NUM 257 + +#define SKIN_NORM_BASE 256 +#define SKIN_WGT_SLOPE_BIT 4 +#define SKIN_WGT_BIT 8 +#define SKIN_WGT_MAX ( 1 << ( SKIN_WGT_BIT ) ) +#define SKIN_CHANGE_WITH_LUMA_BIT 3 +#define SKIN_CHANGE_WITH_LUMA_BIT_ROUND ( 1 << ( SKIN_CHANGE_WITH_LUMA_BIT - 1 ) ) + +enum ADLDebugFlags { + eADLDebugDisabled = 0x0, + eADLDebugInput = 0x1, + eADLDebugOutput = 0x2, + eADLDebugTime = 0x4, + eADLDebugContent = 0x8, + eADLDebugAll = 0xFF +}; + +typedef unsigned int uint32_t; +typedef unsigned short uint16_t; +typedef unsigned char uint8_t; +typedef signed int int32_t; + + +#ifndef ADL_ANDROID_PLATFORM + #define ADAPTIVE_LUMA_DEBUG2_EN 1 // Debug switch for ADL FW +#endif + +// Initial register values to ADL HW +struct ADLInitReg { + uint32_t useless; // To pass compilation +}; + +// Initial param to ADL HW +struct ADLInitParam { + uint32_t useless; // To pass compilation +}; + +// Fields collected from ADL HW +struct ADLInput { + uint32_t LumaHist[LUMA_HIST_NUM_WEIGHT]; + uint32_t LumaSum; + uint32_t ColorHist; + uint32_t ImgArea; + uint8_t LmtFullSwitch; // 0: limited, 1: full + uint8_t VideoImgSwitch; // 0: Video, 1: Image + uint8_t dync_cboost_yoffset; +#if DYN_CONTRAST_VERSION == 0 +#else + uint8_t tdshp_cboost_yoffset; +#endif +}; + +// Fields which will be set to HW registers +struct ADLOutput { + uint16_t LumaCurve[LUMA_CURVE_NUM]; + uint8_t dync_cboost_yoffset; +#if DYN_CONTRAST_VERSION == 0 +#else + uint8_t tdshp_cboost_yoffset; +#endif +}; + + +// ADL FW registers +struct ADLReg { + // On & Off Switch + uint8_t bALOnOff; + uint8_t bBSOnOff; + uint8_t bWSOnOff; + uint8_t bStrongBSOffset; + uint8_t bStrongWSOffset; + uint8_t bBSAdaptiveLmt; // Blending with Dynamic Ratio according to BS Index + uint8_t bWSAdaptiveLmt; // Blending with Dynamic Ratio according to WS Index + + // Full Range Setup + uint8_t bLevelLowBnd; + uint8_t bLevelHighBnd; + + // Scene Change Param + uint8_t bADLSceneChange; + uint8_t bForceScenceChangeEn; // For debug + uint8_t bForceScenceChange2En; // To control scene change + uint8_t bForceScenceChange2; // Scene change type + uint8_t bMaxDiffThreshold; + uint8_t bTotalDiffThreshold; + uint8_t bAPLDiffThreshold; + + // Histogram FIR Weight + uint32_t bADLWeight1; + uint32_t bADLWeight2; + uint32_t bADLWeight3; + + // Mid Param + uint8_t bMIDACGain; + uint8_t bMIDDCGain; + + // BS Basic Param + uint8_t bBSDCGain; + uint8_t bBSACGain; + uint8_t bBSLevel; + uint8_t bBSRatio; + + // BS Offset Param + uint8_t bBSOffsetThL; // Input threshold + uint8_t bBSOffsetThH; // Input threshold + uint8_t bBSOffsetL; // Output threshold + uint8_t bBSOffsetH; // Output threshold + + // WS Basic Param + uint8_t bWSDCGain; + uint8_t bWSACGain; + uint8_t bWSLevel; + uint8_t bWSRatio; + + // WS Offset Param + uint8_t bWSOffsetThL; // Input threshold + uint8_t bWSOffsetThH; // Input threshold + uint8_t bWSOffsetL; // Output threshold + uint8_t bWSOffsetH; // Output threshold + + // YGamma + uint8_t bYGammaIdx1; + uint8_t bYGammaIdx2; + + // IIR + uint8_t bIIRStrength; + + // Spike Fallback Protection + uint8_t bSpikeWeightLowBnd; + uint32_t bSpikeThLow; + uint32_t bSpikeThHigh; + uint8_t bSpikeBlendmethod; + uint8_t bIIRStrengthSpike; + + // Skin processing + uint8_t bSkinBlendmethod; + uint8_t bIIRStrengthSkin; + uint32_t bSkinWgtSlope; +}; + + +/////////////////////////////////////////////////////////////////////////////// +// ADL FW Processing class +/////////////////////////////////////////////////////////////////////////////// +class CPQDCFW +{ + /* ........Adaptive Luma Process, functions......... */ +public: + + CPQDCFW(); + ~CPQDCFW(); +#ifdef ADL_ANDROID_PLATFORM + void onCalculate(const ADLInput &input, ADLOutput *output); + void onInitPlatform(const ADLInitParam &initParam, ADLInitReg *initReg); +#else + void vDrvADLProc_int( const ADLInput &input, ADLOutput * output); +#endif + + + void setDebugFlags(unsigned int debug) { + DebugFlags = debug; + } + +private: + void ADLInitialize(void); + void LmtFullSettings1(uint8_t LmtFullSwitch, const uint32_t wHist[LUMA_HIST_NUM_WEIGHT], uint32_t waHistCur[LUMA_HIST_NUM_WEIGHT], ADLOutput * output); // + void HistLmt2Full( const uint32_t wHist[LUMA_HIST_NUM_WEIGHT], uint32_t waHistCur[LUMA_HIST_NUM_WEIGHT] ); // + void BasicInfoCal( uint32_t LumaSum, uint32_t ImgArea, uint32_t ColorHist, uint32_t * u4APL, uint32_t * u4SkinRatio ); + void u1DrvGetLumaHistWeight(const uint32_t wHist[LUMA_HIST_NUM_WEIGHT], uint16_t waHistCur[LUMA_HIST_NUM_WEIGHT], uint16_t u2NormBase); + void bHistogramNormalization(const uint32_t wHist[LUMA_HIST_NUM_WEIGHT], uint16_t waHistCur[LUMA_HIST_NUM_WEIGHT], uint8_t bDim, uint16_t wBase); + uint8_t bDrvADLDetectSceneChanged(const uint16_t wHistCur[LUMA_HIST_NUM_WEIGHT], uint32_t u4APL, uint8_t VideoImgSwitch); + void vDrvGetBlackWhiteIndex(const uint16_t waHistCur[LUMA_HIST_NUM_WEIGHT]); + void LocalHistEqualized(const uint16_t waHist[LUMA_HIST_NUM_WEIGHT], uint16_t waLumaCurve[LUMA_CURVE_NUM]); + void vDrvDynamicADLPara(void); + void vDrvDynamicBSOffset(void); + void vDrvDynamicWSOffset(void); + void vDrvADLBuildDefault(uint16_t wCurve[LUMA_CURVE_NUM]); + void LowPassFilter(uint32_t u4FIR[FIR_NUM]); + void HistFIR(const uint16_t waHistCur[LUMA_HIST_NUM_WEIGHT], uint16_t waLowPass[LUMA_HIST_NUM], uint32_t u4FIR[FIR_NUM] ); + void vDrvApplyUserCurve1(uint16_t* waFinalCurve, uint8_t bSel); + void vDrvApplyUserCurve2(uint16_t* waFinalCurve, uint8_t bSel); + void vDrvADLLumaCurveLowPass(const uint16_t waCurCurve[LUMA_CURVE_NUM], uint16_t waLumaCurve[LUMA_CURVE_NUM]); + + void vBuildSecondLumaCurve(const uint16_t waCurCurve[LUMA_CURVE_NUM], uint16_t waLumaCurve[LUMA_CURVE_NUM], uint32_t u4SkinRatio); + uint32_t vAdapSecondLumaWeight( uint32_t u4SkinRatio ); + void vSpikeLumaCurve(const uint16_t waCurCurve[LUMA_CURVE_NUM], uint16_t waLumaCurve[LUMA_CURVE_NUM], const uint16_t waHist[LUMA_HIST_NUM_WEIGHT]); + uint32_t vSpikeLumaWeight(const uint16_t waHist[LUMA_HIST_NUM_WEIGHT]); + void LmtFullSettings2(uint8_t LmtFullSwitch, uint16_t waCurCurve[LUMA_CURVE_NUM]); // + void CurveFull2Lmt(uint16_t waCurCurve[LUMA_CURVE_NUM]); // + + /* ........Adaptive Luma Process, variables......... */ +public: + ADLReg * pADLReg; + +#ifndef ADL_ANDROID_PLATFORM + FILE * ifp1; + FILE * ifp2; // wenwen +#endif + +private: + + uint32_t DebugFlags; + + uint32_t fullHist[LUMA_HIST_NUM_WEIGHT]; // + uint16_t waHist[LUMA_HIST_NUM_WEIGHT]; + uint16_t waCurCurve[LUMA_CURVE_NUM]; + uint16_t waLumaArray[LUMA_CURVE_NUM]; + uint16_t waLumaArray2[LUMA_CURVE_NUM]; + uint32_t u4APL; + uint32_t u4SkinRatio; + + // Histogram FIR Weight + uint8_t bParamChange; + + // BS_WS Index Param + uint8_t bBlackIndex; + uint8_t bWhiteIndex; + + // BS Offset Param + uint8_t bBSOffset; // Output result + + // WS Offset Param + uint8_t bWSOffset; // Output result + + // Previous luma curve : Add bits to prevent quantization error + uint32_t waTCurvePre[LUMA_CURVE_NUM]; + + // Previous average pixel level + uint32_t u4PreAPL; + + // Previous histogram + uint16_t wHistPre[LUMA_HIST_NUM_WEIGHT]; + + // previous skin ratio: Add bits to prevent quantization error + uint32_t u4SkinRatioPre; + // previous spike weight: Add bits to prevent quantization error + uint32_t u4SpikeWeightPre; +}; + +#endif //__PQDCIMPL_H__ diff --git a/mtklibs/libpq_prot/include/PQDSImpl.h b/mtklibs/libpq_prot/include/PQDSImpl.h new file mode 100755 index 0000000000000000000000000000000000000000..30d6f3b89cd1aca33b7e360269cf905dd1b7190f --- /dev/null +++ b/mtklibs/libpq_prot/include/PQDSImpl.h @@ -0,0 +1,212 @@ +#ifndef __PQDSIMPL_H__ +#define __PQDSIMPL_H__ + +/* +* header files +*/ + +#define DSHP_ANDROID_PLATFORM + +//#define DYN_SHARP_VERSION 1 //0:6755, 1:6797 + +typedef unsigned int uint32_t; +typedef unsigned short uint16_t; +typedef unsigned char uint8_t; +typedef signed int int32_t; + +// Initial register values to DS HW +struct DSInitReg { + uint32_t useless; // To pass compilation +}; + +struct DSHWReg { + uint16_t tdshp_gain_high; + uint16_t tdshp_gain_mid; + + uint16_t tdshp_coring_zero; + uint16_t tdshp_coring_thr; + uint16_t tdshp_softcoring_gain; + uint16_t tdshp_coring_value; + uint16_t tdshp_gain; +#if DYN_SHARP_VERSION == 0 +#else + uint16_t tdshp_high_coring_zero; + uint16_t tdshp_high_coring_thr; + uint16_t tdshp_high_softcoring_gain; + uint16_t tdshp_high_coring_value; + uint16_t tdshp_mid_coring_zero; + uint16_t tdshp_mid_coring_thr; + uint16_t tdshp_mid_softcoring_gain; + uint16_t tdshp_mid_coring_value; + + uint16_t edf_flat_th; + uint16_t edf_detail_rise_th; + uint16_t edf_edge_gain; +#endif + + uint16_t tdshp_clip_thr; + uint16_t tdshp_clip_ratio; +}; + +// Fields collected from DS HW +struct DSInput { + uint16_t SrcWidth; + uint16_t SrcHeight; + uint16_t DstWidth; + uint16_t DstHeight; + + uint8_t VideoImgSwitch; // 0: Video, 1: Image + + uint16_t inISOSpeed; + struct DSHWReg iHWReg; +}; + +// Fields which will be set to HW registers +struct DSOutput { + struct DSHWReg iHWReg; +}; + +// DS FW registers +struct DSReg { + int32_t DS_en; + + int32_t iUpSlope; // Range from -64 to 63 + int32_t iUpThreshold; // Range from 0 to 4095 + int32_t iDownSlope; // Range from -64 to 63 + int32_t iDownThreshold; // Range from 0 to 4095 + + uint16_t iISO_en; + uint16_t iISO_thr1; + uint16_t iISO_thr0; + uint16_t iISO_thr3; + uint16_t iISO_thr2; + uint16_t iISO_IIR_alpha; + + int32_t iCorZero_clip2; //Range from -255 to 255 + int32_t iCorZero_clip1; //Range from -255 to 255 + int32_t iCorZero_clip0; //Range from -255 to 255 + int32_t iCorThr_clip2; //Range from -255 to 255 + int32_t iCorThr_clip1; //Range from -255 to 255 + int32_t iCorThr_clip0; //Range from -255 to 255 + int32_t iCorGain_clip2; //Range from -255 to 255 + int32_t iCorGain_clip1; //Range from -255 to 255 + int32_t iCorGain_clip0; //Range from -255 to 255 + int32_t iGain_clip2; //Range from -255 to 255 + int32_t iGain_clip1; //Range from -255 to 255 + int32_t iGain_clip0; //Range from -255 to 255 +#if DYN_SHARP_VERSION == 0 +#else + int32_t iHighCorZero_clip2; //Range from -255 to 255 + int32_t iHighCorZero_clip1; //Range from -255 to 255 + int32_t iHighCorZero_clip0; //Range from -255 to 255 + int32_t iHighCorThr_clip2; //Range from -255 to 255 + int32_t iHighCorThr_clip1; //Range from -255 to 255 + int32_t iHighCorThr_clip0; //Range from -255 to 255 + int32_t iHighCorGain_clip2; //Range from -255 to 255 + int32_t iHighCorGain_clip1; //Range from -255 to 255 + int32_t iHighCorGain_clip0; //Range from -255 to 255 + + int32_t iMidCorZero_clip2; //Range from -255 to 255 + int32_t iMidCorZero_clip1; //Range from -255 to 255 + int32_t iMidCorZero_clip0; //Range from -255 to 255 + int32_t iMidCorThr_clip2; //Range from -255 to 255 + int32_t iMidCorThr_clip1; //Range from -255 to 255 + int32_t iMidCorThr_clip0; //Range from -255 to 255 + int32_t iMidCorGain_clip2; //Range from -255 to 255 + int32_t iMidCorGain_clip1; //Range from -255 to 255 + int32_t iMidCorGain_clip0; //Range from -255 to 255 + + int32_t i_edf_flat_th_clip2; //Range from -255 to 255 + int32_t i_edf_flat_th_clip1; //Range from -255 to 255 + int32_t i_edf_flat_th_clip0; //Range from -255 to 255 + int32_t i_edf_detail_rise_th_clip2; //Range from -255 to 255 + int32_t i_edf_detail_rise_th_clip1; //Range from -255 to 255 + int32_t i_edf_detail_rise_th_clip0; //Range from -255 to 255 +#endif + + //UltraResolution registers + int32_t iUltraRes_en; //u1.0 + int32_t iUltraRes_ratio_thr2; //u16.0 + int32_t iUltraRes_ratio_thr1; //u16.0 + int32_t iUltraRes_ratio_thr0; //u16.0 + int32_t iUltraRes_gain_mid_clip1; //9-bit s8.0 + int32_t iUltraRes_gain_mid_clip0; //9-bit s8.0 + int32_t iUltraRes_gain_high_clip1; //9-bit s8.0 + int32_t iUltraRes_gain_high_clip0; //9-bit s8.0 +#if DYN_SHARP_VERSION == 0 +#else + int32_t iUltraRes_edf_edge_gain_clip1; //9-bit s8.0 + int32_t iUltraRes_edf_edge_gain_clip0; //9-bit s8.0 +#endif + int32_t iUltraRes_clip_thr_clip1; //9-bit s8.0 + int32_t iUltraRes_clip_thr_clip0; //9-bit s8.0 + int32_t iUltraRes_clip_ratio_clip1; //9-bit s8.0 + int32_t iUltraRes_clip_ratio_clip0; //9-bit s8.0 + +}; + + +/////////////////////////////////////////////////////////////////////////////// +// DS FW Processing class +/////////////////////////////////////////////////////////////////////////////// +class CPQDSFW +{ + + /* ........Dynamic Sharpness Process, functions......... */ +public: + +#ifdef DSHP_ANDROID_PLATFORM + void onCalculate(const DSInput *input, DSOutput *output); + void onInitPlatform(void); +#else + void vDrvDSProc_int(const DSInput * input, DSOutput * output); +#endif + + + void DSInitialize(void); + //int32_t IsoAdpGetReg(int32_t delta_iso, int32_t reg, int32_t reg_clip, int32_t reg_slope, int32_t reg_shift, int32_t reg_min, int32_t reg_max); + int32_t UltraResGetReg( + int32_t in_scl_ratio, + int32_t in_value, + int32_t reg_ultra_res_thr0, + int32_t reg_ultra_res_thr1, + int32_t reg_ultra_res_thr2, + int32_t reg_clip1, + int32_t reg_clip2, + int32_t reg_min, + int32_t reg_max + ); + int32_t IsoAdpGetReg( + int32_t in_iso, + int32_t in_value, + int32_t reg_iso_thr0, + int32_t reg_iso_thr1, + int32_t reg_iso_thr2, + int32_t reg_iso_thr3, + int32_t reg_clip1, + int32_t reg_clip2, + int32_t reg_clip3, + int32_t reg_min, + int32_t reg_max + ); + int32_t IsoAdpGetCorValue(int32_t zero_thr, int32_t coring_thr, int32_t gain, int32_t cor_gain); + int32_t IsoAdpAlphaBlending(int32_t data1, int32_t data2, int32_t alpha, int32_t bits); + + CPQDSFW(); + + ~CPQDSFW(); + +private: + + /* ........Dynamic Sharpness Process, variables......... */ +public: + DSReg * pDSReg; + +private: + DSInput oldInput; + DSOutput oldOutput; + + uint16_t iISOSpeedIIR; +}; + +#endif //__PQDSIMPL_H__ diff --git a/mtklibs/libpq_prot/include/PQRszImpl.h b/mtklibs/libpq_prot/include/PQRszImpl.h new file mode 100755 index 0000000000000000000000000000000000000000..ca9a7396e1ce8b17653f71cecdc37f1eb7492a47 --- /dev/null +++ b/mtklibs/libpq_prot/include/PQRszImpl.h @@ -0,0 +1,232 @@ +#ifndef __PQRSZIMPL_H__ +#define __PQRSZIMPL_H__ + +#include +#include +#include + +#ifndef RSZ_VERSION + #define RSZ_VERSION RSZ_VER_EVEREST + #define RSZ_VER_EVEREST 0 + #define RSZ_VER_ROCKY 1 + #define RSZ_VER_WHITNEY 2 + #define RSZ_VER_ELBRUS 3 +#endif + +#ifndef RESZIER_6TAP_STEPCOUNTER_BIT + #define RESZIER_6TAP_STEPCOUNTER_BIT 15 +#endif + +#define RSZ_ANDROID_PLATFORM + +typedef unsigned int uint32_t; +typedef unsigned short uint16_t; +typedef unsigned char uint8_t; +typedef signed int int32_t; + +// Initial register values to Resizer HW +struct RszInitReg { + uint32_t reserved; // To pass compilation +}; + +// Initial parameter to Resizer HW +struct RszInitParam { + uint32_t reserved; // To pass compilation +}; + +// Fields collected from Resizer HW +struct RszInput { + uint16_t srcWidth; + uint16_t srcHeight; + uint16_t dstWidth; + uint16_t dstHeight; + uint16_t cropOffsetX; + uint32_t cropSubpixX; + uint16_t cropOffsetY; + uint32_t cropSubpixY; + uint16_t cropWidth; + uint16_t cropHeight; + + uint8_t enable; // = 1; + uint8_t yuv422Tyuv444; // = 0; + uint8_t demoEnable; // = 0; + + // Demo Window + uint16_t demoOutHStart; + uint16_t demoOutHEnd; + uint16_t demoOutVStart; + uint16_t demoOutVEnd; + +#if (RSZ_VERSION == RSZ_VER_WHITNEY) + // 8b or 10b mode + uint8_t powerSavingMode; +#endif +}; + +// Fields which will be set to HW registers +struct RszOutput { + uint8_t rszEnable; + uint8_t horEnable; + uint8_t verEnable; + uint8_t verticalFirst; + uint8_t horAlgo; + uint8_t verAlgo; + uint8_t horTable; + uint8_t verTable; + uint32_t precX; + uint32_t precY; + uint32_t coeffStepX; + uint32_t coeffStepY; + uint8_t IBSEEnable;//should not be used + uint8_t tapAdaptEnable; + + // demo window + uint16_t demoInHStart; + uint16_t demoInHEnd; + uint16_t demoInVStart; + uint16_t demoInVEnd; + + // offset + int32_t horLumaIntOffset; + int32_t horLumaSubOffset; + int32_t horChromaIntOffset; + int32_t horChromaSubOffset; + int32_t verLumaIntOffset; + int32_t verLumaSubOffset; + int32_t verChromaIntOffset; + int32_t verChromaSubOffset; + + // truncation of coefficients + uint8_t horTruncBit; + uint8_t verTruncBit; + +#if ((RSZ_VERSION==RSZ_VER_ELBRUS) | (RSZ_VERSION==RSZ_VER_WHITNEY)) + // truncation of coefficients + uint8_t verCubicTruncEn; + uint8_t verLumaCubicTruncBit; + uint8_t verChromaCubicTruncBit; + uint8_t horCubicTruncEn; + uint8_t horLumaCubicTruncBit; + uint8_t horChromaCubicTruncBit; +#endif + + //Ultra Resolution + uint8_t IBSEGainMid; + uint8_t IBSE_clip_thr; + uint8_t IBSE_clip_ratio; + uint8_t TapAdaptSlope; + +#if ((RSZ_VERSION==RSZ_VER_ELBRUS) | (RSZ_VERSION==RSZ_VER_WHITNEY)) + //C42, C24 control + uint8_t c24CropEn; + uint8_t c42odd2evenMode; + uint8_t c42LCropEn; + uint8_t c42InterpEn; +#endif +}; + +// Resizer FW registers +struct RszReg { + uint8_t tableMode; // rollback mode or not (Rome or Everest) + uint8_t defaultUpTable; // defaultTable for up scaling + uint8_t defaultDownTable; // defaultTable for down scaling + uint8_t autoTableSelection; // enable auto table selection + uint8_t autoAlignment; // enable auto alignment + uint8_t autoAlgSelection; // enable auto algorithm selelction + uint8_t IBSEEnable; // enable IBSE + uint8_t ultraResEnable; // enable Ultra Resolution + uint8_t autoCoefTrunc; // bit truncation for (1/2, 1]x scaling ratio + + // algorithm-switch ratios for Rome mode + uint8_t switchRatio6Tap6nTap; + uint8_t switchRatio6nTapAcc; + + // Ultra Resolution + int32_t dynIBSE_gain_ratio_thr0; + int32_t dynIBSE_gain_ratio_thr1; + int32_t dynIBSE_gain_ratio_thr2; + int32_t dynIBSE_gain_clip1; + int32_t dynIBSE_gain_clip2; + int32_t dynIBSE_gain_min; + int32_t dynIBSE_gain_max; + + int32_t tapAdaptSlope; + int32_t tapAdapt_slope_ratio_thr0; + int32_t tapAdapt_slope_ratio_thr1; + int32_t tapAdapt_slope_ratio_thr2; + int32_t tapAdapt_slope_clip1; + int32_t tapAdapt_slope_clip2; + int32_t tapAdapt_slope_min; + int32_t tapAdapt_slope_max; + + int32_t IBSE_clip_thr; + int32_t IBSE_clip_thr_ratio_thr0; + int32_t IBSE_clip_thr_ratio_thr1; + int32_t IBSE_clip_thr_ratio_thr2; + int32_t IBSE_clip_thr_clip1; + int32_t IBSE_clip_thr_clip2; + int32_t IBSE_clip_thr_min; + int32_t IBSE_clip_thr_max; + + int32_t IBSE_clip_ratio; + int32_t IBSE_clip_ratio_ratio_thr0; + int32_t IBSE_clip_ratio_ratio_thr1; + int32_t IBSE_clip_ratio_ratio_thr2; + int32_t IBSE_clip_ratio_clip1; + int32_t IBSE_clip_ratio_clip2; + int32_t IBSE_clip_ratio_min; + int32_t IBSE_clip_ratio_max; +}; + + +class CPQRszFW +{ +public: + +#ifdef RSZ_ANDROID_PLATFORM + void onCalculate(const RszInput *input, RszOutput *output); + void onInitPlatform(const RszInitParam &initParam, RszInitReg *initReg); +#else + void vDrvRszProc_int(const RszInput *input, RszOutput *output); +#endif + + void initialize(void); + + CPQRszFW() + { + memset(this, 0, sizeof(*this)); + #ifdef RSZ_ANDROID_PLATFORM + initialize(); + #endif + }; + + ~CPQRszFW() + { + }; + + RszReg m_rszReg; + +private: + /****** Resizer processes, variables ******/ + void rsz_alg_det(const RszInput *reg_in, RszOutput *reg_out); + void rsz_config(const RszInput *reg_in, RszOutput *reg_out, int Alg, int isHor); + int rsz_tbl_select(int Alg, int stepSize); + void rsz_config_demoWindow(const RszInput *input, RszOutput *output); + void rsz_config_ctrlRegs(const RszInput *reg_in, RszOutput *reg_out); + void rsz_auto_align(const RszInput *reg_in, RszOutput *reg_out, int Alg, int isHor); + void rsz_ultraRes(const RszInput *reg_in, RszOutput *reg_out); + int32_t UltraResGetRegWOInit(int32_t in_ratio, int32_t reg_ratio_thr0, int32_t reg_ratio_thr1, int32_t reg_ratio_thr2, int32_t reg_clip1, int32_t reg_clip2, int32_t reg_min, int32_t reg_max); + int32_t UltraResGetRegWInit(int32_t in_value, int32_t in_ratio, int32_t reg_ratio_thr0, int32_t reg_ratio_thr1, int32_t reg_ratio_thr2, int32_t reg_clip1, int32_t reg_clip2, int32_t reg_min, int32_t reg_max); + int32_t AlphaBlending(int32_t data1, int32_t data2, int32_t alpha, int32_t bits); + void rsz_auto_coefTrunc(const RszInput *reg_in, RszOutput *reg_out); + void rsz_offset_check(const RszInput *reg_in, RszOutput *reg_out); + //void rsz_coef_trunc_6nTap(void); + +#if 0 + RszInput oldInput; + RszOutput oldOutput; +#endif +}; + + +#endif // __PQRSZIMPL_H__ diff --git a/mtklibs/libpq_prot/libpq_prot.so b/mtklibs/libpq_prot/libpq_prot.so new file mode 100755 index 0000000000000000000000000000000000000000..5fac9fa190cc55d3a5a2d358f28f0ce9603eeb22 Binary files /dev/null and b/mtklibs/libpq_prot/libpq_prot.so differ diff --git a/mtklibs/libpthreadctrl/Android.mk_ b/mtklibs/libpthreadctrl/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..c5aa5c53f1956f8ae080d1038900f3baa756ea3b --- /dev/null +++ b/mtklibs/libpthreadctrl/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libpthreadctrl +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libpthreadctrl.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libpthreadctrl +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libpthreadctrl.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libpthreadctrl/README b/mtklibs/libpthreadctrl/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libpthreadctrl/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libpthreadctrl/arm/libpthreadctrl.a b/mtklibs/libpthreadctrl/arm/libpthreadctrl.a new file mode 100755 index 0000000000000000000000000000000000000000..005d2ec1615db8d1c8785ff73c3affafb9c00951 Binary files /dev/null and b/mtklibs/libpthreadctrl/arm/libpthreadctrl.a differ diff --git a/mtklibs/libpthreadctrl/libpthreadctrl.a b/mtklibs/libpthreadctrl/libpthreadctrl.a new file mode 100755 index 0000000000000000000000000000000000000000..53f9a1f71d457a4f890821aee82af2f27a5b42f8 Binary files /dev/null and b/mtklibs/libpthreadctrl/libpthreadctrl.a differ diff --git a/mtklibs/librilmtk-prop-md1/Android.mk_ b/mtklibs/librilmtk-prop-md1/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a8903487553b55a3b1576079289c5d19ccfb8001 --- /dev/null +++ b/mtklibs/librilmtk-prop-md1/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = librilmtk-prop-md1 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = librilmtk-prop-md1.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = librilmtk-prop-md1 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/librilmtk-prop-md1.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/librilmtk-prop-md1/NOTICE b/mtklibs/librilmtk-prop-md1/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/librilmtk-prop-md1/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/librilmtk-prop-md1/README b/mtklibs/librilmtk-prop-md1/README new file mode 100755 index 0000000000000000000000000000000000000000..116156453a8b56faa5abb9076880a0300d5d6d0d --- /dev/null +++ b/mtklibs/librilmtk-prop-md1/README @@ -0,0 +1,21 @@ +This directory contains MTK RIL request queue mechanism, which can central control requests from RILJ + + +WHAT IT DOES? +============= +It provides MTK RIL request queue mechanism. + +HOW IT WAS BUILT? +================== + +The librilmtk-prop-md1.a binary was built entirely from source files written by Mediatek. + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a static library 'librilmtk-prop-md1.a'. + +The shared library 'librilmtk-prop-md1.a' is used by librilmtk.so + diff --git a/mtklibs/librilmtk-prop-md1/arm/librilmtk-prop-md1.a b/mtklibs/librilmtk-prop-md1/arm/librilmtk-prop-md1.a new file mode 100755 index 0000000000000000000000000000000000000000..58d16227ba599ede7954bc2d9b6ed705a480485e Binary files /dev/null and b/mtklibs/librilmtk-prop-md1/arm/librilmtk-prop-md1.a differ diff --git a/mtklibs/librilmtk-prop-md1/librilmtk-prop-md1.a b/mtklibs/librilmtk-prop-md1/librilmtk-prop-md1.a new file mode 100755 index 0000000000000000000000000000000000000000..33692118895ea1347beedf79205f3f97c8c3a929 Binary files /dev/null and b/mtklibs/librilmtk-prop-md1/librilmtk-prop-md1.a differ diff --git a/mtklibs/librilmtk-prop-md2/Android.mk_ b/mtklibs/librilmtk-prop-md2/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..0e0a271d99baf291f8661ba85dad6f78a952dec1 --- /dev/null +++ b/mtklibs/librilmtk-prop-md2/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = librilmtk-prop-md2 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = librilmtk-prop-md2.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = librilmtk-prop-md2 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/librilmtk-prop-md2.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/librilmtk-prop-md2/NOTICE b/mtklibs/librilmtk-prop-md2/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/librilmtk-prop-md2/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/librilmtk-prop-md2/README b/mtklibs/librilmtk-prop-md2/README new file mode 100755 index 0000000000000000000000000000000000000000..116156453a8b56faa5abb9076880a0300d5d6d0d --- /dev/null +++ b/mtklibs/librilmtk-prop-md2/README @@ -0,0 +1,21 @@ +This directory contains MTK RIL request queue mechanism, which can central control requests from RILJ + + +WHAT IT DOES? +============= +It provides MTK RIL request queue mechanism. + +HOW IT WAS BUILT? +================== + +The librilmtk-prop-md1.a binary was built entirely from source files written by Mediatek. + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a static library 'librilmtk-prop-md1.a'. + +The shared library 'librilmtk-prop-md1.a' is used by librilmtk.so + diff --git a/mtklibs/librilmtk-prop-md2/arm/librilmtk-prop-md2.a b/mtklibs/librilmtk-prop-md2/arm/librilmtk-prop-md2.a new file mode 100755 index 0000000000000000000000000000000000000000..3ed28aa2c186130eec2458b1fb1fcdaf8e0efd50 Binary files /dev/null and b/mtklibs/librilmtk-prop-md2/arm/librilmtk-prop-md2.a differ diff --git a/mtklibs/librilmtk-prop-md2/librilmtk-prop-md2.a b/mtklibs/librilmtk-prop-md2/librilmtk-prop-md2.a new file mode 100755 index 0000000000000000000000000000000000000000..5b07c89ced8a25561f3b248da8afadce3acbb133 Binary files /dev/null and b/mtklibs/librilmtk-prop-md2/librilmtk-prop-md2.a differ diff --git a/mtklibs/libsink/Android.mk_ b/mtklibs/libsink/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a52ad1633d6457091e5de2f20614188ff6bd2fb7 --- /dev/null +++ b/mtklibs/libsink/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libsink +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libbinder libgui libmedia libstagefright libstagefright_foundation libui libcomutils libvcodec_cap libvt_avsync libaed libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libsink.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libsink +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libgui libmedia libstagefright libstagefright_foundation libui libcomutils libvcodec_cap libvt_avsync libaed libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libsink.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libsink/NOTICE b/mtklibs/libsink/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..090fb862dcee02e8e85ffec7413c818b98d38691 --- /dev/null +++ b/mtklibs/libsink/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/libsink/README b/mtklibs/libsink/README new file mode 100755 index 0000000000000000000000000000000000000000..99531bb82e0bd8675402bfbd911aa0a7119f9f65 --- /dev/null +++ b/mtklibs/libsink/README @@ -0,0 +1,27 @@ +Library of MTK ViLTE features, controlling downlink data path + +WHAT IT DOES? +============= +libsink.so control the downlink video playback + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +libcutils.so +libstagefright_foundation.so +libutils.so +libstagefright.so +libbinder.so +libmedia.so +libutils.so + +and the following libs from MediaTek: + +libcomutils.so +libvt_avsync.so + + +HOW TO USE IT? +============== +used by the libimsma module to do the donwlink data process + diff --git a/mtklibs/libsink/arm/libsink.so b/mtklibs/libsink/arm/libsink.so new file mode 100755 index 0000000000000000000000000000000000000000..039de0975ca68581b87251f50cd2fad858fa4d43 Binary files /dev/null and b/mtklibs/libsink/arm/libsink.so differ diff --git a/mtklibs/libsink/libsink.so b/mtklibs/libsink/libsink.so new file mode 100755 index 0000000000000000000000000000000000000000..545d7038fc9446cd50ea9d8038417efe90037cb2 Binary files /dev/null and b/mtklibs/libsink/libsink.so differ diff --git a/mtklibs/libskia_graphics_opt/Android.mk_ b/mtklibs/libskia_graphics_opt/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..928a49b383ec6cc434fe27c2d9facca6aa1358ec --- /dev/null +++ b/mtklibs/libskia_graphics_opt/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libskia_graphics_opt +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libskia_graphics_opt.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libskia_graphics_opt +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libskia_graphics_opt.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libskia_graphics_opt/NOTICE b/mtklibs/libskia_graphics_opt/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..277f89f8d243ab8957fb3003ef5d6fc30e2947d7 --- /dev/null +++ b/mtklibs/libskia_graphics_opt/NOTICE @@ -0,0 +1,20 @@ + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: \ No newline at end of file diff --git a/mtklibs/libskia_graphics_opt/README b/mtklibs/libskia_graphics_opt/README new file mode 100755 index 0000000000000000000000000000000000000000..04579cbeab1d9fcc4e64964c00dd60e156fea14d --- /dev/null +++ b/mtklibs/libskia_graphics_opt/README @@ -0,0 +1,19 @@ +Library of MTK skia optimization. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +Skia_graphics contains MediaTek developed optimization related drawing. + +HOW IT WAS BUILT? +================== + +HOW TO USE IT? +============== + +Provide optimization for skia drawing features. +all api interface are at (vendor/mediatek/proprietary/external/skia_graphic) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libskia_graphics_opt/arm/libskia_graphics_opt.a b/mtklibs/libskia_graphics_opt/arm/libskia_graphics_opt.a new file mode 100755 index 0000000000000000000000000000000000000000..96e957ac1834a16795beec98eb2f755cf5de7746 Binary files /dev/null and b/mtklibs/libskia_graphics_opt/arm/libskia_graphics_opt.a differ diff --git a/mtklibs/libskia_graphics_opt/libskia_graphics_opt.a b/mtklibs/libskia_graphics_opt/libskia_graphics_opt.a new file mode 100755 index 0000000000000000000000000000000000000000..791deb92b3ae98c4f79a00e50b4b82e50d13c943 Binary files /dev/null and b/mtklibs/libskia_graphics_opt/libskia_graphics_opt.a differ diff --git a/mtklibs/libskia_opt/Android.mk_ b/mtklibs/libskia_opt/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..17e31230073e8d969cd3ad8feb7a9ac418c007fe --- /dev/null +++ b/mtklibs/libskia_opt/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libskia_opt +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libskia_opt.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libskia_opt +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libskia_opt.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libskia_opt/NOTICE b/mtklibs/libskia_opt/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2c0401022dd0e70becaaf402b5ea53da17949eb4 --- /dev/null +++ b/mtklibs/libskia_opt/NOTICE @@ -0,0 +1,21 @@ + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libskia_opt/README b/mtklibs/libskia_opt/README new file mode 100755 index 0000000000000000000000000000000000000000..2d75ea6bf8afeb61df4dcc90571ad554979d482d --- /dev/null +++ b/mtklibs/libskia_opt/README @@ -0,0 +1,16 @@ + +WHAT IT DOES? +============= +This module works for png which decoded to 8888 dest optimization to let png decode faster. + +HOW IT WAS BUILT? +================== +It can be built independently and after build this module, should also build libskia.so, this opt can effect. + +HOW TO USE IT? +============== + +Provide png decode filter optimization's implementation. +Call this api in external/skia/src/images/SkScaledBitmapSampler.cpp (xxxx_D8888_neon()) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libskia_opt/arm/libskia_opt.a b/mtklibs/libskia_opt/arm/libskia_opt.a new file mode 100755 index 0000000000000000000000000000000000000000..5169bd5b59b4dd3576e43816ec060fdac0408f8d Binary files /dev/null and b/mtklibs/libskia_opt/arm/libskia_opt.a differ diff --git a/mtklibs/libskia_opt/libskia_opt.a b/mtklibs/libskia_opt/libskia_opt.a new file mode 100755 index 0000000000000000000000000000000000000000..e0cde525e5e0f6447bf373e09ec71a9963eb1a08 Binary files /dev/null and b/mtklibs/libskia_opt/libskia_opt.a differ diff --git a/mtklibs/libsource/Android.mk_ b/mtklibs/libsource/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..71cba1185a0503591349a6ec4337fc752f6e8312 --- /dev/null +++ b/mtklibs/libsource/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libsource +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libbinder libgui libmedia libstagefright libstagefright_foundation libui libcamera_client libcomutils libvcodec_cap libaed libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libsource.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libsource +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libgui libmedia libstagefright libstagefright_foundation libui libcamera_client libcomutils libvcodec_cap libaed libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libsource.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libsource/NOTICE b/mtklibs/libsource/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..090fb862dcee02e8e85ffec7413c818b98d38691 --- /dev/null +++ b/mtklibs/libsource/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/libsource/README b/mtklibs/libsource/README new file mode 100755 index 0000000000000000000000000000000000000000..288692ac4444f8d6b829aadcc1cd5615d2d3264d --- /dev/null +++ b/mtklibs/libsource/README @@ -0,0 +1,27 @@ +Library of MTK ViLTE features, controlling uplink data path + +WHAT IT DOES? +============= +libsource.so control the uplink + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +libcutils.so +libstagefright_foundation.so +libutils.so +libstagefright.so +libbinder.so +libmedia.so +libutils.so + +and the following libs from MediaTek: + +libvcodec_cap.so +libcomutils.so + + +HOW TO USE IT? +============== +used by the libimsma.so module to do the multimedia uplink process + diff --git a/mtklibs/libsource/arm/libsource.so b/mtklibs/libsource/arm/libsource.so new file mode 100755 index 0000000000000000000000000000000000000000..4d6eee6a5727ea45e3fabab701bb3abf7b8a5b93 Binary files /dev/null and b/mtklibs/libsource/arm/libsource.so differ diff --git a/mtklibs/libsource/libsource.so b/mtklibs/libsource/libsource.so new file mode 100755 index 0000000000000000000000000000000000000000..7e4111538c73d1018b9b1b015195c5415955c26b Binary files /dev/null and b/mtklibs/libsource/libsource.so differ diff --git a/mtklibs/libstagefright_hdcprx/Android.mk_ b/mtklibs/libstagefright_hdcprx/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..43a1be2c7cdf1f9f777f3f6176cc110f3fdd8e0b --- /dev/null +++ b/mtklibs/libstagefright_hdcprx/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libstagefright_hdcprx +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libstagefright libstagefright_foundation libtz_uree liburee_meta_drmkeyinstall_v2 libgui libhardware libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libstagefright_hdcprx.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libstagefright_hdcprx +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libstagefright libstagefright_foundation libtz_uree liburee_meta_drmkeyinstall_v2 libgui libhardware libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libstagefright_hdcprx.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libstagefright_hdcprx/arm/libstagefright_hdcprx.so b/mtklibs/libstagefright_hdcprx/arm/libstagefright_hdcprx.so new file mode 100755 index 0000000000000000000000000000000000000000..a51c88605b61f44e6cdbbcefa5f0beaa130acc56 Binary files /dev/null and b/mtklibs/libstagefright_hdcprx/arm/libstagefright_hdcprx.so differ diff --git a/mtklibs/libstagefright_hdcprx/libstagefright_hdcprx.so b/mtklibs/libstagefright_hdcprx/libstagefright_hdcprx.so new file mode 100755 index 0000000000000000000000000000000000000000..a63132e913994da29c46171d2eac4913348a20d8 Binary files /dev/null and b/mtklibs/libstagefright_hdcprx/libstagefright_hdcprx.so differ diff --git a/mtklibs/libstagefright_hdcptx/Android.mk_ b/mtklibs/libstagefright_hdcptx/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..56ca7ae32e12d2979d452d0b354aa3dbaaa83560 --- /dev/null +++ b/mtklibs/libstagefright_hdcptx/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libstagefright_hdcptx +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libstagefright libstagefright_foundation libgralloc_extra libcrypto libtz_uree liburee_meta_drmkeyinstall_v2 libgui libhardware libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libstagefright_hdcptx.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libstagefright_hdcptx +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libstagefright libstagefright_foundation libgralloc_extra libcrypto libtz_uree liburee_meta_drmkeyinstall_v2 libgui libhardware libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libstagefright_hdcptx.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libstagefright_hdcptx/NOTICE b/mtklibs/libstagefright_hdcptx/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libstagefright_hdcptx/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libstagefright_hdcptx/README b/mtklibs/libstagefright_hdcptx/README new file mode 100755 index 0000000000000000000000000000000000000000..bea27de6252ffe9fb7701a203537e4afd3dcc8a3 --- /dev/null +++ b/mtklibs/libstagefright_hdcptx/README @@ -0,0 +1,18 @@ +Library of MTK HDCP Transmitter features. + + + +WHAT IT DOES? +============= +library used for Miracast Souce to encrypt the protect content + +HOW IT WAS BUILT? +================== + + +HOW TO USE IT? +============== +Provide api for Miracast Source to do content protection. +all api interface are at (vendor/mediatek/proprietary/protect-bsp/frameworks/av/media/libstagefright/wifi-display/hdcp/tx) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libstagefright_hdcptx/arm/libstagefright_hdcptx.so b/mtklibs/libstagefright_hdcptx/arm/libstagefright_hdcptx.so new file mode 100755 index 0000000000000000000000000000000000000000..8c68893a4ce96dffc7918d4552eda2013d19b149 Binary files /dev/null and b/mtklibs/libstagefright_hdcptx/arm/libstagefright_hdcptx.so differ diff --git a/mtklibs/libstagefright_hdcptx/libstagefright_hdcptx.so b/mtklibs/libstagefright_hdcptx/libstagefright_hdcptx.so new file mode 100755 index 0000000000000000000000000000000000000000..16f15377a887fea5401ae9fbeec8ac0a5f568f61 Binary files /dev/null and b/mtklibs/libstagefright_hdcptx/libstagefright_hdcptx.so differ diff --git a/mtklibs/libstereocam/Android.mk_ b/mtklibs/libstereocam/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a957249d554d363227273db93d3eb4d6e60b5398 --- /dev/null +++ b/mtklibs/libstereocam/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libstereocam +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libstereocam.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libstereocam +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libstereocam.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libstereocam/README b/mtklibs/libstereocam/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libstereocam/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libstereocam/arm/libstereocam.a b/mtklibs/libstereocam/arm/libstereocam.a new file mode 100755 index 0000000000000000000000000000000000000000..efc3024c5c7fe84559e0fc697c95f1482d1c76e4 Binary files /dev/null and b/mtklibs/libstereocam/arm/libstereocam.a differ diff --git a/mtklibs/libstereocam/libstereocam.a b/mtklibs/libstereocam/libstereocam.a new file mode 100755 index 0000000000000000000000000000000000000000..6ed75a06fa92d3c411cb66b3f16e4117735e1b24 Binary files /dev/null and b/mtklibs/libstereocam/libstereocam.a differ diff --git a/mtklibs/libstereodepthsw/Android.mk_ b/mtklibs/libstereodepthsw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..98bbea93d510b0143e6bf0d0ff261c8bd5710bc0 --- /dev/null +++ b/mtklibs/libstereodepthsw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libstereodepthsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libstereodepthsw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libstereodepthsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libstereodepthsw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libstereodepthsw/README b/mtklibs/libstereodepthsw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libstereodepthsw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libstereodepthsw/arm/libstereodepthsw.a b/mtklibs/libstereodepthsw/arm/libstereodepthsw.a new file mode 100755 index 0000000000000000000000000000000000000000..7c6346279fd9789ab65fb30072554c1a5f4a4e59 Binary files /dev/null and b/mtklibs/libstereodepthsw/arm/libstereodepthsw.a differ diff --git a/mtklibs/libstereodepthsw/libstereodepthsw.a b/mtklibs/libstereodepthsw/libstereodepthsw.a new file mode 100755 index 0000000000000000000000000000000000000000..3cdaa7d6e33e8355a2ed04cded9ebbedee780841 Binary files /dev/null and b/mtklibs/libstereodepthsw/libstereodepthsw.a differ diff --git a/mtklibs/libsurfaceflinger_mediatek/Android.mk_ b/mtklibs/libsurfaceflinger_mediatek/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..3cfde989b0c83861dbd0668c3fa6db51130d6808 --- /dev/null +++ b/mtklibs/libsurfaceflinger_mediatek/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libsurfaceflinger_mediatek +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libsurfaceflinger_mediatek.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libsurfaceflinger_mediatek +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libsurfaceflinger_mediatek.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libsurfaceflinger_mediatek/NOTICE b/mtklibs/libsurfaceflinger_mediatek/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libsurfaceflinger_mediatek/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libsurfaceflinger_mediatek/README b/mtklibs/libsurfaceflinger_mediatek/README new file mode 100755 index 0000000000000000000000000000000000000000..3234ebe4aa531cc4ba706ca6059b4ef216e791ae --- /dev/null +++ b/mtklibs/libsurfaceflinger_mediatek/README @@ -0,0 +1,24 @@ +This directory contains extended static library for SurfaceFlinger + + +WHAT IT DOES? +============= + +It provides exteneded functionality for SurfaceFlinger to use. + + +HOW IT WAS BUILT? +================== + +It needs the following libs from AOSP: +1. libutils.so +2. libcutils.so + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a shared library 'libsurfaceflinger.so'. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libsurfaceflinger_mediatek/arm/libsurfaceflinger_mediatek.a b/mtklibs/libsurfaceflinger_mediatek/arm/libsurfaceflinger_mediatek.a new file mode 100755 index 0000000000000000000000000000000000000000..8e9ddf6ee8c62f8e81f31a45beb613d9904e40b3 Binary files /dev/null and b/mtklibs/libsurfaceflinger_mediatek/arm/libsurfaceflinger_mediatek.a differ diff --git a/mtklibs/libsurfaceflinger_mediatek/libsurfaceflinger_mediatek.a b/mtklibs/libsurfaceflinger_mediatek/libsurfaceflinger_mediatek.a new file mode 100755 index 0000000000000000000000000000000000000000..eafabb52adc5dfce9253847419c8d569c3cda559 Binary files /dev/null and b/mtklibs/libsurfaceflinger_mediatek/libsurfaceflinger_mediatek.a differ diff --git a/mtklibs/libtouchfilter/Android.mk_ b/mtklibs/libtouchfilter/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..9c73db97578560438595cee846d6fc1a5da39d48 --- /dev/null +++ b/mtklibs/libtouchfilter/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libtouchfilter +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libmtk_drvb libinput libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libtouchfilter.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libtouchfilter +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmtk_drvb libinput libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libtouchfilter.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libtouchfilter/NOTICE b/mtklibs/libtouchfilter/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..aeb70f59fb3bbb90045edd2bea6db8528b110a5a --- /dev/null +++ b/mtklibs/libtouchfilter/NOTICE @@ -0,0 +1,18 @@ +This MediaTek software package contains software with the following notices and under the following licenses: + +============================================================================= +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ diff --git a/mtklibs/libtouchfilter/README b/mtklibs/libtouchfilter/README new file mode 100755 index 0000000000000000000000000000000000000000..c8d8cc4fbab47da370bb3d362006abe3a7a65b8f --- /dev/null +++ b/mtklibs/libtouchfilter/README @@ -0,0 +1,29 @@ +The bin file factory is a service. +This bin is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= + +touchfilter is native service to improve touch input data. + + +HOW IT WAS BUILT? +================== + +It needs the following library from AOSP: +1. libcutils +2. liblog +3. libmtk_drvb +4. libutils +5. libinput +6. libc + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + + +HOW TO USE IT? +============== + +This bin file is automatically started by system.img \ No newline at end of file diff --git a/mtklibs/libtouchfilter/arm/libtouchfilter.so b/mtklibs/libtouchfilter/arm/libtouchfilter.so new file mode 100755 index 0000000000000000000000000000000000000000..7088aeaec6b585f232e6e84f3ec02bb85d994c25 Binary files /dev/null and b/mtklibs/libtouchfilter/arm/libtouchfilter.so differ diff --git a/mtklibs/libtouchfilter/libtouchfilter.so b/mtklibs/libtouchfilter/libtouchfilter.so new file mode 100755 index 0000000000000000000000000000000000000000..db77a92f90eeda2e89ec19a39a506f372f205dc3 Binary files /dev/null and b/mtklibs/libtouchfilter/libtouchfilter.so differ diff --git a/mtklibs/libtsfsw/Android.mk_ b/mtklibs/libtsfsw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..622af9b116e4d50fb56ff37c85e12b03b0d4c44f --- /dev/null +++ b/mtklibs/libtsfsw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libtsfsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libtsfsw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libtsfsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libtsfsw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libtsfsw/README b/mtklibs/libtsfsw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libtsfsw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libtsfsw/arm/libtsfsw.a b/mtklibs/libtsfsw/arm/libtsfsw.a new file mode 100755 index 0000000000000000000000000000000000000000..c5ba4b3fbb2cca6542ab8b9d17b49a57db3f17af Binary files /dev/null and b/mtklibs/libtsfsw/arm/libtsfsw.a differ diff --git a/mtklibs/libtsfsw/libtsfsw.a b/mtklibs/libtsfsw/libtsfsw.a new file mode 100755 index 0000000000000000000000000000000000000000..a35ff6c34581d3fad52e8021622445e5becd5253 Binary files /dev/null and b/mtklibs/libtsfsw/libtsfsw.a differ diff --git a/mtklibs/libudf/Android.mk_ b/mtklibs/libudf/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..1bb4a7da3034fe5b17b294e9853d16462a9191a4 --- /dev/null +++ b/mtklibs/libudf/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libudf +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libudf.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libudf +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libudf.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libudf/NOTICE b/mtklibs/libudf/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..ae0747bdea50a6c33eac5734ecc3014b524be76e --- /dev/null +++ b/mtklibs/libudf/NOTICE @@ -0,0 +1,15 @@ +The MIT License +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/mtklibs/libudf/README b/mtklibs/libudf/README new file mode 100755 index 0000000000000000000000000000000000000000..7da9b2810597400eb1c4425687f5987b692385da --- /dev/null +++ b/mtklibs/libudf/README @@ -0,0 +1,35 @@ +libudf description: +user space debug framework library which includes MTK debug15/fdleak/ubrd debug feature, +it load through LD_PRELOAD mechanism, and rehook libc system call for add intermediate debug; + +libudf build and release: +source code maintain in alps performance in MTK, binary release to customer; + +libudf usage: +debug15/fdleak debug in libudf "default on" on MTK eng load, and MTK user/userdebug buildin/default off; +customer eng/user/userdebug buildin/default off; +For MTK eng load related issue please reference debug15/fdleak debug guide for analyze. + + +Notes: +if want to enable it on MTK user/userdebug or customer load step by step: +1. add libudf.so to init.environ.rc.in +file path: +system/core/rootdir/init.environ.rc.in + +need modify: + on init + export LD_PRELOAD libsigchain.so:libudf.so + +2.build load and down load again, check libudf.so in LD_PRELOAD list, you can reproduce issue +adb shell "echo $LD_PRELOAD" + +if libudf.so not preload, contact MTK for support; + + +Terminology: +udf - user space debug framework +ubrd - user space backtrace record +debug15 - memory debug feature, cover Android memory debug 5/10 + +20141107 diff --git a/mtklibs/libudf/arm/libudf.so b/mtklibs/libudf/arm/libudf.so new file mode 100755 index 0000000000000000000000000000000000000000..54859e54f7fc550f01e964545d5ae579a90cb922 Binary files /dev/null and b/mtklibs/libudf/arm/libudf.so differ diff --git a/mtklibs/libudf/libudf.so b/mtklibs/libudf/libudf.so new file mode 100755 index 0000000000000000000000000000000000000000..1fc087dfa731c72f4ca9167099f53f3f6e1910ff Binary files /dev/null and b/mtklibs/libudf/libudf.so differ diff --git a/mtklibs/libudf_unwind/Android.mk_ b/mtklibs/libudf_unwind/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..dfc38ab57e96ff48097e0ce281c166c1dc13cd62 --- /dev/null +++ b/mtklibs/libudf_unwind/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libudf_unwind +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libudf_unwind.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libudf_unwind/NOTICE b/mtklibs/libudf_unwind/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..ae0747bdea50a6c33eac5734ecc3014b524be76e --- /dev/null +++ b/mtklibs/libudf_unwind/NOTICE @@ -0,0 +1,15 @@ +The MIT License +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/mtklibs/libudf_unwind/README b/mtklibs/libudf_unwind/README new file mode 100755 index 0000000000000000000000000000000000000000..7da9b2810597400eb1c4425687f5987b692385da --- /dev/null +++ b/mtklibs/libudf_unwind/README @@ -0,0 +1,35 @@ +libudf description: +user space debug framework library which includes MTK debug15/fdleak/ubrd debug feature, +it load through LD_PRELOAD mechanism, and rehook libc system call for add intermediate debug; + +libudf build and release: +source code maintain in alps performance in MTK, binary release to customer; + +libudf usage: +debug15/fdleak debug in libudf "default on" on MTK eng load, and MTK user/userdebug buildin/default off; +customer eng/user/userdebug buildin/default off; +For MTK eng load related issue please reference debug15/fdleak debug guide for analyze. + + +Notes: +if want to enable it on MTK user/userdebug or customer load step by step: +1. add libudf.so to init.environ.rc.in +file path: +system/core/rootdir/init.environ.rc.in + +need modify: + on init + export LD_PRELOAD libsigchain.so:libudf.so + +2.build load and down load again, check libudf.so in LD_PRELOAD list, you can reproduce issue +adb shell "echo $LD_PRELOAD" + +if libudf.so not preload, contact MTK for support; + + +Terminology: +udf - user space debug framework +ubrd - user space backtrace record +debug15 - memory debug feature, cover Android memory debug 5/10 + +20141107 diff --git a/mtklibs/libudf_unwind/arm/libudf_unwind.a b/mtklibs/libudf_unwind/arm/libudf_unwind.a new file mode 100755 index 0000000000000000000000000000000000000000..ac4261988008230a5f370c2c45a9f34a24b7d8f7 Binary files /dev/null and b/mtklibs/libudf_unwind/arm/libudf_unwind.a differ diff --git a/mtklibs/liburee_meta_drmkey_if/Android.mk_ b/mtklibs/liburee_meta_drmkey_if/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..7fed53823f1394755434a2bd6190d81822d55c58 --- /dev/null +++ b/mtklibs/liburee_meta_drmkey_if/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = liburee_meta_drmkey_if +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = liburee_meta_drmkey_if.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/liburee_meta_drmkey_if/README b/mtklibs/liburee_meta_drmkey_if/README new file mode 100755 index 0000000000000000000000000000000000000000..9523a2f1bdc75b8f76bd665228e3abd33a6107f9 --- /dev/null +++ b/mtklibs/liburee_meta_drmkey_if/README @@ -0,0 +1,13 @@ +Application of MTK drm key management daemon. + +WHAT IT DOES? +============= +Kisd is MediaTek developed drm key management daemon. +Without it, drm key management functionalities will not work. + +HOW IT WAS BUILT? +================== +It needs the following libraries from AOSP: +1.libcutils +2.libnetutils +3.libc \ No newline at end of file diff --git a/mtklibs/liburee_meta_drmkey_if/liburee_meta_drmkey_if.a b/mtklibs/liburee_meta_drmkey_if/liburee_meta_drmkey_if.a new file mode 100755 index 0000000000000000000000000000000000000000..f1dea887c2614c82d0a16efe718d5ed255bf0d96 Binary files /dev/null and b/mtklibs/liburee_meta_drmkey_if/liburee_meta_drmkey_if.a differ diff --git a/mtklibs/liburee_meta_drmkeyinstall_v2/Android.mk_ b/mtklibs/liburee_meta_drmkeyinstall_v2/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..b95991e624fdedb1490a5ed8eb26e800174bd090 --- /dev/null +++ b/mtklibs/liburee_meta_drmkeyinstall_v2/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = liburee_meta_drmkeyinstall_v2 +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libnetutils libtz_uree libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = liburee_meta_drmkeyinstall_v2.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = liburee_meta_drmkeyinstall_v2 +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libnetutils libtz_uree libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/liburee_meta_drmkeyinstall_v2.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/liburee_meta_drmkeyinstall_v2/README b/mtklibs/liburee_meta_drmkeyinstall_v2/README new file mode 100755 index 0000000000000000000000000000000000000000..9523a2f1bdc75b8f76bd665228e3abd33a6107f9 --- /dev/null +++ b/mtklibs/liburee_meta_drmkeyinstall_v2/README @@ -0,0 +1,13 @@ +Application of MTK drm key management daemon. + +WHAT IT DOES? +============= +Kisd is MediaTek developed drm key management daemon. +Without it, drm key management functionalities will not work. + +HOW IT WAS BUILT? +================== +It needs the following libraries from AOSP: +1.libcutils +2.libnetutils +3.libc \ No newline at end of file diff --git a/mtklibs/liburee_meta_drmkeyinstall_v2/arm/liburee_meta_drmkeyinstall_v2.so b/mtklibs/liburee_meta_drmkeyinstall_v2/arm/liburee_meta_drmkeyinstall_v2.so new file mode 100755 index 0000000000000000000000000000000000000000..92a9d2fe01ca7af54e9b1f960b75c874eed5f6db Binary files /dev/null and b/mtklibs/liburee_meta_drmkeyinstall_v2/arm/liburee_meta_drmkeyinstall_v2.so differ diff --git a/mtklibs/liburee_meta_drmkeyinstall_v2/liburee_meta_drmkeyinstall_v2.so b/mtklibs/liburee_meta_drmkeyinstall_v2/liburee_meta_drmkeyinstall_v2.so new file mode 100755 index 0000000000000000000000000000000000000000..9a18f67ed010af6cd2e5701cdd35336c824fcca2 Binary files /dev/null and b/mtklibs/liburee_meta_drmkeyinstall_v2/liburee_meta_drmkeyinstall_v2.so differ diff --git a/mtklibs/libutilFilteringNeon/Android.mk_ b/mtklibs/libutilFilteringNeon/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..5c35799a8e83a95b621ca0da088aaa9d0ea88683 --- /dev/null +++ b/mtklibs/libutilFilteringNeon/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilFilteringNeon +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libutilFilteringNeon.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilFilteringNeon +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libutilFilteringNeon.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libutilFilteringNeon/README b/mtklibs/libutilFilteringNeon/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libutilFilteringNeon/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libutilFilteringNeon/arm/libutilFilteringNeon.a b/mtklibs/libutilFilteringNeon/arm/libutilFilteringNeon.a new file mode 100755 index 0000000000000000000000000000000000000000..3d7de91fb618ca01f0c88c92e51f2d6a0fe67f44 Binary files /dev/null and b/mtklibs/libutilFilteringNeon/arm/libutilFilteringNeon.a differ diff --git a/mtklibs/libutilFilteringNeon/libutilFilteringNeon.a b/mtklibs/libutilFilteringNeon/libutilFilteringNeon.a new file mode 100755 index 0000000000000000000000000000000000000000..b200119e1f4a1f1b51dd031e04d584508eb6cd3d Binary files /dev/null and b/mtklibs/libutilFilteringNeon/libutilFilteringNeon.a differ diff --git a/mtklibs/libutilcreateglescontext/Android.mk_ b/mtklibs/libutilcreateglescontext/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..2618f070ff745e8a452eafb04f25813d7edd0844 --- /dev/null +++ b/mtklibs/libutilcreateglescontext/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilcreateglescontext +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libutilcreateglescontext.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilcreateglescontext +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libutilcreateglescontext.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libutilcreateglescontext/README b/mtklibs/libutilcreateglescontext/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libutilcreateglescontext/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libutilcreateglescontext/arm/libutilcreateglescontext.a b/mtklibs/libutilcreateglescontext/arm/libutilcreateglescontext.a new file mode 100755 index 0000000000000000000000000000000000000000..a387f8a34c4d79ce6575cbd82ad8b2ee05cf0e62 Binary files /dev/null and b/mtklibs/libutilcreateglescontext/arm/libutilcreateglescontext.a differ diff --git a/mtklibs/libutilcreateglescontext/libutilcreateglescontext.a b/mtklibs/libutilcreateglescontext/libutilcreateglescontext.a new file mode 100755 index 0000000000000000000000000000000000000000..8211f6c593f815cb0fd444f3c988515c536da6c0 Binary files /dev/null and b/mtklibs/libutilcreateglescontext/libutilcreateglescontext.a differ diff --git a/mtklibs/libutileglimageio/Android.mk_ b/mtklibs/libutileglimageio/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..cde8440b1118ae867d35760efb0ce0677ef359ca --- /dev/null +++ b/mtklibs/libutileglimageio/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutileglimageio +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libutileglimageio.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutileglimageio +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libutileglimageio.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libutileglimageio/README b/mtklibs/libutileglimageio/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libutileglimageio/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libutileglimageio/arm/libutileglimageio.a b/mtklibs/libutileglimageio/arm/libutileglimageio.a new file mode 100755 index 0000000000000000000000000000000000000000..9414a7d45c6bb022547787b52d9cf65426defeb7 Binary files /dev/null and b/mtklibs/libutileglimageio/arm/libutileglimageio.a differ diff --git a/mtklibs/libutileglimageio/libutileglimageio.a b/mtklibs/libutileglimageio/libutileglimageio.a new file mode 100755 index 0000000000000000000000000000000000000000..e19842f2a07632595f4ba0af476baefd8a97b064 Binary files /dev/null and b/mtklibs/libutileglimageio/libutileglimageio.a differ diff --git a/mtklibs/libutilfiltering/Android.mk_ b/mtklibs/libutilfiltering/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..570b6170657c7328471ed0e915af0b28ce9b28b7 --- /dev/null +++ b/mtklibs/libutilfiltering/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilfiltering +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libutilfiltering.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilfiltering +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libutilfiltering.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libutilfiltering/README b/mtklibs/libutilfiltering/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libutilfiltering/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libutilfiltering/arm/libutilfiltering.a b/mtklibs/libutilfiltering/arm/libutilfiltering.a new file mode 100755 index 0000000000000000000000000000000000000000..1c1d3808c1c9d32dcdc4e164a0a929df50e6b5d4 Binary files /dev/null and b/mtklibs/libutilfiltering/arm/libutilfiltering.a differ diff --git a/mtklibs/libutilfiltering/libutilfiltering.a b/mtklibs/libutilfiltering/libutilfiltering.a new file mode 100755 index 0000000000000000000000000000000000000000..3e46d6602f67c6a612b4b9324e0c80b7752f415f Binary files /dev/null and b/mtklibs/libutilfiltering/libutilfiltering.a differ diff --git a/mtklibs/libutilimagpu/Android.mk_ b/mtklibs/libutilimagpu/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..e3d1b675068849dc1651407b1b2bc25cf03547b0 --- /dev/null +++ b/mtklibs/libutilimagpu/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilimagpu +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libutilimagpu.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilimagpu +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libutilimagpu.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libutilimagpu/README b/mtklibs/libutilimagpu/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libutilimagpu/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libutilimagpu/arm/libutilimagpu.a b/mtklibs/libutilimagpu/arm/libutilimagpu.a new file mode 100755 index 0000000000000000000000000000000000000000..d9488ba23a794eb48f1105ab18c8ef21d4f81b4d Binary files /dev/null and b/mtklibs/libutilimagpu/arm/libutilimagpu.a differ diff --git a/mtklibs/libutilimagpu/libutilimagpu.a b/mtklibs/libutilimagpu/libutilimagpu.a new file mode 100755 index 0000000000000000000000000000000000000000..50e9881d1f696ef77411e88e0884aa796d22a547 Binary files /dev/null and b/mtklibs/libutilimagpu/libutilimagpu.a differ diff --git a/mtklibs/libutilitysw/Android.mk_ b/mtklibs/libutilitysw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..0239cb799f4ffdf8c250eb02634d87eea728a4f7 --- /dev/null +++ b/mtklibs/libutilitysw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilitysw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libutilitysw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilitysw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libutilitysw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libutilitysw/README b/mtklibs/libutilitysw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libutilitysw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libutilitysw/arm/libutilitysw.a b/mtklibs/libutilitysw/arm/libutilitysw.a new file mode 100755 index 0000000000000000000000000000000000000000..d308c031089d43ed7b4389304a04903db5c9b1cb Binary files /dev/null and b/mtklibs/libutilitysw/arm/libutilitysw.a differ diff --git a/mtklibs/libutilitysw/libutilitysw.a b/mtklibs/libutilitysw/libutilitysw.a new file mode 100755 index 0000000000000000000000000000000000000000..0a7b1cc7380f8c8df0dced3c9804c7b8d27ee7e3 Binary files /dev/null and b/mtklibs/libutilitysw/libutilitysw.a differ diff --git a/mtklibs/libutilmath/Android.mk_ b/mtklibs/libutilmath/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..9b6d7de5fd1c45d96dd2d0c973a5733dca1d6e23 --- /dev/null +++ b/mtklibs/libutilmath/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilmath +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libutilmath.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilmath +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libutilmath.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libutilmath/README b/mtklibs/libutilmath/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libutilmath/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libutilmath/arm/libutilmath.a b/mtklibs/libutilmath/arm/libutilmath.a new file mode 100755 index 0000000000000000000000000000000000000000..4e58a9be1dd57e69ec270e59a2b728b8c750dc7c Binary files /dev/null and b/mtklibs/libutilmath/arm/libutilmath.a differ diff --git a/mtklibs/libutilmath/libutilmath.a b/mtklibs/libutilmath/libutilmath.a new file mode 100755 index 0000000000000000000000000000000000000000..b12e0a5488f784696d0264f5b2640a870d7cadae Binary files /dev/null and b/mtklibs/libutilmath/libutilmath.a differ diff --git a/mtklibs/libutilmultiframe/Android.mk_ b/mtklibs/libutilmultiframe/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..418740bc0545b6c397744b5f6f61434365d7826b --- /dev/null +++ b/mtklibs/libutilmultiframe/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilmultiframe +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libutilmultiframe.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutilmultiframe +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libutilmultiframe.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libutilmultiframe/README b/mtklibs/libutilmultiframe/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libutilmultiframe/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libutilmultiframe/arm/libutilmultiframe.a b/mtklibs/libutilmultiframe/arm/libutilmultiframe.a new file mode 100755 index 0000000000000000000000000000000000000000..c4ebd904f29a111da7760e545b1719eb6a1cc096 Binary files /dev/null and b/mtklibs/libutilmultiframe/arm/libutilmultiframe.a differ diff --git a/mtklibs/libutilmultiframe/libutilmultiframe.a b/mtklibs/libutilmultiframe/libutilmultiframe.a new file mode 100755 index 0000000000000000000000000000000000000000..06c456a9636fc0942f0235f216b8b09c85fb4667 Binary files /dev/null and b/mtklibs/libutilmultiframe/libutilmultiframe.a differ diff --git a/mtklibs/libutiltransform/Android.mk_ b/mtklibs/libutiltransform/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..1e13ef0db8f54fe9e8899e4af5903e9044b5f578 --- /dev/null +++ b/mtklibs/libutiltransform/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutiltransform +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libutiltransform.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutiltransform +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libutiltransform.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libutiltransform/README b/mtklibs/libutiltransform/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libutiltransform/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libutiltransform/arm/libutiltransform.a b/mtklibs/libutiltransform/arm/libutiltransform.a new file mode 100755 index 0000000000000000000000000000000000000000..0deb6641c5e53eb71aff4177debb10bb1ffba8f0 Binary files /dev/null and b/mtklibs/libutiltransform/arm/libutiltransform.a differ diff --git a/mtklibs/libutiltransform/libutiltransform.a b/mtklibs/libutiltransform/libutiltransform.a new file mode 100755 index 0000000000000000000000000000000000000000..c357d971c70d6b92ad0ecf043aa1388eb1a1f369 Binary files /dev/null and b/mtklibs/libutiltransform/libutiltransform.a differ diff --git a/mtklibs/libutiltransformneon/Android.mk_ b/mtklibs/libutiltransformneon/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..306f52cf5f1cd68d8ae72dd316dfda223be9c375 --- /dev/null +++ b/mtklibs/libutiltransformneon/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutiltransformneon +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libutiltransformneon.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libutiltransformneon +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libutiltransformneon.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libutiltransformneon/README b/mtklibs/libutiltransformneon/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libutiltransformneon/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libutiltransformneon/arm/libutiltransformneon.a b/mtklibs/libutiltransformneon/arm/libutiltransformneon.a new file mode 100755 index 0000000000000000000000000000000000000000..650f1996df8f8f8fc836d8b18a55c61759456c6c Binary files /dev/null and b/mtklibs/libutiltransformneon/arm/libutiltransformneon.a differ diff --git a/mtklibs/libutiltransformneon/libutiltransformneon.a b/mtklibs/libutiltransformneon/libutiltransformneon.a new file mode 100755 index 0000000000000000000000000000000000000000..a5625fc64d77ff4f1e07a54f6f21d850803f96f2 Binary files /dev/null and b/mtklibs/libutiltransformneon/libutiltransformneon.a differ diff --git a/mtklibs/libuvtswdec/Android.mk_ b/mtklibs/libuvtswdec/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..fea6c1c859ae0a9603835624b06498438bb24e3f --- /dev/null +++ b/mtklibs/libuvtswdec/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libuvtswdec +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libuvtswdec.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libuvtswdec/README b/mtklibs/libuvtswdec/README new file mode 100755 index 0000000000000000000000000000000000000000..896bd1095c114169356a77e81541cd1e528f9151 --- /dev/null +++ b/mtklibs/libuvtswdec/README @@ -0,0 +1,18 @@ +The module creates 3G VT video decoder library +This library is pre-built by MediaTek internally. + +WHAT IT DOES? +============= +3G VT decoder offers best decoding quality and error resilient tools for telephony transmission + +libuvtswdec.a contains the 3G VT decoder core +libmp4com.a contains the common decoder core + +HOW IT WAS BUILT? +================== +These two libraries are released as static library, and should be built with VTMAL module. + +HOW TO USE IT? +============== +This library should be used with VTMAL module and cannot be used directly by an +application developer. \ No newline at end of file diff --git a/mtklibs/libuvtswdec/arm/libuvtswdec.a b/mtklibs/libuvtswdec/arm/libuvtswdec.a new file mode 100755 index 0000000000000000000000000000000000000000..48978fb2020c4c9821c545a5e1d3649c514d994e Binary files /dev/null and b/mtklibs/libuvtswdec/arm/libuvtswdec.a differ diff --git a/mtklibs/libuvtswenc/Android.mk_ b/mtklibs/libuvtswenc/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..324290bdbc31288cfcbcdf35715019d64e77b11a --- /dev/null +++ b/mtklibs/libuvtswenc/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libuvtswenc +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libuvtswenc.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libuvtswenc/README b/mtklibs/libuvtswenc/README new file mode 100755 index 0000000000000000000000000000000000000000..b7568d2c0b717365a1c5a23bf8508a961ed5454d --- /dev/null +++ b/mtklibs/libuvtswenc/README @@ -0,0 +1,18 @@ +The module creates 3G VT video encoder library +This library is pre-built by MediaTek internally. + +WHAT IT DOES? +============= +3G VT encoder offers constant bitrate control for H.263/MPEG4 and offers +best quality at the same time. + +libuvtswenc.a contains the 3G VT encoder core. + +HOW IT WAS BUILT? +================== +It is released as static library, and should be built with VTMAL module. + +HOW TO USE IT? +============== +This library should be used with VTMAL module and cannot be used directly by an +application developer. \ No newline at end of file diff --git a/mtklibs/libuvtswenc/arm/libuvtswenc.a b/mtklibs/libuvtswenc/arm/libuvtswenc.a new file mode 100755 index 0000000000000000000000000000000000000000..0030219a8a05349014a6d85239ef492a5fa21866 Binary files /dev/null and b/mtklibs/libuvtswenc/arm/libuvtswenc.a differ diff --git a/mtklibs/libvc1dec_sw/Android.mk_ b/mtklibs/libvc1dec_sw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..c174f1329351162313c78365b6dd8d7641463650 --- /dev/null +++ b/mtklibs/libvc1dec_sw/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvc1dec_sw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvc1dec_sw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvc1dec_sw/NOTICE b/mtklibs/libvc1dec_sw/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libvc1dec_sw/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libvc1dec_sw/README b/mtklibs/libvc1dec_sw/README new file mode 100755 index 0000000000000000000000000000000000000000..9daa225a16bff897e647d62d07c8693dcb3f4c0f --- /dev/null +++ b/mtklibs/libvc1dec_sw/README @@ -0,0 +1,24 @@ +Library of wrapper for MediaTek software VC1 video decoder. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +This library provide the wrapper of software VC1 video decoder of MediaTek. + + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libc.so +2. libcutils.so + + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== +provide the private interface for MediaTek video common driver. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libvc1dec_sw/arm/libvc1dec_sw.a b/mtklibs/libvc1dec_sw/arm/libvc1dec_sw.a new file mode 100755 index 0000000000000000000000000000000000000000..48c7a21a7c4b1597512da71ab0d96b61d149d0aa Binary files /dev/null and b/mtklibs/libvc1dec_sw/arm/libvc1dec_sw.a differ diff --git a/mtklibs/libvcodec_cap/Android.mk_ b/mtklibs/libvcodec_cap/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..1e7d4aba2fec7f456722dc78a4194c5b76f9f51b --- /dev/null +++ b/mtklibs/libvcodec_cap/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvcodec_cap +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libui libbinder libexpat libvcodecdrv libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libvcodec_cap.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvcodec_cap +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libui libbinder libexpat libvcodecdrv libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvcodec_cap.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvcodec_cap/arm/libvcodec_cap.so b/mtklibs/libvcodec_cap/arm/libvcodec_cap.so new file mode 100755 index 0000000000000000000000000000000000000000..382d3893c8cc498c78c8625631427ac999ace69d Binary files /dev/null and b/mtklibs/libvcodec_cap/arm/libvcodec_cap.so differ diff --git a/mtklibs/libvcodec_cap/libvcodec_cap.so b/mtklibs/libvcodec_cap/libvcodec_cap.so new file mode 100755 index 0000000000000000000000000000000000000000..48b149fe84c3a73d980ae2d34b821bb99cc3ce64 Binary files /dev/null and b/mtklibs/libvcodec_cap/libvcodec_cap.so differ diff --git a/mtklibs/libvcodec_utility/Android.mk_ b/mtklibs/libvcodec_utility/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..2a3a977eac648018ae2944a978741eba3a0e07f5 --- /dev/null +++ b/mtklibs/libvcodec_utility/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvcodec_utility +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libbwc libm4u libion libion_mtk libmtk_drvb libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libvcodec_utility.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvcodec_utility +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbwc libm4u libion libion_mtk libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvcodec_utility.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvcodec_utility/NOTICE b/mtklibs/libvcodec_utility/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libvcodec_utility/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libvcodec_utility/README b/mtklibs/libvcodec_utility/README new file mode 100755 index 0000000000000000000000000000000000000000..0274195d3262ef5676ec356bd4ea449a59e21c9a --- /dev/null +++ b/mtklibs/libvcodec_utility/README @@ -0,0 +1,27 @@ +Library of MTK video driver utility + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libvcodec_utility.so contains MediaTek developed h.264 hw enc modules. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libcutils.so + +and the following libs from MediaTek: +1. libmtk_drvb.so +2. libmet-tag.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +all api interface are at (vendor/mediatek/proprietary/hardware/libvcodec/mt8163/utility/) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libvcodec_utility/arm/libvcodec_utility.so b/mtklibs/libvcodec_utility/arm/libvcodec_utility.so new file mode 100755 index 0000000000000000000000000000000000000000..ac3ed935a086057bf0ad10ddcd6ff58b6e488381 Binary files /dev/null and b/mtklibs/libvcodec_utility/arm/libvcodec_utility.so differ diff --git a/mtklibs/libvcodec_utility/libvcodec_utility.so b/mtklibs/libvcodec_utility/libvcodec_utility.so new file mode 100755 index 0000000000000000000000000000000000000000..198e6da04f201039eaaa8042219980725bb94a20 Binary files /dev/null and b/mtklibs/libvcodec_utility/libvcodec_utility.so differ diff --git a/mtklibs/libvcodecdrv/Android.mk_ b/mtklibs/libvcodecdrv/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..0dad84b2bb633b04ffd142c161fc82add7f91a43 --- /dev/null +++ b/mtklibs/libvcodecdrv/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvcodecdrv +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libvcodec_utility libmtk_drvb libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libvcodecdrv.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvcodecdrv +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libvcodec_utility libvcodec_oal libmp4enc_sa.ca7 libvp8dec_sa.ca7 libvc1dec_sa.ca7 libvp8enc_sa.ca7 libhevce_sb.ca7.android libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvcodecdrv.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvcodecdrv/NOTICE b/mtklibs/libvcodecdrv/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libvcodecdrv/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libvcodecdrv/README b/mtklibs/libvcodecdrv/README new file mode 100755 index 0000000000000000000000000000000000000000..7d060c596c109e8e9795555edf7553205540e26a --- /dev/null +++ b/mtklibs/libvcodecdrv/README @@ -0,0 +1,27 @@ +Library of MTK video driver, icluding vdec and venc + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libvcodecdrv.so contains MediaTek developed h.264 hw enc modules. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libcutils.so + +and the following libs from MediaTek: +1. libmtk_drvb.so +2. libmet-tag.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +all api interface are at (vendor/mediatek/proprietary/hardware/libvcodec/mt8163/common/) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libvcodecdrv/arm/libvcodecdrv.so b/mtklibs/libvcodecdrv/arm/libvcodecdrv.so new file mode 100755 index 0000000000000000000000000000000000000000..74615576da87255f03dad0cf3c2b8dae6a31762b Binary files /dev/null and b/mtklibs/libvcodecdrv/arm/libvcodecdrv.so differ diff --git a/mtklibs/libvcodecdrv/libvcodecdrv.so b/mtklibs/libvcodecdrv/libvcodecdrv.so new file mode 100755 index 0000000000000000000000000000000000000000..8b62bee11a053e3238b3ffa9f6408f4b950ca4a6 Binary files /dev/null and b/mtklibs/libvcodecdrv/libvcodecdrv.so differ diff --git a/mtklibs/libvfb/Android.mk_ b/mtklibs/libvfb/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..c03a559055b4a93d32da328e4f6bf9f8eb315624 --- /dev/null +++ b/mtklibs/libvfb/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvfb +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libvfb.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvfb +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvfb.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvfb/README b/mtklibs/libvfb/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libvfb/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libvfb/arm/libvfb.a b/mtklibs/libvfb/arm/libvfb.a new file mode 100755 index 0000000000000000000000000000000000000000..3d6ee9b0ead8db38a1a44adac3841c8907e1476e Binary files /dev/null and b/mtklibs/libvfb/arm/libvfb.a differ diff --git a/mtklibs/libvfb/libvfb.a b/mtklibs/libvfb/libvfb.a new file mode 100755 index 0000000000000000000000000000000000000000..bd613814329e0ca1c1709a640d305101310c6ea9 Binary files /dev/null and b/mtklibs/libvfb/libvfb.a differ diff --git a/mtklibs/libvfbsw/Android.mk_ b/mtklibs/libvfbsw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..2ad981090d41ee270771ef12400fb8c2fde8bb7c --- /dev/null +++ b/mtklibs/libvfbsw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvfbsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libvfbsw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvfbsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvfbsw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvfbsw/README b/mtklibs/libvfbsw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libvfbsw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libvfbsw/arm/libvfbsw.a b/mtklibs/libvfbsw/arm/libvfbsw.a new file mode 100755 index 0000000000000000000000000000000000000000..9ac7fd720ffcb26bd4bdd2505d891c1ac3d7c190 Binary files /dev/null and b/mtklibs/libvfbsw/arm/libvfbsw.a differ diff --git a/mtklibs/libvfbsw/libvfbsw.a b/mtklibs/libvfbsw/libvfbsw.a new file mode 100755 index 0000000000000000000000000000000000000000..cf2f42eb42b5f5fbf8a1b90fc83c13ec243a8949 Binary files /dev/null and b/mtklibs/libvfbsw/libvfbsw.a differ diff --git a/mtklibs/libvie/Android.mk_ b/mtklibs/libvie/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..caa0e568d6f43e4bba847408890fad5f07f28143 --- /dev/null +++ b/mtklibs/libvie/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvie +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libstagefright libmedia libstdc++ libgui libsqlite libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvie.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvie/README b/mtklibs/libvie/README new file mode 100755 index 0000000000000000000000000000000000000000..0050350b8624a54a0db94095523fd6cb119f0aba --- /dev/null +++ b/mtklibs/libvie/README @@ -0,0 +1,21 @@ +This module creates the libvie.so libary file. + +WHAT IT DOES? +============= +libvie is the main native library in VIE feature. it controls libaudiostream library to record pcm. +it calls swip to recognize the different command and return the result to java service. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + + libcutils, libutils, libstlport, libgui, libdl, libsqlite + +and the following libs from MediaTek: + + libstagefright, libmedia, libaudiostream, libvieswip, libdrvb, libmtk_drvb + +HOW TO USE IT? +============== + +user can call the fuctions in this library by JNI layer. \ No newline at end of file diff --git a/mtklibs/libvie/arm/libvie.so b/mtklibs/libvie/arm/libvie.so new file mode 100755 index 0000000000000000000000000000000000000000..d01ac04fb12038d190ae5a8cf6257a79b0856c88 Binary files /dev/null and b/mtklibs/libvie/arm/libvie.so differ diff --git a/mtklibs/libvie_jni/Android.mk_ b/mtklibs/libvie_jni/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..fc27c0b17bf900e7fab896ca45088e31fb146492 --- /dev/null +++ b/mtklibs/libvie_jni/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvie_jni +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libui libbinder libandroid_runtime libnativehelper libvie libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvie_jni.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvie_jni/README b/mtklibs/libvie_jni/README new file mode 100755 index 0000000000000000000000000000000000000000..6b70ab41bcfa76d93404550a36ce189849b8fa16 --- /dev/null +++ b/mtklibs/libvie_jni/README @@ -0,0 +1,21 @@ +This module creates the libvie_jni.so libary file. + +WHAT IT DOES? +============= +libvie_jni is JNI layer of voice interface extension, Java app can call native layer APIS by it +and it will reveive the messages from native, and pass to java service. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +libuim, libutils, libbinder, libandroid_runtime, libnativehelper, libcutils + +and the following libs from MediaTek: + +libvie + +HOW TO USE IT? +============== + +java app call call the fuctions in this library. diff --git a/mtklibs/libvie_jni/arm/libvie_jni.so b/mtklibs/libvie_jni/arm/libvie_jni.so new file mode 100755 index 0000000000000000000000000000000000000000..d2316476687d800bbec7f1b721eb946129fb4706 Binary files /dev/null and b/mtklibs/libvie_jni/arm/libvie_jni.so differ diff --git a/mtklibs/libvoicerecognition/Android.mk_ b/mtklibs/libvoicerecognition/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..db73f235f60e8dfa85f5bba20c54f67974df9e7a --- /dev/null +++ b/mtklibs/libvoicerecognition/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvoicerecognition +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libstagefright libmedia libstdc++ libgui libsqlite libmtk_drvb libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvoicerecognition.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvoicerecognition/README b/mtklibs/libvoicerecognition/README new file mode 100755 index 0000000000000000000000000000000000000000..24456f8508d50c55b58ffb7d0825fac786950d0e --- /dev/null +++ b/mtklibs/libvoicerecognition/README @@ -0,0 +1,22 @@ +This module creates the libvoicerecognition.so libary file. + +WHAT IT DOES? +============= +libvie is the main native library in voice features. voice ui, voice unlock, voice contact search, vow all use it +it controls libaudiostream library to record pcm. +it calls swip to recognize the different command and return the result to java service. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + + libcutils, libutils, libstlport, libgui, libdl, libsqlite + +and the following libs from MediaTek: + + libstagefright, libmedia, libaudiostream, libvoiceunlock, libvoiceui, libmtk_drvb, libmtk_drvb + +HOW TO USE IT? +============== + +user can call the fuctions in this library by JNI layer. \ No newline at end of file diff --git a/mtklibs/libvoicerecognition/arm/libvoicerecognition.so b/mtklibs/libvoicerecognition/arm/libvoicerecognition.so new file mode 100755 index 0000000000000000000000000000000000000000..a4f7822e19a3ea5e80874dc6bc49f3e7c9ed9d3a Binary files /dev/null and b/mtklibs/libvoicerecognition/arm/libvoicerecognition.so differ diff --git a/mtklibs/libvoicerecognition_jni/Android.mk_ b/mtklibs/libvoicerecognition_jni/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..983feb82728723dbcc9024509b1b792031207737 --- /dev/null +++ b/mtklibs/libvoicerecognition_jni/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvoicerecognition_jni +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libui libbinder libandroid_runtime libnativehelper libmedia libmedia_jni libvoicerecognition libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvoicerecognition_jni.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvoicerecognition_jni/README b/mtklibs/libvoicerecognition_jni/README new file mode 100755 index 0000000000000000000000000000000000000000..d43f97dbabf5b8e03511029f85b3af5bf5ceb530 --- /dev/null +++ b/mtklibs/libvoicerecognition_jni/README @@ -0,0 +1,21 @@ +This module creates the libvoicerecognition_jni.so libary file. + +WHAT IT DOES? +============= +libvoicerecognition_jni is JNI layer of voice ui, voice unlock, voice contact search and VOW, Java app can call native layer APIS by it +and it will reveive the messages from native, and pass to java service. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +libui, libutils, libbinder, libandroid_runtime, libnativehelper, libcutils + +and the following libs from MediaTek: + +libvoicerecognition, libmedia, libmedia_jni + +HOW TO USE IT? +============== + +java app call call the fuctions in this library. diff --git a/mtklibs/libvoicerecognition_jni/arm/libvoicerecognition_jni.so b/mtklibs/libvoicerecognition_jni/arm/libvoicerecognition_jni.so new file mode 100755 index 0000000000000000000000000000000000000000..0ad44f5f4ce47d51627cea3628e75ec6fb0e6b86 Binary files /dev/null and b/mtklibs/libvoicerecognition_jni/arm/libvoicerecognition_jni.so differ diff --git a/mtklibs/libvp8dec_sw/Android.mk_ b/mtklibs/libvp8dec_sw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..9b227a61a49b969853600d7d84226ba8380343f6 --- /dev/null +++ b/mtklibs/libvp8dec_sw/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvp8dec_sw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvp8dec_sw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvp8dec_sw/NOTICE b/mtklibs/libvp8dec_sw/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libvp8dec_sw/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libvp8dec_sw/README b/mtklibs/libvp8dec_sw/README new file mode 100755 index 0000000000000000000000000000000000000000..0fb40ce84c14904d7a89c97a0480a7b3664d3ef2 --- /dev/null +++ b/mtklibs/libvp8dec_sw/README @@ -0,0 +1,17 @@ +Library of MTK provided SW/HW video codec, including encoder and decoder. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libvp8dec_sw.a is sw vp8 decoder + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libc.so +2. libcutils.so + +HOW TO USE IT? +============== +It is used to decode vp8 bitstream to YUV frame \ No newline at end of file diff --git a/mtklibs/libvp8dec_sw/arm/libvp8dec_sw.a b/mtklibs/libvp8dec_sw/arm/libvp8dec_sw.a new file mode 100755 index 0000000000000000000000000000000000000000..82e31983e5038b5ce1d19fd41ef478bab680d032 Binary files /dev/null and b/mtklibs/libvp8dec_sw/arm/libvp8dec_sw.a differ diff --git a/mtklibs/libvp8enc_sw/Android.mk_ b/mtklibs/libvp8enc_sw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..dc2ab80f87c35809eaf850cb694c10cc887ce8ca --- /dev/null +++ b/mtklibs/libvp8enc_sw/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvp8enc_sw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvp8enc_sw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvp8enc_sw/NOTICE b/mtklibs/libvp8enc_sw/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libvp8enc_sw/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libvp8enc_sw/README b/mtklibs/libvp8enc_sw/README new file mode 100755 index 0000000000000000000000000000000000000000..b363fbbd75067546be228b7c3dea726e6a528a1e --- /dev/null +++ b/mtklibs/libvp8enc_sw/README @@ -0,0 +1,28 @@ +Library of MTK VP8 sw enc features, icluding encoding yuv to bitstream + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libvp8enc_sw.a contains MediaTek developed vp8 sw enc modules. +Without them, customer can use android solution + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libcutils.so + +and the following libs from MediaTek: +1. libmtk_drvb.so +2. libmet-tag.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +all api interface are at (vendor/mediatek/proprietary/hardware/libvcodec/common/software/vp8_enc/) + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libvp8enc_sw/arm/libvp8enc_sw.a b/mtklibs/libvp8enc_sw/arm/libvp8enc_sw.a new file mode 100755 index 0000000000000000000000000000000000000000..b371f97518199b4a5a29ff044099f761a163dc6e Binary files /dev/null and b/mtklibs/libvp8enc_sw/arm/libvp8enc_sw.a differ diff --git a/mtklibs/libvp9dec_sw/Android.mk_ b/mtklibs/libvp9dec_sw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a8c3607b0c566a2e994e4ebc25e937f7e0f2931f --- /dev/null +++ b/mtklibs/libvp9dec_sw/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvp9dec_sw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvp9dec_sw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvp9dec_sw/NOTICE b/mtklibs/libvp9dec_sw/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libvp9dec_sw/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libvp9dec_sw/README b/mtklibs/libvp9dec_sw/README new file mode 100755 index 0000000000000000000000000000000000000000..bf66c9df3b6d27de8f7bb89761301ee2c5897c79 --- /dev/null +++ b/mtklibs/libvp9dec_sw/README @@ -0,0 +1,28 @@ +Library of MTK vp9 codec driver. + +This library is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= +libvp9dec_sw contains MediaTek developed vp9 software video decoder related functions. +Without them, vp9 video playback will not work¡¨ + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. llibcutils libc.so + +and the following libs from MediaTek: +NA + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +Provide vp9 decoder api invoked by common decoder interface, +those api are all internal-used and are invisible to customer. + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/libvp9dec_sw/arm/libvp9dec_sw.a b/mtklibs/libvp9dec_sw/arm/libvp9dec_sw.a new file mode 100755 index 0000000000000000000000000000000000000000..30c3642abbb29a7528617485dcc5734e5412eaed Binary files /dev/null and b/mtklibs/libvp9dec_sw/arm/libvp9dec_sw.a differ diff --git a/mtklibs/libvt_avsync/Android.mk_ b/mtklibs/libvt_avsync/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..e31136cd2e85edbf361f4598093999e838e38cd1 --- /dev/null +++ b/mtklibs/libvt_avsync/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvt_avsync +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libbinder libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libvt_avsync.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvt_avsync +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvt_avsync.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvt_avsync/arm/libvt_avsync.so b/mtklibs/libvt_avsync/arm/libvt_avsync.so new file mode 100755 index 0000000000000000000000000000000000000000..5886ff10893c41ab0c33a9164f0dd05bdf0e97af Binary files /dev/null and b/mtklibs/libvt_avsync/arm/libvt_avsync.so differ diff --git a/mtklibs/libvt_avsync/libvt_avsync.so b/mtklibs/libvt_avsync/libvt_avsync.so new file mode 100755 index 0000000000000000000000000000000000000000..ef7631e691ef06a65f895f7faee9eb69229d7983 Binary files /dev/null and b/mtklibs/libvt_avsync/libvt_avsync.so differ diff --git a/mtklibs/libvt_socketbind/Android.mk_ b/mtklibs/libvt_socketbind/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..ae25eefecf9f7105765fa760c82ed637eba2abd4 --- /dev/null +++ b/mtklibs/libvt_socketbind/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvt_socketbind +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libbinder libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libvt_socketbind.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvt_socketbind +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvt_socketbind.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvt_socketbind/arm/libvt_socketbind.so b/mtklibs/libvt_socketbind/arm/libvt_socketbind.so new file mode 100755 index 0000000000000000000000000000000000000000..71535e500fa8de002dd7581749f0b7c82c86b53a Binary files /dev/null and b/mtklibs/libvt_socketbind/arm/libvt_socketbind.so differ diff --git a/mtklibs/libvt_socketbind/libvt_socketbind.so b/mtklibs/libvt_socketbind/libvt_socketbind.so new file mode 100755 index 0000000000000000000000000000000000000000..4b8055b5986eeb5832d7fbf74c0e115e44d7b1d2 Binary files /dev/null and b/mtklibs/libvt_socketbind/libvt_socketbind.so differ diff --git a/mtklibs/libvtmal/Android.mk_ b/mtklibs/libvtmal/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..ffbbbd6408fc6839659c26295eef84764bfc3ed8 --- /dev/null +++ b/mtklibs/libvtmal/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvtmal +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libbinder libmedia libui libcamera_client libgui libskia libblisrc libstagefright libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libvtmal.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libvtmal +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libbinder libmedia libui libcamera_client libmtkcamera_client libgui libskia libamrvt libblisrc libvt_custom libstagefright libamr_wrap libawb_wrap libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libvtmal.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libvtmal/NOTICE b/mtklibs/libvtmal/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2056235fb9e40327f09830d67110d494d4b64665 --- /dev/null +++ b/mtklibs/libvtmal/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/libvtmal/README b/mtklibs/libvtmal/README new file mode 100755 index 0000000000000000000000000000000000000000..e2608729a42eeeb08df7a58502099340e35c254c --- /dev/null +++ b/mtklibs/libvtmal/README @@ -0,0 +1,26 @@ +This module creates the libvtmal.so libary file. + +WHAT IT DOES? +============= +libvtmal mainly used for multimedia control for 3G VT + + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + + libcutils, libutils,libui, libgui, libinder,libblisrc + +and the following libs from MediaTek: + + libamrvt,libcamera_client,libmtkcamera_client,libskia,libvt_custom,libamr_wrap,libawb_wrap,libstagefright, libmedia + + +HOW TO USE IT? +============== + +The libvtmal libraries should not be used directly by an application developer. +Used by JNI layer + +The majority of source code for this library were written by MediaTek. Various +open source libraries are also used and contained in this folder. diff --git a/mtklibs/libvtmal/arm/libvtmal.so b/mtklibs/libvtmal/arm/libvtmal.so new file mode 100755 index 0000000000000000000000000000000000000000..6b90a682a3b1deaa2430b8e2dfad994226159fc9 Binary files /dev/null and b/mtklibs/libvtmal/arm/libvtmal.so differ diff --git a/mtklibs/libvtmal/libvtmal.so b/mtklibs/libvtmal/libvtmal.so new file mode 100755 index 0000000000000000000000000000000000000000..0b0d67355bb2395e0ccd5c9d1f57f47ab2be49aa Binary files /dev/null and b/mtklibs/libvtmal/libvtmal.so differ diff --git a/mtklibs/libwarpsw/Android.mk_ b/mtklibs/libwarpsw/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..31e7ef5a23edd72d48155bf14ff6501bd1c0a3f6 --- /dev/null +++ b/mtklibs/libwarpsw/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libwarpsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libwarpsw.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libwarpsw +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libwarpsw.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libwarpsw/README b/mtklibs/libwarpsw/README new file mode 100755 index 0000000000000000000000000000000000000000..2308a284e7a59a8e0b9fedff45f283c2f5b54b69 --- /dev/null +++ b/mtklibs/libwarpsw/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +camera feature + +HOW IT WAS BUILT? +================== +static library + +HOW TO USE IT? +============== +should not be directly accessed \ No newline at end of file diff --git a/mtklibs/libwarpsw/arm/libwarpsw.a b/mtklibs/libwarpsw/arm/libwarpsw.a new file mode 100755 index 0000000000000000000000000000000000000000..58b514cd5f03da92530c9df79f51e4ca0f4afbe5 Binary files /dev/null and b/mtklibs/libwarpsw/arm/libwarpsw.a differ diff --git a/mtklibs/libwarpsw/libwarpsw.a b/mtklibs/libwarpsw/libwarpsw.a new file mode 100755 index 0000000000000000000000000000000000000000..a3387c7a9693886027b6208dae59edb5d828bb27 Binary files /dev/null and b/mtklibs/libwarpsw/libwarpsw.a differ diff --git a/mtklibs/libwvdecryptcommon_L1/Android.mk_ b/mtklibs/libwvdecryptcommon_L1/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..87f1282305afd64f87a3e40ff4b689040412271d --- /dev/null +++ b/mtklibs/libwvdecryptcommon_L1/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libwvdecryptcommon_L1 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libwvdecryptcommon_L1.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libwvdecryptcommon_L1/README b/mtklibs/libwvdecryptcommon_L1/README new file mode 100755 index 0000000000000000000000000000000000000000..349c09625e490f8d4e6d307478e23c728d86affc --- /dev/null +++ b/mtklibs/libwvdecryptcommon_L1/README @@ -0,0 +1,20 @@ +library of Drm features, including widevine crypto plugin api. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libwvdecryptcommon_L$ is used by crypto plugin, it contains method to call oem api. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libwvdecryptcommon_L$ is used by crypto plugin, it calls oem api to decrypt. diff --git a/mtklibs/libwvdecryptcommon_L1/arm/libwvdecryptcommon_L1.a b/mtklibs/libwvdecryptcommon_L1/arm/libwvdecryptcommon_L1.a new file mode 100755 index 0000000000000000000000000000000000000000..55df66a64493ed86cce49f929e3a45da3dcae589 Binary files /dev/null and b/mtklibs/libwvdecryptcommon_L1/arm/libwvdecryptcommon_L1.a differ diff --git a/mtklibs/libwvdecryptcommon_L3/Android.mk_ b/mtklibs/libwvdecryptcommon_L3/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..5adf67a73331a05103c582daaa03dea4badf5b84 --- /dev/null +++ b/mtklibs/libwvdecryptcommon_L3/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libwvdecryptcommon_L3 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libwvdecryptcommon_L3.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libwvdecryptcommon_L3/README b/mtklibs/libwvdecryptcommon_L3/README new file mode 100755 index 0000000000000000000000000000000000000000..349c09625e490f8d4e6d307478e23c728d86affc --- /dev/null +++ b/mtklibs/libwvdecryptcommon_L3/README @@ -0,0 +1,20 @@ +library of Drm features, including widevine crypto plugin api. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libwvdecryptcommon_L$ is used by crypto plugin, it contains method to call oem api. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libwvdecryptcommon_L$ is used by crypto plugin, it calls oem api to decrypt. diff --git a/mtklibs/libwvdecryptcommon_L3/arm/libwvdecryptcommon_L3.a b/mtklibs/libwvdecryptcommon_L3/arm/libwvdecryptcommon_L3.a new file mode 100755 index 0000000000000000000000000000000000000000..8c16dbdbe49089e530a061874b2f1f3f47fd7e63 Binary files /dev/null and b/mtklibs/libwvdecryptcommon_L3/arm/libwvdecryptcommon_L3.a differ diff --git a/mtklibs/libwvdrmcryptoplugin/Android.mk_ b/mtklibs/libwvdrmcryptoplugin/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..16799540688931ba2f338fe074e7416744ea06fa --- /dev/null +++ b/mtklibs/libwvdrmcryptoplugin/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libwvdrmcryptoplugin +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libwvdrmcryptoplugin.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libwvdrmcryptoplugin/README b/mtklibs/libwvdrmcryptoplugin/README new file mode 100755 index 0000000000000000000000000000000000000000..af5aca5f9d67b019f5fe4eb0bbeb2d60a11471fc --- /dev/null +++ b/mtklibs/libwvdrmcryptoplugin/README @@ -0,0 +1,21 @@ +Library of Drm features. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libwvdrmcryptoplugin will be used by libwvdrmengine. +Without them, widevine drm will not work. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libwvdrmcryptoplugin provides interface of crypto plugin, it is built library. diff --git a/mtklibs/libwvdrmcryptoplugin/arm/libwvdrmcryptoplugin.a b/mtklibs/libwvdrmcryptoplugin/arm/libwvdrmcryptoplugin.a new file mode 100755 index 0000000000000000000000000000000000000000..023c4e891f04c66a29136b0c18e5d8b33d6a4883 Binary files /dev/null and b/mtklibs/libwvdrmcryptoplugin/arm/libwvdrmcryptoplugin.a differ diff --git a/mtklibs/libwvdrmdrmplugin/Android.mk_ b/mtklibs/libwvdrmdrmplugin/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..cc813d56298ddbbafd3a1c4310b3b8396ee30a2e --- /dev/null +++ b/mtklibs/libwvdrmdrmplugin/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libwvdrmdrmplugin +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libwvdrmdrmplugin.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libwvdrmdrmplugin/NOTICE b/mtklibs/libwvdrmdrmplugin/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..8d1c4a32af71ade26b8eb52ec8f5d2baccfbcd8c --- /dev/null +++ b/mtklibs/libwvdrmdrmplugin/NOTICE @@ -0,0 +1,22 @@ +// Copyright 2013 Google Inc. All Rights Reserved.: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/libwvdrmdrmplugin/README b/mtklibs/libwvdrmdrmplugin/README new file mode 100755 index 0000000000000000000000000000000000000000..3ca9909cdf2873d0ebb1e57a7d0201d9278d24e2 --- /dev/null +++ b/mtklibs/libwvdrmdrmplugin/README @@ -0,0 +1,21 @@ +Library of Drm features, including classic drm widevine plugin. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libwvdrmdrmplugin will be used by classic drm, it contains api for drmmanager. +Without them, classic drm will not work. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libwvdrmdrmplugin provides interface of classic drm, it is built library. diff --git a/mtklibs/libwvdrmdrmplugin/arm/libwvdrmdrmplugin.a b/mtklibs/libwvdrmdrmplugin/arm/libwvdrmdrmplugin.a new file mode 100755 index 0000000000000000000000000000000000000000..3cada708316107460a8b874c53b8769def90ff8d Binary files /dev/null and b/mtklibs/libwvdrmdrmplugin/arm/libwvdrmdrmplugin.a differ diff --git a/mtklibs/libwvdrmengine/Android.mk_ b/mtklibs/libwvdrmengine/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..4f898b33e5f565dc637c4611432d1f1ca6aeec37 --- /dev/null +++ b/mtklibs/libwvdrmengine/Android.mk_ @@ -0,0 +1,13 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libwvdrmengine +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = $(PRODUCT_OUT)/system/vendor/lib/mediadrm +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libprotobuf-cpp-lite libstagefright_foundation libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libwvdrmengine.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/libwvdrmengine/NOTICE b/mtklibs/libwvdrmengine/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..3071ad5c785dc1506008d98615f922d7377c735d --- /dev/null +++ b/mtklibs/libwvdrmengine/NOTICE @@ -0,0 +1,38 @@ +This software contains software licensed under the BSD license: + +MODP_B64 - High performance base64 encoder/decoder +http://code.google.com/p/stringencoders/ + +Copyright © 2005, 2006, 2007 Nick Galbreath -- nickg [at] modp [dot] com +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + Neither the name of the modp.com nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This is the standard "new" BSD license: +http://www.opensource.org/licenses/bsd-license.php + diff --git a/mtklibs/libwvdrmengine/README b/mtklibs/libwvdrmengine/README new file mode 100755 index 0000000000000000000000000000000000000000..184c40db2c3b7c105b0cadc3c3d7a6c1ffdb3676 --- /dev/null +++ b/mtklibs/libwvdrmengine/README @@ -0,0 +1,28 @@ +Library of Drm features, including cdm, media drm,crypto related functions. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libwvdrmengine will be used by drm, it implement basic functions. +Without them, widevine drm will not work. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libcrypto.so +2. libcutils.so +3. libdl.so +4. liblog.so +5. libstlport.so +6. libutils.so +7. libstagefright_foundation.so + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libwvdrmengine provides interface of drm basic functions, it is built library. diff --git a/mtklibs/libwvdrmengine/arm/libwvdrmengine.so b/mtklibs/libwvdrmengine/arm/libwvdrmengine.so new file mode 100755 index 0000000000000000000000000000000000000000..585fcf2041a14faf76277955542d41b7376f1950 Binary files /dev/null and b/mtklibs/libwvdrmengine/arm/libwvdrmengine.so differ diff --git a/mtklibs/libwvlevel3/Android.mk_ b/mtklibs/libwvlevel3/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..bb637a75628325a66fe4c11165a4d1aaecde4318 --- /dev/null +++ b/mtklibs/libwvlevel3/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libwvlevel3 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libwvlevel3.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libwvlevel3/README b/mtklibs/libwvlevel3/README new file mode 100755 index 0000000000000000000000000000000000000000..5768b3565db530198440d5d9d8b43d21ca4b4cef --- /dev/null +++ b/mtklibs/libwvlevel3/README @@ -0,0 +1,21 @@ +Library of Drm features, prebuild libwvlevel3.a for arm architecture. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libwvlevel3 will be used by drm, it is for arm architecture. +Without them, widevine drm will not work in arm architecture. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libwvlevel3 provides interface of drm basic functions for arm architecture, it is built library. diff --git a/mtklibs/libwvlevel3/arm/libwvlevel3.a b/mtklibs/libwvlevel3/arm/libwvlevel3.a new file mode 100755 index 0000000000000000000000000000000000000000..645dd864bfc2f56eb7d433186adc37efb3bc3f51 Binary files /dev/null and b/mtklibs/libwvlevel3/arm/libwvlevel3.a differ diff --git a/mtklibs/libwvmcommon_L1/Android.mk_ b/mtklibs/libwvmcommon_L1/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..6ddc2ddb8f5fb1793a036f6366719da9cd98da3c --- /dev/null +++ b/mtklibs/libwvmcommon_L1/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libwvmcommon_L1 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libwvmcommon_L1.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libwvmcommon_L1/README b/mtklibs/libwvmcommon_L1/README new file mode 100755 index 0000000000000000000000000000000000000000..bafe2cd67464fbdf0fa1eb670da51b5066fec702 --- /dev/null +++ b/mtklibs/libwvmcommon_L1/README @@ -0,0 +1,22 @@ +library of Drm features, including widevine extractor, widevine mediasource. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libwvmcommon_L$ is used by mediaplayerservice, it contains extract widevine mediasource. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libstagefright.so +2. libstagefright_foundation.so + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libwvmcommon_L$ is used by mediaplayerservice to extract mediasource. diff --git a/mtklibs/libwvmcommon_L1/arm/libwvmcommon_L1.a b/mtklibs/libwvmcommon_L1/arm/libwvmcommon_L1.a new file mode 100755 index 0000000000000000000000000000000000000000..8ea1c282ad7289fd349171cd83050b4696920ef8 Binary files /dev/null and b/mtklibs/libwvmcommon_L1/arm/libwvmcommon_L1.a differ diff --git a/mtklibs/libwvmcommon_L3/Android.mk_ b/mtklibs/libwvmcommon_L3/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a5e1e6283dd7db88fdbbb320a780bef49be5653c --- /dev/null +++ b/mtklibs/libwvmcommon_L3/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libwvmcommon_L3 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/libwvmcommon_L3.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libwvmcommon_L3/README b/mtklibs/libwvmcommon_L3/README new file mode 100755 index 0000000000000000000000000000000000000000..bafe2cd67464fbdf0fa1eb670da51b5066fec702 --- /dev/null +++ b/mtklibs/libwvmcommon_L3/README @@ -0,0 +1,22 @@ +library of Drm features, including widevine extractor, widevine mediasource. + +This library is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +libwvmcommon_L$ is used by mediaplayerservice, it contains extract widevine mediasource. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. libstagefright.so +2. libstagefright_foundation.so + +and the following libs from MediaTek: + +All source/dependency modules of this module are already put in +'system/lib' folder. + +HOW TO USE IT? +============== +libwvmcommon_L$ is used by mediaplayerservice to extract mediasource. diff --git a/mtklibs/libwvmcommon_L3/arm/libwvmcommon_L3.a b/mtklibs/libwvmcommon_L3/arm/libwvmcommon_L3.a new file mode 100755 index 0000000000000000000000000000000000000000..b0a4e687012d8a83eec13478910e835a9b92640b Binary files /dev/null and b/mtklibs/libwvmcommon_L3/arm/libwvmcommon_L3.a differ diff --git a/mtklibs/libyamaha_utils/Android.mk_ b/mtklibs/libyamaha_utils/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..519e93ca87cfee4c34245dc52d52e464a51503ec --- /dev/null +++ b/mtklibs/libyamaha_utils/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = libyamaha_utils +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = libyamaha_utils.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/libyamaha_utils/NOTICE b/mtklibs/libyamaha_utils/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/libyamaha_utils/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/libyamaha_utils/README b/mtklibs/libyamaha_utils/README new file mode 100755 index 0000000000000000000000000000000000000000..bb33af8b207a9a445676a8a56815fc03f53e7955 --- /dev/null +++ b/mtklibs/libyamaha_utils/README @@ -0,0 +1,21 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. \ No newline at end of file diff --git a/mtklibs/libyamaha_utils/libyamaha_utils.a b/mtklibs/libyamaha_utils/libyamaha_utils.a new file mode 100755 index 0000000000000000000000000000000000000000..fb5786498a4b58501dd6387b766d296796b3694b Binary files /dev/null and b/mtklibs/libyamaha_utils/libyamaha_utils.a differ diff --git a/mtklibs/lsm303md/Android.mk_ b/mtklibs/lsm303md/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..f03be956b05658c99175c0e9d4c1b559edcba977 --- /dev/null +++ b/mtklibs/lsm303md/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = lsm303md +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = $(PRODUCT_OUT)/system/bin +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = lsm303md +include $(BUILD_PREBUILT) diff --git a/mtklibs/lsm303md/NOTICE b/mtklibs/lsm303md/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/lsm303md/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/lsm303md/README b/mtklibs/lsm303md/README new file mode 100755 index 0000000000000000000000000000000000000000..57bd3cab3a9bdd95b8db7773232a199ad0003ca6 --- /dev/null +++ b/mtklibs/lsm303md/README @@ -0,0 +1,29 @@ + + +WHAT IT DOES? +============= +It provide G-sensor test item feature on PC side, which allow test gsensor as GUI. + + +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. + diff --git a/mtklibs/lsm303md/lsm303md b/mtklibs/lsm303md/lsm303md new file mode 100755 index 0000000000000000000000000000000000000000..67bdd35b844548001f9e011e784392fc9ea335c4 Binary files /dev/null and b/mtklibs/lsm303md/lsm303md differ diff --git a/mtklibs/magd/Android.mk_ b/mtklibs/magd/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d47f5010c0a288ca260920135823869baaca55b3 --- /dev/null +++ b/mtklibs/magd/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = magd +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = $(PRODUCT_OUT)/system/bin +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = magd +include $(BUILD_PREBUILT) diff --git a/mtklibs/magd/NOTICE b/mtklibs/magd/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/magd/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/magd/README b/mtklibs/magd/README new file mode 100755 index 0000000000000000000000000000000000000000..bb33af8b207a9a445676a8a56815fc03f53e7955 --- /dev/null +++ b/mtklibs/magd/README @@ -0,0 +1,21 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. \ No newline at end of file diff --git a/mtklibs/magd/magd b/mtklibs/magd/magd new file mode 100755 index 0000000000000000000000000000000000000000..8897f55b247da3971f07039783899872d65ec56f Binary files /dev/null and b/mtklibs/magd/magd differ diff --git a/mtklibs/mc6420d/Android.mk_ b/mtklibs/mc6420d/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..322b17adf5d15a74222cb35e09aec6bae4b76e5c --- /dev/null +++ b/mtklibs/mc6420d/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = mc6420d +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = $(PRODUCT_OUT)/system/bin +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = mc6420d +include $(BUILD_PREBUILT) diff --git a/mtklibs/mc6420d/README b/mtklibs/mc6420d/README new file mode 100755 index 0000000000000000000000000000000000000000..f7d36c5bc0187e63f65a2be970e959542eec6a81 --- /dev/null +++ b/mtklibs/mc6420d/README @@ -0,0 +1,18 @@ +MC6420 daemon + +WHAT IT DOES? +============= +MC6420 daemon + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +and the following libs from MediaTek: +1. libmcubesensors.a + +HOW TO USE IT? +============== +Start mc6420d service + +All the source code of this library were written by mcube co.. diff --git a/mtklibs/mc6420d/mc6420d b/mtklibs/mc6420d/mc6420d new file mode 100755 index 0000000000000000000000000000000000000000..0d6dbf0fe7be340740e5ed49f7befaa65f61e79f Binary files /dev/null and b/mtklibs/mc6420d/mc6420d differ diff --git a/mtklibs/memsicd/Android.mk_ b/mtklibs/memsicd/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..3ce6545f0a74ffeb0178f8137a8e9473eaed263e --- /dev/null +++ b/mtklibs/memsicd/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = memsicd +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = memsicd +include $(BUILD_PREBUILT) diff --git a/mtklibs/memsicd/NOTICE b/mtklibs/memsicd/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/memsicd/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/memsicd/README b/mtklibs/memsicd/README new file mode 100755 index 0000000000000000000000000000000000000000..bb33af8b207a9a445676a8a56815fc03f53e7955 --- /dev/null +++ b/mtklibs/memsicd/README @@ -0,0 +1,21 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. \ No newline at end of file diff --git a/mtklibs/memsicd/memsicd b/mtklibs/memsicd/memsicd new file mode 100755 index 0000000000000000000000000000000000000000..03dcea676c48df9655639c1df39f40805a43bab5 Binary files /dev/null and b/mtklibs/memsicd/memsicd differ diff --git a/mtklibs/memsicd3416x/Android.mk_ b/mtklibs/memsicd3416x/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d1f9d4a26a521eb9ef326fa773906564f4cf5a04 --- /dev/null +++ b/mtklibs/memsicd3416x/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = memsicd3416x +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = memsicd3416x +include $(BUILD_PREBUILT) diff --git a/mtklibs/memsicd3416x/NOTICE b/mtklibs/memsicd3416x/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/memsicd3416x/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/memsicd3416x/README b/mtklibs/memsicd3416x/README new file mode 100755 index 0000000000000000000000000000000000000000..bb33af8b207a9a445676a8a56815fc03f53e7955 --- /dev/null +++ b/mtklibs/memsicd3416x/README @@ -0,0 +1,21 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. \ No newline at end of file diff --git a/mtklibs/memsicd3416x/memsicd3416x b/mtklibs/memsicd3416x/memsicd3416x new file mode 100755 index 0000000000000000000000000000000000000000..7c888c22511d28562aaef3aff92dc7d89ca37dd7 Binary files /dev/null and b/mtklibs/memsicd3416x/memsicd3416x differ diff --git a/mtklibs/mmp/Android.mk_ b/mtklibs/mmp/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..5277958e3d0a26b62550dccd4df56da951ffdbae --- /dev/null +++ b/mtklibs/mmp/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = mmp +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = mmp +include $(BUILD_PREBUILT) diff --git a/mtklibs/mmp/README b/mtklibs/mmp/README new file mode 100755 index 0000000000000000000000000000000000000000..b52e68c0bf5b54d9b8f6022d8c6cbef57794c135 --- /dev/null +++ b/mtklibs/mmp/README @@ -0,0 +1,20 @@ +The bin file 'mmp' is a debug tool for catching display debug log. +This bin is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= + +capture display debug log from kernel to external tool. + +HOW IT WAS BUILT? +================== + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + + +HOW TO USE IT? +============== + +The bin file is a tool, and can get mmp log from kernel. diff --git a/mtklibs/mmp/mmp b/mtklibs/mmp/mmp new file mode 100755 index 0000000000000000000000000000000000000000..3e6d15a0a8d61b8905df7f4730429ac570051883 Binary files /dev/null and b/mtklibs/mmp/mmp differ diff --git a/mtklibs/mobile_log_d/Android.mk_ b/mtklibs/mobile_log_d/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..d854c9b557865417a2274f214580236b32395702 --- /dev/null +++ b/mtklibs/mobile_log_d/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = mobile_log_d +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libselinux libmtk_drvb libaed libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = mobile_log_d +include $(BUILD_PREBUILT) diff --git a/mtklibs/mobile_log_d/README b/mtklibs/mobile_log_d/README new file mode 100755 index 0000000000000000000000000000000000000000..dae26d46b41965cf3386d238ee5353439b39a033 --- /dev/null +++ b/mtklibs/mobile_log_d/README @@ -0,0 +1,27 @@ +Log tool which can record log to sdcard. + +This module can't release to customer. + + +WHAT IT DOES? +============= +It will record many type of logs to sdcard. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +1. liblog.so +2. libcutils.so +3. libutils.so +4. libselinux.so + +and the following libs from MediaTek: +1. libmtk_drvb.so +2. libdrvb.so + +HOW TO USE IT? +============== + +This module should be controled by mtklogger.qpk + +All the source code of this module were written by MediaTek co.. diff --git a/mtklibs/mobile_log_d/mobile_log_d b/mtklibs/mobile_log_d/mobile_log_d new file mode 100755 index 0000000000000000000000000000000000000000..071e1fc8dad85647ba964f061b6e0cacee2cc220 Binary files /dev/null and b/mtklibs/mobile_log_d/mobile_log_d differ diff --git a/mtklibs/mobile_manager/Android.mk_ b/mtklibs/mobile_manager/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..6cfd469d0dfdca8f097863548583b7b4b9db8e63 --- /dev/null +++ b/mtklibs/mobile_manager/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = mobile_manager +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/mobile_manager/NOTICE b/mtklibs/mobile_manager/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..29cced39b9193fcf644647cc31fbe06d228ddeae --- /dev/null +++ b/mtklibs/mobile_manager/NOTICE @@ -0,0 +1,22 @@ +* Copyright (C) 2008 The Android Open Source Project: + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/mobile_manager/README b/mtklibs/mobile_manager/README new file mode 100755 index 0000000000000000000000000000000000000000..fc32bc7c4bccacb4a4adbe3654f24f517b6f88a1 --- /dev/null +++ b/mtklibs/mobile_manager/README @@ -0,0 +1,16 @@ +Mobile Management. + +WHAT IT DOES? +============= +To give smart phone user a more secure environment, the CATR +(China Academy of Telecommunication Research of MIIT) publish +a set of specifications (YDT 2407 and YDT 2408) and all smart +devices in China must support it. + +HOW IT WAS BUILT? +================== +It is built along with module. + +HOW TO USE IT? +============== +Static link to service.jar. diff --git a/mtklibs/mobile_manager/javalib.jar b/mtklibs/mobile_manager/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..3d68b04ad18f05263887a592ac0519de71ea1259 Binary files /dev/null and b/mtklibs/mobile_manager/javalib.jar differ diff --git a/mtklibs/mplugin/Android.mk_ b/mtklibs/mplugin/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..26b724dae0a545fe329779b1f7bbc4450dccf26f --- /dev/null +++ b/mtklibs/mplugin/Android.mk_ @@ -0,0 +1,6 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_MODULE = mplugin +LOCAL_SRC_FILES := $(call all-subdir-java-files) +include $(LOCAL_PREBUILT_JAVA_LIBRARIES) diff --git a/mtklibs/mplugin/README b/mtklibs/mplugin/README new file mode 100755 index 0000000000000000000000000000000000000000..7740f3fe6037fae7d25fc4c028bf2ec2971e2be1 --- /dev/null +++ b/mtklibs/mplugin/README @@ -0,0 +1,13 @@ +MPlugin core mechanism. + +WHAT IT DOES? +============= +MPlugin core mechanism for apk preload, check Apk's certificate and create instance. + +HOW IT WAS BUILT? +================== +It is built along into mediatek-common.jar. + +HOW TO USE IT? +============== +MPlugin mechanism is invoked by framework's caller / app's caller. diff --git a/mtklibs/mplugin/src/javalib.jar b/mtklibs/mplugin/src/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..3083df0f570d824212bb87192e48d60fd3dfb21e Binary files /dev/null and b/mtklibs/mplugin/src/javalib.jar differ diff --git a/mtklibs/msensord/Android.mk_ b/mtklibs/msensord/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..9200fa38dd18a0072a133bba550cdbab218014de --- /dev/null +++ b/mtklibs/msensord/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = msensord +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = $(PRODUCT_OUT)/system/bin +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = msensord +include $(BUILD_PREBUILT) diff --git a/mtklibs/msensord/NOTICE b/mtklibs/msensord/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/msensord/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/msensord/README b/mtklibs/msensord/README new file mode 100755 index 0000000000000000000000000000000000000000..bb33af8b207a9a445676a8a56815fc03f53e7955 --- /dev/null +++ b/mtklibs/msensord/README @@ -0,0 +1,21 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. \ No newline at end of file diff --git a/mtklibs/msensord/msensord b/mtklibs/msensord/msensord new file mode 100755 index 0000000000000000000000000000000000000000..1dd67670e23e92ea8e6b41eadefbf60ede7eb469 Binary files /dev/null and b/mtklibs/msensord/msensord differ diff --git a/mtklibs/mtk-ril-prop-md1/Android.mk_ b/mtklibs/mtk-ril-prop-md1/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..42515b3cc4d768635c357015ded332119a4afe1e --- /dev/null +++ b/mtklibs/mtk-ril-prop-md1/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = mtk-ril-prop-md1 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = mtk-ril-prop-md1.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = mtk-ril-prop-md1 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/mtk-ril-prop-md1.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/mtk-ril-prop-md1/NOTICE b/mtklibs/mtk-ril-prop-md1/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/mtk-ril-prop-md1/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/mtk-ril-prop-md1/README b/mtklibs/mtk-ril-prop-md1/README new file mode 100755 index 0000000000000000000000000000000000000000..d3abcbc21c30c60d2c6731816f045818fdd0c35a --- /dev/null +++ b/mtklibs/mtk-ril-prop-md1/README @@ -0,0 +1,21 @@ +This directory contains RIL part of MTK telephony modules, which connect with modem + + +WHAT IT DOES? +============= +It handles RIL request and send the modem at command and receive response or indicator from the modem. + +HOW IT WAS BUILT? +================== + +The mtk-ril-prop-md1.a binary was built entirely from source files written by Mediatek. + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a static library 'mtk-ril-prop-md1.a'. + +The shared library 'mtk-ril-prop-md1.a' is used by mtk-ril.so + diff --git a/mtklibs/mtk-ril-prop-md1/arm/mtk-ril-prop-md1.a b/mtklibs/mtk-ril-prop-md1/arm/mtk-ril-prop-md1.a new file mode 100755 index 0000000000000000000000000000000000000000..e136c11ee218e7cffd519e5afc69a7309c590cdc Binary files /dev/null and b/mtklibs/mtk-ril-prop-md1/arm/mtk-ril-prop-md1.a differ diff --git a/mtklibs/mtk-ril-prop-md1/mtk-ril-prop-md1.a b/mtklibs/mtk-ril-prop-md1/mtk-ril-prop-md1.a new file mode 100755 index 0000000000000000000000000000000000000000..8fbf9bf89df2140b993462dd59eaedac7c4aa1d9 Binary files /dev/null and b/mtklibs/mtk-ril-prop-md1/mtk-ril-prop-md1.a differ diff --git a/mtklibs/mtk-ril-prop-md2/Android.mk_ b/mtklibs/mtk-ril-prop-md2/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..e918c819514d2821684c9d86bfd252dc355fd85b --- /dev/null +++ b/mtklibs/mtk-ril-prop-md2/Android.mk_ @@ -0,0 +1,23 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = mtk-ril-prop-md2 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = mtk-ril-prop-md2.a +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = mtk-ril-prop-md2 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/mtk-ril-prop-md2.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/mtk-ril-prop-md2/NOTICE b/mtklibs/mtk-ril-prop-md2/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/mtk-ril-prop-md2/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/mtk-ril-prop-md2/README b/mtklibs/mtk-ril-prop-md2/README new file mode 100755 index 0000000000000000000000000000000000000000..d3abcbc21c30c60d2c6731816f045818fdd0c35a --- /dev/null +++ b/mtklibs/mtk-ril-prop-md2/README @@ -0,0 +1,21 @@ +This directory contains RIL part of MTK telephony modules, which connect with modem + + +WHAT IT DOES? +============= +It handles RIL request and send the modem at command and receive response or indicator from the modem. + +HOW IT WAS BUILT? +================== + +The mtk-ril-prop-md1.a binary was built entirely from source files written by Mediatek. + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a static library 'mtk-ril-prop-md1.a'. + +The shared library 'mtk-ril-prop-md1.a' is used by mtk-ril.so + diff --git a/mtklibs/mtk-ril-prop-md2/arm/mtk-ril-prop-md2.a b/mtklibs/mtk-ril-prop-md2/arm/mtk-ril-prop-md2.a new file mode 100755 index 0000000000000000000000000000000000000000..19bbca16e62775bcd58fe6b608a5f07190ef92af Binary files /dev/null and b/mtklibs/mtk-ril-prop-md2/arm/mtk-ril-prop-md2.a differ diff --git a/mtklibs/mtk-ril-prop-md2/mtk-ril-prop-md2.a b/mtklibs/mtk-ril-prop-md2/mtk-ril-prop-md2.a new file mode 100755 index 0000000000000000000000000000000000000000..fd1677d8ed690cb1cc267855375b9fa5a814759a Binary files /dev/null and b/mtklibs/mtk-ril-prop-md2/mtk-ril-prop-md2.a differ diff --git a/mtklibs/muxreport/Android.mk_ b/mtklibs/muxreport/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..78349c1ea85048a21f974792efb60be194695310 --- /dev/null +++ b/mtklibs/muxreport/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = muxreport +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = muxreport +include $(BUILD_PREBUILT) diff --git a/mtklibs/muxreport/NOTICE b/mtklibs/muxreport/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/muxreport/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/muxreport/README b/mtklibs/muxreport/README new file mode 100755 index 0000000000000000000000000000000000000000..99124f8e055464456533bae9338d4636b1f75928 --- /dev/null +++ b/mtklibs/muxreport/README @@ -0,0 +1,17 @@ +This process controll modem by trigger CCCI ioctl + +This library is pre-built by MediaTek internally. + + +WHAT IT DOES? +============= +This process trigger CCCI ioctl to stop/start/reset modem + +HOW IT WAS BUILT? +================== +It is built to executable binary + +HOW TO USE IT? +============== +Using adb shell command to set ril.mux.report.case system +property value and execute muxreport process \ No newline at end of file diff --git a/mtklibs/muxreport/muxreport b/mtklibs/muxreport/muxreport new file mode 100755 index 0000000000000000000000000000000000000000..6042c8a97937ead95d51c7db9b8450815d42a210 Binary files /dev/null and b/mtklibs/muxreport/muxreport differ diff --git a/mtklibs/netdiag/Android.mk_ b/mtklibs/netdiag/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..6929d14b38e4ebb026b4683ce9cfa083c87f44d3 --- /dev/null +++ b/mtklibs/netdiag/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = netdiag +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libsysutils libnetutils libcrypto libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = netdiag +include $(BUILD_PREBUILT) diff --git a/mtklibs/netdiag/README b/mtklibs/netdiag/README new file mode 100755 index 0000000000000000000000000000000000000000..aef107772af57137d643671790f699801f23b669 --- /dev/null +++ b/mtklibs/netdiag/README @@ -0,0 +1,32 @@ +The bin file netdiag is a daemon service. +This bin is pre-built by MediaTek internal. + + +WHAT IT DOES? +============= + +netdiag is native service to process network log. +It is started in init.rc,and controlled by MTKLogger,send command to tcpdump to record network log. + + +HOW IT WAS BUILT? +================== + +It needs the following library from AOSP: +1. libutils.so +2. libcutils.so +3. libsysutils.so +5. libnetutils.so +6. libcrypto.so +7. liblog +8. external/libpcap + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + + +HOW TO USE IT? +============== + +This bin file is automatically started when system boots, and it behavior is controlled by MTKLogger + diff --git a/mtklibs/netdiag/netdiag b/mtklibs/netdiag/netdiag new file mode 100755 index 0000000000000000000000000000000000000000..5b0d5762fb547202e6dce0a5a728bc4d130ec50b Binary files /dev/null and b/mtklibs/netdiag/netdiag differ diff --git a/mtklibs/nvram_agent_binder/Android.mk_ b/mtklibs/nvram_agent_binder/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..814e0a15ed575417703951a84fc25397cee0a364 --- /dev/null +++ b/mtklibs/nvram_agent_binder/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = nvram_agent_binder +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libbinder libnvram libfile_op libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = nvram_agent_binder +include $(BUILD_PREBUILT) diff --git a/mtklibs/nvram_agent_binder/NOTICE b/mtklibs/nvram_agent_binder/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..659191ac4c14841a965ace35620ac0d469bad19e --- /dev/null +++ b/mtklibs/nvram_agent_binder/NOTICE @@ -0,0 +1,40 @@ +This MediaTek software package contains software with the following notices and under the following licenses: + +============================================================================= + +/***************************************************************************** + * Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein + * is confidential and proprietary to MediaTek Inc. and/or its licensors. + * Without the prior written permission of MediaTek inc. and/or its licensors, + * any reproduction, modification, use or disclosure of MediaTek Software, + * and information contained herein, in whole or in part, shall be strictly prohibited. + * + * MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON + * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. + * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE + * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR + * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH + * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES + * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES + * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK + * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND + * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, + * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, + * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO + * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek Software") + * have been modified by MediaTek Inc. All revisions are subject to any receiver's + * applicable license agreements with MediaTek Inc. + * +*****************************************************************************/ diff --git a/mtklibs/nvram_agent_binder/README b/mtklibs/nvram_agent_binder/README new file mode 100755 index 0000000000000000000000000000000000000000..d2fc4b5f22e60064c8aae4044db39edc69f44950 --- /dev/null +++ b/mtklibs/nvram_agent_binder/README @@ -0,0 +1,38 @@ +This directory contains NvRAM libfile_op interface, which defines the interface of +libfile_op and is used to build a libfile_op related shared library. + + +WHAT IT DOES? +============= +It provide interface to backup NvRAM data to backup partition. +and restore NvRAM partition when fielsystem is empty. +Without NvRAM backup or restore feature, factory data maybe lost in some +case. + + +HOW IT WAS BUILT? +================== + +It needs the following libs from AOSP: +1. libutils.so +2. libcutils.so +3. libbinder.so + +and the following libs from MediaTek: +1. libnvram.so + + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a shared library 'nvram_agent_binder.so'. + +The shared library 'nvram_agent_binder.so' is used by +nvram users those don't have pemission to access nvram data. + + diff --git a/mtklibs/nvram_agent_binder/nvram_agent_binder b/mtklibs/nvram_agent_binder/nvram_agent_binder new file mode 100755 index 0000000000000000000000000000000000000000..b2a66ce8bbabcf576062d9a40415f1eb43f26933 Binary files /dev/null and b/mtklibs/nvram_agent_binder/nvram_agent_binder differ diff --git a/mtklibs/nvram_daemon/Android.mk_ b/mtklibs/nvram_daemon/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..deaad751b185d6888c127e021c77d491132dcb20 --- /dev/null +++ b/mtklibs/nvram_daemon/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = nvram_daemon +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libnvram libcustom_nvram libfile_op libnvram_daemon_callback libhwm libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = nvram_daemon +include $(BUILD_PREBUILT) diff --git a/mtklibs/nvram_daemon/NOTICE b/mtklibs/nvram_daemon/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..c3f777dc74af2fb39069c78100f149d37d2d7fda --- /dev/null +++ b/mtklibs/nvram_daemon/NOTICE @@ -0,0 +1,4 @@ +This MediaTek software package contains software with the following notices and under the following licenses: + +============================================================================= + diff --git a/mtklibs/nvram_daemon/README b/mtklibs/nvram_daemon/README new file mode 100755 index 0000000000000000000000000000000000000000..a9d2c836ab471656abb7a08aa3a9984f5f6a2507 --- /dev/null +++ b/mtklibs/nvram_daemon/README @@ -0,0 +1,37 @@ +This directory contains NvRAM daemon binary + + +WHAT IT DOES? +============= +It provide restore NvRAM data from backup partition to file system when filesystem is empty +And it provide callback for specific request of NvRAM modules, like do some data convert things. + +HOW IT WAS BUILT? +================== + +It needs the following libs from AOSP: +1. libc.so +2. libcutils.so + +and the following libs from MediaTek: +1. libnvram.so +2. libcustom_nvram.so +3. libfile_op +4. libnvram_daemon_callback + + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a binary which's name is 'nvram_daemon' + +The binary 'nvram_daemon'' is loaded when system boot up, +it would do NvRAM data restore tings when file system is empty. + + +All the source code of this library were written by MediaTek co.. diff --git a/mtklibs/nvram_daemon/nvram_daemon b/mtklibs/nvram_daemon/nvram_daemon new file mode 100755 index 0000000000000000000000000000000000000000..37e6133bb3777b5d6d5ff0c6b321d8b10f0ab4c2 Binary files /dev/null and b/mtklibs/nvram_daemon/nvram_daemon differ diff --git a/mtklibs/orientationd/Android.mk_ b/mtklibs/orientationd/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..ec1079f801f050b37d7169048f4a2e56c6323767 --- /dev/null +++ b/mtklibs/orientationd/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = orientationd +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = orientationd +include $(BUILD_PREBUILT) diff --git a/mtklibs/orientationd/NOTICE b/mtklibs/orientationd/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/orientationd/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/orientationd/README b/mtklibs/orientationd/README new file mode 100755 index 0000000000000000000000000000000000000000..bb33af8b207a9a445676a8a56815fc03f53e7955 --- /dev/null +++ b/mtklibs/orientationd/README @@ -0,0 +1,21 @@ +This file is a daemon deal and correct sensor data for driver. + +WHAT IT DOES? +============= +It is the daemon that are a few threads, and each thread is independent on +each other, each of them is working like follows: +If it's activated, it will read raw sensor values from device driver, and +then process the raw values if needed, and deliver the processed data to HAL +via the data channel, if command is received to deactivate this sensor data +transfer, the thread will go to sleep state and stops to deliver data to data +channel. + + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + + +HOW TO USE IT? +============== +Add the section in mediatek/config/$(PROJECT_NAME)/init.project.rc. \ No newline at end of file diff --git a/mtklibs/orientationd/orientationd b/mtklibs/orientationd/orientationd new file mode 100755 index 0000000000000000000000000000000000000000..a06b0c1303935f1a13ab196dd9c38673312de388 Binary files /dev/null and b/mtklibs/orientationd/orientationd differ diff --git a/mtklibs/param.dat/Android.mk_ b/mtklibs/param.dat/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..988b832776d871abf4ff8eebd0c8d1118c9d8182 --- /dev/null +++ b/mtklibs/param.dat/Android.mk_ @@ -0,0 +1,14 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = param.dat +LOCAL_MODULE_CLASS = ETC +LOCAL_MODULE_PATH = $(PRODUCT_OUT)/data/misc/acdapi +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SRC_FILES = param.dat +include $(BUILD_PREBUILT) diff --git a/mtklibs/param.dat/README b/mtklibs/param.dat/README new file mode 100755 index 0000000000000000000000000000000000000000..68b3aed7c1c1ed4a2e2f9b4563936c771ebca5fe --- /dev/null +++ b/mtklibs/param.dat/README @@ -0,0 +1,19 @@ +AcdApiDaemon daemon + +WHAT IT DOES? +============= +AcdApiDaemon daemon + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +liblog libcutils libutils libui libbinder + +and the following libs from MediaTek: +1. N/A + +HOW TO USE IT? +============== +Start AcdApiDaemon service + +All the source code of this library were written by ALPS ELECTRIC co.. diff --git a/mtklibs/param.dat/param.dat b/mtklibs/param.dat/param.dat new file mode 100755 index 0000000000000000000000000000000000000000..b1b94a2fe693fcba48814c25a5a8e44470cbe19c --- /dev/null +++ b/mtklibs/param.dat/param.dat @@ -0,0 +1,140 @@ +gblMagPeriod:50 +cl3Mode:5 +cl3MaxInCnt:200 +cl3MinLen:60 +cl3PltLen:5 +cl3spwPltLen:5 +cl3MinNum0:30 +cl3spwMaxNum2:8 +cl3spwCnt2:30 +cl3spwMaxCnt2:40 +cl3spwAreaCnt2:10 +cl3spwRWidth2:50 +cl3spwMaxNum3:8 +cl3spwCnt3:40 +cl3spwMaxCnt3:60 +cl3spwAreaCnt3:14 +cl3spwRWidth3:50 +cl3spwAreaPriority:0 +cl3spwMaxVar1:500 +cl3spwMaxVar2:1000 +cl3spwMaxVar3:1500 +dr3ValidL:1 +dr3RRange:75 +dr3NRange:0 +dr3StaWidth:10 +dr3StaTimes:0 +dr3StaCover:1 +dr3AutoClb:0 +dr3AziAve:50 +dr3AziAveStop:20 +dr3MagAvLen:10 +dr3AccAvLen:10 +dr3AttAveLen:1 +dr3AccZLimit:5 +dr3AttLimit:3 +dr3CalAttType:1 +dr3AttMode:8 +dr3AccStopSnsThr:50 +dr3AccStopSnsCnt:3 +dr3SmtPeriod:0 +dr3SmtStep:1 +dr3thetaNtoR:160 +dr3thetaRtoN:140 +dr3AndRev:0 +dr3FilterNoInit:0 +incAutoStart:0 +incCont:0 +incLvl:0 +incCntNum:10 +incSlntNum:6 +incIncJudgR:30 +incAccThr:5 +incMaxCnt:100 +incMagAvLen:8 +incAccAvLen:8 +flgWRT:0 +snsAtt:0 +flgAft:0 +aftMtx0:1000 +aftMtx1:0 +aftMtx2:0 +aftMtx3:0 +aftMtx4:1000 +aftMtx5:0 +aftMtx6:0 +aftMtx7:0 +aftMtx8:1000 + +cl3Mode.ori.t10:5 +cl3MinLen.ori.t10:30 +cl3MaxInCnt.ori.t10:10000 +cl3MinNum0.ori.t10:100 +cl3spwMaxNum2.ori.t10:30 +cl3spwCnt2.ori.t10:100 +cl3spwMaxCnt2.ori.t10:200 +cl3spwAreaCnt2.ori.t10:10 +cl3spwRWidth2.ori.t10:50 +cl3spwMaxNum3.ori.t10:30 +cl3spwCnt3.ori.t10:200 +cl3spwMaxCnt3.ori.t10:300 +cl3spwAreaCnt3.ori.t10:14 +cl3spwRWidth3.ori.t10:50 +dr3MagAvLen.ori.t10:32 +dr3AccAvLen.ori.t10:32 +dr3AziAve.ori.t10:96 + +cl3Mode.ori.t20:5 +cl3MinLen.ori.t20:60 +cl3MaxInCnt.ori.t20:500 +cl3MinNum0.ori.t20:50 +cl3spwMaxNum2.ori.t20:15 +cl3spwCnt2.ori.t20:50 +cl3spwMaxCnt2.ori.t20:100 +cl3spwAreaCnt2.ori.t20:10 +cl3spwRWidth2.ori.t20:50 +cl3spwMaxNum3.ori.t20:15 +cl3spwCnt3.ori.t20:100 +cl3spwMaxCnt3.ori.t20:150 +cl3spwAreaCnt3.ori.t20:14 +cl3spwRWidth3.ori.t20:50 +dr3MagAvLen.ori.t20:16 +dr3AccAvLen.ori.t20:16 +dr3AziAve.ori.t20:70 + +cl3Mode.ori.t50:5 +cl3MinLen.ori.t50:60 +cl3MaxInCnt.ori.t50:200 +cl3MinNum0.ori.t50:30 +cl3spwMaxNum2.ori.t50:8 +cl3spwCnt2.ori.t50:30 +cl3spwMaxCnt2.ori.t50:40 +cl3spwAreaCnt2.ori.t50:10 +cl3spwRWidth2.ori.t50:50 +cl3spwMaxNum3.ori.t50:8 +cl3spwCnt3.ori.t50:40 +cl3spwMaxCnt3.ori.t50:60 +cl3spwAreaCnt3.ori.t50:14 +cl3spwRWidth3.ori.t50:50 +dr3MagAvLen.ori.t50:10 +dr3AccAvLen.ori.t50:10 +dr3AziAve.ori.t50:50 + +cl3Mode.ori.t100:5 +cl3MinLen.ori.t100:60 +cl3MaxInCnt.ori.t100:100 +cl3MinNum0.ori.t100:30 +cl3spwMaxNum2.ori.t100:8 +cl3spwCnt2.ori.t100:30 +cl3spwMaxCnt2.ori.t100:50 +cl3spwAreaCnt2.ori.t100:10 +cl3spwRWidth2.ori.t100:25 +cl3spwMaxNum3.ori.t100:8 +cl3spwCnt3.ori.t100:50 +cl3spwMaxCnt3.ori.t100:60 +cl3spwAreaCnt3.ori.t100:16 +cl3spwRWidth3.ori.t100:25 +dr3MagAvLen.ori.t100:5 +dr3AccAvLen.ori.t100:5 +dr3AziAve.ori.t100:30 + diff --git a/mtklibs/program_binary_service/Android.mk_ b/mtklibs/program_binary_service/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..a2059cd7cf30523fa62504b5f4dd7c5cdb54ad20 --- /dev/null +++ b/mtklibs/program_binary_service/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = program_binary_service +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libhwui libEGL libGLESv2 libbinder libui libgui libmtk_drvb libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = program_binary_service +include $(BUILD_PREBUILT) diff --git a/mtklibs/program_binary_service/NOTICE b/mtklibs/program_binary_service/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2c0401022dd0e70becaaf402b5ea53da17949eb4 --- /dev/null +++ b/mtklibs/program_binary_service/NOTICE @@ -0,0 +1,21 @@ + + + +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +: + \ No newline at end of file diff --git a/mtklibs/program_binary_service/README b/mtklibs/program_binary_service/README new file mode 100755 index 0000000000000000000000000000000000000000..72b6d50eadbaed41ec6342879037a17b5eacccee --- /dev/null +++ b/mtklibs/program_binary_service/README @@ -0,0 +1,28 @@ +This module creates program binary service for HWUI rendering enhancement. + +This library is pre-built by MediaTek internally. + + +WHAT IT DOES? +============= +Program binary service is used in conjunction with HWUI for UI rendering. +It enhances rendering performance. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +libhwui libEGL libGLESv2 libcutils libutils libbinder liblog libui libgui libutils + +and the following libs from MediaTek: + +libmtk_drvb.so + +All source/dependency modules of this module are already put in +'vendor/mediatek/libs' folder. + +HOW TO USE IT? +============== + +Program binary service is triggered on init stage during bootup. It will +communicate with HWUI automatically for UI rendering. \ No newline at end of file diff --git a/mtklibs/program_binary_service/program_binary_service b/mtklibs/program_binary_service/program_binary_service new file mode 100755 index 0000000000000000000000000000000000000000..c21637a62b4090b83a04e5b23fe3a1c2725b28ed Binary files /dev/null and b/mtklibs/program_binary_service/program_binary_service differ diff --git a/mtklibs/recovery_manager/Android.mk_ b/mtklibs/recovery_manager/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..f587a0c76fc1f402d30c800a5eed7c5ba419d549 --- /dev/null +++ b/mtklibs/recovery_manager/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = recovery_manager +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/recovery_manager/NOTICE b/mtklibs/recovery_manager/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..c5b1efa7aac764ae6d8da63476a2d5cec02a6a5d --- /dev/null +++ b/mtklibs/recovery_manager/NOTICE @@ -0,0 +1,190 @@ + + Copyright (c) 2005-2008, The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/mtklibs/recovery_manager/README b/mtklibs/recovery_manager/README new file mode 100755 index 0000000000000000000000000000000000000000..21f61ae7074b019e148d1fb78d3ee5d68f035bf8 --- /dev/null +++ b/mtklibs/recovery_manager/README @@ -0,0 +1,11 @@ +WHAT IT DOES? +============= +This is the core service of RecoveryManagerService(RMS). + +HOW IT WAS BUILT? +================== +This module is built to a static java library recovery_manager, which is linked to service.core + +HOW TO USE IT? +============== +RMS is initialized in SystemServer. When system get ready, it should call systemReady() of RMS. diff --git a/mtklibs/recovery_manager/javalib.jar b/mtklibs/recovery_manager/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..f62a202773ae3617619b71eaa1004a604a6b381f Binary files /dev/null and b/mtklibs/recovery_manager/javalib.jar differ diff --git a/mtklibs/rild-prop-md1/Android.mk_ b/mtklibs/rild-prop-md1/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..b0fd2ef2cd7169684a80d40df08abeceb6da8b33 --- /dev/null +++ b/mtklibs/rild-prop-md1/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = rild-prop-md1 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = rild-prop-md1.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/rild-prop-md1/NOTICE b/mtklibs/rild-prop-md1/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/rild-prop-md1/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/rild-prop-md1/README b/mtklibs/rild-prop-md1/README new file mode 100755 index 0000000000000000000000000000000000000000..21222cda8d2f34bffcea26c512f704cdb43fa7b8 --- /dev/null +++ b/mtklibs/rild-prop-md1/README @@ -0,0 +1,20 @@ +This directory contains MTK RIL protect mechansim, which can restart the modem and ril while underlayer is abnormal + +WHAT IT DOES? +============= +It provides the protect mechanism for MTK RIL. + +HOW IT WAS BUILT? +================== + +The rild-prop-md1.a binary was built entirely from source files written by Mediatek. + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a static library 'rild-prop-md1.a'. + +The shared library 'rild-prop-md1.a' is used by the bin file 'mtkrild' + diff --git a/mtklibs/rild-prop-md1/rild-prop-md1.a b/mtklibs/rild-prop-md1/rild-prop-md1.a new file mode 100755 index 0000000000000000000000000000000000000000..4f84bec350adcd30eb5fce4a057cc73fcd8ae19b Binary files /dev/null and b/mtklibs/rild-prop-md1/rild-prop-md1.a differ diff --git a/mtklibs/rild-prop-md2/Android.mk_ b/mtklibs/rild-prop-md2/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..e08eeed67333bdd36497461c3ebcfb5bfe07c1a1 --- /dev/null +++ b/mtklibs/rild-prop-md2/Android.mk_ @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = rild-prop-md2 +LOCAL_MODULE_CLASS = STATIC_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .a +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = rild-prop-md2.a +include $(BUILD_PREBUILT) diff --git a/mtklibs/rild-prop-md2/NOTICE b/mtklibs/rild-prop-md2/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..0519ecba6ea913e21689ec692e81e9e4973fbf73 --- /dev/null +++ b/mtklibs/rild-prop-md2/NOTICE @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/mtklibs/rild-prop-md2/README b/mtklibs/rild-prop-md2/README new file mode 100755 index 0000000000000000000000000000000000000000..21222cda8d2f34bffcea26c512f704cdb43fa7b8 --- /dev/null +++ b/mtklibs/rild-prop-md2/README @@ -0,0 +1,20 @@ +This directory contains MTK RIL protect mechansim, which can restart the modem and ril while underlayer is abnormal + +WHAT IT DOES? +============= +It provides the protect mechanism for MTK RIL. + +HOW IT WAS BUILT? +================== + +The rild-prop-md1.a binary was built entirely from source files written by Mediatek. + + +HOW TO USE IT? +============== + +Files in this directory is used to +generate a static library 'rild-prop-md1.a'. + +The shared library 'rild-prop-md1.a' is used by the bin file 'mtkrild' + diff --git a/mtklibs/rild-prop-md2/rild-prop-md2.a b/mtklibs/rild-prop-md2/rild-prop-md2.a new file mode 100755 index 0000000000000000000000000000000000000000..65a64b15eaefd9a37d788a610f42dab2ed156a7f Binary files /dev/null and b/mtklibs/rild-prop-md2/rild-prop-md2.a differ diff --git a/mtklibs/s62xd/Android.mk_ b/mtklibs/s62xd/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..440cd3cce0248d5fe7aad47f6a91c6262a8f32fd --- /dev/null +++ b/mtklibs/s62xd/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = s62xd +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = s62xd +include $(BUILD_PREBUILT) diff --git a/mtklibs/s62xd/README b/mtklibs/s62xd/README new file mode 100755 index 0000000000000000000000000000000000000000..9631f3296c55f9616b48a7f3e8a8b52b9fa68af0 --- /dev/null +++ b/mtklibs/s62xd/README @@ -0,0 +1,22 @@ +This module creates S62XD, the calibration daemon for the S62X magnetic field +sensors from Smartsensor Inc. + +This daemon is pre-built by MediaTek internally. + + +WHAT IT DOES? +============= +S62XD is the native daemon which is used in conjunction with the Android Sensor +framework. It reads the magnetic field measurement from S62X device driver and +write back the calibrated result. So that, Android Sensor HAL can read the +calibrated magnetic field measurement from S62X device driver. + +HOW IT WAS BUILT? +================== +> ./mk $(PROJECT_NAME) mm + +HOW TO USE IT? +============== +The S62XD should be invoked by init.rc or equivalent mechanisms. It only +interacts with S62X device driver and writes data for housekeeping at +/data/misc/s62x folder. diff --git a/mtklibs/s62xd/s62xd b/mtklibs/s62xd/s62xd new file mode 100755 index 0000000000000000000000000000000000000000..1069810dd7a3c8b829b09618ce9828b83b9bc4df Binary files /dev/null and b/mtklibs/s62xd/s62xd differ diff --git a/mtklibs/sensors.dat/Android.mk_ b/mtklibs/sensors.dat/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..fb14b14a634075a92d77bd647ddd85d61b99a4b2 --- /dev/null +++ b/mtklibs/sensors.dat/Android.mk_ @@ -0,0 +1,14 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = sensors.dat +LOCAL_MODULE_CLASS = ETC +LOCAL_MODULE_PATH = $(PRODUCT_OUT)/data/misc/acdapi +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SRC_FILES = sensors.dat +include $(BUILD_PREBUILT) diff --git a/mtklibs/sensors.dat/README b/mtklibs/sensors.dat/README new file mode 100755 index 0000000000000000000000000000000000000000..68b3aed7c1c1ed4a2e2f9b4563936c771ebca5fe --- /dev/null +++ b/mtklibs/sensors.dat/README @@ -0,0 +1,19 @@ +AcdApiDaemon daemon + +WHAT IT DOES? +============= +AcdApiDaemon daemon + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +liblog libcutils libutils libui libbinder + +and the following libs from MediaTek: +1. N/A + +HOW TO USE IT? +============== +Start AcdApiDaemon service + +All the source code of this library were written by ALPS ELECTRIC co.. diff --git a/mtklibs/sensors.dat/sensors.dat b/mtklibs/sensors.dat/sensors.dat new file mode 100755 index 0000000000000000000000000000000000000000..cf50ab2ba4618169d41b9087998b000c999b51eb --- /dev/null +++ b/mtklibs/sensors.dat/sensors.dat @@ -0,0 +1,4 @@ +acc_Off_X:0 +acc_Off_Y:0 +acc_Off_Z:0 + diff --git a/mtklibs/services.ipo/Android.mk_ b/mtklibs/services.ipo/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..6b1094b05418f350ef70f8c987264f7965ad9931 --- /dev/null +++ b/mtklibs/services.ipo/Android.mk_ @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = services.ipo +LOCAL_MODULE_CLASS = JAVA_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .jar +LOCAL_SRC_FILES = javalib.jar +include $(BUILD_PREBUILT) diff --git a/mtklibs/services.ipo/README b/mtklibs/services.ipo/README new file mode 100755 index 0000000000000000000000000000000000000000..2964e01b9285ad4526cb9417a26cbab269c5fb9f --- /dev/null +++ b/mtklibs/services.ipo/README @@ -0,0 +1,9 @@ +To build ActivityManagerPlus.jar: + +1) run prepare_ActivityManagerPlus.sh + it will copy ActivityManagerPlus.java frameworks/base/services/core/java/com/android/server/am/ + and clean all classes in services & ActivityManagerPlus +2) build services.jar + ex, make services +3) run pack_ActivityManagerPlus.sh + which will pack all ActivityManagerPlus*.class into ActivityManagerPlus.jar diff --git a/mtklibs/services.ipo/javalib.jar b/mtklibs/services.ipo/javalib.jar new file mode 100755 index 0000000000000000000000000000000000000000..6e7671bf3fa45c68dac5f0d0340dae9da70f0419 Binary files /dev/null and b/mtklibs/services.ipo/javalib.jar differ diff --git a/mtklibs/sink/Android.mk_ b/mtklibs/sink/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..30667e5e8f6c12a1eba3b3f08055ab7f58a58a3c --- /dev/null +++ b/mtklibs/sink/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = sink +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libbinder libgui libmedia libstagefright libstagefright_foundation libui libsink libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = sink +include $(BUILD_PREBUILT) diff --git a/mtklibs/sink/NOTICE b/mtklibs/sink/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..090fb862dcee02e8e85ffec7413c818b98d38691 --- /dev/null +++ b/mtklibs/sink/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/sink/README b/mtklibs/sink/README new file mode 100755 index 0000000000000000000000000000000000000000..99531bb82e0bd8675402bfbd911aa0a7119f9f65 --- /dev/null +++ b/mtklibs/sink/README @@ -0,0 +1,27 @@ +Library of MTK ViLTE features, controlling downlink data path + +WHAT IT DOES? +============= +libsink.so control the downlink video playback + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +libcutils.so +libstagefright_foundation.so +libutils.so +libstagefright.so +libbinder.so +libmedia.so +libutils.so + +and the following libs from MediaTek: + +libcomutils.so +libvt_avsync.so + + +HOW TO USE IT? +============== +used by the libimsma module to do the donwlink data process + diff --git a/mtklibs/sink/sink b/mtklibs/sink/sink new file mode 100755 index 0000000000000000000000000000000000000000..2940186a3c928d1e468031a0053e92ec4e278137 Binary files /dev/null and b/mtklibs/sink/sink differ diff --git a/mtklibs/slpd/Android.mk_ b/mtklibs/slpd/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..c39beeeab72074b4733244249de57ccdc7ffd80f --- /dev/null +++ b/mtklibs/slpd/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = slpd +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libcrypto libssl libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = slpd +include $(BUILD_PREBUILT) diff --git a/mtklibs/slpd/README b/mtklibs/slpd/README new file mode 100755 index 0000000000000000000000000000000000000000..027a2bc37d284dcd1ecc316d3ce7f99e15b4f64c --- /dev/null +++ b/mtklibs/slpd/README @@ -0,0 +1,22 @@ +The binary file 'slpd' is a MTK SUPL Location Provider Software. +This binary file is pre-built by MediaTek internal. + +WHAT IT DOES? +============= +'slpd' is the implementation including SUPL stack, +RRLP stack, LPP stack to provide the SUPL Location to Mediatek's +modules + +HOW IT WAS BUILT? +================== +All source/dependency modules of this module are already put in +'vendor/mediatek/libs'. + +HOW TO USE IT? +============== +The binary file 'slpd' is a native daemon which will be +launched when system is booting up. + +Source +============== +All the source code of this binary file were written by MediaTek co.. diff --git a/mtklibs/slpd/slpd b/mtklibs/slpd/slpd new file mode 100755 index 0000000000000000000000000000000000000000..b6754acb67069b8bd009ca19e9e9ee59688702f8 Binary files /dev/null and b/mtklibs/slpd/slpd differ diff --git a/mtklibs/source/Android.mk_ b/mtklibs/source/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..2398fefbd30e3a8c8503d0a42043fd8bdd2ebf90 --- /dev/null +++ b/mtklibs/source/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = source +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libbinder libgui libmedia libstagefright libstagefright_foundation libui libsource libcomutils libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = source +include $(BUILD_PREBUILT) diff --git a/mtklibs/source/NOTICE b/mtklibs/source/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..090fb862dcee02e8e85ffec7413c818b98d38691 --- /dev/null +++ b/mtklibs/source/NOTICE @@ -0,0 +1,18 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + + \ No newline at end of file diff --git a/mtklibs/source/README b/mtklibs/source/README new file mode 100755 index 0000000000000000000000000000000000000000..288692ac4444f8d6b829aadcc1cd5615d2d3264d --- /dev/null +++ b/mtklibs/source/README @@ -0,0 +1,27 @@ +Library of MTK ViLTE features, controlling uplink data path + +WHAT IT DOES? +============= +libsource.so control the uplink + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: +libcutils.so +libstagefright_foundation.so +libutils.so +libstagefright.so +libbinder.so +libmedia.so +libutils.so + +and the following libs from MediaTek: + +libvcodec_cap.so +libcomutils.so + + +HOW TO USE IT? +============== +used by the libimsma.so module to do the multimedia uplink process + diff --git a/mtklibs/source/source b/mtklibs/source/source new file mode 100755 index 0000000000000000000000000000000000000000..949b4b751cd1120ec0665ecc2dbd96a8a6cba2e5 Binary files /dev/null and b/mtklibs/source/source differ diff --git a/mtklibs/thermal_manager/Android.mk_ b/mtklibs/thermal_manager/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..aad22b7db49817715a3f9921ab8d811e6c2fdd58 --- /dev/null +++ b/mtklibs/thermal_manager/Android.mk_ @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = thermal_manager +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = +LOCAL_MODULE_STEM = +LOCAL_MODULE_STEM_32 = +LOCAL_MODULE_STEM_64 = +LOCAL_SHARED_LIBRARIES = libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = thermal_manager +include $(BUILD_PREBUILT) diff --git a/mtklibs/thermal_manager/README b/mtklibs/thermal_manager/README new file mode 100755 index 0000000000000000000000000000000000000000..9a3dae0b935d505e142ba15e09da67a0fee59869 --- /dev/null +++ b/mtklibs/thermal_manager/README @@ -0,0 +1,40 @@ +libmtcloader + +WHAT IT DOES? +============= +libmtcloader provides an API function to set a thermal configuration file and +to make it applied as current thermal policy. + +HOW IT WAS BUILT? +================== +libmtcloader is built as 32bit. It dynamic links to the following library from +AOSP: +1. libcutils +2. libc + +HOW TO USE IT? +============== +1. Dynamically link to libmtcloader. +2. Use API function loadmtc() with the file path of a thermal configuration + file. + +############## + +thermal_manager + +WHAT IT DOES? +============= +It uses libmtcloader to apply a thermal configuration file when system +initialized or when it is executed from shell. + +HOW IT WAS BUILT? +================== +thermal_manager is built as 32bit. It dynamic links to the following library from +AOSP: +1. libcutils +2. libc +It requires libmtcloader from MTK. + +HOW TO USE IT? +============== +1. /system/bin/thermal_manager \ No newline at end of file diff --git a/mtklibs/thermal_manager/thermal_manager b/mtklibs/thermal_manager/thermal_manager new file mode 100755 index 0000000000000000000000000000000000000000..36d286ca1626e2a9967f422babc3057326156fb9 Binary files /dev/null and b/mtklibs/thermal_manager/thermal_manager differ diff --git a/mtklibs/volte_imsm/Android.mk_ b/mtklibs/volte_imsm/Android.mk_ new file mode 100755 index 0000000000000000000000000000000000000000..37f616a7bf56440ae94e4dc2e48fdc37af09d14b --- /dev/null +++ b/mtklibs/volte_imsm/Android.mk_ @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = volte_imsm +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_64 = libmal libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = volte_imsm.so +include $(BUILD_PREBUILT) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = volte_imsm +LOCAL_MODULE_CLASS = SHARED_LIBRARIES +LOCAL_MODULE_PATH = +LOCAL_MODULE_RELATIVE_PATH = +LOCAL_MODULE_SUFFIX = .so +LOCAL_SHARED_LIBRARIES_32 = libmal libc++ +LOCAL_MULTILIB = 32 +LOCAL_SRC_FILES_32 = arm/volte_imsm.so +include $(BUILD_PREBUILT) diff --git a/mtklibs/volte_imsm/NOTICE b/mtklibs/volte_imsm/NOTICE new file mode 100755 index 0000000000000000000000000000000000000000..2a1c652cf35103d41c4d5c50585bcf2e3caa8f96 --- /dev/null +++ b/mtklibs/volte_imsm/NOTICE @@ -0,0 +1,15 @@ +/* +* Copyright (C) 2011-2014 MediaTek Inc. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ \ No newline at end of file diff --git a/mtklibs/volte_imsm/README b/mtklibs/volte_imsm/README new file mode 100755 index 0000000000000000000000000000000000000000..5016d7b3678d6b3a8ac2920e6534655d70d7cf90 --- /dev/null +++ b/mtklibs/volte_imsm/README @@ -0,0 +1,14 @@ +IMS relay module, handling NAS bearer, P-CSCF address discovery, IMS AKA and relay message among IMCB/IMSA/MAL modules + + +WHAT IT DOES? +============= +handle the request from IMCB/IMSA/MAL module +Send the event to IMCB/IMSA/MAL module, and receive the Response + +HOW IT WAS BUILT? +================== +This module is binary released. + +HOW TO USE IT? +============== diff --git a/mtklibs/volte_imsm/arm/volte_imsm.so b/mtklibs/volte_imsm/arm/volte_imsm.so new file mode 100755 index 0000000000000000000000000000000000000000..a55a5888cd4cbb2b6bfea83576d3a1f3c020b699 Binary files /dev/null and b/mtklibs/volte_imsm/arm/volte_imsm.so differ diff --git a/mtklibs/volte_imsm/volte_imsm.so b/mtklibs/volte_imsm/volte_imsm.so new file mode 100755 index 0000000000000000000000000000000000000000..80c190a1b7467510b7295ed13afac830557bde23 Binary files /dev/null and b/mtklibs/volte_imsm/volte_imsm.so differ diff --git a/mtklibs/vtservice/Android.mk b/mtklibs/vtservice/Android.mk new file mode 100755 index 0000000000000000000000000000000000000000..283b2b9d0b7430fe8372d4e6368b43121cf596a9 --- /dev/null +++ b/mtklibs/vtservice/Android.mk @@ -0,0 +1,11 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_IS_HOST_MODULE = +LOCAL_MODULE = vtservice +LOCAL_MODULE_CLASS = EXECUTABLES +LOCAL_MODULE_PATH_64 = /system/vendor/bin +LOCAL_SHARED_LIBRARIES = libbinder libmtk_vt_service libc++ +LOCAL_MULTILIB = 64 +LOCAL_SRC_FILES_64 = vtservice +include $(BUILD_PREBUILT) diff --git a/mtklibs/vtservice/README b/mtklibs/vtservice/README new file mode 100755 index 0000000000000000000000000000000000000000..dfb854870f9e1ff45e78d851a5d2eb79110cc83a --- /dev/null +++ b/mtklibs/vtservice/README @@ -0,0 +1,44 @@ +This module creates the VT (Video Telephony) libraries. + +This library is pre-built by MediaTek internally. + +WHAT IT DOES? +============= +VT is a native service which serves the video telephony functionality. +The service work on both 3G/4G network. +For 3G network, the serivce implement 3g324m stack and pass the media package to Modem. +For 4G network, the service communicate between Phone APK, Multimedia, IMS module. + +libmtk_vt_swip.so contain the 3g324m stack. +libmtk_vt_utils.so contain the utility API for VT module usage. +libmtk_vt_service.so contain the main interface for Phone APK & the module to handle the communication interface between IMS & Multimedia. +libvtmal.so contain the dummy interface for 64 bit project. +libvt_socketbind.so contain interface for data transfer functionality from media to Modem. +libvt_avsync.so contain interface for AV sync functionality when receiving data. +vtservice bin file is the entry of the video telephony service. + +HOW IT WAS BUILT? +================== +It needs the following library from AOSP: + +libutils, libcutils, libstagefright, libandroid_runtime, libbinder, +libnativehelper, libui, libgui, libmedia, libstagefright_foundation, +libcamera_client, libskia and libblisrc + +libEGL, libGLESv2, libandroid, libcutils, liblog, libstlport and libutils + +and the following libs from MediaTek: + +libimsma.so +libsource.so +libimsma_rtp.so + +HOW TO USE IT? +============== + +The VT libraries should not be used directly by an application developer. +The AOSP video call provider framework provides a more suitable API. +(frameworks\base\telecomm\java\android\telecom). + +The majority of source code for this library were written by MediaTek. +Various open source libraries are also used and contained in this folder. diff --git a/mtklibs/vtservice/vtservice b/mtklibs/vtservice/vtservice new file mode 100755 index 0000000000000000000000000000000000000000..ef0925addaa066a60a6079fef35348e17b925f4e Binary files /dev/null and b/mtklibs/vtservice/vtservice differ diff --git a/proprietary/Android.mk b/proprietary/Android.mk new file mode 100644 index 0000000000000000000000000000000000000000..25bedf2c8c9ede46cbe517cb18d67469eac2ed93 --- /dev/null +++ b/proprietary/Android.mk @@ -0,0 +1,16 @@ +# +# Copyright (C) 2016 The CyanogenMod Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +include $(call all-subdir-makefiles) diff --git a/proprietary/bootable/bootloader/lk/project/t1.mk b/proprietary/bootable/bootloader/lk/project/t1.mk new file mode 100755 index 0000000000000000000000000000000000000000..88fec851784a6dbbbf19ae9345f96392c6f3f5ec --- /dev/null +++ b/proprietary/bootable/bootloader/lk/project/t1.mk @@ -0,0 +1,28 @@ +# +LOCAL_DIR := $(GET_LOCAL_DIR) + +TARGET := p15v57c2k_gq_tee + +MODULES += app/mt_boot \ + dev/lcm + +MTK_EMMC_SUPPORT = yes +DEFINES += MTK_NEW_COMBO_EMMC_SUPPORT +MTK_KERNEL_POWER_OFF_CHARGING = yes +DEFINES += SWCHR_POWER_PATH +DEFINES += MTK_BQ24261_SUPPORT +MTK_LCM_PHYSICAL_ROTATION = 180 +CUSTOM_LK_LCM="KR070IA4T_DSI_VDO" +#nt35595_fhd_dsi_cmd_truly_nt50358 = yes + +#FASTBOOT_USE_G_ORIGINAL_PROTOCOL = yes +MTK_SECURITY_SW_SUPPORT = yes +MTK_VERIFIED_BOOT_SUPPORT = yes +MTK_SEC_FASTBOOT_UNLOCK_SUPPORT = yes + +BOOT_LOGO=wxga + +#DEFINES += WITH_DEBUG_DCC=1 +DEFINES += WITH_DEBUG_UART=1 +#DEFINES += WITH_DEBUG_FBCON=1 +#DEFINES += MACH_FPGA=y diff --git a/proprietary/custom/mt6757/hal/Android.mk b/proprietary/custom/mt6757/hal/Android.mk_ similarity index 96% rename from proprietary/custom/mt6757/hal/Android.mk rename to proprietary/custom/mt6757/hal/Android.mk_ index ce7e207e322dbeaf05f23dbf0ec14a98e4de0934..38f002cee32dc17febe233e6aca384114e14e495 100755 --- a/proprietary/custom/mt6757/hal/Android.mk +++ b/proprietary/custom/mt6757/hal/Android.mk_ @@ -66,10 +66,12 @@ LOCAL_WHOLE_STATIC_LIBRARIES += libcameracustom.cam_cal #----------------------------------------------------------- LOCAL_SHARED_LIBRARIES += liblog +#LOCAL_SHARED_LIBRARIES += libcameracustom.imgsensor +#LOCAL_SHARED_LIBRARIES += libcameracustom.imgsensor.core LOCAL_SHARED_LIBRARIES += libcutils #----------------------------------------------------------- -#LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_TAGS := optional LOCAL_MODULE := libcameracustom #----------------------------------------------------------- diff --git a/proprietary/custom/mt6757/native/vt/Android.mk b/proprietary/custom/mt6757/native/vt/Android.mk_ similarity index 100% rename from proprietary/custom/mt6757/native/vt/Android.mk rename to proprietary/custom/mt6757/native/vt/Android.mk_ diff --git a/proprietary/modem/agold_mt6757p_sp_ct5m_p15/preloader_t1.bin b/proprietary/modem/agold_mt6757p_sp_ct5m_p15/preloader_t1.bin new file mode 100644 index 0000000000000000000000000000000000000000..bf32a11706baeb3e234422ef77d2fb9c0b0cf7b4 Binary files /dev/null and b/proprietary/modem/agold_mt6757p_sp_ct5m_p15/preloader_t1.bin differ diff --git a/proprietary/trustzone/custom/build/Android.mk b/proprietary/trustzone/custom/build/Android.mk_ similarity index 100% rename from proprietary/trustzone/custom/build/Android.mk rename to proprietary/trustzone/custom/build/Android.mk_ diff --git a/proprietary/trustzone/microtrust/source/platform/Android.mk b/proprietary/trustzone/microtrust/source/platform/Android.mk_ similarity index 100% rename from proprietary/trustzone/microtrust/source/platform/Android.mk rename to proprietary/trustzone/microtrust/source/platform/Android.mk_ diff --git a/wpa_supplicant_8_lib/Android.mk b/wpa_supplicant_8_lib/Android.mk_ similarity index 100% rename from wpa_supplicant_8_lib/Android.mk rename to wpa_supplicant_8_lib/Android.mk_