Browse code

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.

Justin Ruggles authored on 2012/03/11 06:37:41
Showing 1 changed files
... ...
@@ -85,6 +85,16 @@ pcm(){
85 85
     avconv "$@" -vn -f s16le -
86 86
 }
87 87
 
88
+enc_dec_pcm(){
89
+    out_fmt=$1
90
+    pcm_fmt=$2
91
+    shift 2
92
+    encfile="${outdir}/${test}.${out_fmt}"
93
+    cleanfiles=$encfile
94
+    avconv -i $ref "$@" -f $out_fmt -y $encfile || return
95
+    avconv -i $encfile -c:a pcm_${pcm_fmt} -f wav -
96
+}
97
+
88 98
 regtest(){
89 99
     t="${test#$2-}"
90 100
     ref=${base}/ref/$2/$t