Nightly AV1/VP9 speed tests

- An independent script for code base Git synchronization.
- A configuration/build script for VP9.
- A configuration/build script for AV1.
- Nightly test includes AV1/VP9 profile=0/2.

Change-Id: Ic16357cef9473c28206203c75da6cefe65d220a7
This commit is contained in:
Yi Luo
2017-07-25 11:46:08 -07:00
parent 782ed34be4
commit ab74651729
7 changed files with 178 additions and 123 deletions

19
scripts/av1_conf_build.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
root_dir=$1
build_dir=$root_dir/release
exp_tool=experimental
cd $build_dir
make clean > /dev/null
$script_dir/nightly_config.sh $exp_tool
make -j > /dev/null
if [ $? -ne 0 ]; then
echo "AV1 build failed on experiment: " $exp_tool
exit 1
fi
test_dir=~/Dev/nightly
cp -f ./aomenc $test_dir/.
cp -f ./aomdec $test_dir/.

View File

@@ -6,16 +6,32 @@ av1_code=~/Dev/av1d
vp9_code=~/Dev/vp9d
log_path=~/Dev/log
date_str=`date +%H:%M_%b_%d_%Y`
log_file=rep_$date_str.txt
#date_str=`date +%H:%M_%b_%d_%Y`
date_str=`date +%b_%d_%Y`
log_file=report_$date_str.txt
$script_path/nightly_speed.sh $av1_code > $log_path/$log_file 2>&1
$script_path/vp9_nightly_speed.sh $vp9_code >> $log_path/$log_file 2>&1
test_dir=~/Dev/nightly
rm $test_dir/*
# AV1
$script_path/sync_codebase.sh $av1_code/aom > $log_path/$log_file 2>&1
$script_path/av1_conf_build.sh $av1_code >> $log_path/$log_file 2>&1
$script_path/nightly_speed.sh $av1_code 0 >> $log_path/$log_file 2>&1
$script_path/nightly_speed.sh $av1_code 2 >> $log_path/$log_file 2>&1
# VP9
$script_path/sync_codebase.sh $vp9_code/libvpx >> $log_path/$log_file 2>&1
$script_path/vp9_conf_build.sh $vp9_code lowbitdepth >> $log_path/$log_file 2>&1
$script_path/vp9_nightly_speed.sh $vp9_code 0 >> $log_path/$log_file 2>&1
$script_path/vp9_conf_build.sh $vp9_code highbitdepth >> $log_path/$log_file 2>&1
$script_path/vp9_nightly_speed.sh $vp9_code 2 >> $log_path/$log_file 2>&1
users=luoyi
host_name=`hostname`
sender=luoyi
cc_list=yunqingwang
#--cc=$cc_list
#cc_list="--cc=yunqingwang"
sendgmr --to=$users --cc=$cc_list --subject="Codec Daily Report" --from=$sender --reply_to=$sender < $log_path/$log_file
sendgmr --to=$users $cc_list --subject="Codec Daily Report" --from=$sender --reply_to=$sender < $log_path/$log_file

View File

@@ -11,10 +11,29 @@
# verbose=-v
#set -x
if [ "$#" -ne 1 ]; then
root_dir=~/Dev/av1k
# LBD or HBD
# Note:
# Standard bit depth:
# 1) profile=0
# 2) bitdepth=
# High bit depth:
# 1) profile=2
# 2) bitdepth="--bit-depth=10/12"
if [ "$#" -ne 2 ]; then
root_dir=~/Dev/av1d
profile=0
else
root_dir=$1
profile=$2
fi
if [ "$profile" == "2" ]; then
bitdepth="--bit-depth=10"
fi
if [ "$profile" == "0" ]; then
bitdepth=
fi
code_dir=$root_dir/aom
@@ -22,95 +41,62 @@ build_dir=$root_dir/release
test_dir=~/Dev/nightly
script_dir=~/Dev/sandbox/libvpx/scripts
. video_sequence.sh
. $script_dir/video_sequence.sh
# General options
codec="--codec=av1"
verbose=
# LBD or HBD
# Note:
# Standard bit depth:
# 1) profile=0
# 2) remove $bitdepth in encoder command line
# 3) Change runconfig.sh, bitdepth=
# High bit depth:
# 1) profile=2
# 2) Add $bitdepth in encoder command line, e.g. bitdepth="--bit-depth=10"
# 3) Change runconfig.sh, bitdepth=--enable-highbitdepth
profile=0
core_id=1
exp_tool=experimental
for exp_tool in experimental
cd $test_dir
do
cd $code_dir
git checkout -q master
git pull -q
git log -1 --oneline
elog=av1enc_log_p_$profile.txt
dlog=av1dec_log_p_$profile.txt
bstream=av1_profile_$profile.webm
cd $build_dir
make clean > /dev/null
$script_dir/nightly_config.sh $exp_tool
make -j > /dev/null
if [ $? -ne 0 ]; then
echo Build failed on experiment: $exp_tool
fi
cp -f ./aomenc $test_dir/.
cp -f ./aomdec $test_dir/.
cd $test_dir
rm *.txt
elog=e_$exp_tool.txt
dlog=d_$exp_tool.txt
bstream="$exp_tool"_nightly_av1.webm
if [ $exp_tool == intrabc ] || [ $exp_tool == palette ] || [ $exp_tool == palette_delta_encoding ] || [ $exp_tool == palette_throughput ]; then
if [ $exp_tool == intrabc ] || [ $exp_tool == palette ] || [ $exp_tool == palette_delta_encoding ] || [ $exp_tool == palette_throughput ]; then
tune_content="--tune-content=screen"
else
else
tune_content=
fi
fi
if [ $exp_tool == ext_tile ]; then
if [ $exp_tool == ext_tile ]; then
col_num=1
else
else
col_num=0
fi
fi
taskset -c $core_id ./aomenc $verbose -o /dev/shm/"$bstream" $video $codec --limit=$frames --profile=$profile --fps=$fps $tune_content --target-bitrate=$bitrate --skip=0 -p 2 --good --cpu-used=0 --lag-in-frames=25 --min-q=0 --max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0 --maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0 --undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0 --tile-columns=$col_num --test-decode=warn --psnr &>> $elog
taskset -c $core_id ./aomenc $verbose -o /dev/shm/"$bstream" $video $codec --limit=$frames --profile=$profile $bitdepth --fps=$fps $tune_content --target-bitrate=$bitrate --skip=0 -p 2 --good --cpu-used=0 --lag-in-frames=25 --min-q=0 --max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0 --maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0 --undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0 --tile-columns=$col_num --test-decode=warn --psnr &>> $elog
# Note: $2 is the time unit, ms or us
#etime=`cat $elog | grep 'Pass 2/2' | grep 'fps)' | sed -e 's/^.*b\/s//' | awk '{print $1" "$2}'`
efps=`cat $elog | grep 'Pass 2/2' | grep 'fps)' | sed -e 's/^.*b\/s//' | awk '{print $3}'`
efps=`echo $efps | sed 's/(//'`
# Note: $2 is the time unit, ms or us
#etime=`cat $elog | grep 'Pass 2/2' | grep 'fps)' | sed -e 's/^.*b\/s//' | awk '{print $1" "$2}'`
efps=`cat $elog | grep 'Pass 2/2' | grep 'fps)' | sed -e 's/^.*b\/s//' | awk '{print $3}'`
efps=`echo $efps | sed 's/(//'`
psnr=`cat $elog | grep 'PSNR' | awk '{print $5, $6, $7, $8, $9}'`
tmp=`cat $elog | grep mismatch`
if [ "$?" -ne 0 ]; then
psnr=`cat $elog | grep 'PSNR' | awk '{print $5, $6, $7, $8, $9}'`
tmp=`cat $elog | grep mismatch`
if [ "$?" -ne 0 ]; then
eflag=e_ok
else
else
eflag=mismatch
fi
fi
echo "AV1 bitstream: " "$bstream"
echo "AV1 bitstream: " "$bstream"
taskset -c $core_id ./aomdec /dev/shm/"$bstream" $codec --i420 --noblit --summary 2>&1 &>> $dlog
if [ "$?" -ne 0 ]; then
taskset -c $core_id ./aomdec /dev/shm/"$bstream" $codec --i420 --noblit --summary 2>&1 &>> $dlog
if [ "$?" -ne 0 ]; then
dflag=fault
else
else
dflag=d_ok
fi
fi
# Note: $8 is the time unit ms or us
dfps=`awk '{print $9}' < $dlog`
dfps=`echo $dfps | sed 's/(//'`
# Note: $8 is the time unit ms or us
dfps=`awk '{print $9}' < $dlog`
dfps=`echo $dfps | sed 's/(//'`
echo -e '\t'"Enc fps Dec fps PSNR"'\t\t\t\t\t\t\t'"Enc status Dec status"
echo -e '\t'$efps" "$dfps" "$psnr'\t'$eflag" "$dflag
printf "\n"
echo -e '\t'"Enc fps Dec fps PSNR"'\t\t\t\t\t\t\t'"Enc status Dec status"
echo -e '\t'$efps" "$dfps" "$psnr'\t'$eflag" "$dflag
printf "\n"
done

8
scripts/sync_codebase.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/sh
code_dir=$1
cd $code_dir
git checkout -q master
git pull -q
git log -1 --oneline

View File

@@ -7,6 +7,13 @@
# bitrate=500
# fps="30/1"
# video=~/Dev/samples/videos/speed-set/touchdown_pass_480p.y4m
# wi=854
# he=480
# frames=30
# bitrate=2400
# fps="30000/1001"
video=~/Dev/samples/videos/speed-set/BasketballDrive_1920x1080_50.y4m
wi=1920
he=1080

30
scripts/vp9_conf_build.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
root_dir=$1
bitdepthflag=$2
build_dir=$root_dir/release
if [ "$bitdepthflag" == "highbitdepth" ]; then
build_flag=--enable-vp9-highbitdepth
else
build_flag=
fi
cd $build_dir
make clean > /dev/null
common_flag="--disable-unit-tests --disable-docs"
../libvpx/configure $common_flag $build_flag > /dev/null
make -j > /dev/null
if [ $? -ne 0 ]; then
echo "VP9 build failed"
exit 1
fi
test_dir=~/Dev/nightly
cp -f ./vpxenc $test_dir/.
cp -f ./vpxdec $test_dir/.

View File

@@ -11,10 +11,29 @@
# verbose=-v
#set -x
if [ "$#" -ne 1 ]; then
root_dir=~/Dev/av1k
# LBD or HBD
# Note:
# Standard bit depth:
# 1) profile=0
# 2) bitdepth=
# High bit depth:
# 1) profile=2
# 2) bitdepth="--bit-depth=10/12"
if [ "$#" -ne 2 ]; then
root_dir=~/Dev/vp9d
profile=0
else
root_dir=$1
profile=$2
fi
if [ "$profile" == "2" ]; then
bitdepth="--bit-depth=10"
fi
if [ "$profile" == "0" ]; then
bitdepth=
fi
code_dir=$root_dir/libvpx
@@ -22,50 +41,20 @@ build_dir=$root_dir/release
test_dir=~/Dev/nightly
script_dir=~/Dev/sandbox/libvpx/scripts
. video_sequence.sh
. $script_dir/video_sequence.sh
# General options
codec="--codec=vp9"
verbose=
# LBD or HBD
# Note:
# Standard bit depth:
# 1) profile=0
# 2) remove $bitdepth in encoder command line
# 3) Change runconfig.sh, bitdepth=
# High bit depth:
# 1) profile=2
# 2) Add $bitdepth in encoder command line, e.g. bitdepth="--bit-depth=10"
# 3) Change runconfig.sh, bitdepth=--enable-highbitdepth
profile=0
core_id=1
cd $code_dir
git checkout -q master
git pull -q
git log -1 --oneline
cd $build_dir
make clean > /dev/null
../libvpx/configure > /dev/null
make -j > /dev/null
if [ $? -ne 0 ]; then
echo "VP9 build failed"
fi
cp -f ./vpxenc $test_dir/.
cp -f ./vpxdec $test_dir/.
cd $test_dir
bstream=nightly_vp9.webm
elog=vp9enc_log.txt
dlog=vp9dec_log.txt
bstream=vp9_profile_$profile.webm
elog=vp9enc_log_p_$profile.txt
dlog=vp9dec_log_p_$profile.txt
taskset -c $core_id ./vpxenc $verbose -o /dev/shm/"$bstream" $video $codec --limit=$frames --profile=$profile --fps=$fps --target-bitrate=$bitrate --skip=0 -p 2 --good --cpu-used=0 --lag-in-frames=25 --min-q=0 --max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0 --maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0 --undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0 --test-decode=warn --psnr &>> $elog
taskset -c $core_id ./vpxenc $verbose -o /dev/shm/"$bstream" $video $codec --limit=$frames --profile=$profile $bitdepth --fps=$fps --target-bitrate=$bitrate --skip=0 -p 2 --good --cpu-used=0 --lag-in-frames=25 --min-q=0 --max-q=63 --auto-alt-ref=1 --kf-max-dist=150 --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50 --minsection-pct=0 --maxsection-pct=2000 --arnr-maxframes=7 --arnr-strength=5 --sharpness=0 --undershoot-pct=100 --overshoot-pct=100 --frame-parallel=0 --test-decode=warn --psnr &>> $elog
# Note: $2 is the time unit, ms or us
#etime=`cat $elog | grep 'Pass 2/2' | grep 'fps)' | sed -e 's/^.*b\/s//' | awk '{print $1" "$2}'`