From 90e5b58a53d863a43a86eea81295097dae13b25a Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sat, 10 Mar 2012 16:37:41 -0500 Subject: [PATCH] FATE: add capability for audio encode/decode tests with fuzzy psnr comparison This allows for testing floating-point audio encoders across different platforms where exact comparisons are unreliable due to float rounding differences. --- tests/fate-run.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 40a4fe2f6d..dcfbc842da 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -85,6 +85,16 @@ pcm(){ avconv "$@" -vn -f s16le - } +enc_dec_pcm(){ + out_fmt=$1 + pcm_fmt=$2 + shift 2 + encfile="${outdir}/${test}.${out_fmt}" + cleanfiles=$encfile + avconv -i $ref "$@" -f $out_fmt -y $encfile || return + avconv -i $encfile -c:a pcm_${pcm_fmt} -f wav - +} + regtest(){ t="${test#$2-}" ref=${base}/ref/$2/$t