summaryrefslogtreecommitdiff
path: root/test/stress.sh
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2017-02-24 00:30:08 -0800
committerJames Zern <jzern@google.com>2017-02-28 15:09:30 -0800
commit4684d286defc9757e10be3fc5102187f531bb98c (patch)
treeb6ad45a49ade5a919357c1919a6740a887f1284f /test/stress.sh
parent3833905ff2ee6ba57fdd8f1e03a94adf85070db2 (diff)
downloadlibvpx-4684d286defc9757e10be3fc5102187f531bb98c.tar
libvpx-4684d286defc9757e10be3fc5102187f531bb98c.tar.gz
libvpx-4684d286defc9757e10be3fc5102187f531bb98c.tar.bz2
libvpx-4684d286defc9757e10be3fc5102187f531bb98c.zip
stress.sh: add one pass encodes
Change-Id: I38e6c988f17c56fbfacd95378b27ef8d77c75f90
Diffstat (limited to 'test/stress.sh')
-rwxr-xr-xtest/stress.sh21
1 files changed, 17 insertions, 4 deletions
diff --git a/test/stress.sh b/test/stress.sh
index 952382476..c5e420828 100755
--- a/test/stress.sh
+++ b/test/stress.sh
@@ -8,8 +8,10 @@
## in the file PATENTS. All contributing project authors may
## be found in the AUTHORS file in the root of the source tree.
##
-## This file performs a stress test. It runs 5 encodes and 30 decodes in
-## parallel.
+## This file performs a stress test. It runs (STRESS_ONEPASS_MAX_JOBS,
+## default=5) one, (STRESS_TWOPASS_MAX_JOBS, default=5) two pass &
+## (STRESS_RT_MAX_JOBS, default=5) encodes and (STRESS_<codec>_DECODE_MAX_JOBS,
+## default=30) decodes in parallel.
. $(dirname $0)/tools_common.sh
@@ -77,17 +79,28 @@ stress() {
local readonly decode_count="$3"
local pids=""
local rt_max_jobs=${STRESS_RT_MAX_JOBS:-5}
+ local onepass_max_jobs=${STRESS_ONEPASS_MAX_JOBS:-5}
local twopass_max_jobs=${STRESS_TWOPASS_MAX_JOBS:-5}
# Enable job control, so we can run multiple processes.
set -m
+ # Start $onepass_max_jobs encode jobs in parallel.
+ for i in $(seq ${onepass_max_jobs}); do
+ bitrate=$(($i * 20 + 300))
+ eval "${VPX_TEST_PREFIX}" "${encoder}" "--codec=${codec} -w 1280 -h 720" \
+ "${YUV}" "-t 4 --limit=150 --test-decode=fatal --passes=1" \
+ "--target-bitrate=${bitrate} -o ${VPX_TEST_OUTPUT_DIR}/${i}.1pass.webm" \
+ ${devnull} &
+ pids="${pids} $!"
+ done
+
# Start $twopass_max_jobs encode jobs in parallel.
for i in $(seq ${twopass_max_jobs}); do
bitrate=$(($i * 20 + 300))
eval "${VPX_TEST_PREFIX}" "${encoder}" "--codec=${codec} -w 1280 -h 720" \
- "${YUV}" "-t 4 --limit=150 --test-decode=fatal " \
- "--target-bitrate=${bitrate} -o ${VPX_TEST_OUTPUT_DIR}/${i}.webm" \
+ "${YUV}" "-t 4 --limit=150 --test-decode=fatal --passes=2" \
+ "--target-bitrate=${bitrate} -o ${VPX_TEST_OUTPUT_DIR}/${i}.2pass.webm" \
${devnull} &
pids="${pids} $!"
done