diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:33 +0000 |
commit | 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch) | |
tree | a4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /third_party/dav1d/tests | |
parent | Adding debian version 124.0.1-1. (diff) | |
download | firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/dav1d/tests')
-rwxr-xr-x | third_party/dav1d/tests/dav1d_argon.bash | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/third_party/dav1d/tests/dav1d_argon.bash b/third_party/dav1d/tests/dav1d_argon.bash index 27a8d61911..954dad8d2d 100755 --- a/third_party/dav1d/tests/dav1d_argon.bash +++ b/third_party/dav1d/tests/dav1d_argon.bash @@ -4,8 +4,8 @@ DAV1D="tools/dav1d" ARGON_DIR='.' FILMGRAIN=1 CPUMASK=-1 -THREADS=0 -JOBS=1 +THREADS=1 +JOBS=0 usage() { NAME=$(basename "$0") @@ -19,8 +19,8 @@ usage() { printf " -a dir path to argon dir (default: 'tests/argon' if found; '.' otherwise)\n" printf " -g \$num enable filmgrain (default: 1)\n" printf " -c \$mask use restricted cpumask (default: -1)\n" - printf " -t \$num number of threads per dav1d (default: 0)\n" - printf " -j \$num number of parallel dav1d processes (default: 1)\n\n" + printf " -t \$num number of threads per dav1d (default: 1)\n" + printf " -j \$num number of parallel dav1d processes (default: 0)\n\n" } >&2 exit 1 } @@ -110,6 +110,14 @@ while getopts ":d:a:g:c:t:j:" opt; do done shift $((OPTIND-1)) +if [ "$JOBS" -eq 0 ]; then + if [ "$THREADS" -gt 0 ]; then + JOBS="$((($( (nproc || sysctl -n hw.logicalcpu || getconf _NPROCESSORS_ONLN || echo 1) 2>/dev/null)+THREADS-1)/THREADS))" + else + JOBS=1 + fi +fi + if [ "$#" -eq 0 ]; then # Everything except large scale tiles and stress files. dirs=("$ARGON_DIR/profile0_core" "$ARGON_DIR/profile0_core_special" |