summaryrefslogtreecommitdiffstats
path: root/third_party/aom/build
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-19 23:00:02 -0500
committertrav90 <travawine@palemoon.org>2018-10-19 23:00:02 -0500
commitb8df135c97a854c2ff9b4394b016649c601177fa (patch)
tree802b7de5ad245f1a12adbcef835ab0d0687c1bf8 /third_party/aom/build
parenta4d3c59dcac642f6b9557dc09b60eda40b517630 (diff)
downloadUXP-b8df135c97a854c2ff9b4394b016649c601177fa.tar
UXP-b8df135c97a854c2ff9b4394b016649c601177fa.tar.gz
UXP-b8df135c97a854c2ff9b4394b016649c601177fa.tar.lz
UXP-b8df135c97a854c2ff9b4394b016649c601177fa.tar.xz
UXP-b8df135c97a854c2ff9b4394b016649c601177fa.zip
Update libaom to rev b25610052a1398032320008d69b51d2da94f5928
Diffstat (limited to 'third_party/aom/build')
-rw-r--r--third_party/aom/build/cmake/aom_config_defaults.cmake1
-rw-r--r--third_party/aom/build/cmake/aom_configure.cmake26
-rw-r--r--third_party/aom/build/cmake/aom_optimization.cmake20
-rw-r--r--third_party/aom/build/cmake/cpu.cmake6
-rw-r--r--third_party/aom/build/cmake/generate_aom_config_templates.cmake10
-rwxr-xr-xthird_party/aom/build/make/iosbuild.sh2
-rwxr-xr-xthird_party/aom/build/make/rtcd.pl30
7 files changed, 32 insertions, 63 deletions
diff --git a/third_party/aom/build/cmake/aom_config_defaults.cmake b/third_party/aom/build/cmake/aom_config_defaults.cmake
index c7252f064..19af5c43b 100644
--- a/third_party/aom/build/cmake/aom_config_defaults.cmake
+++ b/third_party/aom/build/cmake/aom_config_defaults.cmake
@@ -76,6 +76,7 @@ set(CONFIG_MISMATCH_DEBUG 0 CACHE NUMBER "Mismatch debugging flag.")
set(CONFIG_ACCOUNTING 0 CACHE NUMBER "Enables bit accounting.")
set(CONFIG_ANALYZER 0 CACHE NUMBER "Enables bit stream analyzer.")
set(CONFIG_COEFFICIENT_RANGE_CHECKING 0 CACHE NUMBER "Coefficient range check.")
+set(CONFIG_DENOISE 0 CACHE NUMBER "Denoise/noise modeling support in encoder.")
set(CONFIG_FILEOPTIONS 1 CACHE NUMBER "Enables encoder config file support.")
set(CONFIG_INSPECTION 0 CACHE NUMBER "Enables bitstream inspection.")
set(CONFIG_INTERNAL_STATS 0 CACHE NUMBER "Enables internal encoder stats.")
diff --git a/third_party/aom/build/cmake/aom_configure.cmake b/third_party/aom/build/cmake/aom_configure.cmake
index 5d782aaf9..a12389778 100644
--- a/third_party/aom/build/cmake/aom_configure.cmake
+++ b/third_party/aom/build/cmake/aom_configure.cmake
@@ -40,14 +40,6 @@ include("${AOM_ROOT}/build/cmake/compiler_flags.cmake")
include("${AOM_ROOT}/build/cmake/compiler_tests.cmake")
include("${AOM_ROOT}/build/cmake/util.cmake")
-# Build a list of all configurable variables.
-get_cmake_property(cmake_cache_vars CACHE_VARIABLES)
-foreach(var ${cmake_cache_vars})
- if("${var}" MATCHES "^CONFIG_")
- list(APPEND AOM_CONFIG_VARS ${var})
- endif()
-endforeach()
-
# Detect target CPU.
if(NOT AOM_TARGET_CPU)
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64" OR
@@ -269,7 +261,7 @@ else()
add_compiler_flag_if_supported("-Wlogical-op")
add_compiler_flag_if_supported("-Wpointer-arith")
add_compiler_flag_if_supported("-Wsign-compare")
- add_compiler_flag_if_supported("-Wstack-usage=320000")
+ add_compiler_flag_if_supported("-Wstack-usage=360000")
add_compiler_flag_if_supported("-Wstring-conversion")
add_compiler_flag_if_supported("-Wtype-limits")
add_compiler_flag_if_supported("-Wuninitialized")
@@ -334,9 +326,6 @@ if(NOT PERL_FOUND)
message(FATAL_ERROR "Perl is required to build libaom.")
endif()
-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"
"${AOM_ROOT}/aom_scale/aom_scale_rtcd.pl"
"${AOM_ROOT}/av1/common/av1_rtcd_defs.pl")
@@ -355,13 +344,12 @@ foreach(NUM RANGE ${AOM_RTCD_CUSTOM_COMMAND_COUNT})
list(GET AOM_RTCD_HEADER_FILE_LIST ${NUM} AOM_RTCD_HEADER_FILE)
list(GET AOM_RTCD_SOURCE_FILE_LIST ${NUM} AOM_RTCD_SOURCE_FILE)
list(GET AOM_RTCD_SYMBOL_LIST ${NUM} AOM_RTCD_SYMBOL)
- execute_process(
- COMMAND ${PERL_EXECUTABLE} "${AOM_ROOT}/build/make/rtcd.pl"
- --arch=${AOM_TARGET_CPU}
- --sym=${AOM_RTCD_SYMBOL} ${AOM_RTCD_FLAGS}
- --config=${AOM_CONFIG_DIR}/${AOM_TARGET_CPU}_rtcd_config.rtcd
- ${AOM_RTCD_CONFIG_FILE}
- OUTPUT_FILE ${AOM_RTCD_HEADER_FILE})
+ execute_process(COMMAND ${PERL_EXECUTABLE} "${AOM_ROOT}/build/make/rtcd.pl"
+ --arch=${AOM_TARGET_CPU}
+ --sym=${AOM_RTCD_SYMBOL} ${AOM_RTCD_FLAGS}
+ --config=${AOM_CONFIG_DIR}/config/aom_config.h
+ ${AOM_RTCD_CONFIG_FILE}
+ OUTPUT_FILE ${AOM_RTCD_HEADER_FILE})
endforeach()
# Generate aom_version.h.
diff --git a/third_party/aom/build/cmake/aom_optimization.cmake b/third_party/aom/build/cmake/aom_optimization.cmake
index 069ea1bb9..ce3dc0340 100644
--- a/third_party/aom/build/cmake/aom_optimization.cmake
+++ b/third_party/aom/build/cmake/aom_optimization.cmake
@@ -197,16 +197,16 @@ endfunction()
# include file, $source is the C source file, and $symbol is used for the symbol
# argument passed to rtcd.pl.
function(add_rtcd_build_step config output source symbol)
- add_custom_command(
- OUTPUT ${output}
- COMMAND ${PERL_EXECUTABLE} ARGS "${AOM_ROOT}/build/make/rtcd.pl"
- --arch=${AOM_TARGET_CPU}
- --sym=${symbol} ${AOM_RTCD_FLAGS}
- --config=${AOM_CONFIG_DIR}/${AOM_TARGET_CPU}_rtcd_config.rtcd
- ${config} > ${output}
- DEPENDS ${config}
- COMMENT "Generating ${output}"
- WORKING_DIRECTORY ${AOM_CONFIG_DIR} VERBATIM)
+ add_custom_command(OUTPUT ${output}
+ COMMAND ${PERL_EXECUTABLE} ARGS
+ "${AOM_ROOT}/build/make/rtcd.pl"
+ --arch=${AOM_TARGET_CPU}
+ --sym=${symbol} ${AOM_RTCD_FLAGS}
+ --config=${AOM_CONFIG_DIR}/config/aom_config.h
+ ${config} > ${output}
+ DEPENDS ${config}
+ COMMENT "Generating ${output}"
+ WORKING_DIRECTORY ${AOM_CONFIG_DIR} VERBATIM)
set_property(SOURCE ${source} PROPERTY OBJECT_DEPENDS ${output})
set_property(SOURCE ${output} PROPERTY GENERATED)
endfunction()
diff --git a/third_party/aom/build/cmake/cpu.cmake b/third_party/aom/build/cmake/cpu.cmake
index 6f866d04d..6e8089e63 100644
--- a/third_party/aom/build/cmake/cpu.cmake
+++ b/third_party/aom/build/cmake/cpu.cmake
@@ -91,9 +91,3 @@ elseif("${AOM_TARGET_CPU}" MATCHES "^x86")
endif()
endforeach()
endif()
-
-foreach(config_var ${AOM_CONFIG_VARS})
- if(${${config_var}})
- set(RTCD_${config_var} yes)
- endif()
-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 6ea02295c..8fbb4737b 100644
--- a/third_party/aom/build/cmake/generate_aom_config_templates.cmake
+++ b/third_party/aom/build/cmake/generate_aom_config_templates.cmake
@@ -98,13 +98,3 @@ foreach(cache_var ${cmake_cache_vars})
"${cache_var} equ \${${cache_var}}\n")
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")
- file(APPEND "${aom_rtcd_config_template}"
- "${cache_var}=\${RTCD_${cache_var}}\n")
- endif()
-endforeach()
-
diff --git a/third_party/aom/build/make/iosbuild.sh b/third_party/aom/build/make/iosbuild.sh
index 75f0b1b08..167ece200 100755
--- a/third_party/aom/build/make/iosbuild.sh
+++ b/third_party/aom/build/make/iosbuild.sh
@@ -245,7 +245,7 @@ build_framework() {
# Trap function. Cleans up the subtree used to build all targets contained in
# $TARGETS.
cleanup() {
- local readonly res=$?
+ local res=$?
cd "${ORIG_PWD}"
if [ $res -ne 0 ]; then
diff --git a/third_party/aom/build/make/rtcd.pl b/third_party/aom/build/make/rtcd.pl
index 8d8be25c0..b849a1eba 100755
--- a/third_party/aom/build/make/rtcd.pl
+++ b/third_party/aom/build/make/rtcd.pl
@@ -58,11 +58,15 @@ open CONFIG_FILE, $opts{config} or
my %config = ();
while (<CONFIG_FILE>) {
- next if !/^(?:CONFIG_|HAVE_)/;
+ next if !/^#define\s+(?:CONFIG_|HAVE_)/;
chomp;
- s/\r$//;
- my @pair = split /=/;
- $config{$pair[0]} = $pair[1];
+ my @line_components = split /\s/;
+ scalar @line_components > 2 or
+ die "Invalid input passed to rtcd.pl via $opts{config}.";
+ # $line_components[0] = #define
+ # $line_components[1] = flag name (CONFIG_SOMETHING or HAVE_SOMETHING)
+ # $line_components[2] = flag value (0 or 1)
+ $config{$line_components[1]} = "$line_components[2]" eq "1" ? "yes" : "";
}
close CONFIG_FILE;
@@ -415,19 +419,11 @@ if ($opts{arch} eq 'x86') {
x86;
} elsif ($opts{arch} eq 'mips32' || $opts{arch} eq 'mips64') {
@ALL_ARCHS = filter("$opts{arch}");
- open CONFIG_FILE, $opts{config} or
- die "Error opening config file '$opts{config}': $!\n";
- while (<CONFIG_FILE>) {
- if (/HAVE_DSPR2=yes/) {
- @ALL_ARCHS = filter("$opts{arch}", qw/dspr2/);
- last;
- }
- if (/HAVE_MSA=yes/) {
- @ALL_ARCHS = filter("$opts{arch}", qw/msa/);
- last;
- }
+ if (aom_config("HAVE_DSPR2") eq "yes") {
+ @ALL_ARCHS = filter("$opts{arch}", qw/dspr2/);
+ } elsif (aom_config("HAVE_MSA") eq "yes") {
+ @ALL_ARCHS = filter("$opts{arch}", qw/msa/);
}
- close CONFIG_FILE;
mips;
} elsif ($opts{arch} =~ /armv7\w?/) {
@ALL_ARCHS = filter(qw/neon/);
@@ -466,4 +462,4 @@ Options:
--disable-EXT Disable support for EXT extensions
--require-EXT Require support for EXT extensions
--sym=SYMBOL Unique symbol to use for RTCD initialization function
- --config=FILE File with CONFIG_FOO=yes lines to parse
+ --config=FILE Path to file containing C preprocessor directives to parse