[FFmpeg-cvslog] FATE: pass the decoded output format and audio source file to enc_dec_pcm
Justin Ruggles
git at videolan.org
Thu Apr 19 21:45:54 CEST 2012
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Tue Apr 17 16:47:57 2012 +0100| [9cc338b1de78c1b82d0867ea96e07367038d226e] | committer: Justin Ruggles
FATE: pass the decoded output format and audio source file to enc_dec_pcm
This will allow decoding to md5 and doing a diff comparison to a reference
checksum instead of a fuzzy stddev or oneoff comparison.
Signed-off-by: Mans Rullgard <mans at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9cc338b1de78c1b82d0867ea96e07367038d226e
---
tests/fate-run.sh | 16 ++++++++++++----
tests/fate/ac3.mak | 4 ++--
tests/fate/wma.mak | 4 ++--
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 39db0e8..f7a7aba 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -28,6 +28,11 @@ errfile="${outdir}/${test}.err"
cmpfile="${outdir}/${test}.diff"
repfile="${outdir}/${test}.rep"
+target_path(){
+ test ${1} = ${1#/} && p=${target_path}/
+ echo ${p}${1}
+}
+
# $1=value1, $2=value2, $3=threshold
# prints 0 if absolute difference between value1 and value2 is <= threshold
compare(){
@@ -86,12 +91,15 @@ pcm(){
enc_dec_pcm(){
out_fmt=$1
- pcm_fmt=$2
- shift 2
+ dec_fmt=$2
+ pcm_fmt=$3
+ src_file=$(target_path $4)
+ shift 4
encfile="${outdir}/${test}.${out_fmt}"
cleanfiles=$encfile
- avconv -i $ref "$@" -f $out_fmt -y ${target_path}/${encfile} || return
- avconv -f $out_fmt -i ${target_path}/${encfile} -c:a pcm_${pcm_fmt} -f wav -
+ encfile=$(target_path ${encfile})
+ avconv -i $src_file "$@" -f $out_fmt -y ${encfile} || return
+ avconv -f $out_fmt -i ${encfile} -c:a pcm_${pcm_fmt} -f ${dec_fmt} -
}
regtest(){
diff --git a/tests/fate/ac3.mak b/tests/fate/ac3.mak
index 2e85186..ca0704d 100644
--- a/tests/fate/ac3.mak
+++ b/tests/fate/ac3.mak
@@ -29,7 +29,7 @@ fate-eac3-4: CMP = oneoff
fate-eac3-4: REF = $(SAMPLES)/eac3/serenity_english_5.1_1536_small.pcm
FATE_AC3 += fate-ac3-encode
-fate-ac3-encode: CMD = enc_dec_pcm ac3 s16le -c:a ac3 -b:a 128k
+fate-ac3-encode: CMD = enc_dec_pcm ac3 wav s16le $(REF) -c:a ac3 -b:a 128k
fate-ac3-encode: CMP = stddev
fate-ac3-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
fate-ac3-encode: CMP_SHIFT = -1024
@@ -37,7 +37,7 @@ fate-ac3-encode: CMP_TARGET = 399.62
fate-ac3-encode: SIZE_TOLERANCE = 488
FATE_AC3 += fate-eac3-encode
-fate-eac3-encode: CMD = enc_dec_pcm eac3 s16le -c:a eac3 -b:a 128k
+fate-eac3-encode: CMD = enc_dec_pcm eac3 wav s16le $(REF) -c:a eac3 -b:a 128k
fate-eac3-encode: CMP = stddev
fate-eac3-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
fate-eac3-encode: CMP_SHIFT = -1024
diff --git a/tests/fate/wma.mak b/tests/fate/wma.mak
index 9143f8c..6fd4b38 100644
--- a/tests/fate/wma.mak
+++ b/tests/fate/wma.mak
@@ -38,7 +38,7 @@ FATE_TESTS += $(FATE_WMAVOICE)
fate-wmavoice: $(FATE_WMAVOICE)
FATE_WMA_ENCODE += fate-wmav1-encode
-fate-wmav1-encode: CMD = enc_dec_pcm asf s16le -c:a wmav1 -b:a 128k
+fate-wmav1-encode: CMD = enc_dec_pcm asf wav s16le $(REF) -c:a wmav1 -b:a 128k
fate-wmav1-encode: CMP = stddev
fate-wmav1-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
fate-wmav1-encode: CMP_SHIFT = -8192
@@ -46,7 +46,7 @@ fate-wmav1-encode: CMP_TARGET = 291.06
fate-wmav1-encode: SIZE_TOLERANCE = 4632
FATE_WMA_ENCODE += fate-wmav2-encode
-fate-wmav2-encode: CMD = enc_dec_pcm asf s16le -c:a wmav2 -b:a 128k
+fate-wmav2-encode: CMD = enc_dec_pcm asf wav s16le $(REF) -c:a wmav2 -b:a 128k
fate-wmav2-encode: CMP = stddev
fate-wmav2-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
fate-wmav2-encode: CMP_SHIFT = -8192
More information about the ffmpeg-cvslog
mailing list