diff options
author | trav90 <travawine@palemoon.org> | 2018-10-17 05:59:08 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-17 05:59:08 -0500 |
commit | df9477dfa60ebb5d31bc142e58ce46535c17abce (patch) | |
tree | c4fdd5d1b09d08c0514f208246260fc87372cb56 /third_party/aom/build | |
parent | 0cc51bc106250988cc3b89cb5d743a5af52cd35a (diff) | |
download | uxp-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.gz |
Update aom to slightly newer commit ID
Diffstat (limited to 'third_party/aom/build')
-rw-r--r-- | third_party/aom/build/cmake/aom_config_defaults.cmake | 39 | ||||
-rw-r--r-- | third_party/aom/build/cmake/aom_configure.cmake | 87 | ||||
-rw-r--r-- | third_party/aom/build/cmake/aom_optimization.cmake | 10 | ||||
-rw-r--r-- | third_party/aom/build/cmake/compiler_flags.cmake | 5 | ||||
-rw-r--r-- | third_party/aom/build/cmake/compiler_tests.cmake | 5 | ||||
-rw-r--r-- | third_party/aom/build/cmake/dist.cmake | 51 | ||||
-rw-r--r-- | third_party/aom/build/cmake/generate_aom_config_templates.cmake | 22 | ||||
-rw-r--r-- | third_party/aom/build/cmake/msvc_runtime.cmake | 4 | ||||
-rw-r--r-- | third_party/aom/build/cmake/rtcd_config.cmake | 137 | ||||
-rw-r--r-- | third_party/aom/build/cmake/toolchains/armv7-ios.cmake | 4 | ||||
-rw-r--r-- | third_party/aom/build/cmake/toolchains/armv7s-ios.cmake | 4 | ||||
-rw-r--r-- | third_party/aom/build/make/Android.mk | 7 | ||||
-rw-r--r-- | third_party/aom/build/make/configure.sh | 34 | ||||
-rwxr-xr-x | third_party/aom/build/make/rtcd.pl | 6 | ||||
-rwxr-xr-x | third_party/aom/build/make/version.sh | 5 |
15 files changed, 193 insertions, 227 deletions
diff --git a/third_party/aom/build/cmake/aom_config_defaults.cmake b/third_party/aom/build/cmake/aom_config_defaults.cmake index 5c2bc5801f..cd6b5ab48f 100644 --- a/third_party/aom/build/cmake/aom_config_defaults.cmake +++ b/third_party/aom/build/cmake/aom_config_defaults.cmake @@ -20,7 +20,6 @@ set(ARCH_MIPS 0 CACHE BOOL "Enables MIPS architecture.") set(ARCH_X86 0 CACHE BOOL "Enables X86 architecture.") set(ARCH_X86_64 0 CACHE BOOL "Enables X86_64 architecture.") set(HAVE_EDSP 0 CACHE BOOL "Enables EDSP optimizations.") -set(HAVE_MEDIA 0 CACHE BOOL "Enables MEDIA optimizations.") set(HAVE_NEON 0 CACHE BOOL "Enables NEON intrinsics optimizations.") set(HAVE_NEON_ASM 0 CACHE BOOL "Enables NEON assembly optimizations.") set(HAVE_MIPS32 0 CACHE BOOL "Enables MIPS32 optimizations.") @@ -42,7 +41,6 @@ set(HAVE_UNISTD_H 0 CACHE BOOL "Internal flag, unistd.h present for target.") set(HAVE_WXWIDGETS 0 CACHE BOOL "WxWidgets present.") set(CONFIG_DEPENDENCY_TRACKING 1 CACHE BOOL "Internal flag.") set(CONFIG_EXTERNAL_BUILD 0 CACHE BOOL "Internal flag.") -set(CONFIG_INSTALL_DOCS 0 CACHE BOOL "Internal flag.") set(CONFIG_INSTALL_BINS 0 CACHE BOOL "Internal flag.") set(CONFIG_INSTALL_LIBS 0 CACHE BOOL "Internal flag.") set(CONFIG_INSTALL_SRCS 0 CACHE BOOL "Internal flag.") @@ -63,8 +61,6 @@ set(CONFIG_INTERNAL_STATS 0 CACHE BOOL "Internal flag.") set(CONFIG_AV1_ENCODER 1 CACHE BOOL "Enable AV1 encoder.") set(CONFIG_AV1_DECODER 1 CACHE BOOL "Enable AV1 decoder.") set(CONFIG_AV1 1 CACHE BOOL "Internal flag.") -set(CONFIG_ENCODERS 1 CACHE BOOL "Enable encoding.") -set(CONFIG_DECODERS 1 CACHE BOOL "Enable decoding.") set(CONFIG_STATIC_MSVCRT 0 CACHE BOOL "Internal flag.") set(CONFIG_SPATIAL_RESAMPLING 1 CACHE BOOL "Internal flag.") set(CONFIG_REALTIME_ONLY 0 CACHE BOOL "Internal flag.") @@ -84,70 +80,67 @@ set(CONFIG_DECODE_PERF_TESTS 0 CACHE BOOL "Internal flag.") set(CONFIG_ENCODE_PERF_TESTS 0 CACHE BOOL "Internal flag.") set(CONFIG_COEFFICIENT_RANGE_CHECKING 0 CACHE BOOL "Internal flag.") set(CONFIG_LOWBITDEPTH 1 CACHE BOOL "Internal flag.") -set(CONFIG_HIGHBITDEPTH 0 CACHE BOOL "Internal flag.") +set(CONFIG_HIGHBITDEPTH 1 CACHE BOOL "Internal flag.") set(CONFIG_EXPERIMENTAL 0 CACHE BOOL "Internal flag.") set(CONFIG_SIZE_LIMIT 0 CACHE BOOL "Internal flag.") -set(CONFIG_AOM_QM 0 CACHE BOOL "Internal flag.") set(CONFIG_FP_MB_STATS 0 CACHE BOOL "Internal flag.") set(CONFIG_CDEF 1 CACHE BOOL "Internal flag.") -set(CONFIG_VAR_TX 0 CACHE BOOL "Internal flag.") +set(CONFIG_VAR_TX 1 CACHE BOOL "Internal flag.") set(CONFIG_RECT_TX 1 CACHE BOOL "Internal flag.") -set(CONFIG_REF_MV 1 CACHE BOOL "Internal flag.") +set(CONFIG_RECT_TX_EXT 0 CACHE BOOL "Internal flag.") set(CONFIG_TPL_MV 0 CACHE BOOL "Internal flag.") set(CONFIG_DUAL_FILTER 1 CACHE BOOL "Internal flag.") set(CONFIG_CONVOLVE_ROUND 0 CACHE BOOL "Internal flag.") set(CONFIG_COMPOUND_ROUND 0 CACHE BOOL "Internal flag.") -set(CONFIG_EXT_TX 0 CACHE BOOL "Internal flag.") +set(CONFIG_EXT_TX 1 CACHE BOOL "Internal flag.") +set(CONFIG_DPCM_INTRA 0 CACHE BOOL "Internal flag.") set(CONFIG_TX64X64 0 CACHE BOOL "Internal flag.") -set(CONFIG_SUB8X8_MC 0 CACHE BOOL "Internal flag.") set(CONFIG_EXT_INTRA 1 CACHE BOOL "Internal flag.") set(CONFIG_INTRA_INTERP 0 CACHE BOOL "Internal flag.") set(CONFIG_FILTER_INTRA 0 CACHE BOOL "Internal flag.") +set(CONFIG_INTRA_EDGE 0 CACHE BOOL "Internal flag.") set(CONFIG_INTRABC 0 CACHE BOOL "Internal flag.") set(CONFIG_EXT_INTER 0 CACHE BOOL "Internal flag.") set(CONFIG_INTERINTRA 0 CACHE BOOL "Internal flag.") set(CONFIG_WEDGE 0 CACHE BOOL "Internal flag.") set(CONFIG_COMPOUND_SEGMENT 0 CACHE BOOL "Internal flag.") set(CONFIG_EXT_REFS 1 CACHE BOOL "Internal flag.") -set(CONFIG_GLOBAL_MOTION 0 CACHE BOOL "Internal flag.") +set(CONFIG_GLOBAL_MOTION 1 CACHE BOOL "Internal flag.") set(CONFIG_NEW_QUANT 0 CACHE BOOL "Internal flag.") set(CONFIG_SUPERTX 0 CACHE BOOL "Internal flag.") set(CONFIG_ANS 0 CACHE BOOL "Internal flag.") -set(CONFIG_EC_MULTISYMBOL 1 CACHE BOOL "Internal flag.") -set(CONFIG_NEW_TOKENSET 1 CACHE BOOL "Internal flag.") set(CONFIG_LOOP_RESTORATION 0 CACHE BOOL "Internal flag.") set(CONFIG_EXT_PARTITION 0 CACHE BOOL "Internal flag.") set(CONFIG_EXT_PARTITION_TYPES 0 CACHE BOOL "Internal flag.") set(CONFIG_UNPOISON_PARTITION_CTX 0 CACHE BOOL "Internal flag.") set(CONFIG_EXT_TILE 0 CACHE BOOL "Internal flag.") -set(CONFIG_MOTION_VAR 0 CACHE BOOL "Internal flag.") +set(CONFIG_MOTION_VAR 1 CACHE BOOL "Internal flag.") set(CONFIG_NCOBMC 0 CACHE BOOL "Internal flag.") -set(CONFIG_WARPED_MOTION 0 CACHE BOOL "Internal flag.") +set(CONFIG_WARPED_MOTION 1 CACHE BOOL "Internal flag.") set(CONFIG_Q_ADAPT_PROBS 0 CACHE BOOL "Internal flag.") -set(CONFIG_SUBFRAME_PROB_UPDATE 0 CACHE BOOL "Internal flag.") set(CONFIG_BITSTREAM_DEBUG 0 CACHE BOOL "Internal flag.") set(CONFIG_ALT_INTRA 1 CACHE BOOL "Internal flag.") set(CONFIG_PALETTE 1 CACHE BOOL "Internal flag.") set(CONFIG_PALETTE_DELTA_ENCODING 0 CACHE BOOL "Internal flag.") -set(CONFIG_DAALA_EC 1 CACHE BOOL "Internal flag.") set(CONFIG_RAWBITS 0 CACHE BOOL "Internal flag.") -set(CONFIG_EC_SMALLMUL 0 CACHE BOOL "Internal flag.") +set(CONFIG_EC_SMALLMUL 1 CACHE BOOL "Internal flag.") set(CONFIG_PVQ 0 CACHE BOOL "Internal flag.") set(CONFIG_CFL 0 CACHE BOOL "Internal flag.") set(CONFIG_XIPHRC 0 CACHE BOOL "Internal flag.") set(CONFIG_CB4X4 1 CACHE BOOL "Internal flag.") set(CONFIG_CHROMA_2X2 0 CACHE BOOL "Internal flag.") +set(CONFIG_CHROMA_SUB8X8 1 CACHE BOOL "Internal flag.") set(CONFIG_FRAME_SIZE 0 CACHE BOOL "Internal flag.") set(CONFIG_DELTA_Q 1 CACHE BOOL "Internal flag.") -set(CONFIG_EXT_DELTA_Q 0 CACHE BOOL "Internal flag.") +set(CONFIG_EXT_DELTA_Q 1 CACHE BOOL "Internal flag.") set(CONFIG_ADAPT_SCAN 0 CACHE BOOL "Internal flag.") set(CONFIG_FILTER_7BIT 1 CACHE BOOL "Internal flag.") set(CONFIG_PARALLEL_DEBLOCKING 0 CACHE BOOL "Internal flag.") set(CONFIG_PARALLEL_DEBLOCKING_15TAP 0 CACHE BOOL "Internal flag.") -set(CONFIG_LOOPFILTERING_ACROSS_TILES 0 CACHE BOOL "Internal flag.") +set(CONFIG_LOOPFILTERING_ACROSS_TILES 1 CACHE BOOL "Internal flag.") set(CONFIG_TILE_GROUPS 1 CACHE BOOL "Internal flag.") set(CONFIG_EC_ADAPT 1 CACHE BOOL "Internal flag.") -set(CONFIG_TEMPMV_SIGNALING 0 CACHE BOOL "Internal flag.") +set(CONFIG_TEMPMV_SIGNALING 1 CACHE BOOL "Internal flag.") set(CONFIG_RD_DEBUG 0 CACHE BOOL "Internal flag.") set(CONFIG_REFERENCE_BUFFER 1 CACHE BOOL "Internal flag.") set(CONFIG_COEF_INTERLEAVE 0 CACHE BOOL "Internal flag.") @@ -164,4 +157,8 @@ set(CONFIG_MV_COMPRESS 1 CACHE BOOL "Internal flag.") set(CONFIG_FRAME_SUPERRES 0 CACHE BOOL "Internal flag.") set(CONFIG_NEW_MULTISYMBOL 0 CACHE BOOL "Internal flag.") set(CONFIG_COMPOUND_SINGLEREF 0 CACHE BOOL "Internal flag.") +set(CONFIG_AOM_QM 0 CACHE BOOL "Internal flag.") +set(CONFIG_ONE_SIDED_COMPOUND 1 CACHE BOOL "Internal flag.") +set(CONFIG_SMOOTH_HV 0 CACHE BOOL "Internal flag.") +set(CONFIG_VAR_REFS 0 CACHE BOOL "Internal flag.") set(CONFIG_ANALYZER 0 CACHE BOOL "Internal flag.") diff --git a/third_party/aom/build/cmake/aom_configure.cmake b/third_party/aom/build/cmake/aom_configure.cmake index 3c9402d0bd..0fa2cce0e9 100644 --- a/third_party/aom/build/cmake/aom_configure.cmake +++ b/third_party/aom/build/cmake/aom_configure.cmake @@ -8,6 +8,9 @@ ## Media Patent License 1.0 was not distributed with this source code in the ## PATENTS file, you can obtain it at www.aomedia.org/license/patent. ## +if (NOT AOM_BUILD_CMAKE_AOM_CONFIGURE_CMAKE_) +set(AOM_BUILD_CMAKE_AOM_CONFIGURE_CMAKE_ 1) + include(FindGit) include(FindPerl) include(FindThreads) @@ -89,7 +92,13 @@ endif () if ("${AOM_TARGET_CPU}" STREQUAL "x86" OR "${AOM_TARGET_CPU}" STREQUAL "x86_64") # TODO(tomfinegan): Support nasm at least as well as the existing build # system. - find_program(AS_EXECUTABLE yasm $ENV{YASM_PATH}) + if (ENABLE_NASM) + find_program(AS_EXECUTABLE nasm $ENV{NASM_PATH}) + set(AOM_AS_FLAGS ${AOM_AS_FLAGS} -Ox) + else () + find_program(AS_EXECUTABLE yasm $ENV{YASM_PATH}) + endif () + if (NOT AS_EXECUTABLE) message(FATAL_ERROR "Unable to find yasm. To build without optimizations, " "add -DAOM_TARGET_CPU=generic to your cmake command line.") @@ -115,6 +124,30 @@ endif () include("${AOM_ROOT}/build/cmake/cpu.cmake") +if (ENABLE_CCACHE) + find_program(CCACHE "ccache") + if (NOT "${CCACHE}" STREQUAL "") + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE}") + else () + message("--- Cannot find ccache, ENABLE_CCACHE ignored.") + endif () +endif () + +if (ENABLE_DISTCC) + find_program(DISTCC "distcc") + if (NOT "${DISTCC}" STREQUAL "") + set(CMAKE_C_COMPILER_LAUNCHER "${DISTCC}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${DISTCC}") + else () + message("--- Cannot find distcc, ENABLE_DISTCC ignored.") + endif () +endif () + +if (NOT CONFIG_AV1_DECODER AND NOT CONFIG_AV1_ENCODER) + message(FATAL_ERROR "Decoder and encoder disabled, nothing to build.") +endif () + # Test compiler flags. if (MSVC) add_compiler_flag_if_supported("/W3") @@ -191,11 +224,6 @@ if (CONFIG_ANALYZER) endif () endif () -if (CONFIG_ANS AND CONFIG_DAALA_EC) - message(FATAL_ERROR - "CONFIG_ANS and CONFIG_DAALA_EC cannot be enabled together.") -endif () - if (NOT MSVC) aom_push_var(CMAKE_REQUIRED_LIBRARIES "m") aom_check_c_compiles("fenv_check" @@ -207,6 +235,13 @@ if (NOT MSVC) aom_pop_var(CMAKE_REQUIRED_LIBRARIES) endif() +set(AOM_LIB_LINK_TYPE PUBLIC) +if (EMSCRIPTEN) + # Avoid CMake generation time errors resulting from collisions with the form + # of target_link_libraries() used by Emscripten.cmake. + unset(AOM_LIB_LINK_TYPE) +endif () + # Generate aom_config templates. set(aom_config_asm_template "${AOM_CONFIG_DIR}/aom_config.asm.cmake") set(aom_config_h_template "${AOM_CONFIG_DIR}/aom_config.h.cmake") @@ -244,9 +279,9 @@ find_package(Perl) if (NOT PERL_FOUND) message(FATAL_ERROR "Perl is required to build libaom.") endif () -configure_file( - "${AOM_ROOT}/build/cmake/rtcd_config.cmake" - "${AOM_CONFIG_DIR}/${AOM_TARGET_CPU}_rtcd_config.rtcd") + +configure_file("${AOM_CONFIG_DIR}/rtcd_config.cmake" + "${AOM_CONFIG_DIR}/${AOM_TARGET_CPU}_rtcd_config.rtcd") set(AOM_RTCD_CONFIG_FILE_LIST "${AOM_ROOT}/aom_dsp/aom_dsp_rtcd_defs.pl" @@ -304,3 +339,37 @@ execute_process( COMMAND ${PERL_EXECUTABLE} "${AOM_ROOT}/build/cmake/aom_version.pl" --version_data=${AOM_GIT_DESCRIPTION} --version_filename=${AOM_CONFIG_DIR}/aom_version.h) + +# Generate aom.pc (pkg-config file). +if (NOT MSVC) + # Extract the version string from aom_version.h + file(STRINGS "${AOM_CONFIG_DIR}/aom_version.h" aom_version + REGEX "VERSION_STRING_NOSP") + string(REPLACE "#define VERSION_STRING_NOSP \"v" "" aom_version + "${aom_version}") + string(REPLACE "\"" "" aom_version "${aom_version}") + + # Write pkg-config info. + set(prefix "${CMAKE_INSTALL_PREFIX}") + set(pkgconfig_file "${AOM_CONFIG_DIR}/aom.pc") + string(TOLOWER ${CMAKE_PROJECT_NAME} pkg_name) + file(WRITE "${pkgconfig_file}" "# libaom pkg-config.\n") + file(APPEND "${pkgconfig_file}" "prefix=${prefix}\n") + file(APPEND "${pkgconfig_file}" "exec_prefix=${prefix}/bin\n") + file(APPEND "${pkgconfig_file}" "libdir=${prefix}/lib\n") + file(APPEND "${pkgconfig_file}" "includedir=${prefix}/include\n\n") + file(APPEND "${pkgconfig_file}" "Name: ${pkg_name}\n") + file(APPEND "${pkgconfig_file}" "Description: AV1 codec library.\n") + file(APPEND "${pkgconfig_file}" "Version: ${aom_version}\n") + file(APPEND "${pkgconfig_file}" "Requires:\n") + file(APPEND "${pkgconfig_file}" "Conflicts:\n") + file(APPEND "${pkgconfig_file}" "Libs: -L${prefix}/lib -l${pkg_name} -lm\n") + if (CONFIG_MULTITHREAD AND HAVE_PTHREAD_H) + file(APPEND "${pkgconfig_file}" "Libs.private: -lm -lpthread\n") + else () + file(APPEND "${pkgconfig_file}" "Libs.private: -lm\n") + endif () + file(APPEND "${pkgconfig_file}" "Cflags: -I${prefix}/include\n") +endif () + +endif () # AOM_BUILD_CMAKE_AOM_CONFIGURE_CMAKE_ diff --git a/third_party/aom/build/cmake/aom_optimization.cmake b/third_party/aom/build/cmake/aom_optimization.cmake index e2b0ba07e3..5a38652813 100644 --- a/third_party/aom/build/cmake/aom_optimization.cmake +++ b/third_party/aom/build/cmake/aom_optimization.cmake @@ -75,7 +75,8 @@ function (get_asm_obj_format out_format) set(objformat "macho64") elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "Linux") set(objformat "elf64") - elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "Windows") + elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "MSYS" OR + "${AOM_TARGET_SYSTEM}" STREQUAL "Windows") set(objformat "win64") else () message(FATAL_ERROR "Unknown obj format: ${AOM_TARGET_SYSTEM}") @@ -85,7 +86,8 @@ function (get_asm_obj_format out_format) set(objformat "macho32") elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "Linux") set(objformat "elf32") - elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "Windows") + elseif ("${AOM_TARGET_SYSTEM}" STREQUAL "MSYS" OR + "${AOM_TARGET_SYSTEM}" STREQUAL "Windows") set(objformat "win32") else () message(FATAL_ERROR "Unknown obj format: ${AOM_TARGET_SYSTEM}") @@ -120,7 +122,7 @@ function (add_asm_library lib_name asm_sources dependent_target) add_custom_command(OUTPUT "${asm_object}" COMMAND ${AS_EXECUTABLE} ARGS ${AOM_AS_FLAGS} - -I${AOM_ROOT} -I${AOM_CONFIG_DIR} + -I${AOM_ROOT}/ -I${AOM_CONFIG_DIR}/ -o "${asm_object}" "${asm_source}" DEPENDS "${asm_source}" COMMENT "Building ASM object ${asm_object}" @@ -141,7 +143,7 @@ function (add_asm_library lib_name asm_sources dependent_target) "void ${lib_name}_dummy_function(void) {}\n") target_sources(${lib_name} PUBLIC ${dummy_c_file}) - target_link_libraries(${dependent_target} PRIVATE ${lib_name}) + target_link_libraries(${dependent_target} ${AOM_LIB_LINK_TYPE} ${lib_name}) # Add the new lib target to the global list of aom library targets. list(APPEND AOM_LIB_TARGETS ${lib_name}) diff --git a/third_party/aom/build/cmake/compiler_flags.cmake b/third_party/aom/build/cmake/compiler_flags.cmake index beb217abcb..c9fc69b92a 100644 --- a/third_party/aom/build/cmake/compiler_flags.cmake +++ b/third_party/aom/build/cmake/compiler_flags.cmake @@ -8,6 +8,9 @@ ## Media Patent License 1.0 was not distributed with this source code in the ## PATENTS file, you can obtain it at www.aomedia.org/license/patent. ## +if (NOT AOM_BUILD_CMAKE_COMPILER_FLAGS_CMAKE_) +set(AOM_BUILD_CMAKE_COMPILER_FLAGS_CMAKE_ 1) + include(CheckCCompilerFlag) include(CheckCXXCompilerFlag) @@ -216,3 +219,5 @@ function (append_exe_linker_flag flag) "" FORCE) endif () endfunction () + +endif () # AOM_BUILD_CMAKE_COMPILER_FLAGS_CMAKE_ diff --git a/third_party/aom/build/cmake/compiler_tests.cmake b/third_party/aom/build/cmake/compiler_tests.cmake index e763597a20..89f0bc12cd 100644 --- a/third_party/aom/build/cmake/compiler_tests.cmake +++ b/third_party/aom/build/cmake/compiler_tests.cmake @@ -8,6 +8,9 @@ ## Media Patent License 1.0 was not distributed with this source code in the ## PATENTS file, you can obtain it at www.aomedia.org/license/patent. ## +if (NOT AOM_BUILD_CMAKE_COMPILER_TESTS_CMAKE_) +set(AOM_BUILD_CMAKE_COMPILER_TESTS_CMAKE_ 1) + include(CheckCSourceCompiles) include(CheckCXXSourceCompiles) @@ -131,3 +134,5 @@ function (aom_get_inline result) set(${result} "__inline" PARENT_SCOPE) endif () endfunction () + +endif () # AOM_BUILD_CMAKE_COMPILER_TESTS_CMAKE_ diff --git a/third_party/aom/build/cmake/dist.cmake b/third_party/aom/build/cmake/dist.cmake new file mode 100644 index 0000000000..0de68a44d4 --- /dev/null +++ b/third_party/aom/build/cmake/dist.cmake @@ -0,0 +1,51 @@ +## +## Copyright (c) 2017, Alliance for Open Media. All rights reserved +## +## This source code is subject to the terms of the BSD 2 Clause License and +## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License +## was not distributed with this source code in the LICENSE file, you can +## obtain it at www.aomedia.org/license/software. If the Alliance for Open +## Media Patent License 1.0 was not distributed with this source code in the +## PATENTS file, you can obtain it at www.aomedia.org/license/patent. +## +cmake_minimum_required(VERSION 3.5) + +# Converts spaces in $in_string to semicolons and writes the output to +# $out_string. In CMake's eyes this converts the input string to a list. +function (listify_string in_string out_string) + string(REPLACE " " ";" ${out_string} ${in_string}) + set(${out_string} "${${out_string}}" PARENT_SCOPE) +endfunction () + +set(REQUIRED_ARGS "AOM_ROOT" "AOM_CONFIG_DIR" "AOM_DIST_DIR" "AOM_DIST_EXAMPLES" + "AOM_DIST_APPS" "AOM_DIST_INCLUDES" "AOM_DIST_LIBS" "ENABLE_DOCS") + +foreach (arg ${REQUIRED_ARGS}) + if ("${${arg}}" STREQUAL "") + message(FATAL_ERROR "${arg} must not be empty.") + endif () +endforeach () + +if (ENABLE_DOCS) + file(INSTALL "${AOM_CONFIG_DIR}/docs" DESTINATION "${AOM_DIST_DIR}") +endif () + +listify_string("${AOM_DIST_EXAMPLES}" "AOM_DIST_EXAMPLES") +foreach (example ${AOM_DIST_EXAMPLES}) + file(INSTALL "${example}" DESTINATION "${AOM_DIST_DIR}/bin/examples") +endforeach () + +listify_string("${AOM_DIST_APPS}" "AOM_DIST_APPS") +foreach (app ${AOM_DIST_APPS}) + file(INSTALL "${app}" DESTINATION "${AOM_DIST_DIR}/bin") +endforeach () + +listify_string("${AOM_DIST_INCLUDES}" "AOM_DIST_INCLUDES") +foreach (inc ${AOM_DIST_INCLUDES}) + file(INSTALL "${inc}" DESTINATION "${AOM_DIST_DIR}/include/aom") +endforeach () + +listify_string("${AOM_DIST_LIBS}" "AOM_DIST_LIBS") +foreach (lib ${AOM_DIST_LIBS}) + file(INSTALL "${lib}" DESTINATION "${AOM_DIST_DIR}/lib") +endforeach () diff --git a/third_party/aom/build/cmake/generate_aom_config_templates.cmake b/third_party/aom/build/cmake/generate_aom_config_templates.cmake index aea4253bbe..effa456fcc 100644 --- a/third_party/aom/build/cmake/generate_aom_config_templates.cmake +++ b/third_party/aom/build/cmake/generate_aom_config_templates.cmake @@ -37,6 +37,18 @@ set(h_file_header_block \#ifndef AOM_CONFIG_H_ \#define AOM_CONFIG_H_ ") +set(cmake_file_header_block +"## +## Copyright (c) ${year}, Alliance for Open Media. All rights reserved +## +## This source code is subject to the terms of the BSD 2 Clause License and +## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License +## was not distributed with this source code in the LICENSE file, you can +## obtain it at www.aomedia.org/license/software. If the Alliance for Open +## Media Patent License 1.0 was not distributed with this source code in the +## PATENTS file, you can obtain it at www.aomedia.org/license/patent. +## +") # Terminates cmake execution when $var_name is an empty string, or the variable # name it contains does not expand to an existing directory. @@ -82,3 +94,13 @@ foreach(cache_var ${cmake_cache_vars}) endif () endforeach () +set(aom_rtcd_config_template "${AOM_CONFIG_DIR}/rtcd_config.cmake") +file(WRITE "${aom_rtcd_config_template}" ${cmake_file_header_block}) +foreach(cache_var ${cmake_cache_vars}) + if (NOT "${cache_var}" MATCHES + "AOM_CONFIG_DIR\|AOM_ROOT\|^CMAKE_\|INLINE\|RESTRICT") + file(APPEND "${aom_rtcd_config_template}" + "${cache_var}=\${RTCD_${cache_var}}\n") + endif () +endforeach () + diff --git a/third_party/aom/build/cmake/msvc_runtime.cmake b/third_party/aom/build/cmake/msvc_runtime.cmake index 0327217b4d..3da5f7df65 100644 --- a/third_party/aom/build/cmake/msvc_runtime.cmake +++ b/third_party/aom/build/cmake/msvc_runtime.cmake @@ -8,6 +8,8 @@ ## Media Patent License 1.0 was not distributed with this source code in the ## PATENTS file, you can obtain it at www.aomedia.org/license/patent. ## +if (NOT AOM_BUILD_CMAKE_MSVC_RUNTIME_CMAKE_) +set(AOM_BUILD_CMAKE_MSVC_RUNTIME_CMAKE_ 1) if (MSVC) # CMake defaults to producing code linked to the DLL MSVC runtime. That will @@ -24,3 +26,5 @@ if (MSVC) endforeach (flag_var) endif () endif () + +endif () # AOM_BUILD_CMAKE_MSVC_RUNTIME_CMAKE_ diff --git a/third_party/aom/build/cmake/rtcd_config.cmake b/third_party/aom/build/cmake/rtcd_config.cmake deleted file mode 100644 index cdea3452a7..0000000000 --- a/third_party/aom/build/cmake/rtcd_config.cmake +++ /dev/null @@ -1,137 +0,0 @@ -## -## Copyright (c) 2017, Alliance for Open Media. All rights reserved -## -## This source code is subject to the terms of the BSD 2 Clause License and -## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License -## was not distributed with this source code in the LICENSE file, you can -## obtain it at www.aomedia.org/license/software. If the Alliance for Open -## Media Patent License 1.0 was not distributed with this source code in the -## PATENTS file, you can obtain it at www.aomedia.org/license/patent. -## -ARCH_ARM=${RTCD_ARCH_ARM} -ARCH_MIPS=${RTCD_ARCH_MIPS} -ARCH_X86=${RTCD_ARCH_X86} -ARCH_X86_64=${RTCD_ARCH_X86_64} -HAVE_NEON=${RTCD_HAVE_NEON} -HAVE_NEON_ASM=${RTCD_HAVE_NEON_ASM} -HAVE_MIPS32=${RTCD_HAVE_MIPS32} -HAVE_DSPR2=${RTCD_HAVE_DSPR2} -HAVE_MSA=${RTCD_HAVE_MSA} -HAVE_MIPS64=${RTCD_HAVE_MIPS64} -HAVE_MMX=${RTCD_HAVE_MMX} -HAVE_SSE=${RTCD_HAVE_SSE} -HAVE_SSE2=${RTCD_HAVE_SSE2} -HAVE_SSE3=${RTCD_HAVE_SSE3} -HAVE_SSSE3=${RTCD_HAVE_SSSE3} -HAVE_SSE4_1=${RTCD_HAVE_SSE4_1} -HAVE_AVX=${RTCD_HAVE_AVX} -HAVE_AVX2=${RTCD_HAVE_AVX2} -CONFIG_ACCOUNTING=${RTCD_CONFIG_ACCOUNTING} -CONFIG_INSPECTION=${RTCD_CONFIG_INSPECTION} -CONFIG_ADAPT_SCAN=${RTCD_CONFIG_ADAPT_SCAN} -CONFIG_ALT_INTRA=${RTCD_CONFIG_ALT_INTRA} -CONFIG_ANS=${RTCD_CONFIG_ANS} -CONFIG_HIGHBITDEPTH=${RTCD_CONFIG_HIGHBITDEPTH} -CONFIG_AOM_QM=${RTCD_CONFIG_AOM_QM} -CONFIG_AV1=${RTCD_CONFIG_AV1} -CONFIG_AV1_DECODER=${RTCD_CONFIG_AV1_DECODER} -CONFIG_AV1_ENCODER=${RTCD_CONFIG_AV1_ENCODER} -CONFIG_BIG_ENDIAN=${RTCD_CONFIG_BIG_ENDIAN} -CONFIG_BITSTREAM_DEBUG=${RTCD_CONFIG_BITSTREAM_DEBUG} -CONFIG_CB4X4=${RTCD_CONFIG_CB4X4} -CONFIG_CDEF=${RTCD_CONFIG_CDEF} -CONFIG_CHROMA_2X2=${RTCD_CONFIG_CHROMA_2X2} -CONFIG_CODEC_SRCS=${RTCD_CONFIG_CODEC_SRCS} -CONFIG_COEFFICIENT_RANGE_CHECKING=${RTCD_CONFIG_COEFFICIENT_RANGE_CHECKING} -CONFIG_COEF_INTERLEAVE=${RTCD_CONFIG_COEF_INTERLEAVE} -CONFIG_COMPOUND_SEGMENT=${RTCD_CONFIG_COMPOUND_SEGMENT} -CONFIG_CONVOLVE_ROUND=${RTCD_CONFIG_CONVOLVE_ROUND} -CONFIG_DAALA_DIST=${RTCD_CONFIG_DAALA_DIST} -CONFIG_DAALA_EC=${RTCD_CONFIG_DAALA_EC} -CONFIG_DEBUG=${RTCD_CONFIG_DEBUG} -CONFIG_DEBUG_LIBS=${RTCD_CONFIG_DEBUG_LIBS} -CONFIG_DECODERS=${RTCD_CONFIG_DECODERS} -CONFIG_DECODE_PERF_TESTS=${RTCD_CONFIG_DECODE_PERF_TESTS} -CONFIG_DELTA_Q=${RTCD_CONFIG_DELTA_Q} -CONFIG_DEPENDENCY_TRACKING=${RTCD_CONFIG_DEPENDENCY_TRACKING} -CONFIG_DEPENDENT_HORZTILES=${RTCD_CONFIG_DEPENDENT_HORZTILES} -CONFIG_DUAL_FILTER=${RTCD_CONFIG_DUAL_FILTER} -CONFIG_EC_ADAPT=${RTCD_CONFIG_EC_ADAPT} -CONFIG_EC_MULTISYMBOL=${RTCD_CONFIG_EC_MULTISYMBOL} -CONFIG_ENCODERS=${RTCD_CONFIG_ENCODERS} -CONFIG_ENCODE_PERF_TESTS=${RTCD_CONFIG_ENCODE_PERF_TESTS} -CONFIG_ENTROPY_STATS=${RTCD_CONFIG_ENTROPY_STATS} -CONFIG_ERROR_CONCEALMENT=${RTCD_CONFIG_ERROR_CONCEALMENT} -CONFIG_EXPERIMENTAL=${RTCD_CONFIG_EXPERIMENTAL} -CONFIG_EXTERNAL_BUILD=${RTCD_CONFIG_EXTERNAL_BUILD} -CONFIG_EXT_INTER=${RTCD_CONFIG_EXT_INTER} -CONFIG_EXT_INTRA=${RTCD_CONFIG_EXT_INTRA} -CONFIG_EXT_PARTITION=${RTCD_CONFIG_EXT_PARTITION} -CONFIG_EXT_PARTITION_TYPES=${RTCD_CONFIG_EXT_PARTITION_TYPES} -CONFIG_EXT_REFS=${RTCD_CONFIG_EXT_REFS} -CONFIG_EXT_TILE=${RTCD_CONFIG_EXT_TILE} -CONFIG_EXT_TX=${RTCD_CONFIG_EXT_TX} -CONFIG_FILTER_7BIT=${RTCD_CONFIG_FILTER_7BIT} -CONFIG_FILTER_INTRA=${RTCD_CONFIG_FILTER_INTRA} -CONFIG_FP_MB_STATS=${RTCD_CONFIG_FP_MB_STATS} -CONFIG_FRAME_SIZE=${RTCD_CONFIG_FRAME_SIZE} -CONFIG_GCC=${RTCD_CONFIG_GCC} -CONFIG_GCOV=${RTCD_CONFIG_GCOV} -CONFIG_GLOBAL_MOTION=${RTCD_CONFIG_GLOBAL_MOTION} -CONFIG_GPROF=${RTCD_CONFIG_GPROF} -CONFIG_INSTALL_BINS=${RTCD_CONFIG_INSTALL_BINS} -CONFIG_INSTALL_DOCS=${RTCD_CONFIG_INSTALL_DOCS} -CONFIG_INSTALL_LIBS=${RTCD_CONFIG_INSTALL_LIBS} -CONFIG_INSTALL_SRCS=${RTCD_CONFIG_INSTALL_SRCS} -CONFIG_INTERNAL_STATS=${RTCD_CONFIG_INTERNAL_STATS} -CONFIG_INTRA_INTERP=${RTCD_CONFIG_INTRA_INTERP} -CONFIG_LIBYUV=${RTCD_CONFIG_LIBYUV} -CONFIG_LOOPFILTERING_ACROSS_TILES=${RTCD_CONFIG_LOOPFILTERING_ACROSS_TILES} -CONFIG_LOOP_RESTORATION=${RTCD_CONFIG_LOOP_RESTORATION} -CONFIG_LOWBITDEPTH=${RTCD_CONFIG_LOWBITDEPTH} -CONFIG_LV_MAP=${RTCD_CONFIG_LV_MAP} -CONFIG_MASKED_TX=${RTCD_CONFIG_MASKED_TX} -CONFIG_MOTION_VAR=${RTCD_CONFIG_MOTION_VAR} -CONFIG_MSVS=${RTCD_CONFIG_MSVS} -CONFIG_MULTITHREAD=${RTCD_CONFIG_MULTITHREAD} -CONFIG_MV_COMPRESS=${RTCD_CONFIG_MV_COMPRESS} -CONFIG_NCOBMC=${RTCD_CONFIG_NCOBMC} -CONFIG_NEW_QUANT=${RTCD_CONFIG_NEW_QUANT} -CONFIG_NEW_TOKENSET=${RTCD_CONFIG_NEW_TOKENSET} -CONFIG_ONTHEFLY_BITPACKING=${RTCD_CONFIG_ONTHEFLY_BITPACKING} -CONFIG_OS_SUPPORT=${RTCD_CONFIG_OS_SUPPORT} -CONFIG_PALETTE=${RTCD_CONFIG_PALETTE} -CONFIG_PALETTE_THROUGHPUT=${RTCD_CONFIG_PALETTE_THROUGHPUT} -CONFIG_PARALLEL_DEBLOCKING=${RTCD_CONFIG_PARALLEL_DEBLOCKING} -CONFIG_PIC=${RTCD_CONFIG_PIC} -CONFIG_POSTPROC=${RTCD_CONFIG_POSTPROC} -CONFIG_POSTPROC_VISUALIZER=${RTCD_CONFIG_POSTPROC_VISUALIZER} -CONFIG_PVQ=${RTCD_CONFIG_PVQ} -CONFIG_RAWBITS=${RTCD_CONFIG_RAWBITS} -CONFIG_RD_DEBUG=${RTCD_CONFIG_RD_DEBUG} -CONFIG_REALTIME_ONLY=${RTCD_CONFIG_REALTIME_ONLY} -CONFIG_RECT_TX=${RTCD_CONFIG_RECT_TX} -CONFIG_REFERENCE_BUFFER=${RTCD_CONFIG_REFERENCE_BUFFER} -CONFIG_REF_ADAPT=${RTCD_CONFIG_REF_ADAPT} -CONFIG_REF_MV=${RTCD_CONFIG_REF_MV} -CONFIG_RUNTIME_CPU_DETECT=${RTCD_CONFIG_RUNTIME_CPU_DETECT} -CONFIG_RVCT=${RTCD_CONFIG_RVCT} -CONFIG_SHARED=${RTCD_CONFIG_SHARED} -CONFIG_SIZE_LIMIT=${RTCD_CONFIG_SIZE_LIMIT} -CONFIG_SMALL=${RTCD_CONFIG_SMALL} -CONFIG_SPATIAL_RESAMPLING=${RTCD_CONFIG_SPATIAL_RESAMPLING} -CONFIG_STATIC=${RTCD_CONFIG_STATIC} -CONFIG_STATIC_MSVCRT=${RTCD_CONFIG_STATIC_MSVCRT} -CONFIG_SUB8X8_MC=${RTCD_CONFIG_SUB8X8_MC} -CONFIG_SUPERTX=${RTCD_CONFIG_SUPERTX} -CONFIG_TEMPMV_SIGNALING=${RTCD_CONFIG_TEMPMV_SIGNALING} -CONFIG_TILE_GROUPS=${RTCD_CONFIG_TILE_GROUPS} -CONFIG_TPL_MV=${RTCD_CONFIG_TPL_MV} -CONFIG_TRIPRED=${RTCD_CONFIG_TRIPRED} -CONFIG_TX64X64=${RTCD_CONFIG_TX64X64} -CONFIG_UNIT_TESTS=${RTCD_CONFIG_UNIT_TESTS} -CONFIG_UNPOISON_PARTITION_CTX=${RTCD_CONFIG_UNPOISON_PARTITION_CTX} -CONFIG_VAR_TX=${RTCD_CONFIG_VAR_TX} -CONFIG_WARPED_MOTION=${RTCD_CONFIG_WARPED_MOTION} -CONFIG_WEBM_IO=${RTCD_CONFIG_WEBM_IO} -CONFIG_XIPHRC=${RTCD_CONFIG_XIPHRC} diff --git a/third_party/aom/build/cmake/toolchains/armv7-ios.cmake b/third_party/aom/build/cmake/toolchains/armv7-ios.cmake index bcd37a06d7..71ac4067c2 100644 --- a/third_party/aom/build/cmake/toolchains/armv7-ios.cmake +++ b/third_party/aom/build/cmake/toolchains/armv7-ios.cmake @@ -27,8 +27,4 @@ set(AOM_NEON_INTRIN_FLAG "") # No runtime cpu detect for armv7s-ios. set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE BOOL "") -# RTCD generation requires --disable-media for armv7s-ios. -set(AOM_RTCD_FLAGS ${AOM_RTCD_FLAGS} --disable-media) -string(STRIP AOM_RTCD_FLAGS ${AOM_RTCD_FLAGS}) - endif () # AOM_BUILD_CMAKE_TOOLCHAINS_ARMV7_IOS_CMAKE_ diff --git a/third_party/aom/build/cmake/toolchains/armv7s-ios.cmake b/third_party/aom/build/cmake/toolchains/armv7s-ios.cmake index 08a0a37ee7..99e1dc39ca 100644 --- a/third_party/aom/build/cmake/toolchains/armv7s-ios.cmake +++ b/third_party/aom/build/cmake/toolchains/armv7s-ios.cmake @@ -27,8 +27,4 @@ set(AOM_NEON_INTRIN_FLAG "") # No runtime cpu detect for armv7s-ios. set(CONFIG_RUNTIME_CPU_DETECT 0 CACHE BOOL "") -# RTCD generation requires --disable-media for armv7s-ios. -set(AOM_RTCD_FLAGS ${AOM_RTCD_FLAGS} --disable-media) -string(STRIP AOM_RTCD_FLAGS ${AOM_RTCD_FLAGS}) - endif () # AOM_BUILD_CMAKE_TOOLCHAINS_ARMV7S_IOS_CMAKE_ diff --git a/third_party/aom/build/make/Android.mk b/third_party/aom/build/make/Android.mk index 6757b1f595..e50faef92a 100644 --- a/third_party/aom/build/make/Android.mk +++ b/third_party/aom/build/make/Android.mk @@ -43,10 +43,6 @@ # Configuring with --disable-runtime-cpu-detect --disable-neon \ # --disable-neon-asm # will remove any NEON dependency. - -# To change to building armeabi, run ./libaom/configure again, but with -# --target=armv6-android-gcc and modify the Application.mk file to -# set APP_ABI := armeabi # # Running ndk-build will build libaom and include it in your project. # @@ -61,9 +57,6 @@ ASM_CNV_PATH := $(LOCAL_PATH)/$(ASM_CNV_PATH_LOCAL) ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) include $(CONFIG_DIR)libs-armv7-android-gcc.mk LOCAL_ARM_MODE := arm -else ifeq ($(TARGET_ARCH_ABI),armeabi) - include $(CONFIG_DIR)libs-armv6-android-gcc.mk - LOCAL_ARM_MODE := arm else ifeq ($(TARGET_ARCH_ABI),arm64-v8a) include $(CONFIG_DIR)libs-armv8-android-gcc.mk LOCAL_ARM_MODE := arm diff --git a/third_party/aom/build/make/configure.sh b/third_party/aom/build/make/configure.sh index 4ece17aee4..b18173b82e 100644 --- a/third_party/aom/build/make/configure.sh +++ b/third_party/aom/build/make/configure.sh @@ -687,9 +687,6 @@ process_common_toolchain() { aarch64*) tgt_isa=arm64 ;; - armv6*) - tgt_isa=armv6 - ;; armv7*-hardfloat* | armv7*-gnueabihf | arm-*-gnueabihf) tgt_isa=armv7 float_abi=hard @@ -898,37 +895,6 @@ process_common_toolchain() { if disabled neon && enabled neon_asm; then die "Disabling neon while keeping neon-asm is not supported" fi - case ${toolchain} in - # Apple iOS SDKs no longer support armv6 as of the version 9 - # release (coincides with release of Xcode 7). Only enable media - # when using earlier SDK releases. - *-darwin*) - if [ "$(show_darwin_sdk_major_version iphoneos)" -lt 9 ]; then - soft_enable media - else - soft_disable media - RTCD_OPTIONS="${RTCD_OPTIONS}--disable-media " - fi - ;; - *) - soft_enable media - ;; - esac - ;; - armv6) - case ${toolchain} in - *-darwin*) - if [ "$(show_darwin_sdk_major_version iphoneos)" -lt 9 ]; then - soft_enable media - else - die "Your iOS SDK does not support armv6." - fi - ;; - *) - soft_enable media - ;; - esac - ;; esac asm_conversion_cmd="cat" diff --git a/third_party/aom/build/make/rtcd.pl b/third_party/aom/build/make/rtcd.pl index 354ae51766..7add5a0366 100755 --- a/third_party/aom/build/make/rtcd.pl +++ b/third_party/aom/build/make/rtcd.pl @@ -382,12 +382,8 @@ if ($opts{arch} eq 'x86') { } close CONFIG_FILE; mips; -} elsif ($opts{arch} eq 'armv6') { - @ALL_ARCHS = filter(qw/media/); - arm; } elsif ($opts{arch} =~ /armv7\w?/) { - @ALL_ARCHS = filter(qw/media neon_asm neon/); - @REQUIRES = filter(keys %required ? keys %required : qw/media/); + @ALL_ARCHS = filter(qw/neon_asm neon/); &require(@REQUIRES); arm; } elsif ($opts{arch} eq 'armv8' || $opts{arch} eq 'arm64' ) { diff --git a/third_party/aom/build/make/version.sh b/third_party/aom/build/make/version.sh index c0eef9f580..2a7090e4de 100755 --- a/third_party/aom/build/make/version.sh +++ b/third_party/aom/build/make/version.sh @@ -28,13 +28,14 @@ if [ -e "${source_path}/.git" ]; then # Source Path is a git working copy. Check for local modifications. # Note that git submodules may have a file as .git, not a directory. export GIT_DIR="${source_path}/.git" - git_version_id=`git describe --match=v[0-9]* 2>/dev/null` + git_version_id=$(git describe --match=v[0-9]* 2>/dev/null) fi changelog_version="" for p in "${source_path}" "${source_path}/.."; do if [ -z "$git_version_id" -a -f "${p}/CHANGELOG" ]; then - changelog_version=`head -n1 "${p}/CHANGELOG" | awk '{print $2}'` + changelog_version=$(grep -m 1 " v[0-9]" "${p}/CHANGELOG" \ + | awk '{print $2}') changelog_version="${changelog_version}" break fi |