diff options
author | Mans Rullgard <mans@mansr.com> | 2012-05-17 22:14:17 +0400 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-05-29 11:27:19 +0400 |
commit | 47b5996bb018e15bde6b6af9b5c849961b4bf845 (patch) | |
tree | dfdf41360d82a998060442aa258df7f2be6680b3 /tests/fate-run.sh | |
parent | 7e5880e0cb041d0f1362bddd75130471ffc811ce (diff) |
fate: allow tests to specify unit size for psnr comparison
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-x | tests/fate-run.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/fate-run.sh b/tests/fate-run.sh index a933fa1ab7..2114490498 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -21,6 +21,7 @@ cpuflags=${11:-all} cmp_shift=${12:-0} cmp_target=${13:-0} size_tolerance=${14:-0} +cmp_unit=${15:-2} outdir="tests/data/fate" outfile="${outdir}/${test}" @@ -40,7 +41,7 @@ compare(){ } do_tiny_psnr(){ - psnr=$(tests/tiny_psnr "$1" "$2" 2 $cmp_shift 0) + psnr=$(tests/tiny_psnr "$1" "$2" $cmp_unit $cmp_shift 0) val=$(expr "$psnr" : ".*$3: *\([0-9.]*\)") size1=$(expr "$psnr" : '.*bytes: *\([0-9]*\)') size2=$(expr "$psnr" : '.*bytes:[ 0-9]*/ *\([0-9]*\)') |