[FFmpeg-cvslog] FATE: allow a tolerance in the size comparison in do_tiny_psnr()
Justin Ruggles
git at videolan.org
Sat Mar 17 05:03:27 CET 2012
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sat Mar 10 19:52:05 2012 -0500| [cffd7580bbdf29ae5b1e56af55ff21e8c85bba6c] | committer: Justin Ruggles
FATE: allow a tolerance in the size comparison in do_tiny_psnr()
This will allow for comparing decoded output to the original source when the
decoded size is not exactly the same as the original size.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cffd7580bbdf29ae5b1e56af55ff21e8c85bba6c
---
tests/Makefile | 2 +-
tests/fate-run.sh | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
index 82eb67c..4c21a6a 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -116,7 +116,7 @@ fate: $(FATE)
$(FATE): avconv$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
@echo "TEST $(@:fate-%=%)"
- $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)'
+ $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)'
fate-list:
@printf '%s\n' $(sort $(FATE))
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 07065c3..40a4fe2 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -20,6 +20,7 @@ thread_type=${10:-frame+slice}
cpuflags=${11:-all}
cmp_shift=${12:-0}
cmp_target=${13:-0}
+size_tolerance=${14:-0}
outdir="tests/data/fate"
outfile="${outdir}/${test}"
@@ -40,7 +41,8 @@ do_tiny_psnr(){
size1=$(expr "$psnr" : '.*bytes: *\([0-9]*\)')
size2=$(expr "$psnr" : '.*bytes:[ 0-9]*/ *\([0-9]*\)')
val_cmp=$(compare $val $cmp_target $fuzz)
- if [ "$val_cmp" != 0 ] || [ $size1 != $size2 ]; then
+ size_cmp=$(compare $size1 $size2 $size_tolerance)
+ if [ "$val_cmp" != 0 ] || [ "$size_cmp" != 0 ]; then
echo "$psnr"
return 1
fi
More information about the ffmpeg-cvslog
mailing list