From 77bbe937a8ded047c423ab6339fdeaea6fc6e6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 21 Nov 2023 16:13:20 -0500 Subject: [PATCH] switch to libvpx, libfido2, libudev-zero upstream repo + patches --- recipes/libfido2/conanfile.py | 22 +- ...0001-fix-cmake-dependency-management.patch | 187 ++ ...2-fix-crypto-explicit_bzero-conflict.patch | 39 + ...03-use-linux-hid-backend-for-android.patch | 25 + recipes/libudev-zero/conanfile.py | 23 +- ...01-fix-undefined-line-max-on-android.patch | 27 + recipes/libudev-zero/patches/CMakeLists.txt | 31 + recipes/libvpx/conanfile.py | 20 +- recipes/libvpx/patches/CMakeLists.txt | 2018 +++++++++++++++++ recipes/libvpx/patches/vpx.pc.in | 14 + recipes/libvpx/patches/vpx_config.h.in | 97 + recipes/libvpx/patches/vpx_version.h.in | 12 + 12 files changed, 2497 insertions(+), 18 deletions(-) create mode 100644 recipes/libfido2/patches/0001-fix-cmake-dependency-management.patch create mode 100644 recipes/libfido2/patches/0002-fix-crypto-explicit_bzero-conflict.patch create mode 100644 recipes/libfido2/patches/0003-use-linux-hid-backend-for-android.patch create mode 100644 recipes/libudev-zero/patches/0001-fix-undefined-line-max-on-android.patch create mode 100644 recipes/libudev-zero/patches/CMakeLists.txt create mode 100644 recipes/libvpx/patches/CMakeLists.txt create mode 100644 recipes/libvpx/patches/vpx.pc.in create mode 100644 recipes/libvpx/patches/vpx_config.h.in create mode 100644 recipes/libvpx/patches/vpx_version.h.in diff --git a/recipes/libfido2/conanfile.py b/recipes/libfido2/conanfile.py index e702206..2ce5dd4 100644 --- a/recipes/libfido2/conanfile.py +++ b/recipes/libfido2/conanfile.py @@ -1,18 +1,20 @@ from conans import ConanFile, tools, CMake, python_requires -import os +import os, shutil class LibFIDO2Conan(ConanFile): name = 'libfido2' - exports = 'VERSION' version = open(os.path.join('.', 'VERSION'), 'r').read().rstrip() license = 'BSD' - url = 'https://github.com/awakecoding/libfido2' + url = 'https://github.com/PowerShell/libfido2' description = 'libfido2' settings = 'os', 'arch', 'distro', 'build_type' no_copy_source = True - branch = 'devolutions' python_requires = "shared/1.0.0@devolutions/stable" python_requires_extend = "shared.UtilsBase" + exports = ['VERSION', + 'patches/0001-fix-cmake-dependency-management.patch', + 'patches/0002-fix-crypto-explicit_bzero-conflict.patch', + 'patches/0003-use-linux-hid-backend-for-android.patch'] options = { 'fPIC': [True, False], @@ -34,10 +36,18 @@ def build_requirements(self): def source(self): folder = self.name - self.output.info('Cloning repo: %s dest: %s branch: %s' % (self.url, folder, self.branch)) + tag = self.version + self.output.info('Cloning repo: %s dest: %s tag: %s' % (self.url, folder, tag)) git = tools.Git(folder=folder) git.clone(self.url) - git.checkout(self.branch) + git.checkout(tag) + + patches_dir = os.path.join(self.recipe_folder, "patches") + if os.path.isdir(patches_dir): + for patch_file in [f for f in os.listdir(patches_dir) if f.endswith('.patch')]: + patch_path = os.path.join(patches_dir, patch_file) + self.output.info('Applying patch: %s' % patch_path) + tools.patch(base_path=folder, patch_file=patch_path) def build(self): cmake = CMake(self) diff --git a/recipes/libfido2/patches/0001-fix-cmake-dependency-management.patch b/recipes/libfido2/patches/0001-fix-cmake-dependency-management.patch new file mode 100644 index 0000000..8c8df2d --- /dev/null +++ b/recipes/libfido2/patches/0001-fix-cmake-dependency-management.patch @@ -0,0 +1,187 @@ +From dc429a234d914a5ecf1e4c7b9ea1ca734937966b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= +Date: Tue, 21 Nov 2023 16:21:17 -0500 +Subject: [PATCH 1/3] fix cmake dependency management + +--- + CMakeLists.txt | 127 +++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 113 insertions(+), 14 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 11a51ac..149838c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,6 +37,7 @@ option(BUILD_MANPAGES "Build man pages" ON) + option(BUILD_SHARED_LIBS "Build the shared library" ON) + option(BUILD_STATIC_LIBS "Build the static library" ON) + option(BUILD_TOOLS "Build tool programs" ON) ++option(BUILD_TESTS "Build test programs" OFF) + option(FUZZ "Enable fuzzing instrumentation" OFF) + option(LIBFUZZER "Build libfuzzer harnesses" OFF) + option(USE_HIDAPI "Use hidapi as the HID backend" OFF) +@@ -69,6 +70,9 @@ if(NOT MSVC) + elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_GNU_SOURCE") + set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_DEFAULT_SOURCE") ++ elseif(CMAKE_SYSTEM_NAME STREQUAL "Android") ++ set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_GNU_SOURCE") ++ set(FIDO_CFLAGS "${FIDO_CFLAGS} -D_DEFAULT_SOURCE") + elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR + CMAKE_SYSTEM_NAME STREQUAL "MidnightBSD") + set(FIDO_CFLAGS "${FIDO_CFLAGS} -D__BSD_VISIBLE=1") +@@ -108,6 +112,11 @@ check_symbol_exists(sysconf unistd.h HAVE_SYSCONF) + check_symbol_exists(timespecsub sys/time.h HAVE_TIMESPECSUB) + check_symbol_exists(timingsafe_bcmp string.h HAVE_TIMINGSAFE_BCMP) + ++if(CMAKE_SYSTEM_NAME STREQUAL "Android") ++ set(HAVE_EXPLICIT_BZERO OFF) ++ add_definitions(-DCRYPTO_EXPLICIT_BZERO) ++endif() ++ + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) + try_compile(HAVE_POSIX_IOCTL + "${CMAKE_CURRENT_BINARY_DIR}/posix_ioctl_check.o" +@@ -194,21 +203,90 @@ if(MSVC) + endif() + set(NFC_LINUX OFF) + else() +- include(FindPkgConfig) +- pkg_search_module(CBOR libcbor) +- pkg_search_module(CRYPTO libcrypto) +- pkg_search_module(ZLIB zlib) + +- if(NOT CBOR_FOUND AND NOT HAVE_CBOR_H) +- message(FATAL_ERROR "could not find libcbor") +- endif() +- if(NOT CRYPTO_FOUND AND NOT HAVE_OPENSSLV_H) +- message(FATAL_ERROR "could not find libcrypto") +- endif() +- if(NOT ZLIB_FOUND) +- message(FATAL_ERROR "could not find zlib") +- endif() ++ # detect zlib ++ ++ if(ZLIB_ROOT_DIR) ++ list(PREPEND CMAKE_FIND_ROOT_PATH ${ZLIB_ROOT_DIR}) ++ endif() ++ ++ find_path(ZLIB_INCLUDE_DIR ++ NAMES "zlib.h") ++ ++ find_library(ZLIB_LIBRARY ++ NAMES zlib z) ++ ++ get_filename_component(ZLIB_LIBRARY_DIR ${ZLIB_LIBRARY} DIRECTORY CACHE) ++ ++ add_library(zlib STATIC IMPORTED GLOBAL) ++ set_target_properties(zlib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${ZLIB_INCLUDE_DIR}") ++ set_target_properties(zlib PROPERTIES IMPORTED_LOCATION "${ZLIB_LIBRARY}") ++ ++ # detect libcbor ++ ++ if(CBOR_ROOT_DIR) ++ list(PREPEND CMAKE_FIND_ROOT_PATH ${CBOR_ROOT_DIR}) ++ endif() ++ ++ find_path(CBOR_INCLUDE_DIR ++ NAMES "cbor.h") ++ ++ find_library(CBOR_LIBRARY ++ NAMES libcbor cbor) ++ ++ get_filename_component(CBOR_LIBRARY_DIR ${CBOR_LIBRARY} DIRECTORY CACHE) ++ ++ add_library(libcbor STATIC IMPORTED GLOBAL) ++ set_target_properties(libcbor PROPERTIES IMPORTED_LOCATION "${CBOR_LIBRARY}") + ++ # detect libressl ++ ++ if(CRYPTO_ROOT_DIR) ++ list(PREPEND CMAKE_FIND_ROOT_PATH ${CRYPTO_ROOT_DIR}) ++ endif() ++ ++ find_path(CRYPTO_INCLUDE_DIR ++ NAMES "openssl/opensslv.h") ++ ++ find_library(CRYPTO_LIBRARY ++ NAMES libcrypto crypto) ++ ++ get_filename_component(CRYPTO_LIBRARY_DIR ${CRYPTO_LIBRARY} DIRECTORY CACHE) ++ ++ add_library(libcrypto STATIC IMPORTED GLOBAL) ++ set_target_properties(libcrypto PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CRYPTO_INCLUDE_DIR}") ++ set_target_properties(libcrypto PROPERTIES IMPORTED_LOCATION "${CRYPTO_LIBRARY}") ++ ++ include(FindPkgConfig) ++ ++ include_directories("${ZLIB_INCLUDE_DIR}") ++ include_directories("${CBOR_INCLUDE_DIR}") ++ include_directories("${CRYPTO_INCLUDE_DIR}") ++ ++ message(STATUS "ZLIB_INCLUDE_DIR: ${ZLIB_INCLUDE_DIR}") ++ message(STATUS "ZLIB_LIBRARY: ${ZLIB_LIBRARY}") ++ message(STATUS "CBOR_INCLUDE_DIR: ${CBOR_INCLUDE_DIR}") ++ message(STATUS "CBOR_LIBRARY: ${CBOR_LIBRARY}") ++ message(STATUS "CRYPTO_INCLUDE_DIR: ${CRYPTO_INCLUDE_DIR}") ++ message(STATUS "CRYPTO_LIBRARY: ${CRYPTO_LIBRARY}") ++ ++ if (NOT (ZLIB_LIBRARY AND CBOR_LIBRARY AND CRYPTO_LIBRARY)) ++ pkg_search_module(CBOR libcbor) ++ pkg_search_module(CRYPTO libcrypto) ++ pkg_search_module(ZLIB zlib) ++ ++ if(NOT CBOR_FOUND AND NOT HAVE_CBOR_H) ++ message(FATAL_ERROR "could not find libcbor") ++ endif() ++ if(NOT CRYPTO_FOUND AND NOT HAVE_OPENSSLV_H) ++ message(FATAL_ERROR "could not find libcrypto") ++ endif() ++ if(NOT ZLIB_FOUND) ++ message(FATAL_ERROR "could not find zlib") ++ endif() ++ endif() ++ ++ set(ZLIB_LIBRARIES "zlib") + set(CBOR_LIBRARIES "cbor") + set(CRYPTO_LIBRARIES "crypto") + +@@ -226,6 +304,27 @@ else() + set(BASE_LIBRARIES ${BASE_LIBRARIES} rt) + endif() + endif() ++ elseif(CMAKE_SYSTEM_NAME STREQUAL "Android") ++ if(UDEV_ROOT_DIR) ++ list(PREPEND CMAKE_FIND_ROOT_PATH ${UDEV_ROOT_DIR}) ++ endif() ++ ++ find_path(UDEV_INCLUDE_DIR ++ NAMES "libudev.h") ++ ++ find_library(UDEV_LIBRARY ++ NAMES libudev-zero.a libudev) ++ ++ add_library(udev STATIC IMPORTED GLOBAL) ++ set_target_properties(udev PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${UDEV_INCLUDE_DIR}") ++ set_target_properties(udev PROPERTIES IMPORTED_LOCATION "${UDEV_LIBRARY}") ++ ++ include_directories("${UDEV_INCLUDE_DIR}") ++ ++ set(UDEV_LIBRARIES "udev") ++ ++ message(STATUS "UDEV_INCLUDE_DIR: ${UDEV_INCLUDE_DIR}") ++ message(STATUS "UDEV_LIBRARY: ${UDEV_LIBRARY}") + else() + set(NFC_LINUX OFF) + endif() +@@ -414,7 +513,7 @@ if(BUILD_MANPAGES) + subdirs(man) + endif() + +-if(NOT WIN32) ++if(NOT WIN32 AND BUILD_TESTS) + if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT FUZZ) + enable_testing() + subdirs(regress) +-- +2.25.1 + diff --git a/recipes/libfido2/patches/0002-fix-crypto-explicit_bzero-conflict.patch b/recipes/libfido2/patches/0002-fix-crypto-explicit_bzero-conflict.patch new file mode 100644 index 0000000..83fa35a --- /dev/null +++ b/recipes/libfido2/patches/0002-fix-crypto-explicit_bzero-conflict.patch @@ -0,0 +1,39 @@ +From 35bb91baf17ac73cfba58765618c7b9041f588de Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= +Date: Tue, 21 Nov 2023 16:22:07 -0500 +Subject: [PATCH 2/3] fix crypto explicit_bzero conflict + +--- + openbsd-compat/explicit_bzero.c | 2 +- + openbsd-compat/openbsd-compat.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/openbsd-compat/explicit_bzero.c b/openbsd-compat/explicit_bzero.c +index ac64e69..e86c5f0 100644 +--- a/openbsd-compat/explicit_bzero.c ++++ b/openbsd-compat/explicit_bzero.c +@@ -7,7 +7,7 @@ + + #include "openbsd-compat.h" + +-#if !defined(HAVE_EXPLICIT_BZERO) && !defined(_WIN32) ++#if !defined(HAVE_EXPLICIT_BZERO) && !defined(_WIN32) && !defined(CRYPTO_EXPLICIT_BZERO) + + #include + +diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h +index dc9acec..b784197 100644 +--- a/openbsd-compat/openbsd-compat.h ++++ b/openbsd-compat/openbsd-compat.h +@@ -62,7 +62,7 @@ char *strsep(char **, const char *); + void *recallocarray(void *, size_t, size_t, size_t); + #endif + +-#if !defined(HAVE_EXPLICIT_BZERO) ++#if !defined(HAVE_EXPLICIT_BZERO) || defined(CRYPTO_EXPLICIT_BZERO) + void explicit_bzero(void *, size_t); + #endif + +-- +2.25.1 + diff --git a/recipes/libfido2/patches/0003-use-linux-hid-backend-for-android.patch b/recipes/libfido2/patches/0003-use-linux-hid-backend-for-android.patch new file mode 100644 index 0000000..86c8fe3 --- /dev/null +++ b/recipes/libfido2/patches/0003-use-linux-hid-backend-for-android.patch @@ -0,0 +1,25 @@ +From 1346ae08134a5444bc21d9fc11fe8b79e784e3b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= +Date: Tue, 21 Nov 2023 16:22:54 -0500 +Subject: [PATCH 3/3] Use Linux HID backend for Android + +--- + src/CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 796ec69..a0295e3 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -63,6 +63,8 @@ elseif(APPLE) + list(APPEND FIDO_SOURCES hid_osx.c) + elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + list(APPEND FIDO_SOURCES hid_linux.c hid_unix.c) ++elseif(CMAKE_SYSTEM_NAME STREQUAL "Android") ++ list(APPEND FIDO_SOURCES hid_linux.c hid_unix.c) + elseif(CMAKE_SYSTEM_NAME STREQUAL "NetBSD") + list(APPEND FIDO_SOURCES hid_netbsd.c hid_unix.c) + elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") +-- +2.25.1 + diff --git a/recipes/libudev-zero/conanfile.py b/recipes/libudev-zero/conanfile.py index a35b6c1..25c8fc5 100644 --- a/recipes/libudev-zero/conanfile.py +++ b/recipes/libudev-zero/conanfile.py @@ -1,18 +1,19 @@ from conans import ConanFile, tools, CMake, python_requires -import os +import os, shutil class LibUdevZeroConan(ConanFile): name = 'libudev-zero' - exports = 'VERSION' version = open(os.path.join('.', 'VERSION'), 'r').read().rstrip() license = 'ISC' - url = 'https://github.com/awakecoding/libudev-zero' + url = 'https://github.com/illiliti/libudev-zero' description = 'libudev-zero' settings = 'os', 'arch', 'distro', 'build_type' no_copy_source = True - branch = 'devolutions' python_requires = "shared/1.0.0@devolutions/stable" python_requires_extend = "shared.UtilsBase" + exports = ['VERSION', + 'patches/CMakeLists.txt', + 'patches/0001-fix-undefined-line-max-on-android.patch'] options = { 'fPIC': [True, False], @@ -28,10 +29,20 @@ def build_requirements(self): def source(self): folder = self.name - self.output.info('Cloning repo: %s dest: %s branch: %s' % (self.url, folder, self.branch)) + tag = self.version + self.output.info('Cloning repo: %s dest: %s tag: %s' % (self.url, folder, tag)) git = tools.Git(folder=folder) git.clone(self.url) - git.checkout(self.branch) + git.checkout(tag) + + patches_dir = os.path.join(self.recipe_folder, "patches") + shutil.copy(os.path.join(patches_dir, "CMakeLists.txt"), os.path.join(folder, "CMakeLists.txt")) + + if os.path.isdir(patches_dir): + for patch_file in [f for f in os.listdir(patches_dir) if f.endswith('.patch')]: + patch_path = os.path.join(patches_dir, patch_file) + self.output.info('Applying patch: %s' % patch_path) + tools.patch(base_path=folder, patch_file=patch_path) def build(self): cmake = CMake(self) diff --git a/recipes/libudev-zero/patches/0001-fix-undefined-line-max-on-android.patch b/recipes/libudev-zero/patches/0001-fix-undefined-line-max-on-android.patch new file mode 100644 index 0000000..32dc189 --- /dev/null +++ b/recipes/libudev-zero/patches/0001-fix-undefined-line-max-on-android.patch @@ -0,0 +1,27 @@ +From 6269064597de4db70b07bd0e454d6ac9fe51a137 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= +Date: Fri, 15 Apr 2022 10:09:26 -0400 +Subject: [PATCH 2/3] fix undefined LINE_MAX on Android + +--- + udev_device.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/udev_device.c b/udev_device.c +index e202150..173cbe4 100644 +--- a/udev_device.c ++++ b/udev_device.c +@@ -26,6 +26,10 @@ + #include "udev.h" + #include "udev_list.h" + ++#ifndef LINE_MAX ++#define LINE_MAX 2048 ++#endif ++ + #ifndef LONG_BIT + #define LONG_BIT (sizeof(unsigned long) * 8) + #endif +-- +2.25.1 + diff --git a/recipes/libudev-zero/patches/CMakeLists.txt b/recipes/libudev-zero/patches/CMakeLists.txt new file mode 100644 index 0000000..c346057 --- /dev/null +++ b/recipes/libudev-zero/patches/CMakeLists.txt @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.1) + +set(CMAKE_C_STANDARD 99) + +project(udev-zero C) + +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +set(CMAKE_THREAD_PREFER_PTHREAD ON) +find_package(Threads REQUIRED) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=700") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-prototypes -Wstrict-prototypes -Wno-unused-parameter") + +add_library(udev-zero + udev.c + udev_list.h + udev_list.c + udev_device.c + udev_monitor.c + udev_enumerate.c) + +target_link_libraries(udev-zero PRIVATE Threads::Threads) + +install(TARGETS udev-zero + DESTINATION "lib") + +install(FILES "udev.h" + DESTINATION "include" + RENAME "libudev.h") diff --git a/recipes/libvpx/conanfile.py b/recipes/libvpx/conanfile.py index 1825fe0..69f6e30 100644 --- a/recipes/libvpx/conanfile.py +++ b/recipes/libvpx/conanfile.py @@ -1,18 +1,21 @@ from conans import ConanFile, tools, CMake, python_requires -import os +import os, shutil class LibvpxConan(ConanFile): name = 'libvpx' - exports = 'VERSION' version = open(os.path.join('.', 'VERSION'), 'r').read().rstrip() license = 'WebM' - url = 'https://github.com/awakecoding/libvpx.git' + url = 'https://github.com/webmproject/libvpx.git' description = 'WebM VP8/VP9 Codec SDK' settings = 'os', 'arch', 'distro', 'build_type' no_copy_source = True - branch = 'cmake' python_requires = "shared/1.0.0@devolutions/stable" python_requires_extend = "shared.UtilsBase" + exports = ['VERSION', + 'patches/CMakeLists.txt', + 'patches/vpx.pc.in', + 'patches/vpx_config.h.in', + 'patches/vpx_version.h.in'] options = { 'fPIC': [True, False], @@ -31,10 +34,15 @@ def source(self): return folder = self.name - self.output.info('Cloning repo: %s dest: %s branch: %s' % (self.url, folder, self.branch)) + tag = 'v%s' % (self.version) + self.output.info('Cloning repo: %s dest: %s tag: %s' % (self.url, folder, tag)) git = tools.Git(folder=folder) git.clone(self.url) - git.checkout(self.branch) + git.checkout(tag) + + patches_dir = os.path.join(self.recipe_folder, "patches") + for file in ['CMakeLists.txt','vpx.pc.in','vpx_config.h.in','vpx_version.h.in']: + shutil.copy(os.path.join(patches_dir, file), os.path.join(folder, file)) def build(self): if self.settings.arch == 'universal': diff --git a/recipes/libvpx/patches/CMakeLists.txt b/recipes/libvpx/patches/CMakeLists.txt new file mode 100644 index 0000000..27c1fe0 --- /dev/null +++ b/recipes/libvpx/patches/CMakeLists.txt @@ -0,0 +1,2018 @@ + +cmake_minimum_required(VERSION 3.15) + +project(LIBVPX C CXX) + +include(CheckIncludeFiles) +include(CMakeDependentOption) + +cmake_policy(SET CMP0091 NEW) + +set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) + +set(LIBVPX_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(LIBVPX_BIN_DIR "${CMAKE_CURRENT_BINARY_DIR}") + +# detect version information + +if(EXISTS "${LIBVPX_SRC_DIR}/.git") + execute_process( + COMMAND "git" "describe" "--match=v[0-9]*" + WORKING_DIRECTORY "${LIBVPX_SRC_DIR}" + OUTPUT_VARIABLE RAW_VERSION_STRING + OUTPUT_STRIP_TRAILING_WHITESPACE) +elseif(EXISTS "${LIBVPX_SRC_DIR}/CHANGELOG") + file(STRINGS + "${LIBVPX_SRC_DIR}/CHANGELOG" CHANGELOG + REGEX ".?([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*)" + LIMIT_COUNT 1) + string(REGEX REPLACE "^(.*) (.*) \"(.*)\"$" "\\2" RAW_VERSION_STRING "${CHANGELOG}") +endif() + +set(VERSION_REGEX "^.?([0-9]+)\\.([0-9]+)\\.([0-9]+)-?(.*)") +string(REGEX REPLACE "${VERSION_REGEX}" "\\1" VERSION_MAJOR "${RAW_VERSION_STRING}") +string(REGEX REPLACE "${VERSION_REGEX}" "\\2" VERSION_MINOR "${RAW_VERSION_STRING}") +string(REGEX REPLACE "${VERSION_REGEX}" "\\3" VERSION_PATCH "${RAW_VERSION_STRING}") +string(REGEX REPLACE "${VERSION_REGEX}" "\\4" VERSION_EXTRA "${RAW_VERSION_STRING}") +set(VERSION_STRING "v${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") + +message(STATUS "libvpx version ${VERSION_STRING}") + +configure_file("${LIBVPX_SRC_DIR}/vpx_version.h.in" + "${LIBVPX_BIN_DIR}/vpx_version.h" @ONLY) + +find_program(PERL_EXECUTABLE perl REQUIRED) + +# semi-hardcoded configuration + +if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) +endif() + +if(NOT DEFINED BUILD_SHARED_LIBS) + set(BUILD_SHARED_LIBS OFF) +endif() + +option(HAVE_VPX_PORTS "Have VPX ports" ON) + +option(CONFIG_DEPENDENCY_TRACKING "Dependency tracking" ON) +option(CONFIG_EXTERNAL_BUILD "External build" OFF) +option(CONFIG_INSTALL_DOCS "Install documentation" OFF) +option(CONFIG_INSTALL_BINS "Install binaries" OFF) +option(CONFIG_INSTALL_LIBS "Install libraries" ON) +option(CONFIG_INSTALL_SRCS "Install sources" OFF) +option(CONFIG_CODEC_SRCS "Codec sources" OFF) +option(INSTALL_PKG_CONFIG_FILE "Install pkg-config file" ON) + +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CONFIG_DEBUG 1) + set(CONFIG_DEBUG_LIBS 1) +endif() + +option(CONFIG_GPROF "Gprof" OFF) +option(CONFIG_GCOV "Gcov" OFF) + +option(CONFIG_RVCT "RVCT compiler" ON) +option(CONFIG_GCC "GCC compiler" ON) +cmake_dependent_option(CONFIG_MSVS "Visual Studio" ON "MSVC" OFF) + +if(CMAKE_POSITION_INDEPENDENT_CODE) + set(CONFIG_PIC 1) +endif() + +if(CMAKE_C_BYTE_ORDER STREQUAL "BIG_ENDIAN") + set(CONFIG_BIG_ENDIAN 1) +endif() + +cmake_dependent_option(CONFIG_RUNTIME_CPU_DETECT "runtime CPU detection" ON "NOT APPLE;NOT ANDROID" OFF) + +option(CONFIG_POSTPROC "post-processing" ON) +option(CONFIG_DEQUANT_TOKENS "Dequant tokens" OFF) +option(CONFIG_DC_RECON "DC recon" OFF) +option(CONFIG_SPATIAL_RESAMPLING "Spatial resampling" ON) +option(CONFIG_REALTIME_ONLY "Realtime only" OFF) +option(CONFIG_ONTHEFLY_BITPACKING "On-the-fly bit packing" OFF) +option(CONFIG_ERROR_CONCEALMENT "Error concealement" OFF) +option(CONFIG_MULTI_RES_ENCODING "Multi-resolution encoding" OFF) +option(CONFIG_TEMPORAL_DENOISING "Temporal denoising" ON) +option(CONFIG_CONSISTENT_RECODE "Consistent recode" OFF) +option(CONFIG_COEFFICIENT_RANGE_CHECKING "Coefficient range checking" OFF) +option(CONFIG_SIZE_LIMIT "Size limit" OFF) +option(CONFIG_ALWAYS_ADJUST_BPM "Always adjust BPM" OFF) +option(CONFIG_NON_GREEDY_MV "Non-greedy MV" OFF) +option(CONFIG_RATE_CTRL "Rate control" OFF) +cmake_dependent_option(CONFIG_POSTPROC_VISUALIZER "Post-processing visualizer" OFF "CONFIG_POSTPROC" OFF) + +option(CONFIG_INTERNAL_STATS "Internal stats" OFF) +option(CONFIG_BITSTREAM_DEBUG "Bitstream debug" OFF) +option(CONFIG_MISMATCH_DEBUG "Mismatch debug" OFF) +option(CONFIG_FP_MB_STATS "FP MB stats" OFF) + +option(CONFIG_ENCODERS "VPX encoders" ON) +option(CONFIG_DECODERS "VPX decoders" ON) + +option(CONFIG_VP8 "VP8 codec" ON) +option(CONFIG_VP9 "VP9 codec" ON) + +cmake_dependent_option(CONFIG_VP8_ENCODER "VP8 encoder" ON "CONFIG_VP8 AND CONFIG_ENCODERS" OFF) +cmake_dependent_option(CONFIG_VP8_DECODER "VP8 decoder" ON "CONFIG_VP8 AND CONFIG_DECODERS" OFF) + +cmake_dependent_option(CONFIG_VP9_ENCODER "VP9 encoder" ON "CONFIG_VP9 AND CONFIG_DECODERS" OFF) +cmake_dependent_option(CONFIG_VP9_DECODER "VP9 decoder" ON "CONFIG_VP9 AND CONFIG_DECODERS" OFF) + +cmake_dependent_option(CONFIG_VP9_HIGHBITDEPTH "VP9 high bit depth" ON "CONFIG_VP9" OFF) +cmake_dependent_option(CONFIG_VP9_POSTPROC "VP9 post-processing" ON "CONFIG_VP9;CONFIG_POSTPROC" OFF) +cmake_dependent_option(CONFIG_VP9_TEMPORAL_DENOISING "VP9 temporal denoising" OFF "CONFIG_VP9;CONFIG_TEMPORAL_DENOISING" OFF) + +cmake_dependent_option(CONFIG_STATIC_MSVCRT "Static MSVC runtime" ON "MSVC" OFF) + +if(CONFIG_STATIC_MSVCRT) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") +endif() + +if(NOT BUILD_SHARED_LIBS) + set(CONFIG_STATIC 1) +endif() + +option(CONFIG_SMALL "Small build" OFF) + +option(CONFIG_BETTER_HW_COMPATIBILITY "Better hardware compatibility" OFF) +option(CONFIG_EMULATE_HARDWARE "Emulate hardware" OFF) +option(CONFIG_EXPERIMENTAL "experimental features" OFF) + +option(CONFIG_OS_SUPPORT "os support" ON) +option(CONFIG_WEBM_IO "webm I/O" ON) +option(CONFIG_LIBYUV "libyuv" ON) + +# detect target processor architecture + +if(DEFINED CMAKE_OSX_ARCHITECTURES AND CMAKE_OSX_ARCHITECTURES) + list(LENGTH CMAKE_OSX_ARCHITECTURES CMAKE_OSX_ARCHITECTURES_COUNT) + if(NOT (CMAKE_OSX_ARCHITECTURES_COUNT EQUAL 1)) + message(WARNING "CMAKE_OSX_ARCHITECTURES can only be used to specify one architecture at a time") + endif() + list(GET CMAKE_OSX_ARCHITECTURES 0 CMAKE_SYSTEM_PROCESSOR) +endif() + +if(DEFINED CMAKE_GENERATOR_PLATFORM AND CMAKE_GENERATOR_PLATFORM) + set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_GENERATOR_PLATFORM}" CACHE STRING "" FORCE) +endif() + +message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64|ARM64") + message(STATUS "Detected ARM64 processor architecture") + set(VPX_ARCH_ARM 1) + set(VPX_TGT_ISA "arm64") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm|^ARM") + message(STATUS "Detected ARM processor architecture") + set(VPX_ARCH_ARM 1) + set(VPX_TGT_ISA "armv7") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|x64|amd64|AMD64") + message(STATUS "Detected x86_64 processor architecture") + set(VPX_ARCH_X86_64 1) + set(VPX_TGT_ISA "x86_64") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86|Win32|i386|i486|i586|i686") + message(STATUS "Detected x86 processor architecture") + set(VPX_ARCH_X86 1) + set(VPX_TGT_ISA "x86") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips") + message(STATUS "Detected MIPS processor architecture") + set(VPX_ARCH_MIPS 1) + if(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips64") + set(VPX_TGT_ISA "mips64") + else() + set(VPX_TGT_ISA "mips32") + endif() +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc|^powerpc") + message(STATUS "Detected PPC processor architecture") + set(VPX_ARCH_PPC 1) + set(VPX_TGT_ISA "ppc64le") +else() + message(FATAL_ERROR "Could not detect processor architecture for \"${CMAKE_SYSTEM_PROCESSOR}\"") +endif() + +# detect assembler configuration + +option(WITH_SIMD "SIMD optimizations" ON) + +if(VPX_ARCH_X86 OR VPX_ARCH_X86_64) + if(WIN32) + if(VPX_ARCH_X86_64) + set(CMAKE_ASM_NASM_OBJECT_FORMAT win64) + else() + set(CMAKE_ASM_NASM_OBJECT_FORMAT win32) + endif() + elseif(APPLE) + if(VPX_ARCH_X86_64) + set(CMAKE_ASM_NASM_OBJECT_FORMAT macho64) + else() + set(CMAKE_ASM_NASM_OBJECT_FORMAT macho) + endif() + else() + if(VPX_ARCH_X86_64) + set(CMAKE_ASM_NASM_OBJECT_FORMAT elf64) + else() + set(CMAKE_ASM_NASM_OBJECT_FORMAT elf) + endif() + endif() + enable_language(ASM_NASM) + set(ASM_EXT ".asm") +endif() + +cmake_dependent_option(HAVE_NEON "NEON extensions" ON "VPX_ARCH_ARM;WITH_SIMD" OFF) +cmake_dependent_option(HAVE_NEON_ASM "NEON asm extensions" OFF "VPX_ARCH_ARM;WITH_SIMD" OFF) + +if(VPX_ARCH_ARM) + if(HAVE_NEON_ASM) + message(WARNING "NEON assembly extensions are not working yet!") + enable_language(ASM) + endif() + set(ASM_EXT ".asm.S") +endif() + +cmake_dependent_option(HAVE_MMX "MMX extensions" ON "VPX_ARCH_X86 OR VPX_ARCH_X86_64;WITH_SIMD" OFF) +cmake_dependent_option(HAVE_SSE "SSE extensions" ON "VPX_ARCH_X86 OR VPX_ARCH_X86_64;WITH_SIMD" OFF) +cmake_dependent_option(HAVE_SSE2 "SSE2 extensions" ON "VPX_ARCH_X86 OR VPX_ARCH_X86_64;WITH_SIMD" OFF) +cmake_dependent_option(HAVE_SSE3 "SSE3 extensions" ON "VPX_ARCH_X86 OR VPX_ARCH_X86_64;WITH_SIMD" OFF) +cmake_dependent_option(HAVE_SSSE3 "SSSE3 extensions" ON "VPX_ARCH_X86 OR VPX_ARCH_X86_64;WITH_SIMD" OFF) +cmake_dependent_option(HAVE_SSE4_1 "SSE4_1 extensions" ON "VPX_ARCH_X86 OR VPX_ARCH_X86_64;WITH_SIMD" OFF) +cmake_dependent_option(HAVE_AVX "AVX extensions" ON "VPX_ARCH_X86 OR VPX_ARCH_X86_64;WITH_SIMD" OFF) +cmake_dependent_option(HAVE_AVX2 "AVX2 extensions" ON "VPX_ARCH_X86 OR VPX_ARCH_X86_64;WITH_SIMD" OFF) +cmake_dependent_option(HAVE_AVX512 "AVX512 extensions" ON "VPX_ARCH_X86 OR VPX_ARCH_X86_64;WITH_SIMD" OFF) + +cmake_dependent_option(HAVE_VSX "VSX extensions" ON "VPX_ARCH_PPC;WITH_SIMD" OFF) + +cmake_dependent_option(HAVE_MSA "MSA extensions" ON "VPX_ARCH_MIPS;WITH_SIMD" OFF) + +if(HAVE_NEON_ASM) + set(ADS2GAL_PL "${LIBVPX_SRC_DIR}/build/make/ads2gas.pl") + set(ASM_HELPER "#!/bin/sh\ncat $INPUT_FILE | perl $SCRIPT_FILE -thumb -noelf > $OUTPUT_FILE\n") + set(ASM_HELPER_SH "${LIBVPX_BIN_DIR}/asm_helper.sh") + file(WRITE "${ASM_HELPER_SH}" "${ASM_HELPER}") + execute_process(COMMAND "chmod" "+x" "${ASM_HELPER_SH}") +endif() + +function(asm_generate) + cmake_parse_arguments(ASM "" "INPUT;OUTPUT;SCRIPT" "" ${ARGN}) + if(NOT ASM_SCRIPT) + set(ASM_SCRIPT "${ADS2GAL_PL}") + endif() + set(ASM_ARGS "-E" "env" + "INPUT_FILE=${ASM_INPUT}" + "SCRIPT_FILE=${ASM_SCRIPT}" + "OUTPUT_FILE=${ASM_OUTPUT}") + list(APPEND ASM_ARGS "${ASM_HELPER_SH}") + add_custom_command(COMMAND ${CMAKE_COMMAND} + ARGS ${ASM_ARGS} + OUTPUT ${ASM_OUTPUT} + DEPENDS ${ASM_INPUT} ${ASM_SCRIPT} + WORKING_DIRECTORY "${LIBVPX_BIN_DIR}") +endfunction() + +# compiler-specific flags + +if(WIN32) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_UNICODE") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS") +endif() + +# define "restrict" and "inline" keywords used by compiler + +set(RESTRICT_KEYWORD "") + +if(MSVC) + set(INLINE_KEYWORD "__inline") +else() + set(INLINE_KEYWORD "inline") +endif() + +find_package(Threads REQUIRED) + +if(CMAKE_USE_PTHREADS_INIT) + set(HAVE_PTHREAD_H 1) +endif() + +check_include_files(unistd.h HAVE_UNISTD_H) + +set(RTCD_PL "${LIBVPX_SRC_DIR}/build/make/rtcd.pl") +set(RTCD_REDIRECT "open OUTPUT, '>', \$ENV{RTCD_OUTPUT} or die \"Can't create file handle: $!\"; select OUTPUT;") +set(RTCD_REDIRECT_PL "${LIBVPX_BIN_DIR}/rtcd_redirect.pl") +file(WRITE "${RTCD_REDIRECT_PL}" "${RTCD_REDIRECT}") + +function(rtcd_generate) + cmake_parse_arguments(RTCD "" "SYMBOL;CONFIG;SCRIPT;OUTPUT" "" ${ARGN}) + if(NOT RTCD_CONFIG) + set(RTCD_CONFIG "vpx_config.mk") + endif() + set(RTCD_ARGS "-E" "env" "RTCD_OUTPUT=${RTCD_OUTPUT}") + list(APPEND RTCD_ARGS "perl" "${RTCD_PL}") + list(APPEND RTCD_ARGS + "--arch=${VPX_TGT_ISA}" + "--sym=${RTCD_SYMBOL}" + "--config=${RTCD_CONFIG}" + "${RTCD_SCRIPT}" "${RTCD_REDIRECT_PL}") + add_custom_command(COMMAND ${CMAKE_COMMAND} + ARGS ${RTCD_ARGS} + OUTPUT ${RTCD_OUTPUT} + DEPENDS ${RTCD_SCRIPT} + WORKING_DIRECTORY "${LIBVPX_BIN_DIR}") +endfunction() + +configure_file("${LIBVPX_SRC_DIR}/vpx_config.h.in" + "${LIBVPX_BIN_DIR}/vpx_config.h" @ONLY) + +file(STRINGS "${LIBVPX_BIN_DIR}/vpx_config.h" VPX_CONFIG_H + REGEX "^#define ([0-9_A-Z]+) ([01])$") + +set(VPX_CONFIG_ASM "") +foreach(VPX_DEFINE_C ${VPX_CONFIG_H}) + string(REGEX REPLACE "^#define ([0-9_A-Z]+) ([01])$" + "\\1 equ \\2" VPX_DEFINE_ASM "${VPX_DEFINE_C}") + set(VPX_CONFIG_ASM "${VPX_CONFIG_ASM}\n${VPX_DEFINE_ASM}") +endforeach() + +file(WRITE "${LIBVPX_BIN_DIR}/vpx_config.asm" "${VPX_CONFIG_ASM}") + +set(VPX_CONFIG_MK "") +set(VPX_CONFIG_MK "${VPX_CONFIG_MK}\nSRC_PATH=${LIBVPX_SRC_DIR}") +set(VPX_CONFIG_MK "${VPX_CONFIG_MK}\nSRC_PATH_BARE=${LIBVPX_SRC_DIR}") +foreach(VPX_DEFINE_C ${VPX_CONFIG_H}) + string(REGEX REPLACE "^.*([01])$" "\\1" VPX_DEFINE_VALUE "${VPX_DEFINE_C}") + if(${VPX_DEFINE_VALUE}) + string(REGEX REPLACE "^#define ([0-9_A-Z]+) ([01])$" + "\\1=yes" VPX_DEFINE_MK "${VPX_DEFINE_C}") + set(VPX_CONFIG_MK "${VPX_CONFIG_MK}\n${VPX_DEFINE_MK}") + endif() +endforeach() + +file(WRITE "${LIBVPX_BIN_DIR}/vpx_config.mk" "${VPX_CONFIG_MK}") + +include_directories(${LIBVPX_SRC_DIR}) +include_directories(${LIBVPX_BIN_DIR}) + +# vpx_codec + +set(LIBVPX_VPX_SRC_DIR "${LIBVPX_SRC_DIR}/vpx") + +set(LIBVPX_VPX_SOURCES "") + +if(CONFIG_VP8_ENCODER OR CONFIG_VP8_DECODER) + list(APPEND LIBVPX_VPX_SOURCES + "${LIBVPX_VPX_SRC_DIR}/vp8.h") +endif() + +if(CONFIG_VP8_ENCODER) + list(APPEND LIBVPX_VPX_SOURCES + "${LIBVPX_VPX_SRC_DIR}/vp8cx.h") +endif() + +if(CONFIG_VP8_DECODER) + list(APPEND LIBVPX_VPX_SOURCES + "${LIBVPX_VPX_SRC_DIR}/vp8dx.h") +endif() + +list(APPEND LIBVPX_VPX_SOURCES + "${LIBVPX_VPX_SRC_DIR}/src/vpx_decoder.c" + "${LIBVPX_VPX_SRC_DIR}/vpx_decoder.h" + "${LIBVPX_VPX_SRC_DIR}/src/vpx_encoder.c" + "${LIBVPX_VPX_SRC_DIR}/vpx_encoder.h" + "${LIBVPX_VPX_SRC_DIR}/internal/vpx_codec_internal.h" + "${LIBVPX_VPX_SRC_DIR}/src/vpx_codec.c" + "${LIBVPX_VPX_SRC_DIR}/src/vpx_image.c" + "${LIBVPX_VPX_SRC_DIR}/vpx_codec.h" + "${LIBVPX_VPX_SRC_DIR}/vpx_frame_buffer.h" + "${LIBVPX_VPX_SRC_DIR}/vpx_image.h" + "${LIBVPX_VPX_SRC_DIR}/vpx_integer.h" + "${LIBVPX_VPX_SRC_DIR}/vpx_ext_ratectrl.h") + +# vpx_mem + +set(LIBVPX_MEM_SRC_DIR "${LIBVPX_SRC_DIR}/vpx_mem") +set(LIBVPX_MEM_SOURCES + "${LIBVPX_MEM_SRC_DIR}/vpx_mem.c" + "${LIBVPX_MEM_SRC_DIR}/vpx_mem.h" + "${LIBVPX_MEM_SRC_DIR}/include/vpx_mem_intrnl.h") + +# vpx_scale + +set(LIBVPX_SCALE_SRC_DIR "${LIBVPX_SRC_DIR}/vpx_scale") +set(LIBVPX_SCALE_SOURCES + "${LIBVPX_SCALE_SRC_DIR}/yv12config.h" + "${LIBVPX_SCALE_SRC_DIR}/generic/yv12config.c" + "${LIBVPX_SCALE_SRC_DIR}/generic/yv12extend.c" + "${LIBVPX_SCALE_SRC_DIR}/vpx_scale_rtcd.c" + "${LIBVPX_BIN_DIR}/vpx_scale_rtcd.h") + +if(CONFIG_SPATIAL_RESAMPLING) + list(APPEND LIBVPX_SCALE_SOURCES + "${LIBVPX_SCALE_SRC_DIR}/vpx_scale.h" + "${LIBVPX_SCALE_SRC_DIR}/generic/vpx_scale.c" + "${LIBVPX_SCALE_SRC_DIR}/generic/gen_scalers.c") +endif() + +if(HAVE_DSPR2) + list(APPEND LIBVPX_SCALE_SOURCES + "${LIBVPX_SCALE_SRC_DIR}/mips/dspr2/yv12extend_dspr2.c") +endif() + +rtcd_generate(SYMBOL "vpx_scale_rtcd" + SCRIPT "${LIBVPX_SRC_DIR}/vpx_scale/vpx_scale_rtcd.pl" + OUTPUT "${LIBVPX_BIN_DIR}/vpx_scale_rtcd.h") + +# vpx_ports + +set(LIBVPX_PORTS_SRC_DIR "${LIBVPX_SRC_DIR}/vpx_ports") + +set(LIBVPX_PORTS_SOURCES + "${LIBVPX_PORTS_SRC_DIR}/bitops.h" + "${LIBVPX_PORTS_SRC_DIR}/compiler_attributes.h" + "${LIBVPX_PORTS_SRC_DIR}/mem.h" + "${LIBVPX_PORTS_SRC_DIR}/msvc.h" + "${LIBVPX_PORTS_SRC_DIR}/static_assert.h" + "${LIBVPX_PORTS_SRC_DIR}/system_state.h" + "${LIBVPX_PORTS_SRC_DIR}/vpx_timer.h") + +if(VPX_ARCH_X86 AND HAVE_MMX) + list(APPEND LIBVPX_PORTS_SOURCES + "${LIBVPX_PORTS_SRC_DIR}/emms_mmx.c") +endif() + +if(VPX_ARCH_X86_64 AND HAVE_MMX) + list(APPEND LIBVPX_PORTS_SOURCES + "${LIBVPX_PORTS_SRC_DIR}/emms_mmx.asm") +endif() + +if(VPX_ARCH_X86 OR VPX_ARCH_X86_64) + list(APPEND LIBVPX_PORTS_SOURCES + "${LIBVPX_PORTS_SRC_DIR}/x86.h" + "${LIBVPX_PORTS_SRC_DIR}/x86_abi_support.asm") +endif() + +if(VPX_ARCH_X86_64 AND CONFIG_MSVS) + list(APPEND LIBVPX_PORTS_SOURCES + "${LIBVPX_PORTS_SRC_DIR}/float_control_word.asm") +endif() + +if(VPX_ARCH_ARM) + list(APPEND LIBVPX_PORTS_SOURCES + "${LIBVPX_PORTS_SRC_DIR}/arm_cpudetect.c" + "${LIBVPX_PORTS_SRC_DIR}/arm.h") +endif() + +if(VPX_ARCH_PPC) + list(APPEND LIBVPX_PORTS_SOURCES + "${LIBVPX_PORTS_SRC_DIR}/ppc_cpudetect.c" + "${LIBVPX_PORTS_SRC_DIR}/ppc.h") +endif() + +if(VPX_ARCH_MIPS) + list(APPEND LIBVPX_PORTS_SOURCES + "${LIBVPX_PORTS_SRC_DIR}/mips_cpudetect.c" + "${LIBVPX_PORTS_SRC_DIR}/mips.h") +endif() + +if(VPX_ARCH_MIPS) + list(APPEND LIBVPX_PORTS_SOURCES + "${LIBVPX_PORTS_SRC_DIR}/asmdefs_mmi.h") +endif() + +# vpx_dsp + +set(LIBVPX_DSP_SRC_DIR "${LIBVPX_SRC_DIR}/vpx_dsp") + +set(LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/vpx_dsp_common.h" + "${LIBVPX_DSP_SRC_DIR}/prob.h" + "${LIBVPX_DSP_SRC_DIR}/prob.c" + "${LIBVPX_DSP_SRC_DIR}/intrapred.c" + "${LIBVPX_DSP_SRC_DIR}/vpx_filter.h" + "${LIBVPX_DSP_SRC_DIR}/vpx_dsp_rtcd.c" + "${LIBVPX_BIN_DIR}/vpx_dsp_rtcd.h") + +if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/macros_msa.h") +endif() + +if(HAVE_AVX2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/bitdepth_conversion_avx2.h") +endif() + +if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/bitdepth_conversion_sse2.h") +endif() + +if(CONFIG_ENCODERS) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/bitwriter.h" + "${LIBVPX_DSP_SRC_DIR}/bitwriter.c" + "${LIBVPX_DSP_SRC_DIR}/bitwriter_buffer.h" + "${LIBVPX_DSP_SRC_DIR}/bitwriter_buffer.c" + "${LIBVPX_DSP_SRC_DIR}/psnr.c" + "${LIBVPX_DSP_SRC_DIR}/psnr.h") + + if(CONFIG_INTERNAL_STATS) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/ssim.c" + "${LIBVPX_DSP_SRC_DIR}/ssim.h" + "${LIBVPX_DSP_SRC_DIR}/psnrhvs.c" + "${LIBVPX_DSP_SRC_DIR}/fastssim.c") + endif() +endif() + +if(CONFIG_DECODERS) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/bitreader.h" + "${LIBVPX_DSP_SRC_DIR}/bitreader.c" + "${LIBVPX_DSP_SRC_DIR}/bitreader_buffer.c" + "${LIBVPX_DSP_SRC_DIR}/bitreader_buffer.h") +endif() + +if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/intrapred_sse2.asm") +endif() + +if(HAVE_SSE3) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/intrapred_ssse3.asm") +endif() + +if(HAVE_VSX) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/ppc/intrapred_vsx.c") +endif() + +if(CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_intrapred_sse2.asm" + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_intrapred_intrin_sse2.c") + endif() + if(HAVE_SSE3) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_intrapred_intrin_ssse3.c") + endif() + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_intrapred_neon.c") + endif() +endif() + +if(CONFIG_POSTPROC) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/add_noise.c" + "${LIBVPX_DSP_SRC_DIR}/deblock.c" + "${LIBVPX_DSP_SRC_DIR}/postproc.h") + if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/add_noise_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/deblock_msa.c") + endif() + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/deblock_neon.c") + endif() + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/add_noise_sse2.asm" + "${LIBVPX_DSP_SRC_DIR}/x86/deblock_sse2.asm" + "${LIBVPX_DSP_SRC_DIR}/x86/post_proc_sse2.c") + endif() + if(HAVE_VSX) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/ppc/deblock_vsx.c") + endif() +endif() + +if(HAVE_NEON_ASM) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/intrapred_neon_asm${ASM_EXT}") +endif() + +if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/intrapred_neon.c") +endif() + +if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/intrapred_msa.c") +endif() + +if(HAVE_DSPR2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/intrapred4_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/intrapred8_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/intrapred16_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/common_dspr2.h" + "${LIBVPX_DSP_SRC_DIR}/mips/common_dspr2.c") +endif() + +if(CONFIG_VP9) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/vpx_convolve.c" + "${LIBVPX_DSP_SRC_DIR}/vpx_convolve.h") + + if(VPX_ARCH_X86 OR VPX_ARCH_X86_64) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/convolve.h") + endif() + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/convolve_sse2.h") + endif() + if(HAVE_SSE3) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/convolve_ssse3.h") + endif() + if(HAVE_AVX2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/convolve_avx2.h") + endif() + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/vpx_subpixel_8t_sse2.asm" + "${LIBVPX_DSP_SRC_DIR}/x86/vpx_subpixel_4t_intrin_sse2.c" + "${LIBVPX_DSP_SRC_DIR}/x86/vpx_subpixel_bilinear_sse2.asm") + endif() + if(HAVE_SSE3) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/vpx_subpixel_8t_ssse3.asm" + "${LIBVPX_DSP_SRC_DIR}/x86/vpx_subpixel_bilinear_ssse3.asm" + "${LIBVPX_DSP_SRC_DIR}/x86/vpx_subpixel_8t_intrin_ssse3.c") + endif() + if(HAVE_AVX2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/vpx_subpixel_8t_intrin_avx2.c") + endif() + if(CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/vpx_high_subpixel_8t_sse2.asm" + "${LIBVPX_DSP_SRC_DIR}/x86/vpx_high_subpixel_bilinear_sse2.asm") + endif() + if(HAVE_AVX2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_convolve_avx2.c") + endif() + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_vpx_convolve_copy_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_vpx_convolve_avg_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_vpx_convolve8_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_vpx_convolve_neon.c") + endif() + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/vpx_convolve_copy_sse2.asm") + endif() + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_scaled_convolve8_neon.c") + endif() + if(HAVE_NEON_ASM) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve_copy_neon_asm${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve8_horiz_filter_type2_neon${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve8_vert_filter_type2_neon${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve8_horiz_filter_type1_neon${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve8_vert_filter_type1_neon${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve8_avg_horiz_filter_type2_neon${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve8_avg_vert_filter_type2_neon${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve8_avg_horiz_filter_type1_neon${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve8_avg_vert_filter_type1_neon${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve_avg_neon_asm${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve8_neon_asm.c" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve8_neon_asm.h" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve_neon.c") + elseif(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve_copy_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve8_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve_avg_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve_neon.c") + endif() + if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/vpx_convolve8_avg_horiz_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/vpx_convolve8_avg_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/vpx_convolve8_avg_vert_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/vpx_convolve8_horiz_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/vpx_convolve8_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/vpx_convolve8_vert_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/vpx_convolve_avg_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/vpx_convolve_copy_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/vpx_convolve_msa.h") + endif() + if(HAVE_MMI) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/vpx_convolve8_mmi.c") + endif() + if(HAVE_DSPR2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/convolve_common_dspr2.h" + "${LIBVPX_DSP_SRC_DIR}/mips/convolve2_avg_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/convolve2_avg_horiz_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/convolve2_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/convolve2_horiz_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/convolve2_vert_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/convolve8_avg_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/convolve8_avg_horiz_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/convolve8_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/convolve8_horiz_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/convolve8_vert_dspr2.c") + endif() + if(HAVE_VSX) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/ppc/vpx_convolve_vsx.c") + endif() + + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/loopfilter.c") + + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/loopfilter_sse2.c") + endif() + if(HAVE_AVX2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/loopfilter_avx2.c") + endif() + if(HAVE_NEON_ASM) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/loopfilter_16_neon${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/loopfilter_8_neon${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/loopfilter_4_neon${ASM_EXT}") + elseif(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/loopfilter_neon.c") + endif() + if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/loopfilter_msa.h" + "${LIBVPX_DSP_SRC_DIR}/mips/loopfilter_16_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/loopfilter_8_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/loopfilter_4_msa.c") + endif() + if(HAVE_DSPR2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/loopfilter_filters_dspr2.h" + "${LIBVPX_DSP_SRC_DIR}/mips/loopfilter_filters_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/loopfilter_macros_dspr2.h" + "${LIBVPX_DSP_SRC_DIR}/mips/loopfilter_masks_dspr2.h" + "${LIBVPX_DSP_SRC_DIR}/mips/loopfilter_mb_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/loopfilter_mb_horiz_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/loopfilter_mb_vert_dspr2.c") + endif() + if(CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_loopfilter_neon.c") + endif() + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_loopfilter_sse2.c") + endif() + endif() + endif() +endif() + +list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/txfm_common.h") + +if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/txfm_common_sse2.h") +endif() +if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/txfm_macros_msa.h") +endif() + +if(CONFIG_VP9_ENCODER) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/fwd_txfm.c" + "${LIBVPX_DSP_SRC_DIR}/fwd_txfm.h") + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/fwd_txfm_sse2.h" + "${LIBVPX_DSP_SRC_DIR}/x86/fwd_txfm_sse2.c" + "${LIBVPX_DSP_SRC_DIR}/x86/fwd_txfm_impl_sse2.h" + "${LIBVPX_DSP_SRC_DIR}/x86/fwd_dct32x32_impl_sse2.h") + endif() + if(VPX_ARCH_X86_64 AND HAVE_SSE3) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/fwd_txfm_ssse3_x86_64.asm") + endif() + if(HAVE_AVX2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/fwd_txfm_avx2.c" + "${LIBVPX_DSP_SRC_DIR}/x86/fwd_dct32x32_impl_avx2.h") + endif() + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/fdct_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/fdct16x16_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/fdct32x32_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/fdct_partial_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/fwd_txfm_neon.c") + endif() + if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/fwd_txfm_msa.h" + "${LIBVPX_DSP_SRC_DIR}/mips/fwd_txfm_msa.c") + endif() + if(NOT CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/fwd_dct32x32_msa.c") + endif() + endif() + if(HAVE_VSX) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/ppc/fdct32x32_vsx.c") + endif() + + if(CONFIG_VP9) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/inv_txfm.h" + "${LIBVPX_DSP_SRC_DIR}/inv_txfm.c") + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/inv_txfm_sse2.h" + "${LIBVPX_DSP_SRC_DIR}/x86/inv_txfm_sse2.c" + "${LIBVPX_DSP_SRC_DIR}/x86/inv_wht_sse2.asm") + endif() + if(HAVE_SSE3) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/inv_txfm_ssse3.h" + "${LIBVPX_DSP_SRC_DIR}/x86/inv_txfm_ssse3.c") + endif() + if(HAVE_NEON_ASM) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/save_reg_neon${ASM_EXT}") + endif() + if(HAVE_VSX) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/ppc/inv_txfm_vsx.c") + endif() + + if(CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_idct4x4_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_idct8x8_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_idct16x16_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_idct32x32_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_idct32x32_34_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_idct32x32_135_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_idct32x32_1024_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/highbd_idct_neon.h") + endif() + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_inv_txfm_sse2.h" + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_idct4x4_add_sse2.c" + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_idct8x8_add_sse2.c" + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_idct16x16_add_sse2.c" + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_idct32x32_add_sse2.c") + endif() + if(HAVE_SSE4_1) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_inv_txfm_sse4.h" + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_idct4x4_add_sse4.c" + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_idct8x8_add_sse4.c" + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_idct16x16_add_sse4.c" + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_idct32x32_add_sse4.c") + endif() + else() + if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/inv_txfm_msa.h" + "${LIBVPX_DSP_SRC_DIR}/mips/idct4x4_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/idct8x8_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/idct16x16_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/idct32x32_msa.c") + endif() + if(HAVE_DSPR2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/inv_txfm_dspr2.h" + "${LIBVPX_DSP_SRC_DIR}/mips/itrans4_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/itrans8_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/itrans16_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/itrans32_dspr2.c" + "${LIBVPX_DSP_SRC_DIR}/mips/itrans32_cols_dspr2.c") + endif() + endif() + + if(HAVE_NEON_ASM) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/idct_neon${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/idct4x4_1_add_neon${ASM_EXT}" + "${LIBVPX_DSP_SRC_DIR}/arm/idct4x4_add_neon${ASM_EXT}") + elseif(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/idct4x4_1_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/idct4x4_add_neon.c") + endif() + + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/idct_neon.h" + "${LIBVPX_DSP_SRC_DIR}/arm/idct8x8_1_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/idct8x8_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/idct16x16_1_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/idct16x16_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/idct32x32_1_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/idct32x32_34_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/idct32x32_135_add_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/idct32x32_add_neon.c") + endif() + endif() + + if(CONFIG_VP9_ENCODER) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/quantize.c" + "${LIBVPX_DSP_SRC_DIR}/quantize.h") + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/quantize_sse2.c" + "${LIBVPX_DSP_SRC_DIR}/x86/quantize_sse2.h") + endif() + if(HAVE_SSSE3) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/quantize_ssse3.c" + "${LIBVPX_DSP_SRC_DIR}/x86/quantize_ssse3.h") + endif() + if(HAVE_AVX) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/quantize_avx.c") + endif() + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/quantize_neon.c") + endif() + if(HAVE_VSX) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/ppc/quantize_vsx.c") + endif() + if(CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_quantize_intrin_sse2.c") + endif() + endif() + + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/avg.c") + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/avg_intrin_sse2.c") + endif() + if(HAVE_AVX2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/avg_intrin_avx2.c") + endif() + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/avg_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/hadamard_neon.c") + endif() + if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/avg_msa.c") + endif() + if(VPX_ARCH_X86_64) + if(HAVE_SSSE3) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/avg_ssse3_x86_64.asm") + endif() + endif() + if(HAVE_VSX) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/ppc/hadamard_vsx.c") + endif() + endif() +endif() + +list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/skin_detection.h" + "${LIBVPX_DSP_SRC_DIR}/skin_detection.c") + +if(CONFIG_ENCODERS) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/sad.c" + "${LIBVPX_DSP_SRC_DIR}/subtract.c" + "${LIBVPX_DSP_SRC_DIR}/sum_squares.c") + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/sum_squares_neon.c") + endif() + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/sum_squares_sse2.c") + endif() + if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/sum_squares_msa.c") + endif() + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/sad4d_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/sad_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/subtract_neon.c") + endif() + if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/sad_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/subtract_msa.c") + endif() + if(HAVE_MMI) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/sad_mmi.c" + "${LIBVPX_DSP_SRC_DIR}/mips/subtract_mmi.c") + endif() + if(HAVE_SSE3) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/sad_sse3.asm") + endif() + if(HAVE_SSSE3) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/sad_ssse3.asm") + endif() + if(HAVE_SSE4_1) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/sad_sse4.asm") + endif() + if(HAVE_AVX2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/sad4d_avx2.c" + "${LIBVPX_DSP_SRC_DIR}/x86/sad_avx2.c") + endif() + if(HAVE_AVX512) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/sad4d_avx512.c") + endif() + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/sad4d_sse2.asm" + "${LIBVPX_DSP_SRC_DIR}/x86/sad_sse2.asm" + "${LIBVPX_DSP_SRC_DIR}/x86/subtract_sse2.asm") + endif() + if(HAVE_VSX) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/ppc/sad_vsx.c" + "${LIBVPX_DSP_SRC_DIR}/ppc/subtract_vsx.c") + endif() + if(CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_sad4d_sse2.asm" + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_sad_sse2.asm") + endif() + endif() +endif() + +if(CONFIG_ENCODERS OR CONFIG_POSTPROC OR CONFIG_VP9_POSTPROC) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/variance.c" + "${LIBVPX_DSP_SRC_DIR}/variance.h") + if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/avg_pred_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/subpel_variance_neon.c" + "${LIBVPX_DSP_SRC_DIR}/arm/variance_neon.c") + endif() + if(HAVE_MSA) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/variance_msa.c" + "${LIBVPX_DSP_SRC_DIR}/mips/sub_pixel_variance_msa.c") + endif() + if(HAVE_MMI) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/mips/variance_mmi.c") + endif() + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/avg_pred_sse2.c" + "${LIBVPX_DSP_SRC_DIR}/x86/variance_sse2.c") + endif() + if(HAVE_AVX2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/variance_avx2.c") + endif() + if(HAVE_VSX) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/ppc/variance_vsx.c") + endif() + if(VPX_ARCH_X86_64) + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/ssim_opt_x86_64.asm") + endif() + endif() + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/subpel_variance_sse2.asm") + endif() + if(CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_variance_sse2.c" + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_variance_impl_sse2.asm" + "${LIBVPX_DSP_SRC_DIR}/x86/highbd_subpel_variance_impl_sse2.asm") + endif() + endif() +endif() + +if(HAVE_NEON) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/arm/mem_neon.h" + "${LIBVPX_DSP_SRC_DIR}/arm/sum_neon.h" + "${LIBVPX_DSP_SRC_DIR}/arm/transpose_neon.h" + "${LIBVPX_DSP_SRC_DIR}/arm/vpx_convolve8_neon.h") +endif() + +if(HAVE_VSX) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/ppc/types_vsx.h" + "${LIBVPX_DSP_SRC_DIR}/ppc/txfm_common_vsx.h" + "${LIBVPX_DSP_SRC_DIR}/ppc/transpose_vsx.h" + "${LIBVPX_DSP_SRC_DIR}/ppc/bitdepth_conversion_vsx.h") +endif() + +if(HAVE_SSE2) + list(APPEND LIBVPX_DSP_SOURCES + "${LIBVPX_DSP_SRC_DIR}/x86/mem_sse2.h" + "${LIBVPX_DSP_SRC_DIR}/x86/transpose_sse2.h") +endif() + +rtcd_generate(SYMBOL "vpx_dsp_rtcd" + SCRIPT "${LIBVPX_SRC_DIR}/vpx_dsp/vpx_dsp_rtcd_defs.pl" + OUTPUT "${LIBVPX_BIN_DIR}/vpx_dsp_rtcd.h") + +# vpx_util + +set(LIBVPX_UTIL_SRC_DIR "${LIBVPX_SRC_DIR}/vpx_util") + +set(LIBVPX_UTIL_SOURCES + "${LIBVPX_UTIL_SRC_DIR}/vpx_atomics.h" + "${LIBVPX_UTIL_SRC_DIR}/vpx_thread.c" + "${LIBVPX_UTIL_SRC_DIR}/vpx_thread.h" + "${LIBVPX_UTIL_SRC_DIR}/endian_inl.h" + "${LIBVPX_UTIL_SRC_DIR}/vpx_write_yuv_frame.h" + "${LIBVPX_UTIL_SRC_DIR}/vpx_write_yuv_frame.c" + "${LIBVPX_UTIL_SRC_DIR}/vpx_timestamp.h") + +if(CONFIG_BITSTREAM_DEBUG OR CONFIG_MISMATCH_DEBUG) + list(APPEND LIBVPX_UTIL_SOURCES + "${LIBVPX_UTIL_SRC_DIR}/vpx_debug_util.h" + "${LIBVPX_UTIL_SRC_DIR}/vpx_debug_util.c") +endif() + +# vp8 + +set(LIBVPX_VP8_SRC_DIR "${LIBVPX_SRC_DIR}/vp8") + +# vp8_common + +set(LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/ppflags.h" + "${LIBVPX_VP8_SRC_DIR}/common/onyx.h" + "${LIBVPX_VP8_SRC_DIR}/common/onyxd.h" + "${LIBVPX_VP8_SRC_DIR}/common/alloccommon.c" + "${LIBVPX_VP8_SRC_DIR}/common/blockd.c" + "${LIBVPX_VP8_SRC_DIR}/common/coefupdateprobs.h" + "${LIBVPX_VP8_SRC_DIR}/common/default_coef_probs.h" + "${LIBVPX_VP8_SRC_DIR}/common/dequantize.c" + "${LIBVPX_VP8_SRC_DIR}/common/entropy.c" + "${LIBVPX_VP8_SRC_DIR}/common/entropymode.c" + "${LIBVPX_VP8_SRC_DIR}/common/entropymv.c" + "${LIBVPX_VP8_SRC_DIR}/common/extend.c" + "${LIBVPX_VP8_SRC_DIR}/common/filter.c" + "${LIBVPX_VP8_SRC_DIR}/common/filter.h" + "${LIBVPX_VP8_SRC_DIR}/common/findnearmv.c" + "${LIBVPX_VP8_SRC_DIR}/common/generic/systemdependent.c" + "${LIBVPX_VP8_SRC_DIR}/common/idct_blk.c" + "${LIBVPX_VP8_SRC_DIR}/common/idctllm.c" + "${LIBVPX_VP8_SRC_DIR}/common/alloccommon.h" + "${LIBVPX_VP8_SRC_DIR}/common/blockd.h" + "${LIBVPX_VP8_SRC_DIR}/common/common.h" + "${LIBVPX_VP8_SRC_DIR}/common/entropy.h" + "${LIBVPX_VP8_SRC_DIR}/common/entropymode.h" + "${LIBVPX_VP8_SRC_DIR}/common/entropymv.h" + "${LIBVPX_VP8_SRC_DIR}/common/extend.h" + "${LIBVPX_VP8_SRC_DIR}/common/findnearmv.h" + "${LIBVPX_VP8_SRC_DIR}/common/header.h" + "${LIBVPX_VP8_SRC_DIR}/common/invtrans.h" + "${LIBVPX_VP8_SRC_DIR}/common/loopfilter.h" + "${LIBVPX_VP8_SRC_DIR}/common/modecont.h" + "${LIBVPX_VP8_SRC_DIR}/common/mv.h" + "${LIBVPX_VP8_SRC_DIR}/common/onyxc_int.h" + "${LIBVPX_VP8_SRC_DIR}/common/quant_common.h" + "${LIBVPX_VP8_SRC_DIR}/common/reconinter.h" + "${LIBVPX_VP8_SRC_DIR}/common/reconintra.h" + "${LIBVPX_VP8_SRC_DIR}/common/reconintra4x4.h" + "${LIBVPX_VP8_SRC_DIR}/common/rtcd.c" + "${LIBVPX_VP8_SRC_DIR}/common/setupintrarecon.h" + "${LIBVPX_VP8_SRC_DIR}/common/swapyv12buffer.h" + "${LIBVPX_VP8_SRC_DIR}/common/systemdependent.h" + "${LIBVPX_VP8_SRC_DIR}/common/threading.h" + "${LIBVPX_VP8_SRC_DIR}/common/treecoder.h" + "${LIBVPX_VP8_SRC_DIR}/common/vp8_loopfilter.c" + "${LIBVPX_VP8_SRC_DIR}/common/loopfilter_filters.c" + "${LIBVPX_VP8_SRC_DIR}/common/mbpitch.c" + "${LIBVPX_VP8_SRC_DIR}/common/modecont.c" + "${LIBVPX_VP8_SRC_DIR}/common/quant_common.c" + "${LIBVPX_VP8_SRC_DIR}/common/reconinter.c" + "${LIBVPX_VP8_SRC_DIR}/common/reconintra.c" + "${LIBVPX_VP8_SRC_DIR}/common/reconintra4x4.c" + "${LIBVPX_VP8_SRC_DIR}/common/setupintrarecon.c" + "${LIBVPX_VP8_SRC_DIR}/common/swapyv12buffer.c" + "${LIBVPX_VP8_SRC_DIR}/common/vp8_entropymodedata.h" + "${LIBVPX_BIN_DIR}/vp8_rtcd.h") + +list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/treecoder.c") + +if(VPX_ARCH_X86 OR VPX_ARCH_X86_64) + list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/x86/vp8_asm_stubs.c" + "${LIBVPX_VP8_SRC_DIR}/common/x86/loopfilter_x86.c") +endif() + +if(CONFIG_POSTPROC) + list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/mfqe.c" + "${LIBVPX_VP8_SRC_DIR}/common/postproc.h" + "${LIBVPX_VP8_SRC_DIR}/common/postproc.c") +endif() + +if(HAVE_MMX) + list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/x86/dequantize_mmx.asm" + "${LIBVPX_VP8_SRC_DIR}/common/x86/idct_blk_mmx.c" + "${LIBVPX_VP8_SRC_DIR}/common/x86/idctllm_mmx.asm" + "${LIBVPX_VP8_SRC_DIR}/common/x86/recon_mmx.asm" + "${LIBVPX_VP8_SRC_DIR}/common/x86/subpixel_mmx.asm") +endif() + +if(HAVE_SSE2) + list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/x86/idct_blk_sse2.c" + "${LIBVPX_VP8_SRC_DIR}/common/x86/idctllm_sse2.asm" + "${LIBVPX_VP8_SRC_DIR}/common/x86/recon_sse2.asm" + "${LIBVPX_VP8_SRC_DIR}/common/x86/bilinear_filter_sse2.c" + "${LIBVPX_VP8_SRC_DIR}/common/x86/subpixel_sse2.asm" + "${LIBVPX_VP8_SRC_DIR}/common/x86/loopfilter_sse2.asm" + "${LIBVPX_VP8_SRC_DIR}/common/x86/iwalsh_sse2.asm") +endif() + +if(HAVE_SSE3) + list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/x86/subpixel_ssse3.asm") +endif() + +if(CONFIG_POSTPROC) + if(HAVE_SSE2) + list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/x86/mfqe_sse2.asm") + endif() +endif() + +if(VPX_ARCH_X86_64) + if(HAVE_SSE2) + list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/x86/loopfilter_block_sse2_x86_64.asm") + endif() +endif() + +if(HAVE_DSPR2) + list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/mips/dspr2/idctllm_dspr2.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/dspr2/filter_dspr2.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/dspr2/vp8_loopfilter_filters_dspr2.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/dspr2/reconinter_dspr2.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/dspr2/idct_blk_dspr2.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/dspr2/dequantize_dspr2.c") +endif() + +if(HAVE_MSA) + list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/mips/msa/bilinear_filter_msa.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/msa/copymem_msa.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/msa/idct_msa.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/msa/loopfilter_filters_msa.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/msa/sixtap_filter_msa.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/msa/vp8_macros_msa.h") +endif() + +if(HAVE_MMI) + list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/mips/mmi/sixtap_filter_mmi.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/mmi/loopfilter_filters_mmi.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/mmi/idctllm_mmi.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/mmi/dequantize_mmi.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/mmi/copymem_mmi.c" + "${LIBVPX_VP8_SRC_DIR}/common/mips/mmi/idct_blk_mmi.c") +endif() + +if(CONFIG_POSTPROC) + if(HAVE_MSA) + list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/mips/msa/mfqe_msa.c") + endif() +endif() + +if(HAVE_NEON) + list(APPEND LIBVPX_VP8_COMMON_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/arm/loopfilter_arm.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/loopfilter_arm.h" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/bilinearpredict_neon.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/copymem_neon.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/dc_only_idct_add_neon.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/dequant_idct_neon.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/dequantizeb_neon.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/idct_blk_neon.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/iwalsh_neon.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/vp8_loopfilter_neon.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/loopfiltersimplehorizontaledge_neon.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/loopfiltersimpleverticaledge_neon.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/mbloopfilter_neon.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/shortidct4x4llm_neon.c" + "${LIBVPX_VP8_SRC_DIR}/common/arm/neon/sixtappredict_neon.c") +endif() + +rtcd_generate(SYMBOL "vp8_rtcd" + SCRIPT "${LIBVPX_SRC_DIR}/vp8/common/rtcd_defs.pl" + OUTPUT "${LIBVPX_BIN_DIR}/vp8_rtcd.h") + +# vp8_encoder + +set(LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/vp8_cx_iface.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/defaultcoefcounts.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/bitstream.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/boolhuff.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/copy_c.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/dct.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/encodeframe.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/encodeframe.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/encodeintra.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/encodemb.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/encodemv.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/block.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/boolhuff.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/bitstream.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/encodeintra.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/encodemb.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/encodemv.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/firstpass.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/lookahead.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/lookahead.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/mcomp.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/modecosts.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/onyx_int.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/pickinter.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/quantize.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/ratectrl.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/rdopt.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/tokenize.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/treewriter.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/mcomp.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/modecosts.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/onyx_if.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/pickinter.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/picklpf.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/picklpf.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/vp8_quantize.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/ratectrl.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/rdopt.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/segmentation.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/segmentation.h" + "${LIBVPX_VP8_SRC_DIR}/common/vp8_skin_detection.c" + "${LIBVPX_VP8_SRC_DIR}/common/vp8_skin_detection.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/tokenize.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/dct_value_cost.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/dct_value_tokens.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/treewriter.c") + +if(CONFIG_MULTITHREAD) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/ethreading.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/ethreading.h") +endif() + +if(CONFIG_TEMPORAL_DENOISING) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/denoising.h" + "${LIBVPX_VP8_SRC_DIR}/encoder/denoising.c") +endif() + +if(CONFIG_INTERNAL_STATS) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/common/postproc.h" + "${LIBVPX_VP8_SRC_DIR}/common/postproc.c") +endif() + +if(CONFIG_MULTI_RES_ENCODING) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/mr_dissim.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/mr_dissim.h") +endif() + +if(NOT CONFIG_REALTIME_ONLY) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/firstpass.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/temporal_filter.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/temporal_filter.h") +endif() + +if(HAVE_SSE2) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/x86/copy_sse2.asm" + "${LIBVPX_VP8_SRC_DIR}/encoder/x86/copy_sse3.asm" + "${LIBVPX_VP8_SRC_DIR}/encoder/x86/dct_sse2.asm" + "${LIBVPX_VP8_SRC_DIR}/encoder/x86/fwalsh_sse2.asm" + "${LIBVPX_VP8_SRC_DIR}/encoder/x86/vp8_quantize_sse2.c") +endif() + +if(HAVE_SSSE3) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/x86/vp8_quantize_ssse3.c") +endif() + +if(HAVE_SSE4_1) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/x86/quantize_sse4.c") +endif() + +if(CONFIG_TEMPORAL_DENOISING) + if(HAVE_SSE2) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/x86/denoising_sse2.c") + endif() +endif() + +if(HAVE_SSE2) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/x86/block_error_sse2.asm" + "${LIBVPX_VP8_SRC_DIR}/encoder/x86/vp8_enc_stubs_sse2.c") + + if(NOT CONFIG_REALTIME_ONLY) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/x86/temporal_filter_apply_sse2.asm") + endif() +endif() + +if(HAVE_NEON) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/arm/neon/denoising_neon.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/arm/neon/fastquantizeb_neon.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/arm/neon/shortfdct_neon.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/arm/neon/vp8_shortwalsh4x4_neon.c") +endif() + +if(HAVE_MSA) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/mips/msa/dct_msa.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/mips/msa/encodeopt_msa.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/mips/msa/quantize_msa.c") + + if(NOT CONFIG_REALTIME_ONLY) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/mips/msa/temporal_filter_msa.c") + endif() +endif() + +if(HAVE_MMI) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/mips/mmi/vp8_quantize_mmi.c" + "${LIBVPX_VP8_SRC_DIR}/encoder/mips/mmi/dct_mmi.c") +endif() + +if(CONFIG_TEMPORAL_DENOISING) + if(HAVE_MSA) + list(APPEND LIBVPX_VP8_ENCODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/encoder/mips/msa/denoising_msa.c") + endif() +endif() + +# vp8_decoder + +set(LIBVPX_VP8_DECODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/vp8_dx_iface.c" + "${LIBVPX_VP8_SRC_DIR}/decoder/dboolhuff.c" + "${LIBVPX_VP8_SRC_DIR}/decoder/decodemv.c" + "${LIBVPX_VP8_SRC_DIR}/decoder/decodeframe.c" + "${LIBVPX_VP8_SRC_DIR}/decoder/detokenize.c" + "${LIBVPX_VP8_SRC_DIR}/decoder/dboolhuff.h" + "${LIBVPX_VP8_SRC_DIR}/decoder/decodemv.h" + "${LIBVPX_VP8_SRC_DIR}/decoder/decoderthreading.h" + "${LIBVPX_VP8_SRC_DIR}/decoder/detokenize.h" + "${LIBVPX_VP8_SRC_DIR}/decoder/onyxd_int.h" + "${LIBVPX_VP8_SRC_DIR}/decoder/treereader.h" + "${LIBVPX_VP8_SRC_DIR}/decoder/onyxd_if.c") + +if(CONFIG_ERROR_CONCEALMENT) + list(APPEND LIBVPX_VP8_DECODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/decoder/ec_types.h" + "${LIBVPX_VP8_SRC_DIR}/decoder/error_concealment.h" + "${LIBVPX_VP8_SRC_DIR}/decoder/error_concealment.c") +endif() + +if(CONFIG_MULTITHREAD) + list(APPEND LIBVPX_VP8_DECODER_SOURCES + "${LIBVPX_VP8_SRC_DIR}/decoder/threading.c") +endif() + +# vp8 + +if(CONFIG_VP8) + list(APPEND LIBVPX_VP8_SOURCES ${LIBVPX_VP8_COMMON_SOURCES}) + + if(CONFIG_VP8_ENCODER) + list(APPEND LIBVPX_VP8_SOURCES ${LIBVPX_VP8_ENCODER_SOURCES}) + endif() + + if(CONFIG_VP8_DECODER) + list(APPEND LIBVPX_VP8_SOURCES ${LIBVPX_VP8_DECODER_SOURCES}) + endif() +endif() + +# vp9 + +set(LIBVPX_VP9_SRC_DIR "${LIBVPX_SRC_DIR}/vp9") + +# vp9_common + +set(LIBVPX_VP9_COMMON_SOURCES + "${LIBVPX_VP9_SRC_DIR}/vp9_iface_common.h" + "${LIBVPX_VP9_SRC_DIR}/vp9_iface_common.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_ppflags.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_alloccommon.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_blockd.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_entropy.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_entropymode.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_entropymv.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_frame_buffers.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_frame_buffers.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_idct.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_alloccommon.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_blockd.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_common.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_entropy.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_entropymode.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_entropymv.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_enums.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_filter.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_filter.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_idct.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_loopfilter.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_thread_common.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_mv.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_onyxc_int.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_pred_common.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_pred_common.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_quant_common.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_reconinter.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_reconintra.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_rtcd.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_scale.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_scale.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_seg_common.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_seg_common.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_tile_common.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_tile_common.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_loopfilter.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_thread_common.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_mvref_common.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_mvref_common.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_quant_common.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_reconinter.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_reconintra.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_common_data.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_common_data.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_scan.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_scan.h" + "${LIBVPX_BIN_DIR}/vp9_rtcd.h") + +if(CONFIG_VP9_POSTPROC) + list(APPEND LIBVPX_VP9_COMMON_SOURCES + "${LIBVPX_VP9_SRC_DIR}/common/vp9_postproc.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_postproc.c" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_mfqe.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_mfqe.c") +endif() + +if(NOT CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_MSA) + list(APPEND LIBVPX_VP9_COMMON_SOURCES + "${LIBVPX_VP9_SRC_DIR}/common/mips/msa/vp9_idct4x4_msa.c" + "${LIBVPX_VP9_SRC_DIR}/common/mips/msa/vp9_idct8x8_msa.c" + "${LIBVPX_VP9_SRC_DIR}/common/mips/msa/vp9_idct16x16_msa.c") + endif() +endif() + +if(HAVE_SSE2) + list(APPEND LIBVPX_VP9_COMMON_SOURCES + "${LIBVPX_VP9_SRC_DIR}/common/x86/vp9_idct_intrin_sse2.c") +endif() + +if(HAVE_VSX) + list(APPEND LIBVPX_VP9_COMMON_SOURCES + "${LIBVPX_VP9_SRC_DIR}/common/ppc/vp9_idct_vsx.c") +endif() + +if(HAVE_NEON) + list(APPEND LIBVPX_VP9_COMMON_SOURCES + "${LIBVPX_VP9_SRC_DIR}/common/arm/neon/vp9_iht4x4_add_neon.c" + "${LIBVPX_VP9_SRC_DIR}/common/arm/neon/vp9_iht8x8_add_neon.c" + "${LIBVPX_VP9_SRC_DIR}/common/arm/neon/vp9_iht16x16_add_neon.c" + "${LIBVPX_VP9_SRC_DIR}/common/arm/neon/vp9_iht_neon.h") +endif() + +if(CONFIG_VP9_POSTPROC) + if(HAVE_MSA) + list(APPEND LIBVPX_VP9_COMMON_SOURCES + "${LIBVPX_VP9_SRC_DIR}/common/mips/msa/vp9_mfqe_msa.c") + endif() + if(HAVE_SSE2) + list(APPEND LIBVPX_VP9_COMMON_SOURCES + "${LIBVPX_VP9_SRC_DIR}/common/x86/vp9_mfqe_sse2.asm") + endif() +endif() + +if(NOT CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_DSPR2) + list(APPEND LIBVPX_VP9_COMMON_SOURCES + "${LIBVPX_VP9_SRC_DIR}/common/mips/dspr2/vp9_itrans4_dspr2.c" + "${LIBVPX_VP9_SRC_DIR}/common/mips/dspr2/vp9_itrans8_dspr2.c" + "${LIBVPX_VP9_SRC_DIR}/common/mips/dspr2/vp9_itrans16_dspr2.c") + endif() +else() + if(HAVE_NEON) + list(APPEND LIBVPX_VP9_COMMON_SOURCES + "${LIBVPX_VP9_SRC_DIR}/common/arm/neon/vp9_highbd_iht4x4_add_neon.c" + "${LIBVPX_VP9_SRC_DIR}/common/arm/neon/vp9_highbd_iht8x8_add_neon.c" + "${LIBVPX_VP9_SRC_DIR}/common/arm/neon/vp9_highbd_iht16x16_add_neon.c") + endif() + if(HAVE_SSE4_1) + list(APPEND LIBVPX_VP9_COMMON_SOURCES + "${LIBVPX_VP9_SRC_DIR}/common/x86/vp9_highbd_iht4x4_add_sse4.c" + "${LIBVPX_VP9_SRC_DIR}/common/x86/vp9_highbd_iht8x8_add_sse4.c" + "${LIBVPX_VP9_SRC_DIR}/common/x86/vp9_highbd_iht16x16_add_sse4.c") + endif() +endif() + +rtcd_generate(SYMBOL "vp9_rtcd" + SCRIPT "${LIBVPX_SRC_DIR}/vp9/common/vp9_rtcd_defs.pl" + OUTPUT "${LIBVPX_BIN_DIR}/vp9_rtcd.h") + +# vp9_encoder + +set(LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/vp9_cx_iface.c" + "${LIBVPX_VP9_SRC_DIR}/vp9_cx_iface.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_bitstream.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_context_tree.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_context_tree.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_cost.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_cost.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_dct.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_encodeframe.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_encodeframe.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_encodemb.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_encodemv.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_ethread.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_ethread.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_extend.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_block.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_bitstream.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_encodemb.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_encodemv.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_extend.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_firstpass.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_frame_scale.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_job_queue.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_lookahead.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_lookahead.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_mcomp.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_multi_thread.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_multi_thread.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_encoder.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_quantize.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_ratectrl.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_rd.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_rdopt.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_pickmode.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_svc_layercontext.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_tokenize.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_treewriter.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_mcomp.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_encoder.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_picklpf.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_picklpf.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_quantize.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_ratectrl.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_rd.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_rdopt.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_pickmode.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_partition_models.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_segmentation.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_segmentation.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_speed_features.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_speed_features.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_subexp.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_subexp.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_svc_layercontext.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_resize.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_resize.h") + +if(CONFIG_VP9_TEMPORAL_DENOISING) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_denoiser.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_denoiser.h") +endif() + +if(CONFIG_INTERNAL_STATS) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_blockiness.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_blockiness.h") +endif() + +if(CONFIG_NON_GREEDY_MV) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_non_greedy_mv.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_non_greedy_mv.h") +endif() + +list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_tokenize.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_treewriter.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_aq_cyclicrefresh.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_aq_cyclicrefresh.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_skin_detection.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_skin_detection.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_noise_estimate.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_noise_estimate.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_ext_ratectrl.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_ext_ratectrl.h") + +if(CONFIG_VP9_POSTPROC) + if(CONFIG_INTERNAL_STATS) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/common/vp9_postproc.h" + "${LIBVPX_VP9_SRC_DIR}/common/vp9_postproc.c") + endif() +endif() + +if(NOT CONFIG_REALTIME_ONLY) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_firstpass.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_temporal_filter.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_temporal_filter.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_mbgraph.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_mbgraph.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_alt_ref_aq.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_alt_ref_aq.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_aq_variance.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_aq_variance.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_aq_360.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_aq_360.h" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_aq_complexity.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/vp9_aq_complexity.h") + + if(HAVE_SSE4_1) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/temporal_filter_sse4.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/temporal_filter_constants.h") + endif() +endif() + +if(HAVE_SSE2) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/vp9_quantize_sse2.c") +endif() + +if(HAVE_AVX2) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/vp9_quantize_avx2.c") +endif() + +if(HAVE_AVX) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/vp9_diamond_search_sad_avx.c") +endif() + +if(CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_SSE2) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/vp9_highbd_block_error_intrin_sse2.c") + endif() + if(NOT CONFIG_REALTIME_ONLY) + if(HAVE_SSE4_1) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/highbd_temporal_filter_sse4.c") + endif() + endif() +endif() + +if(HAVE_SSE2) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/vp9_dct_sse2.asm" + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/vp9_error_sse2.asm") +endif() + +if(VPX_ARCH_X86_64) + if(HAVE_SSSE3) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/vp9_quantize_ssse3_x86_64.asm") + endif() +endif() + +if(HAVE_SSE2) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/vp9_dct_intrin_sse2.c") +endif() + +if(HAVE_SSSE3) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/vp9_frame_scale_ssse3.c") +endif() + +if(CONFIG_VP9_TEMPORAL_DENOISING) + if(HAVE_SSE2) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/vp9_denoiser_sse2.c") + endif() + if(HAVE_NEON) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/arm/neon/vp9_denoiser_neon.c") + endif() +endif() + +if(HAVE_AVX2) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/x86/vp9_error_avx2.c") +endif() + +if(NOT CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_NEON) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/arm/neon/vp9_error_neon.c") + endif() +endif() + +if(HAVE_NEON) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/arm/neon/vp9_frame_scale_neon.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/arm/neon/vp9_quantize_neon.c") +endif() + +if(HAVE_MSA) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/mips/msa/vp9_error_msa.c") +endif() + +if(NOT CONFIG_VP9_HIGHBITDEPTH) + if(HAVE_MSA) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/mips/msa/vp9_fdct4x4_msa.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/mips/msa/vp9_fdct8x8_msa.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/mips/msa/vp9_fdct16x16_msa.c" + "${LIBVPX_VP9_SRC_DIR}/encoder/mips/msa/vp9_fdct_msa.h") + endif() +endif() + +if(HAVE_VSX) + list(APPEND LIBVPX_VP9_ENCODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/encoder/ppc/vp9_quantize_vsx.c") +endif() + +# v9_decoder + +set(LIBVPX_VP9_DECODER_SOURCES + "${LIBVPX_VP9_SRC_DIR}/vp9_dx_iface.c" + "${LIBVPX_VP9_SRC_DIR}/vp9_dx_iface.h" + "${LIBVPX_VP9_SRC_DIR}/decoder/vp9_decodemv.c" + "${LIBVPX_VP9_SRC_DIR}/decoder/vp9_decodeframe.c" + "${LIBVPX_VP9_SRC_DIR}/decoder/vp9_decodeframe.h" + "${LIBVPX_VP9_SRC_DIR}/decoder/vp9_detokenize.c" + "${LIBVPX_VP9_SRC_DIR}/decoder/vp9_decodemv.h" + "${LIBVPX_VP9_SRC_DIR}/decoder/vp9_detokenize.h" + "${LIBVPX_VP9_SRC_DIR}/decoder/vp9_decoder.c" + "${LIBVPX_VP9_SRC_DIR}/decoder/vp9_decoder.h" + "${LIBVPX_VP9_SRC_DIR}/decoder/vp9_dsubexp.c" + "${LIBVPX_VP9_SRC_DIR}/decoder/vp9_dsubexp.h" + "${LIBVPX_VP9_SRC_DIR}/decoder/vp9_job_queue.c" + "${LIBVPX_VP9_SRC_DIR}/decoder/vp9_job_queue.h") + +# vp9 + +if(CONFIG_VP9) + list(APPEND LIBVPX_VP9_SOURCES ${LIBVPX_VP9_COMMON_SOURCES}) + + if(CONFIG_VP9_ENCODER) + list(APPEND LIBVPX_VP9_SOURCES ${LIBVPX_VP9_ENCODER_SOURCES}) + endif() + + if(CONFIG_VP9_DECODER) + list(APPEND LIBVPX_VP9_SOURCES ${LIBVPX_VP9_DECODER_SOURCES}) + endif() +endif() + +# libvpx + +set(LIBVPX_HEADERS + "${LIBVPX_SRC_DIR}/vpx/vpx_codec.h" + "${LIBVPX_SRC_DIR}/vpx/vpx_frame_buffer.h" + "${LIBVPX_SRC_DIR}/vpx/vpx_image.h" + "${LIBVPX_SRC_DIR}/vpx/vpx_integer.h") + +if(CONFIG_ENCODERS OR CONFIG_DECODERS) + list(APPEND LIBVPX_HEADERS + "${LIBVPX_SRC_DIR}/vpx/vp8.h") +endif() + +if(CONFIG_ENCODERS) + list(APPEND LIBVPX_HEADERS + "${LIBVPX_SRC_DIR}/vpx/vp8cx.h" + "${LIBVPX_SRC_DIR}/vpx/vpx_encoder.h" + "${LIBVPX_SRC_DIR}/vpx/vpx_ext_ratectrl.h") +endif() + +if(CONFIG_DECODERS) + list(APPEND LIBVPX_HEADERS + "${LIBVPX_SRC_DIR}/vpx/vp8dx.h" + "${LIBVPX_SRC_DIR}/vpx/vpx_decoder.h") +endif() + +set(LIBVPX_SOURCES + ${LIBVPX_VPX_SOURCES} + ${LIBVPX_MEM_SOURCES} + ${LIBVPX_SCALE_SOURCES} + ${LIBVPX_PORTS_SOURCES} + ${LIBVPX_DSP_SOURCES} + ${LIBVPX_UTIL_SOURCES} + ${LIBVPX_VP8_SOURCES} + ${LIBVPX_VP9_SOURCES}) + +set(MMX_SRC_FLAGS "-mmmx") +set(SSE2_SRC_FLAGS "-msse2") +set(SSE3_SRC_FLAGS "-msse3") +set(SSSE3_SRC_FLAGS "-mssse3") +set(SSE4_SRC_FLAGS "-msse4.1") +set(AVX_SRC_FLAGS "-mavx") +set(AVX2_SRC_FLAGS "-mavx2") +set(AVX512_SRC_FLAGS "-mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl") +set(VSX_SRC_FLAGS "-maltivec -mvsx") +set(MSA_SRC_FLAGS "-mmsa") + +foreach(LIBVPX_SOURCE_FILE ${LIBVPX_SOURCES}) + get_filename_component(LIBVPX_SOURCE_NAME "${LIBVPX_SOURCE_FILE}" NAME_WE) + get_filename_component(LIBVPX_SOURCE_EXT "${LIBVPX_SOURCE_FILE}" EXT) + get_filename_component(LIBVPX_SOURCE_DIR "${LIBVPX_SOURCE_FILE}" DIRECTORY) + if(LIBVPX_SOURCE_EXT STREQUAL ".c") + if(LIBVPX_SOURCE_NAME MATCHES "_mmx$|_sse2$|_sse3$|_ssse3$|_sse4$|_avx$|_avx2$|_avx512$|_vsx$|_msa$") + string(REGEX REPLACE "^.*_(.*)$" "\\1" VPX_SRC_SUFFIX "${LIBVPX_SOURCE_NAME}") + string(TOUPPER ${VPX_SRC_SUFFIX} VPX_SRC_SUFFIX) + set(VPX_SRC_FLAGS "${${VPX_SRC_SUFFIX}_SRC_FLAGS}") + set_source_files_properties("${LIBVPX_SOURCE_FILE}" PROPERTIES COMPILE_FLAGS "${VPX_SRC_FLAGS}") + endif() + elseif(LIBVPX_SOURCE_EXT STREQUAL ".asm.S") + set(LIBVPX_INPUT_FILE "${LIBVPX_SOURCE_DIR}/${LIBVPX_SOURCE_NAME}.asm") + set(LIBVPX_OUTPUT_FILE "${LIBVPX_SOURCE_DIR}/${LIBVPX_SOURCE_NAME}.asm.S") + asm_generate(INPUT ${LIBVPX_INPUT_FILE} OUTPUT ${LIBVPX_OUTPUT_FILE}) + endif() +endforeach() + +add_library(vpx ${LIBVPX_SOURCES}) + +# installation + +install(TARGETS vpx) + +install(FILES ${LIBVPX_HEADERS} + DESTINATION "include/vpx") + +# pkg-config file + +if(INSTALL_PKG_CONFIG_FILE) + set(PC_LIBS "-lvpx -lm") + set(PC_PRIVATE_LIBS "-lm") + + if(HAVE_PTHREAD_H) + set(PC_PRIVATE_LIBS "${PC_PRIVATE_LIBS} -lpthread") + endif() + + configure_file("${LIBVPX_SRC_DIR}/vpx.pc.in" + "${LIBVPX_BIN_DIR}/vpx.pc" @ONLY) + + install(FILES "${LIBVPX_BIN_DIR}/vpx.pc" + DESTINATION "lib/pkgconfig") +endif() diff --git a/recipes/libvpx/patches/vpx.pc.in b/recipes/libvpx/patches/vpx.pc.in new file mode 100644 index 0000000..76fe7e1 --- /dev/null +++ b/recipes/libvpx/patches/vpx.pc.in @@ -0,0 +1,14 @@ +# pkg-config file for libvpx @VERSION_STRING@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: vpx +Description: WebM Project VPx codec implementation +Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ +Requires: +Conflicts: +Libs: -L${libdir} @PC_LIBS@ +Libs.private: @PC_LIBS_PRIVATE@ +Cflags: -I${includedir} diff --git a/recipes/libvpx/patches/vpx_config.h.in b/recipes/libvpx/patches/vpx_config.h.in new file mode 100644 index 0000000..087b17c --- /dev/null +++ b/recipes/libvpx/patches/vpx_config.h.in @@ -0,0 +1,97 @@ +#ifndef VPX_CONFIG_H +#define VPX_CONFIG_H + +#define RESTRICT @RESTRICT_KEYWORD@ +#define INLINE @INLINE_KEYWORD@ + +#cmakedefine01 VPX_ARCH_ARM +#cmakedefine01 VPX_ARCH_MIPS +#cmakedefine01 VPX_ARCH_X86 +#cmakedefine01 VPX_ARCH_X86_64 +#cmakedefine01 VPX_ARCH_PPC + +#cmakedefine01 HAVE_NEON +#cmakedefine01 HAVE_NEON_ASM +#cmakedefine01 HAVE_MIPS32 +#cmakedefine01 HAVE_DSPR2 +#cmakedefine01 HAVE_MSA +#cmakedefine01 HAVE_MIPS64 +#cmakedefine01 HAVE_MMX +#cmakedefine01 HAVE_SSE +#cmakedefine01 HAVE_SSE2 +#cmakedefine01 HAVE_SSE3 +#cmakedefine01 HAVE_SSSE3 +#cmakedefine01 HAVE_SSE4_1 +#cmakedefine01 HAVE_AVX +#cmakedefine01 HAVE_AVX2 +#cmakedefine01 HAVE_AVX512 +#cmakedefine01 HAVE_VSX +#cmakedefine01 HAVE_MMI +#cmakedefine01 HAVE_VPX_PORTS +#cmakedefine01 HAVE_PTHREAD_H +#cmakedefine01 HAVE_UNISTD_H + +#cmakedefine01 CONFIG_DEPENDENCY_TRACKING +#cmakedefine01 CONFIG_EXTERNAL_BUILD +#cmakedefine01 CONFIG_INSTALL_DOCS +#cmakedefine01 CONFIG_INSTALL_BINS +#cmakedefine01 CONFIG_INSTALL_LIBS +#cmakedefine01 CONFIG_INSTALL_SRCS +#cmakedefine01 CONFIG_DEBUG +#cmakedefine01 CONFIG_GPROF +#cmakedefine01 CONFIG_GCOV +#cmakedefine01 CONFIG_RVCT +#cmakedefine01 CONFIG_GCC +#cmakedefine01 CONFIG_MSVS +#cmakedefine01 CONFIG_PIC +#cmakedefine01 CONFIG_BIG_ENDIAN +#cmakedefine01 CONFIG_CODEC_SRCS +#cmakedefine01 CONFIG_DEBUG_LIBS +#cmakedefine01 CONFIG_DEQUANT_TOKENS +#cmakedefine01 CONFIG_DC_RECON +#cmakedefine01 CONFIG_RUNTIME_CPU_DETECT +#cmakedefine01 CONFIG_POSTPROC +#cmakedefine01 CONFIG_VP9_POSTPROC +#cmakedefine01 CONFIG_MULTITHREAD +#cmakedefine01 CONFIG_INTERNAL_STATS +#cmakedefine01 CONFIG_VP8_ENCODER +#cmakedefine01 CONFIG_VP8_DECODER +#cmakedefine01 CONFIG_VP9_ENCODER +#cmakedefine01 CONFIG_VP9_DECODER +#cmakedefine01 CONFIG_VP8 +#cmakedefine01 CONFIG_VP9 +#cmakedefine01 CONFIG_ENCODERS +#cmakedefine01 CONFIG_DECODERS +#cmakedefine01 CONFIG_STATIC_MSVCRT +#cmakedefine01 CONFIG_SPATIAL_RESAMPLING +#cmakedefine01 CONFIG_REALTIME_ONLY +#cmakedefine01 CONFIG_ONTHEFLY_BITPACKING +#cmakedefine01 CONFIG_ERROR_CONCEALMENT +#cmakedefine01 CONFIG_SHARED +#cmakedefine01 CONFIG_STATIC +#cmakedefine01 CONFIG_SMALL +#cmakedefine01 CONFIG_POSTPROC_VISUALIZER +#cmakedefine01 CONFIG_OS_SUPPORT +#cmakedefine01 CONFIG_UNIT_TESTS +#cmakedefine01 CONFIG_WEBM_IO +#cmakedefine01 CONFIG_LIBYUV +#cmakedefine01 CONFIG_DECODE_PERF_TESTS +#cmakedefine01 CONFIG_ENCODE_PERF_TESTS +#cmakedefine01 CONFIG_MULTI_RES_ENCODING +#cmakedefine01 CONFIG_TEMPORAL_DENOISING +#cmakedefine01 CONFIG_VP9_TEMPORAL_DENOISING +#cmakedefine01 CONFIG_CONSISTENT_RECODE +#cmakedefine01 CONFIG_COEFFICIENT_RANGE_CHECKING +#cmakedefine01 CONFIG_VP9_HIGHBITDEPTH +#cmakedefine01 CONFIG_BETTER_HW_COMPATIBILITY +#cmakedefine01 CONFIG_EXPERIMENTAL +#cmakedefine01 CONFIG_SIZE_LIMIT +#cmakedefine01 CONFIG_ALWAYS_ADJUST_BPM +#cmakedefine01 CONFIG_BITSTREAM_DEBUG +#cmakedefine01 CONFIG_MISMATCH_DEBUG +#cmakedefine01 CONFIG_FP_MB_STATS +#cmakedefine01 CONFIG_EMULATE_HARDWARE +#cmakedefine01 CONFIG_NON_GREEDY_MV +#cmakedefine01 CONFIG_RATE_CTRL + +#endif /* VPX_CONFIG_H */ \ No newline at end of file diff --git a/recipes/libvpx/patches/vpx_version.h.in b/recipes/libvpx/patches/vpx_version.h.in new file mode 100644 index 0000000..62e9d11 --- /dev/null +++ b/recipes/libvpx/patches/vpx_version.h.in @@ -0,0 +1,12 @@ +#ifndef VPX_VERSION_H +#define VPX_VERSION_H + +#define VERSION_MAJOR @VERSION_MAJOR@ +#define VERSION_MINOR @VERSION_MINOR@ +#define VERSION_PATCH @VERSION_PATCH@ +#define VERSION_EXTRA "@VERSION_EXTRA@" +#define VERSION_PACKED ((VERSION_MAJOR<<16)|(VERSION_MINOR<<8)|(VERSION_PATCH)) +#define VERSION_STRING_NOSP "@VERSION_STRING" +#define VERSION_STRING " @VERSION_STRING" + +#endif /* VPX_VERSION_H */ \ No newline at end of file