Seems to work
diff --git a/README.txt b/README.txt
index d08493c..ce0c294 100644
--- a/README.txt
+++ b/README.txt
@@ -6,6 +6,14 @@
To compare the typical performance of VP8 and H.264 in a real-time scenario.
+Short instructions:
+
+./fetch_videos.sh
+./install_software.sh
+./run_vp8_tests.sh video
+./run_h264_tests.sh video
+./draw_graphs.sh
+
Methodology:
We gathered a small set of test clips containing content that is
diff --git a/fetch_videos.sh b/fetch_videos.sh
new file mode 100755
index 0000000..00cb0ae
--- /dev/null
+++ b/fetch_videos.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Fetch and decompress the videos for the comparision test.
+#
+set -e
+
+files='
+desktop_640_360_30.yuv
+gipsrecmotion_1280_720_50.yuv
+gipsrecstat_1280_720_50.yuv
+kirland_640_480_30.yuv
+macmarcomoving_640_480_30.yuv
+macmarcostationary_640_480_30.yuv
+niklas_1280_720_30.yuv
+niklas_640_480_30.yuv
+tacomanarrows_640_480_30.yuv
+tacomasmallcameramovement_640_480_30.yuv
+thaloundeskmtg_640_480_30.yuv
+'
+
+if which wget; then
+ # Do nothing
+ true
+else
+ echo "No wget, exiting"
+ exit 1
+fi
+
+if [ ! -d video ]; then
+ mkdir video
+fi
+
+cd video
+
+for file in $files; do
+ if [ ! -f $file ]; then
+ # Remove earlier partial downloads.
+ [ -f $file.xz ] && rm $file.xz
+ wget http://downloads.webmproject.org/ietf_tests/$file.xz
+ xz -d $file.xz
+ else
+ echo "Already have $file"
+ fi
+done
+
+
diff --git a/install_software.sh b/install_software.sh
new file mode 100755
index 0000000..78954ff
--- /dev/null
+++ b/install_software.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# Install required software to run the tests.
+#
+set -e
+
+[ -d bin ] || mkdir bin
+
+sudo apt-get install ffmpeg
+sudo apt-get install x264
+sudo apt-get install python
+# Reqiurements for compiling libvpx
+sudo apt-get install yasm
+
+# Build the vpxenc and vpxdec binaries
+if [ ! -d libvpx ]; then
+ git clone http://git.chromium.org/webm/libvpx.git
+fi
+cd libvpx
+# Ensure we check out exactly a consistent version.
+git checkout master
+git checkout c129203f7e5e20f5d67f92c27c65f7d5e362aa7a
+./configure
+make vpxenc
+make vpxdec
+cp vpxenc ../bin/
+cp vpxdec ../bin/
+cd ..
+
+# Build the x264 binary
+if [ ! -d x264 ]; then
+ git clone git://git.videolan.org/x264.git
+fi
+cd x264
+git checkout 198a7ea
+./configure
+make x264
+cp x264 ../bin/
+
+# Build the psnr binary
+gcc -o bin/psnr src/psnr.c -lm
+
+
diff --git a/run_h264_tests.sh b/run_h264_tests.sh
index 6d75136..18a3e49 100755
--- a/run_h264_tests.sh
+++ b/run_h264_tests.sh
@@ -5,6 +5,10 @@
# Input Parameters:
# $1=Input directory
+if [ ! -d "$1" ]; then
+ echo "No such directory: $1"
+ exit 1
+fi
if [ ! -d encoded_clips ]; then
mkdir encoded_clips
@@ -50,7 +54,7 @@
for (( rate=rate_start; rate<=rate_end; rate+=rate_step ))
do
# Encode into ./<clip_name>_<width>_<height>_<frame_rate>_<rate>kbps.yuv
- x264 --nal-hrd cbr --vbv-maxrate ${rate} --vbv-bufsize ${rate} \
+ ./bin/x264 --nal-hrd cbr --vbv-maxrate ${rate} --vbv-bufsize ${rate} \
--vbv-init 0.8 --bitrate ${rate} --fps ${frame_rate} \
--profile baseline --no-scenecut --keyint infinite --preset veryslow \
--input-res ${width}x${height} \