]> granicus.if.org Git - libvpx/commitdiff
Add nightly decoder speed test
authorYi Luo <luoyi@google.com>
Thu, 20 Jul 2017 21:44:52 +0000 (14:44 -0700)
committerYi Luo <luoyi@google.com>
Thu, 20 Jul 2017 21:44:52 +0000 (14:44 -0700)
Change-Id: I8d6df2f6d9f7b1a69b7888b9a9fe063db0e0b757

scripts/nightly_config.sh [new file with mode: 0755]
scripts/nightly_speed.sh [new file with mode: 0755]

diff --git a/scripts/nightly_config.sh b/scripts/nightly_config.sh
new file mode 100755 (executable)
index 0000000..b756d4a
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+platform=x86_64-linux-gcc
+codec=--enable-av1
+libsrc=aom
+
+common="--disable-unit-tests --disable-docs --enable-experimental"
+
+disabled="--disable-chroma_sub8x8 --disable-filter_7bit --disable-reference_buffer
+ --disable-delta_q --disable-tile_groups --disable-rect_tx --disable-global_motion --disable-ext_tx --disable-cdef --disable-ext_intra --disable-mv_compress --disable-ext_refs --disable-dual_filter --disable-motion_var --disable-warped_motion --disable-ext_delta_q --disable-loopfiltering_across_tiles --disable-ec_smallmul --disable-var_tx --disable-ext_inter --disable-wedge --disable-compound_segment --disable-interintra --disable-one_sided_compound --disable-smooth_hv --disable-parallel_deblocking --disable-palette --disable-alt_intra --disable-palette_throughput --disable-tempmv_signaling"
+
+../$libsrc/configure $common $disabled $tool > /dev/null
diff --git a/scripts/nightly_speed.sh b/scripts/nightly_speed.sh
new file mode 100755 (executable)
index 0000000..2ef497e
--- /dev/null
@@ -0,0 +1,118 @@
+#!/bin/sh
+# File:
+#  list_exp_speed.sh
+# Decription:
+#  Configure, build, and run encoder/decoder for each experimental tool.
+#  Display the encoder/decode run time
+# Preassumption:
+#  1) Assume all script files are in ~/Dev/sandbox/libvpx/scripts
+# Note:
+#  See encoder config output if set,
+#  verbose=-v
+#set -x
+
+if [ "$#" -ne 1 ]; then
+  root_dir=~/Dev/av1k
+else
+  root_dir=$1
+fi
+
+code_dir=$root_dir/aom
+build_dir=$root_dir/release
+test_dir=~/Dev/nightly
+script_dir=~/Dev/sandbox/libvpx/scripts
+
+# video=~/Dev/samples/videos/yaowu/soccer_cif.y4m
+# wi=352
+# he=288
+# frames=5
+# bitrate=500
+# fps="30/1"
+
+video=~/Dev/samples/videos/speed-set/BasketballDrive_1920x1080_50.y4m
+wi=1920
+he=1080
+frames=150
+bitrate=4000
+fps="50/1"
+
+# General options
+bs=bs
+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
+
+for exp_tool in experimental
+
+do
+  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
+  bs=$exp_tool_nightly.webm
+  
+  if [ $exp_tool == intrabc ] || [ $exp_tool == palette ] || [ $exp_tool == palette_delta_encoding ] || [ $exp_tool == palette_throughput ]; then
+    tune_content="--tune-content=screen"
+  else
+    tune_content=
+  fi
+
+  if [ $exp_tool == ext_tile ]; then
+    col_num=1
+  else
+    col_num=0
+  fi
+  
+  taskset -c $core_id ./aomenc $verbose -o /dev/shm/$bs $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
+
+  # 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}'`
+  
+  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
+    eflag=mismatch
+  fi
+  
+  taskset -c $core_id ./aomdec /dev/shm/$bs $codec --i420 --noblit --summary 2>&1 &>> $dlog
+  if [ "$?" -ne 0 ]; then
+    dflag=fault
+  else
+    dflag=d_ok
+  fi
+
+  # Note: $8 is the time unit ms or us
+  dtime=`awk '{print $7" "$8}' < $dlog`
+  
+  echo -e $exp_tool '\t'$etime'\t'$dtime'\t'$psnr'\t'$eflag'\t'$dflag
+
+done
+