[FFmpeg-cvslog] FATE: allow tests to set CMP_SHIFT to pass to 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 18:53:19 2012 -0500| [5ecadc662042f3d005a1a01618f448c9b1c44afc] | committer: Justin Ruggles

FATE: allow tests to set CMP_SHIFT to pass to tiny_psnr

This will allow adjusting for any encoder or decoder delay when doing
comparisons.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ecadc662042f3d005a1a01618f448c9b1c44afc
---

 tests/Makefile    |    2 +-
 tests/fate-run.sh |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index 5c65237..760915a 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)'
+	$(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)'
 
 fate-list:
 	@printf '%s\n' $(sort $(FATE))
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 419a3eb..94d7cf8 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -18,6 +18,7 @@ fuzz=${8:-1}
 threads=${9:-1}
 thread_type=${10:-frame+slice}
 cpuflags=${11:-all}
+cmp_shift=${12:-0}
 
 outdir="tests/data/fate"
 outfile="${outdir}/${test}"
@@ -26,7 +27,7 @@ cmpfile="${outdir}/${test}.diff"
 repfile="${outdir}/${test}.rep"
 
 do_tiny_psnr(){
-    psnr=$(tests/tiny_psnr "$1" "$2" 2 0 0)
+    psnr=$(tests/tiny_psnr "$1" "$2" 2 $cmp_shift 0)
     val=$(expr "$psnr" : ".*$3: *\([0-9.]*\)")
     size1=$(expr "$psnr" : '.*bytes: *\([0-9]*\)')
     size2=$(expr "$psnr" : '.*bytes:[ 0-9]*/ *\([0-9]*\)')



More information about the ffmpeg-cvslog mailing list