Simplify regression test execution.

Originally committed as revision 6906 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Diego Biurrun 2006-11-05 20:05:37 +00:00
parent 8cd13128b8
commit 1de61a185c

View File

@ -155,6 +155,16 @@ do_ffmpeg_nocheck()
echo `cat $datadir/bench2.tmp` $f >> $benchfile
}
do_video_decoding()
{
do_ffmpeg $raw_dst -y -i $file -f rawvideo $@ $raw_dst
}
do_video_encoding()
{
do_ffmpeg $file -y $1 -f pgmyuv -i $raw_src $2 $file
}
echo "ffmpeg regression test" > $logfile
echo "ffmpeg benchmarks" > $benchfile
@ -167,195 +177,195 @@ do_ffmpeg_nocheck $pcm_ref -y -ab 128 -ac 2 -ar 44100 -f s16le -i $pcm_src -f wa
if [ -n "$do_mpeg" ] ; then
# mpeg1 encoding
file=${outfile}mpeg1.mpg
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -f mpeg1video $file
do_video_encoding "-qscale 10" "-f mpeg1video"
# mpeg1 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_mpeg2" ] ; then
# mpeg2 encoding
file=${outfile}mpeg2.mpg
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video $file
do_video_encoding "-qscale 10" "-vcodec mpeg2video -f mpeg1video"
# mpeg2 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
# mpeg2 encoding using intra vlc
file=${outfile}mpeg2ivlc.mpg
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -flags2 +ivlc $file
do_video_encoding "-qscale 10" "-vcodec mpeg2video -f mpeg1video -flags2 +ivlc"
# mpeg2 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
# mpeg2 encoding
file=${outfile}mpeg2.mpg
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -idct int -dct int -f mpeg1video $file
do_video_encoding "-qscale 10" "-vcodec mpeg2video -idct int -dct int -f mpeg1video"
# mpeg2 decoding
do_ffmpeg $raw_dst -y -idct int -i $file -f rawvideo $raw_dst
# mpeg2 encoding interlaced
file=${outfile}mpeg2i.mpg
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -flags +ildct+ilme $file
do_video_encoding "-qscale 10" "-vcodec mpeg2video -f mpeg1video -flags +ildct+ilme"
# mpeg2 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_mpeg2thread" ] ; then
# mpeg2 encoding interlaced
file=${outfile}mpeg2thread.mpg
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 2 $file
do_video_encoding "-qscale 10" "-vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 2"
# mpeg2 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
# mpeg2 encoding interlaced using intra vlc
file=${outfile}mpeg2threadivlc.mpg
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -flags2 +ivlc -threads 2 $file
do_video_encoding "-qscale 10" "-vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -flags2 +ivlc -threads 2"
# mpeg2 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
# mpeg2 encoding interlaced
file=${outfile}mpeg2reuse.mpg
do_ffmpeg $file -y -sameq -me_threshold 256 -mb_threshold 1024 -i ${outfile}mpeg2thread.mpg -vcodec mpeg2video -f mpeg1video -bf 2 -flags +ildct+ilme -threads 4 $file
# mpeg2 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_msmpeg4v2" ] ; then
# msmpeg4 encoding
file=${outfile}msmpeg4v2.avi
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec msmpeg4v2 $file
do_video_encoding "-qscale 10" "-an -vcodec msmpeg4v2"
# msmpeg4v2 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_msmpeg4" ] ; then
# msmpeg4 encoding
file=${outfile}msmpeg4.avi
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec msmpeg4 $file
do_video_encoding "-qscale 10" "-an -vcodec msmpeg4"
# msmpeg4 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_wmv1" ] ; then
# wmv1 encoding
file=${outfile}wmv1.avi
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec wmv1 $file
do_video_encoding "-qscale 10" "-an -vcodec wmv1"
# wmv1 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_wmv2" ] ; then
# wmv2 encoding
file=${outfile}wmv2.avi
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec wmv2 $file
do_video_encoding "-qscale 10" "-an -vcodec wmv2"
# wmv2 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_h261" ] ; then
# h261 encoding
file=${outfile}h261.avi
do_ffmpeg $file -y -qscale 11 -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h261 $file
do_video_encoding "-qscale 11" "-s 352x288 -an -vcodec h261"
# h261 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_h263" ] ; then
# h263 encoding
file=${outfile}h263.avi
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h263 $file
do_video_encoding "-qscale 10" "-s 352x288 -an -vcodec h263"
# h263 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_h263p" ] ; then
# h263p encoding
file=${outfile}h263p.avi
do_ffmpeg $file -y -qscale 2 -flags +umv+aiv+aic -f pgmyuv -i $raw_src -s 352x288 -an -vcodec h263p -ps 300 $file
do_video_encoding "-qscale 2 -flags +umv+aiv+aic" "-s 352x288 -an -vcodec h263p -ps 300"
# h263p decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_mpeg4" ] ; then
# mpeg4
file=${outfile}odivx.mp4
do_ffmpeg $file -y -flags +mv4 -mbd bits -qscale 10 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
do_video_encoding "-flags +mv4 -mbd bits -qscale 10" "-an -vcodec mpeg4"
# mpeg4 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_huffyuv" ] ; then
# huffyuv
file=${outfile}huffyuv.avi
do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec huffyuv -pix_fmt yuv422p $file
do_video_encoding "" "-an -vcodec huffyuv -pix_fmt yuv422p"
# huffyuv decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo -strict -2 -pix_fmt yuv420p $raw_dst
do_video_decoding -strict -2 -pix_fmt yuv420p
fi
###################################
if [ -n "$do_rc" ] ; then
# mpeg4 rate control
file=${outfile}mpeg4-rc.avi
do_ffmpeg $file -y -b 400k -bf 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
do_video_encoding "-b 400k -bf 2" "-an -vcodec mpeg4"
# mpeg4 rate control decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_mpeg4adv" ] ; then
# mpeg4
file=${outfile}mpeg4-adv.avi
do_ffmpeg $file -y -qscale 9 -flags +mv4+part+aic+trell -mbd bits -ps 200 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
do_video_encoding "-qscale 9 -flags +mv4+part+aic+trell -mbd bits -ps 200" "-an -vcodec mpeg4"
# mpeg4 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_mpeg4thread" ] ; then
# mpeg4
file=${outfile}mpeg4-thread.avi
do_ffmpeg $file -y -b 500k -flags +mv4+part+aic+trell -mbd bits -ps 200 -bf 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 -threads 2 $file
do_video_encoding "-b 500k -flags +mv4+part+aic+trell -mbd bits -ps 200 -bf 2" "-an -vcodec mpeg4 -threads 2"
# mpeg4 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_mpeg4adv" ] ; then
# mpeg4
file=${outfile}mpeg4-Q.avi
do_ffmpeg $file -y -qscale 7 -flags +mv4+qpel -mbd 2 -bf 2 -cmp 1 -subcmp 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
do_video_encoding "-qscale 7 -flags +mv4+qpel -mbd 2 -bf 2 -cmp 1 -subcmp 2" "-an -vcodec mpeg4"
# mpeg4 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
@ -369,160 +379,160 @@ fi
if [ -n "$do_error" ] ; then
# damaged mpeg4
file=${outfile}error-mpeg4-adv.avi
do_ffmpeg $file -y -qscale 7 -flags +mv4+part+aic -mbd rd -ps 250 -error 10 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
do_video_encoding "-qscale 7 -flags +mv4+part+aic -mbd rd -ps 250 -error 10" "-an -vcodec mpeg4"
# damaged mpeg4 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_mpeg4nr" ] ; then
# noise reduction
file=${outfile}mpeg4-nr.avi
do_ffmpeg $file -y -qscale 8 -flags +mv4 -mbd rd -nr 200 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
do_video_encoding "-qscale 8 -flags +mv4 -mbd rd -nr 200" "-an -vcodec mpeg4"
# mpeg4 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_mpeg1b" ] ; then
# mpeg1
file=${outfile}mpeg1b.mpg
do_ffmpeg $file -y -qscale 8 -bf 3 -ps 200 -f pgmyuv -i $raw_src -an -vcodec mpeg1video -f mpeg1video $file
do_video_encoding "-qscale 8 -bf 3 -ps 200" "-an -vcodec mpeg1video -f mpeg1video"
# mpeg1 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_mjpeg" ] ; then
# mjpeg
file=${outfile}mjpeg.avi
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec mjpeg -pix_fmt yuvj420p $file
do_video_encoding "-qscale 10" "-an -vcodec mjpeg -pix_fmt yuvj420p"
# mjpeg decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo -pix_fmt yuv420p $raw_dst
do_video_decoding -pix_fmt yuv420p
fi
###################################
if [ -n "$do_ljpeg" ] ; then
# ljpeg
file=${outfile}ljpeg.avi
do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec ljpeg -strict -1 $file
do_video_encoding "" "-an -vcodec ljpeg -strict -1"
# ljpeg decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_jpegls" ] ; then
# jpeg ls
file=${outfile}jpegls.avi
do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec jpegls -vtag MJPG $file
do_video_encoding "" "-an -vcodec jpegls -vtag MJPG"
# jpeg ls decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo -pix_fmt yuv420p $raw_dst
do_video_decoding -pix_fmt yuv420p
fi
###################################
if [ -n "$do_rv10" ] ; then
# rv10 encoding
file=${outfile}rv10.rm
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an $file
do_video_encoding "-qscale 10" "-an"
# rv10 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_rv20" ] ; then
# rv20 encoding
file=${outfile}rv20.rm
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -vcodec rv20 -an $file
do_video_encoding "-qscale 10" "-vcodec rv20 -an"
# rv20 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_asv1" ] ; then
# asv1 encoding
file=${outfile}asv1.avi
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec asv1 $file
do_video_encoding "-qscale 10" "-an -vcodec asv1"
# asv1 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_asv2" ] ; then
# asv2 encoding
file=${outfile}asv2.avi
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec asv2 $file
do_video_encoding "-qscale 10" "-an -vcodec asv2"
# asv2 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_flv" ] ; then
# flv encoding
file=${outfile}flv.flv
do_ffmpeg $file -y -qscale 10 -f pgmyuv -i $raw_src -an -vcodec flv $file
do_video_encoding "-qscale 10" "-an -vcodec flv"
# flv decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_ffv1" ] ; then
# ffv1 encoding
file=${outfile}ffv1.avi
do_ffmpeg $file -y -strict -2 -f pgmyuv -i $raw_src -an -vcodec ffv1 $file
do_video_encoding "-strict -2" "-an -vcodec ffv1"
# ffv1 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_snow" ] ; then
# snow encoding
file=${outfile}snow.avi
do_ffmpeg $file -y -strict -2 -f pgmyuv -i $raw_src -an -vcodec snow -qscale 2 -flags +qpel -me iter -dia_size 2 -cmp 12 -subcmp 12 -s 128x64 $file
do_video_encoding "-strict -2" "-an -vcodec snow -qscale 2 -flags +qpel -me iter -dia_size 2 -cmp 12 -subcmp 12 -s 128x64"
# snow decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo -s 352x288 $raw_dst
do_video_decoding -s 352x288
fi
###################################
if [ -n "$do_snowll" ] ; then
# snow encoding
file=${outfile}snow53.avi
do_ffmpeg $file -y -strict -2 -f pgmyuv -i $raw_src -an -vcodec snow -qscale .001 -pred 1 -flags +mv4+qpel $file
do_video_encoding "-strict -2" "-an -vcodec snow -qscale .001 -pred 1 -flags +mv4+qpel"
# snow decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
do_video_decoding
fi
###################################
if [ -n "$do_dv" ] ; then
# dv encoding
file=${outfile}dv.dv
do_ffmpeg $file -dct int -y -f pgmyuv -i $raw_src -s pal -an $file
do_video_encoding "-dct int" "-s pal -an"
# dv decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo -s cif $raw_dst
do_video_decoding -s cif
fi
###################################
if [ -n "$do_dv50" ] ; then
# dv50 encoding
file=${outfile}dv.dv
do_ffmpeg $file -dct int -y -f pgmyuv -i $raw_src -s pal -pix_fmt yuv422p -an $file
do_video_encoding "-dct int" "-s pal -pix_fmt yuv422p -an"
# dv50 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo -s cif -pix_fmt yuv420p $raw_dst
do_video_decoding -s cif -pix_fmt yuv420p
fi
@ -530,10 +540,10 @@ fi
if [ -n "$do_svq1" ] ; then
# svq1 encoding
file=${outfile}svq1.mov
do_ffmpeg $file -y -f pgmyuv -i $raw_src -an -vcodec svq1 -qscale 3 -pix_fmt yuv410p $file
do_video_encoding "" "-an -vcodec svq1 -qscale 3 -pix_fmt yuv410p"
# svq1 decoding
do_ffmpeg $raw_dst -y -i $file -f rawvideo -pix_fmt yuv420p $raw_dst
do_video_decoding -pix_fmt yuv420p
fi
###################################