Commit bb9ecf4c authored by mru's avatar mru

split lavf regression tests


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11833 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d2264121
...@@ -310,7 +310,42 @@ CODEC_TESTS = $(addprefix regtest-, \ ...@@ -310,7 +310,42 @@ CODEC_TESTS = $(addprefix regtest-, \
wma \ wma \
) )
LAVF_TESTS = regtest-lavf LAVF_TESTS = $(addprefix regtest-, \
avi \
asf \
rm \
mpg \
ts \
swf \
ffm \
flv_fmt \
mov \
dv_fmt \
gxf \
nut \
mkv \
pbmpipe \
pgmpipe \
ppmpipe \
gif \
yuv4mpeg \
pgm \
ppm \
bmp \
tga \
tiff \
sgi \
jpg \
wav \
alaw \
mulaw \
au \
mmf \
aiff \
voc \
ogg \
pixfmt \
)
REGFILES = $(addprefix tests/data/,$(addsuffix .$(1),$(2:regtest-%=%))) REGFILES = $(addprefix tests/data/,$(addsuffix .$(1),$(2:regtest-%=%)))
...@@ -346,11 +381,11 @@ $(CODEC_TESTS) $(LAVF_TESTS): regtest-ref ...@@ -346,11 +381,11 @@ $(CODEC_TESTS) $(LAVF_TESTS): regtest-ref
regtest-ref: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/asynth1.sw regtest-ref: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/asynth1.sw
$(CODEC_TESTS) regtest-ref: tests/tiny_psnr$(EXESUF) $(CODEC_TESTS) regtest-ref: tests/tiny_psnr$(EXESUF)
$(SRC_PATH)/tests/regression.sh $@ vsynth tests/vsynth1 $(SRC_PATH)/tests/regression.sh $@ vsynth tests/vsynth1 a
$(SRC_PATH)/tests/regression.sh $@ rotozoom tests/vsynth2 $(SRC_PATH)/tests/regression.sh $@ rotozoom tests/vsynth2 a
$(LAVF_TESTS): $(LAVF_TESTS):
$(SRC_PATH)/tests/regression.sh $@ lavf tests/vsynth1 $(SRC_PATH)/tests/regression.sh $@ lavf tests/vsynth1 b
seektest: codectest libavtest tests/seek_test$(EXESUF) seektest: codectest libavtest tests/seek_test$(EXESUF)
$(SRC_PATH)/tests/seek_test.sh $(SEEK_REFFILE) $(SRC_PATH)/tests/seek_test.sh $(SEEK_REFFILE)
......
...@@ -36,15 +36,15 @@ b54fe5ee2983506550b4433b63845daf *./tests/data/b-libav.nut ...@@ -36,15 +36,15 @@ b54fe5ee2983506550b4433b63845daf *./tests/data/b-libav.nut
43238b15f1012aa27536c2be20bb2383 *./tests/data/b-libav.mkv 43238b15f1012aa27536c2be20bb2383 *./tests/data/b-libav.mkv
329854 ./tests/data/b-libav.mkv 329854 ./tests/data/b-libav.mkv
./tests/data/b-libav.mkv CRC=0x400c29e9 ./tests/data/b-libav.mkv CRC=0x400c29e9
9a9da315747599f7718cc9a9a09c21ff *./tests/data/b-libav.pbm 9a9da315747599f7718cc9a9a09c21ff *./tests/data/b-pbmpipe.pbm
317075 ./tests/data/b-libav.pbm 317075 ./tests/data/b-pbmpipe.pbm
./tests/data/b-libav.pbm CRC=0xb92906cb ./tests/data/b-pbmpipe.pbm CRC=0xb92906cb
6ea0e1faf08f6fcdb44db4a104361b57 *./tests/data/b-libav.pgm 6ea0e1faf08f6fcdb44db4a104361b57 *./tests/data/b-pgmpipe.pgm
2534775 ./tests/data/b-libav.pgm 2534775 ./tests/data/b-pgmpipe.pgm
./tests/data/b-libav.pgm CRC=0xf4aa7c47 ./tests/data/b-pgmpipe.pgm CRC=0xf4aa7c47
0c5fe86621b7377705837f304d4ba1e9 *./tests/data/b-libav.ppm 0c5fe86621b7377705837f304d4ba1e9 *./tests/data/b-ppmpipe.ppm
7603575 ./tests/data/b-libav.ppm 7603575 ./tests/data/b-ppmpipe.ppm
./tests/data/b-libav.ppm CRC=0xb2bb8e92 ./tests/data/b-ppmpipe.ppm CRC=0xb2bb8e92
88a98269295fbfce7816558ad84e1259 *./tests/data/b-libav.gif 88a98269295fbfce7816558ad84e1259 *./tests/data/b-libav.gif
2906382 ./tests/data/b-libav.gif 2906382 ./tests/data/b-libav.gif
b977a4fedff90a79baf70c8e02986820 *./tests/data/b-libav.y4m b977a4fedff90a79baf70c8e02986820 *./tests/data/b-libav.y4m
......
...@@ -12,15 +12,10 @@ datadir="./tests/data" ...@@ -12,15 +12,10 @@ datadir="./tests/data"
test="${1#regtest-}" test="${1#regtest-}"
this="$test.$2" this="$test.$2"
logfile="$datadir/$this.regression" logfile="$datadir/$this.regression"
outfile="$datadir/a-" outfile="$datadir/$4-"
eval do_$test=y eval do_$test=y
if [ "$test" = "lavf" ] ; then
outfile="$datadir/b-"
fi
# various files # various files
ffmpeg="./ffmpeg_g" ffmpeg="./ffmpeg_g"
tiny_psnr="tests/tiny_psnr" tiny_psnr="tests/tiny_psnr"
...@@ -33,6 +28,8 @@ raw_ref="$datadir/$2.ref.yuv" ...@@ -33,6 +28,8 @@ raw_ref="$datadir/$2.ref.yuv"
pcm_src="tests/asynth1.sw" pcm_src="tests/asynth1.sw"
pcm_dst="$datadir/$this.out.wav" pcm_dst="$datadir/$this.out.wav"
pcm_ref="$datadir/$2.ref.wav" pcm_ref="$datadir/$2.ref.wav"
crcfile="$datadir/$this.crc"
if [ X"`echo | md5sum 2> /dev/null`" != X ]; then if [ X"`echo | md5sum 2> /dev/null`" != X ]; then
do_md5sum() { md5sum -b $1; } do_md5sum() { md5sum -b $1; }
elif [ -x /sbin/md5 ]; then elif [ -x /sbin/md5 ]; then
...@@ -89,11 +86,12 @@ do_ffmpeg_crc() ...@@ -89,11 +86,12 @@ do_ffmpeg_crc()
{ {
f="$1" f="$1"
shift shift
echo $ffmpeg $FFMPEG_OPTS $* -f crc $datadir/ffmpeg.crc echo $ffmpeg $FFMPEG_OPTS $* -f crc "$crcfile"
$ffmpeg $FFMPEG_OPTS $* -f crc $datadir/ffmpeg.crc > /tmp/ffmpeg$$ 2>&1 $ffmpeg $FFMPEG_OPTS $* -f crc "$crcfile" > /tmp/ffmpeg$$ 2>&1
egrep -v "^(Stream|Press|Input|Output|frame| Stream| Duration|video:|ffmpeg version| configuration| built)" /tmp/ffmpeg$$ || true egrep -v "^(Stream|Press|Input|Output|frame| Stream| Duration|video:|ffmpeg version| configuration| built)" /tmp/ffmpeg$$ || true
rm -f /tmp/ffmpeg$$ rm -f /tmp/ffmpeg$$
echo "$f `cat $datadir/ffmpeg.crc`" >> $logfile echo "$f `cat $crcfile`" >> $logfile
rm -f "$crcfile"
} }
do_ffmpeg_nocheck() do_ffmpeg_nocheck()
...@@ -141,7 +139,7 @@ do_libav() ...@@ -141,7 +139,7 @@ do_libav()
do_streamed_images() do_streamed_images()
{ {
file=${outfile}libav.$1 file=${outfile}${1}pipe.$1
do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f image2pipe $file do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f image2pipe $file
do_ffmpeg_crc $file -f image2pipe -i $file do_ffmpeg_crc $file -f image2pipe -i $file
} }
...@@ -533,49 +531,73 @@ fi ...@@ -533,49 +531,73 @@ fi
# libavformat testing # libavformat testing
################################### ###################################
if [ -n "$do_lavf" ] ; then if [ -n "$do_avi" ] ; then
# avi # avi
do_libav avi do_libav avi
fi
if [ -n "$do_asf" ] ; then
# asf # asf
do_libav asf "-acodec mp2" "-r 25" do_libav asf "-acodec mp2" "-r 25"
fi
if [ -n "$do_rm" ] ; then
# rm # rm
file=${outfile}libav.rm file=${outfile}libav.rm
do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -f s16le -i $pcm_src $file
# broken # broken
#do_ffmpeg_crc $file -i $file #do_ffmpeg_crc $file -i $file
fi
if [ -n "$do_mpg" ] ; then
# mpegps # mpegps
do_libav mpg do_libav mpg
fi
if [ -n "$do_ts" ] ; then
# mpegts # mpegts
do_libav ts do_libav ts
fi
if [ -n "$do_swf" ] ; then
# swf # swf
do_libav swf -an do_libav swf -an
fi
if [ -n "$do_ffm" ] ; then
# ffm # ffm
do_libav ffm do_libav ffm
fi
if [ -n "$do_flv_fmt" ] ; then
# flv # flv
do_libav flv -an do_libav flv -an
fi
if [ -n "$do_mov" ] ; then
# mov # mov
do_libav mov "-acodec pcm_alaw" do_libav mov "-acodec pcm_alaw"
fi
if [ -n "$do_dv_fmt" ] ; then
# dv # dv
do_libav dv "-ar 48000 -r 25 -s pal -ac 2" do_libav dv "-ar 48000 -r 25 -s pal -ac 2"
fi
if [ -n "$do_gxf" ] ; then
# gxf # gxf
do_libav gxf "-ar 48000 -r 25 -s pal -ac 1" do_libav gxf "-ar 48000 -r 25 -s pal -ac 1"
fi
if [ -n "$do_nut" ] ; then
# nut # nut
do_libav nut "-acodec mp2" do_libav nut "-acodec mp2"
fi
if [ -n "$do_mkv" ] ; then
# mkv # mkv
do_libav mkv do_libav mkv
fi
#################### ####################
...@@ -585,77 +607,120 @@ do_libav mkv ...@@ -585,77 +607,120 @@ do_libav mkv
#do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file #do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
#do_ffmpeg_crc $file -i $file #do_ffmpeg_crc $file -i $file
if [ -n "$do_pbmpipe" ] ; then
# pbmpipe # pbmpipe
do_streamed_images pbm do_streamed_images pbm
fi
if [ -n "$do_pgmpipe" ] ; then
# pgmpipe # pgmpipe
do_streamed_images pgm do_streamed_images pgm
fi
if [ -n "$do_ppmpipe" ] ; then
# ppmpipe # ppmpipe
do_streamed_images ppm do_streamed_images ppm
fi
if [ -n "$do_gif" ] ; then
# gif # gif
file=${outfile}libav.gif file=${outfile}libav.gif
do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -pix_fmt rgb24 $file do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src -pix_fmt rgb24 $file
#do_ffmpeg_crc $file -i $file #do_ffmpeg_crc $file -i $file
fi
if [ -n "$do_yuv4mpeg" ] ; then
# yuv4mpeg # yuv4mpeg
file=${outfile}libav.y4m file=${outfile}libav.y4m
do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file do_ffmpeg $file -t 1 -y -qscale 10 -f pgmyuv -i $raw_src $file
#do_ffmpeg_crc $file -i $file #do_ffmpeg_crc $file -i $file
fi
#################### ####################
# image formats # image formats
if [ -n "$do_pgm" ] ; then
# pgm # pgm
do_image_formats pgm do_image_formats pgm
fi
if [ -n "$do_ppm" ] ; then
# ppm # ppm
do_image_formats ppm do_image_formats ppm
fi
if [ -n "$do_bmp" ] ; then
# bmp # bmp
do_image_formats bmp do_image_formats bmp
fi
if [ -n "$do_tga" ] ; then
# tga # tga
do_image_formats tga do_image_formats tga
fi
if [ -n "$do_tiff" ] ; then
# tiff # tiff
do_image_formats tiff "-pix_fmt rgb24" do_image_formats tiff "-pix_fmt rgb24"
fi
if [ -n "$do_sgi" ] ; then
# sgi # sgi
do_image_formats sgi do_image_formats sgi
fi
if [ -n "$do_jpg" ] ; then
# jpeg # jpeg
do_image_formats jpg "-flags +bitexact -dct fastint -idct simple -pix_fmt yuvj420p" "-f image2" do_image_formats jpg "-flags +bitexact -dct fastint -idct simple -pix_fmt yuvj420p" "-f image2"
fi
#################### ####################
# audio only # audio only
if [ -n "$do_wav" ] ; then
# wav # wav
do_audio_only wav do_audio_only wav
fi
if [ -n "$do_alaw" ] ; then
# alaw # alaw
do_audio_only al do_audio_only al
fi
if [ -n "$do_mulaw" ] ; then
# mulaw # mulaw
do_audio_only ul do_audio_only ul
fi
if [ -n "$do_au" ] ; then
# au # au
do_audio_only au do_audio_only au
fi
if [ -n "$do_mmf" ] ; then
# mmf # mmf
do_audio_only mmf do_audio_only mmf
fi
if [ -n "$do_aiff" ] ; then
# aiff # aiff
do_audio_only aif do_audio_only aif
fi
if [ -n "$do_voc" ] ; then
# voc # voc
do_audio_only voc do_audio_only voc
fi
if [ -n "$do_ogg" ] ; then
# ogg # ogg
do_audio_only ogg do_audio_only ogg
fi
#################### ####################
# pix_fmt conversions # pix_fmt conversions
if [ -n "$do_pixfmt" ] ; then
conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \ conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \
yuvj422p yuvj444p rgb24 bgr24 rgb32 rgb565 rgb555 gray monow \ yuvj422p yuvj444p rgb24 bgr24 rgb32 rgb565 rgb555 gray monow \
monob pal8 yuv440p yuvj440p" monob pal8 yuv440p yuvj440p"
...@@ -666,7 +731,6 @@ for pix_fmt in $conversions ; do ...@@ -666,7 +731,6 @@ for pix_fmt in $conversions ; do
do_ffmpeg $file -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $raw_dst \ do_ffmpeg $file -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $raw_dst \
-f rawvideo -s 352x288 -pix_fmt yuv444p $file -f rawvideo -s 352x288 -pix_fmt yuv444p $file
done done
fi
fi # [ -n "$do_lavf" ]
rm -f "$bench" "$bench2" rm -f "$bench" "$bench2"
...@@ -3330,7 +3330,7 @@ ret: 0 st: 0 dts:-209146758205323.718750 pts:-209146758205323.718750 pos:-1 size ...@@ -3330,7 +3330,7 @@ ret: 0 st: 0 dts:-209146758205323.718750 pts:-209146758205323.718750 pos:-1 size
ret: 0 st:-1 ts:-0.645825 flags:1 ret: 0 st:-1 ts:-0.645825 flags:1
ret: 0 st: 0 dts:-209146758205323.718750 pts:-209146758205323.718750 pos:-1 size:2280 flags:1 ret: 0 st: 0 dts:-209146758205323.718750 pts:-209146758205323.718750 pos:-1 size:2280 flags:1
---------------- ----------------
tests/data/b-libav.pbm tests/data/b-pbmpipe.pbm
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:-1 size:317075 flags:1 ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:-1 size:317075 flags:1
ret:-1 st:-1 ts:-1.000000 flags:0 ret:-1 st:-1 ts:-1.000000 flags:0
ret:-1 st:-1 ts:1.894167 flags:1 ret:-1 st:-1 ts:1.894167 flags:1
...@@ -3359,7 +3359,7 @@ ret:-1 st: 0 ts:1.560000 flags:1 ...@@ -3359,7 +3359,7 @@ ret:-1 st: 0 ts:1.560000 flags:1
ret:-1 st:-1 ts:0.460008 flags:0 ret:-1 st:-1 ts:0.460008 flags:0
ret:-1 st:-1 ts:-0.645825 flags:1 ret:-1 st:-1 ts:-0.645825 flags:1
---------------- ----------------
tests/data/b-libav.pgm tests/data/b-pgmpipe.pgm
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:-1 size:2534775 flags:1 ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:-1 size:2534775 flags:1
ret:-1 st:-1 ts:-1.000000 flags:0 ret:-1 st:-1 ts:-1.000000 flags:0
ret:-1 st:-1 ts:1.894167 flags:1 ret:-1 st:-1 ts:1.894167 flags:1
...@@ -3388,7 +3388,7 @@ ret:-1 st: 0 ts:1.560000 flags:1 ...@@ -3388,7 +3388,7 @@ ret:-1 st: 0 ts:1.560000 flags:1
ret:-1 st:-1 ts:0.460008 flags:0 ret:-1 st:-1 ts:0.460008 flags:0
ret:-1 st:-1 ts:-0.645825 flags:1 ret:-1 st:-1 ts:-0.645825 flags:1
---------------- ----------------
tests/data/b-libav.ppm tests/data/b-ppmpipe.ppm
ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:-1 size:7603575 flags:1 ret: 0 st: 0 dts:0.000000 pts:0.000000 pos:-1 size:7603575 flags:1
ret:-1 st:-1 ts:-1.000000 flags:0 ret:-1 st:-1 ts:-1.000000 flags:0
ret:-1 st:-1 ts:1.894167 flags:1 ret:-1 st:-1 ts:1.894167 flags:1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment