From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- third_party/dav1d/tests/dav1d_argon.bash | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'third_party/dav1d/tests/dav1d_argon.bash') 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" -- cgit v1.2.3