diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-30 03:39:24 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-30 03:40:54 +0400 |
commit | b0387edd5e766b1032f946d6cdb35b765bb45435 (patch) | |
tree | dd3ca8577a8d3b05efee8b1214a80f845ddeb47f /tests/fate-run.sh | |
parent | 8619362ff1de6605ffe6da8a42bdfe4fb7be75c1 (diff) | |
parent | f919cc7df6ab844bc12f89fe7bef4fb915a47725 (diff) |
Merge commit 'f919cc7df6ab844bc12f89fe7bef4fb915a47725'
* commit 'f919cc7df6ab844bc12f89fe7bef4fb915a47725':
fate: fix acodec/vsynth tests for make 3.81
pcm_mpeg: fix number of consumed bytes to include the header.
avfilter: include required header file avfilter.h in video.h
x86: Avoid movs on BUTTERFLYPS when in AVX mode
x86: use new schema for ASM macros
fate: convert codec-regression.sh to makefile rules
fate: allow tests to specify unit size for psnr comparison
fate: teach videogen/rotozoom to output a single raw video stream
http: Add support for reusing the http socket for subsequent requests
http: Add support for using persistent connections
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-x | tests/fate-run.sh | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/tests/fate-run.sh b/tests/fate-run.sh index a2cf299554..26ccaea3f5 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -21,6 +21,7 @@ cpuflags=${11:-all} cmp_shift=${12:-0} cmp_target=${13:-0} size_tolerance=${14:-0} +cmp_unit=${15:-2} outdir="tests/data/fate" outfile="${outdir}/${test}" @@ -40,7 +41,7 @@ compare(){ } do_tiny_psnr(){ - psnr=$(tests/tiny_psnr "$1" "$2" 2 $cmp_shift 0) + psnr=$(tests/tiny_psnr "$1" "$2" $cmp_unit $cmp_shift 0) val=$(expr "$psnr" : ".*$3: *\([0-9.]*\)") size1=$(expr "$psnr" : '.*bytes: *\([0-9]*\)') size2=$(expr "$psnr" : '.*bytes:[ 0-9]*/ *\([0-9]*\)') @@ -110,16 +111,40 @@ enc_dec_pcm(){ ffmpeg -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) + ffmpeg -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) + ffmpeg $8 $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" "$samples" } -codectest(){ - regtest codec $1 tests/$1 -} - lavffatetest(){ regtest lavf lavf-fate tests/vsynth1 } @@ -139,10 +164,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 @@ -151,7 +176,7 @@ seektest(){ mkdir -p "$outdir" exec 3>&2 -$command > "$outfile" 2>$errfile +eval $command >"$outfile" 2>$errfile err=$? if [ $err -gt 128 ]; then |