summaryrefslogtreecommitdiff
path: root/tests/fate-run.sh
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-19 20:46:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-19 21:23:52 +0200
commit2a976debc1de10c22c258583b543ab5b4bbe5974 (patch)
treea2b0a12017a42e8a37365ca84a6bf2a0179311e8 /tests/fate-run.sh
parent2ff935f4bb6173daf3361b2ac7b58c6e33994878 (diff)
parent2b98377935384ecd22c2cd26106b9e03a6c9f598 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: dv: Initialize encoder tables during encoder init. dv: Replace some magic numbers by the appropriate #define. FATE: pass the decoded output format and audio source file to enc_dec_pcm FATE: specify the input format when decoding in enc_dec_pcm() x86inc: support AVX abstraction for 2-operand instructions configure: detect PGI compiler and set suitable flags avconv: check for an incompatible changing channel layout avio: make AVIOContext.av_class pointer to const nutdec: add malloc check and fix const to non-const conversion warnings Conflicts: ffmpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-xtests/fate-run.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index e9863af01c..47649f4246 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 -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 -i ${encfile} -c:a pcm_${pcm_fmt} -f ${dec_fmt} -
}
regtest(){