aboutsummaryrefslogtreecommitdiffstats
path: root/tests/regression.sh
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-04-10 21:29:31 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-04-10 21:29:31 +0000
commit67cbe68129a617b7befc3539325db097b1fec679 (patch)
tree28c848ab136acc763da7d814053a14cd91085e24 /tests/regression.sh
parent9680a722822241c18ca1049e55bef0feb69eb6fe (diff)
downloadffmpeg-67cbe68129a617b7befc3539325db097b1fec679.tar.gz
check quality too, not only md5 (but dont take the scores too serious, the different codecs use different quality/bitrates and its just based on a artificially generated testvideo)
small changes to some test to check a broader area of features Originally committed as revision 1751 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'tests/regression.sh')
-rwxr-xr-xtests/regression.sh23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/regression.sh b/tests/regression.sh
index 26adea26e7..07aba7ed08 100755
--- a/tests/regression.sh
+++ b/tests/regression.sh
@@ -42,11 +42,13 @@ fi
# various files
ffmpeg="../ffmpeg_g"
+tiny_psnr="./tiny_psnr"
outfile="$datadir/a-"
reffile="$2"
benchfile="$datadir/ffmpeg.bench"
raw_src="vsynth1/%d.pgm"
raw_dst="$datadir/out.yuv"
+raw_ref="$datadir/ref.yuv"
pcm_src="asynth1.sw"
pcm_dst="$datadir/out.wav"
@@ -60,6 +62,9 @@ do_ffmpeg()
echo $ffmpeg -bitexact -dct_algo 1 -idct_algo 2 $*
$ffmpeg -bitexact -dct_algo 1 -idct_algo 2 -benchmark $* > $datadir/bench.tmp
md5sum -b $f >> $logfile
+ if [ $f = $raw_dst ] ; then
+ $tiny_psnr $f $raw_ref >> $logfile
+ fi
expr "`cat $datadir/bench.tmp`" : '.*utime=\(.*s\)' > $datadir/bench2.tmp
echo `cat $datadir/bench2.tmp` $f >> $benchfile
}
@@ -74,10 +79,24 @@ do_ffmpeg_crc()
cat $datadir/ffmpeg.crc >> $logfile
}
+do_ffmpeg_nocheck()
+{
+ f="$1"
+ shift
+ echo $ffmpeg -bitexact -dct_algo 1 -idct_algo 2 $*
+ $ffmpeg -bitexact -dct_algo 1 -idct_algo 2 -benchmark $* > $datadir/bench.tmp
+ expr "`cat $datadir/bench.tmp`" : '.*utime=\(.*s\)' > $datadir/bench2.tmp
+ echo `cat $datadir/bench2.tmp` $f >> $benchfile
+}
+
echo "ffmpeg regression test" > $logfile
echo "ffmpeg benchmarks" > $benchfile
###################################
+# generate reference for quality check
+do_ffmpeg_nocheck $raw_ref -y -f pgmyuv -i $raw_src -an -f rawvideo $raw_ref
+
+###################################
if [ -n "$do_mpeg" ] ; then
# mpeg1 encoding
file=${outfile}mpeg1.mpg
@@ -145,7 +164,7 @@ fi
if [ -n "$do_h263p" ] ; then
# h263p encoding
file=${outfile}h263p.avi
-do_ffmpeg $file -y -qscale 10 -umv -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h263p -ps 300 $file
+do_ffmpeg $file -y -qscale 2 -umv -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h263p -ps 300 $file
# h263p decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
@@ -155,7 +174,7 @@ fi
if [ -n "$do_mpeg4" ] ; then
# mpeg4
file=${outfile}odivx.avi
-do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
+do_ffmpeg $file -y -4mv -qscale 10 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
# mpeg4 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst