Skip to content

Commit b024c61

Browse files
youennfphiln
authored andcommitted
Update libaom up to M115
https://bugs.webkit.org/show_bug.cgi?id=257959 rdar://problem/110645667 Reviewed by Eric Carlson. * Source/ThirdParty/libwebrtc/Source/third_party/libaom: Resynced. * Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj: Update list of files to compile Canonical link: https://commits.webkit.org/265114@main
1 parent 39e70dd commit b024c61

628 files changed

Lines changed: 96932 additions & 149799 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Source/ThirdParty/libwebrtc/Source/third_party/libaom/BUILD.gn

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2014 The Chromium Authors. All rights reserved.
1+
# Copyright 2014 The Chromium Authors
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

@@ -36,6 +36,10 @@ if (current_cpu == "x86") {
3636
} else {
3737
cpu_arch_full = "arm"
3838
}
39+
} else if (current_cpu == "riscv64") {
40+
cpu_arch_full = "generic"
41+
} else if (current_cpu == "loong64") {
42+
cpu_arch_full = "generic"
3943
} else {
4044
cpu_arch_full = current_cpu
4145
}
@@ -197,9 +201,7 @@ if (current_cpu == "arm64" || cpu_arch_full == "arm-neon" ||
197201
}
198202
configs += [ ":libaom_config" ]
199203

200-
# https://bugs.chromium.org/p/aomedia/issues/detail?id=2294
201-
sources = [ "//third_party/libaom/source/libaom/aom_ports/arm_cpudetect.c" ]
202-
sources += aom_av1_common_intrin_neon
204+
sources = aom_av1_common_intrin_neon
203205
sources += aom_dsp_common_intrin_neon
204206
sources += aom_av1_encoder_intrin_neon
205207
sources += aom_dsp_encoder_intrin_neon
@@ -226,7 +228,7 @@ static_library("libaom") {
226228
sources += aom_util_sources
227229
sources += aom_av1_encoder_sources
228230
sources += aom_dsp_encoder_sources
229-
if (use_libfuzzer) {
231+
if (use_fuzzing_engine) {
230232
# Note this is inherited from OSS-Fuzz where the fuzzers were being run
231233
# with a 2 GB total allocation limit.
232234
if (is_msan) {
@@ -256,13 +258,36 @@ static_library("libaom") {
256258
cpu_arch_full == "arm-neon-cpu-detect") {
257259
deps += [ ":libaom_intrinsics_neon" ]
258260
}
261+
if (current_cpu == "arm64" || current_cpu == "arm") {
262+
# This is needed by all arm boards due to aom_arm_cpu_caps()
263+
sources +=
264+
[ "//third_party/libaom/source/libaom/aom_ports/arm_cpudetect.c" ]
265+
}
259266
if (is_android) {
260267
deps += [ "//third_party/android_ndk:cpu_features" ]
261268
}
262269
public_configs = [ ":libaom_external_config" ]
263270
public_deps = [ ":libaom_buildflags" ]
264271
}
265272

273+
static_library("libaomrc") {
274+
if (!is_debug && is_win) {
275+
configs -= [ "//build/config/compiler:default_optimization" ]
276+
configs += [ "//build/config/compiler:optimize_max" ]
277+
}
278+
279+
sources = [
280+
"//third_party/libaom/source/libaom/av1/ratectrl_rtc.cc",
281+
"//third_party/libaom/source/libaom/av1/ratectrl_rtc.h",
282+
]
283+
configs -= [ "//build/config/compiler:chromium_code" ]
284+
configs += [ "//build/config/compiler:no_chromium_code" ]
285+
configs += [ ":libaom_config" ]
286+
287+
public_configs = [ ":libaom_external_config" ]
288+
public_deps = [ ":libaom" ]
289+
}
290+
266291
fuzzer_test("libaom_av1_dec_fuzzer") {
267292
sources = [ "source/libaom/examples/av1_dec_fuzzer.cc" ]
268293
seed_corpus = "fuzz/av1_dec_fuzzer_corpus"
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
tomfinegan@chromium.org
2-
johannkoenig@google.com
1+
# Primary OWNERS
32
jzern@chromium.org
43
jzern@google.com
54
wtc@google.com

Source/ThirdParty/libwebrtc/Source/third_party/libaom/README.chromium

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Name: Alliance for Open Media Video Codec
22
Short Name: libaom
33
URL: https://aomedia.googlesource.com/aom/
4-
Version: 3.4.0
5-
Date: Sunday August 07 2022
6-
Revision: 121f3851459d5ee2ca1b5b23c6187bda79984eb2
7-
CPEPrefix: cpe:/a:aomedia:aomedia:3.4.0
4+
Version: 0
5+
Date: Wednesday May 10 2023
6+
Revision: 5f516275fb8761562bd877f2a8f185cd76c2a274
7+
CPEPrefix: cpe:/a:aomedia:aomedia:3.6.0
88
License: BSD
99
License File: source/libaom/LICENSE
1010
Security Critical: yes
@@ -25,6 +25,16 @@ Please follow these steps to update libaom source code:
2525

2626
Use the generated commit message for the roll.
2727

28+
Note: When running roll_dep.py on a Chrome release branch, we get the
29+
error message:
30+
error: Ensure chromium/src is clean first (no non-merged commits).
31+
32+
because the is_prestine() function in roll_dep.py runs git diff against
33+
origin/main. A workaround is to edit roll_dep.py and change
34+
'origin/main' to the release branch, e.g., 'branch-heads/5414' for the
35+
Chrome M109 release branch. Remember to change it back to 'origin/main'
36+
after running roll_dep.py.
37+
2838
2. Generate the config files:
2939
# See prerequisites in file comments.
3040
./cmake_update.sh

Source/ThirdParty/libwebrtc/Source/third_party/libaom/cmake_update.sh

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
#
3-
# Copyright (c) 2018 The Chromium Authors. All rights reserved.
3+
# Copyright 2018 The Chromium Authors
44
# Use of this source code is governed by a BSD-style license that can be
55
# found in the LICENSE file.
66

@@ -22,8 +22,8 @@
2222
# - gcc-aarch64-linux-gnu
2323
# - g++-aarch64-linux-gnu
2424
# 32bit build environment for cmake. Including but potentially not limited to:
25-
# - lib32gcc-11-dev
26-
# - lib32stdc++-11-dev
25+
# - lib32gcc-12-dev
26+
# - lib32stdc++-12-dev
2727
# Alternatively: treat 32bit builds like Windows and manually tweak aom_config.h
2828

2929
set -eE
@@ -35,13 +35,13 @@ BASE=$(pwd)
3535
SRC="${BASE}/source/libaom"
3636
CFG="${BASE}/source/config"
3737

38-
function clean {
38+
function cleanup() {
3939
rm -rf "${TMP}"
4040
}
4141

4242
# Create empty temp and config directories.
4343
# $1 - Header file directory.
44-
function reset_dirs {
44+
function reset_dirs() {
4545
cd ..
4646
rm -rf "${TMP}"
4747
mkdir "${TMP}"
@@ -52,7 +52,7 @@ function reset_dirs {
5252
mkdir -p "${CFG}/${1}/config"
5353
}
5454

55-
if [ $# -ne 0 ]; then
55+
if [[ $# -ne 0 ]]; then
5656
echo "Unknown option(s): ${@}"
5757
exit 1
5858
fi
@@ -64,13 +64,13 @@ fi
6464
# Generate Config files.
6565
# $1 - Header file directory.
6666
# $2 - cmake options.
67-
function gen_config_files {
67+
function gen_config_files() {
6868
cmake "${SRC}" ${2} &> cmake.txt
6969

7070
case "${1}" in
7171
*x64*|*ia32*)
72-
egrep "#define [A-Z0-9_]+ [01]" config/aom_config.h | \
73-
awk '{print "%define " $2 " " $3}' > config/aom_config.asm
72+
egrep "#define [A-Z0-9_]+ [01]" config/aom_config.h \
73+
| awk '{print "%define " $2 " " $3}' > config/aom_config.asm
7474
;;
7575
esac
7676

@@ -79,7 +79,7 @@ function gen_config_files {
7979
cp config/*_rtcd.h "${CFG}/${1}/config/"
8080
}
8181

82-
function update_readme {
82+
function update_readme() {
8383
local IFS=$'\n'
8484
# Split git log output '<date>\n<commit hash>' on the newline to produce 2
8585
# array entries.
@@ -102,7 +102,7 @@ EOF
102102
# generate VS project files on linux.
103103
#
104104
# $1 - File to modify.
105-
function convert_to_windows {
105+
function convert_to_windows() {
106106
sed -i.bak \
107107
-e 's/\(#define[[:space:]]INLINE[[:space:]]*\)inline/\1 __inline/' \
108108
-e 's/\(#define[[:space:]]HAVE_PTHREAD_H[[:space:]]*\)1/\1 0/' \
@@ -119,7 +119,7 @@ TMP=$(mktemp -d "${BASE}/build.XXXX")
119119
cd "${TMP}"
120120

121121
trap '{
122-
[ -f ${TMP}/cmake.txt ] && cat ${TMP}/cmake.txt
122+
[[ -f ${TMP}/cmake.txt ]] && cat ${TMP}/cmake.txt
123123
echo "Build directory ${TMP} not removed automatically."
124124
}' ERR
125125

@@ -159,35 +159,47 @@ gen_config_files linux/x64 "${all_platforms}"
159159
reset_dirs win/ia32
160160
cp "${CFG}/linux/ia32/config"/* "${CFG}/win/ia32/config/"
161161
convert_to_windows "${CFG}/win/ia32/config/aom_config.h"
162-
egrep "#define [A-Z0-9_]+[[:space:]]+[01]" "${CFG}/win/ia32/config/aom_config.h" \
162+
egrep \
163+
"#define [A-Z0-9_]+[[:space:]]+[01]" "${CFG}/win/ia32/config/aom_config.h" \
163164
| awk '{print "%define " $2 " " $3}' > "${CFG}/win/ia32/config/aom_config.asm"
164165

165166
# Copy linux configurations and modify for Windows.
166167
reset_dirs win/x64
167168
cp "${CFG}/linux/x64/config"/* "${CFG}/win/x64/config/"
168169
convert_to_windows "${CFG}/win/x64/config/aom_config.h"
169-
egrep "#define [A-Z0-9_]+[[:space:]]+[01]" "${CFG}/win/x64/config/aom_config.h" \
170+
egrep \
171+
"#define [A-Z0-9_]+[[:space:]]+[01]" "${CFG}/win/x64/config/aom_config.h" \
170172
| awk '{print "%define " $2 " " $3}' > "${CFG}/win/x64/config/aom_config.asm"
171173

172174
reset_dirs linux/arm
173175
gen_config_files linux/arm \
174176
"${toolchain}/armv7-linux-gcc.cmake -DENABLE_NEON=0 ${all_platforms}"
175177

176178
reset_dirs linux/arm-neon
177-
gen_config_files linux/arm-neon "${toolchain}/armv7-linux-gcc.cmake ${all_platforms}"
179+
gen_config_files linux/arm-neon \
180+
"${toolchain}/armv7-linux-gcc.cmake ${all_platforms}"
178181

179182
reset_dirs linux/arm-neon-cpu-detect
180183
gen_config_files linux/arm-neon-cpu-detect \
181-
"${toolchain}/armv7-linux-gcc.cmake -DCONFIG_RUNTIME_CPU_DETECT=1 ${all_platforms}"
184+
"${toolchain}/armv7-linux-gcc.cmake -DCONFIG_RUNTIME_CPU_DETECT=1 \
185+
${all_platforms}"
182186

183187
reset_dirs linux/arm64
184-
gen_config_files linux/arm64 "${toolchain}/arm64-linux-gcc.cmake ${all_platforms}"
188+
gen_config_files linux/arm64 \
189+
"${toolchain}/arm64-linux-gcc.cmake ${all_platforms}"
185190

191+
# CMAKE_INSTALL_NAME_TOOL is set to a non-empty/true value to allow this
192+
# configuration to complete on platforms without `install_name`. The build
193+
# commands are not invoked so the value doesn't matter.
186194
reset_dirs ios/arm-neon
187-
gen_config_files ios/arm-neon "${toolchain}/armv7-ios.cmake ${all_platforms}"
195+
gen_config_files ios/arm-neon \
196+
"${toolchain}/armv7-ios.cmake -DCMAKE_INSTALL_NAME_TOOL=no-such-command \
197+
${all_platforms}"
188198

189199
reset_dirs ios/arm64
190-
gen_config_files ios/arm64 "${toolchain}/arm64-ios.cmake ${all_platforms}"
200+
gen_config_files ios/arm64 \
201+
"${toolchain}/arm64-ios.cmake -DCMAKE_INSTALL_NAME_TOOL=no-such-command \
202+
${all_platforms}"
191203

192204
# Copy linux configurations and modify for Windows.
193205
reset_dirs win/arm64
@@ -200,4 +212,4 @@ update_readme
200212
git cl format > /dev/null \
201213
|| echo "ERROR: 'git cl format' failed. Please run 'git cl format' manually."
202214

203-
clean
215+
cleanup

0 commit comments

Comments
 (0)