diff options
author | Mans Rullgard <mans@mansr.com> | 2012-05-18 10:33:28 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-05-29 08:35:41 +0100 |
commit | 7263cd554496d95dec4b97df3e7a935208acd5b1 (patch) | |
tree | c113b3a9413c5044f709a3ead093a24df66aef66 /tests/fate-run.sh | |
parent | 47b5996bb018e15bde6b6af9b5c849961b4bf845 (diff) | |
download | ffmpeg-7263cd554496d95dec4b97df3e7a935208acd5b1.tar.gz |
fate: convert codec-regression.sh to makefile rules
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-x | tests/fate-run.sh | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 2114490498..5d3ba4dddb 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -111,16 +111,40 @@ enc_dec_pcm(){ avconv -f $out_fmt -i ${encfile} -c:a pcm_${pcm_fmt} -f ${dec_fmt} - } +FLAGS="-flags +bitexact -sws_flags +accurate_rnd+bitexact" +DEC_OPTS="-threads $threads -idct simple $FLAGS" +ENC_OPTS="-threads 1 -idct simple -dct fastint" + +enc_dec(){ + src_fmt=$1 + srcfile=$2 + enc_fmt=$3 + enc_opt=$4 + dec_fmt=$5 + dec_opt=$6 + encfile="${outdir}/${test}.${enc_fmt}" + decfile="${outdir}/${test}.out.${dec_fmt}" + cleanfiles="$cleanfiles $decfile" + test "$7" = -keep || cleanfiles="$cleanfiles $encfile" + tsrcfile=$(target_path $srcfile) + tencfile=$(target_path $encfile) + tdecfile=$(target_path $decfile) + avconv -f $src_fmt $DEC_OPTS -i $tsrcfile $ENC_OPTS $enc_opt $FLAGS \ + -f $enc_fmt -y $tencfile || return + do_md5sum $encfile + echo $(wc -c $encfile) + avconv $DEC_OPTS -i $tencfile $ENC_OPTS $dec_opt $FLAGS \ + -f $dec_fmt -y $tdecfile || return + do_md5sum $decfile + tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift +} + regtest(){ t="${test#$2-}" ref=${base}/ref/$2/$t ${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags" } -codectest(){ - regtest codec $1 tests/$1 -} - lavftest(){ regtest lavf lavf tests/vsynth1 } @@ -136,10 +160,10 @@ seektest(){ case $t in image_*) file="tests/data/images/${t#image_}/%02d.${t#image_}" ;; *) file=$(echo $t | tr _ '?') - for d in acodec vsynth2 lavf; do - test -f tests/data/$d/$file && break + for d in fate/acodec- fate/vsynth2- lavf/; do + test -f tests/data/$d$file && break done - file=$(echo tests/data/$d/$file) + file=$(echo tests/data/$d$file) ;; esac run libavformat/seek-test $target_path/$file @@ -148,7 +172,7 @@ seektest(){ mkdir -p "$outdir" exec 3>&2 -$command > "$outfile" 2>$errfile +eval $command >"$outfile" 2>$errfile err=$? if [ $err -gt 128 ]; then |