Mercurial > hg > decimation
changeset 22:83e285b97c01
Add timings
author | Chris Cannam |
---|---|
date | Fri, 18 Oct 2013 17:44:09 +0100 |
parents | 12a0c2e493c4 |
children | 24598a8754b4 |
files | run-tests.sh |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/run-tests.sh Fri Oct 18 17:40:07 2013 +0100 +++ b/run-tests.sh Fri Oct 18 17:44:09 2013 +0100 @@ -13,7 +13,7 @@ factor="$1" infile="$2" outfile="$3" - sndfile-resample -to "$(($original/$factor))" "$infile" "$outfile" + time sndfile-resample -to "$(($original/$factor))" "$infile" "$outfile" } do_linear() { @@ -22,28 +22,28 @@ outfile="$3" echo "factor is $factor" echo "running... sndfile-resample -to $(($original/$factor)) -c 4 $infile $outfile" - sndfile-resample -to "$(($original/$factor))" -c 4 "$infile" "$outfile" + time sndfile-resample -to "$(($original/$factor))" -c 4 "$infile" "$outfile" } do_resample_hq() { factor="$1" infile="$2" outfile="$3" - "$mydir/garage-resampler/resample" --snr 100 --bandwidth 0.02 --to "$(($original/$factor))" "$infile" "$outfile" + time "$mydir/garage-resampler/resample" --snr 100 --bandwidth 0.02 --to "$(($original/$factor))" "$infile" "$outfile" } do_resample_mq() { factor="$1" infile="$2" outfile="$3" - "$mydir/garage-resampler/resample" --snr 70 --bandwidth 0.03 --to "$(($original/$factor))" "$infile" "$outfile" + time "$mydir/garage-resampler/resample" --snr 70 --bandwidth 0.03 --to "$(($original/$factor))" "$infile" "$outfile" } do_resample_lq() { factor="$1" infile="$2" outfile="$3" - "$mydir/garage-resampler/resample" --snr 50 --bandwidth 0.05 --to "$(($original/$factor))" "$infile" "$outfile" + time "$mydir/garage-resampler/resample" --snr 50 --bandwidth 0.05 --to "$(($original/$factor))" "$infile" "$outfile" } decimate_twice() { @@ -60,7 +60,7 @@ factor="$1" infile="$2" outfile="$3" - case "$factor" in + time case "$factor" in 16) decimate_twice 4 4 "$infile" "$outfile";; 32) decimate_twice 8 4 "$infile" "$outfile";; 64) decimate_twice 8 8 "$infile" "$outfile";; @@ -72,7 +72,8 @@ for f in $factors; do for impl in linear decimate resample_hq resample_mq resample_lq src; do - do_$impl "$f" "$mydir/infinitewave-testsignals/Swept_float.wav" "$mydir"/out/"$f"_"$impl".wav + echo "factor $f, impl $impl..." + do_$impl "$f" "$mydir/infinitewave-testsignals/Swept_float.wav" "$mydir"/out/"$f"_"$impl".wav > "$mydir"/out/"$f"_"$impl".log 2>&1 done done