Add muxer test based on stream-copy from FATE sample.

This should test muxing Theora into Ogg.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
Reimar Döffinger 2012-02-12 11:52:10 +01:00
parent f3bd226de6
commit f23a740303
6 changed files with 29 additions and 3 deletions

6
configure vendored
View File

@ -1778,7 +1778,7 @@ test_deps _muxer _demuxer \
pcm_mulaw=mulaw \ pcm_mulaw=mulaw \
mxf="mxf mxf_d10" \ mxf="mxf mxf_d10" \
nut \ nut \
ogg \ ogg="ogg ogg_vp3" \
rawvideo=pixfmt \ rawvideo=pixfmt \
rm \ rm \
swf \ swf \
@ -1946,11 +1946,12 @@ find_tests(){
ACODEC_TESTS=$(find_tests acodec) ACODEC_TESTS=$(find_tests acodec)
VCODEC_TESTS=$(find_tests vsynth1) VCODEC_TESTS=$(find_tests vsynth1)
LAVF_FATE_TESTS=$(find_tests lavf-fate)
LAVF_TESTS=$(find_tests lavf) LAVF_TESTS=$(find_tests lavf)
LAVFI_TESTS=$(find_tests lavfi) LAVFI_TESTS=$(find_tests lavfi)
SEEK_TESTS=$(find_tests seek seek_) SEEK_TESTS=$(find_tests seek seek_)
ALL_TESTS="$ACODEC_TESTS $VCODEC_TESTS $LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS" ALL_TESTS="$ACODEC_TESTS $VCODEC_TESTS $LAVF_FATE_TESTS $LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS"
pcm_test_deps=$(map 'echo ${v%_*}_decoder $v' $(filter pcm_* $ENCODER_LIST)) pcm_test_deps=$(map 'echo ${v%_*}_decoder $v' $(filter pcm_* $ENCODER_LIST))
@ -3699,6 +3700,7 @@ print_config CONFIG_ "$config_files" $CONFIG_LIST \
cat >>config.mak <<EOF cat >>config.mak <<EOF
ACODEC_TESTS=$(print_enabled -n _test $ACODEC_TESTS) ACODEC_TESTS=$(print_enabled -n _test $ACODEC_TESTS)
VCODEC_TESTS=$(print_enabled -n _test $VCODEC_TESTS) VCODEC_TESTS=$(print_enabled -n _test $VCODEC_TESTS)
LAVF_FATE_TESTS=$(print_enabled -n _test $LAVF_FATE_TESTS)
LAVF_TESTS=$(print_enabled -n _test $LAVF_TESTS) LAVF_TESTS=$(print_enabled -n _test $LAVF_TESTS)
LAVFI_TESTS=$(print_enabled -n _test $LAVFI_TESTS) LAVFI_TESTS=$(print_enabled -n _test $LAVFI_TESTS)
SEEK_TESTS=$(print_enabled -n _test $SEEK_TESTS) SEEK_TESTS=$(print_enabled -n _test $SEEK_TESTS)

View File

@ -81,6 +81,7 @@ FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%)
FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%) FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%) FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
FATE_VCODEC = $(FATE_VSYNTH1) $(FATE_VSYNTH2) FATE_VCODEC = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
FATE_LAVF_FATE = $(LAVF_FATE_TESTS:%=fate-lavf-fate-%)
FATE_LAVF = $(LAVF_TESTS:%=fate-lavf-%) FATE_LAVF = $(LAVF_TESTS:%=fate-lavf-%)
FATE_LAVFI = $(LAVFI_TESTS:%=fate-lavfi-%) FATE_LAVFI = $(LAVFI_TESTS:%=fate-lavfi-%)
FATE_SEEK = $(SEEK_TESTS:seek_%=fate-seek-%) FATE_SEEK = $(SEEK_TESTS:seek_%=fate-seek-%)
@ -104,6 +105,7 @@ $(FATE_SEEK): fate-codec fate-lavf libavformat/seek-test$(EXESUF)
$(FATE_ACODEC): CMD = codectest acodec $(FATE_ACODEC): CMD = codectest acodec
$(FATE_VSYNTH1): CMD = codectest vsynth1 $(FATE_VSYNTH1): CMD = codectest vsynth1
$(FATE_VSYNTH2): CMD = codectest vsynth2 $(FATE_VSYNTH2): CMD = codectest vsynth2
$(FATE_LAVF_FATE): CMD = lavffatetest
$(FATE_LAVF): CMD = lavftest $(FATE_LAVF): CMD = lavftest
$(FATE_LAVFI): CMD = lavfitest $(FATE_LAVFI): CMD = lavfitest
$(FATE_SEEK): CMD = seektest $(FATE_SEEK): CMD = seektest
@ -111,11 +113,13 @@ $(FATE_SEEK): CMD = seektest
fate-codec: fate-acodec fate-vcodec fate-codec: fate-acodec fate-vcodec
fate-acodec: $(FATE_ACODEC) fate-acodec: $(FATE_ACODEC)
fate-vcodec: $(FATE_VCODEC) fate-vcodec: $(FATE_VCODEC)
fate-lavf-fate: $(FATE_LAVF_FATE)
fate-lavf: $(FATE_LAVF) fate-lavf: $(FATE_LAVF)
fate-lavfi: $(FATE_LAVFI) fate-lavfi: $(FATE_LAVFI)
fate-seek: $(FATE_SEEK) fate-seek: $(FATE_SEEK)
ifdef SAMPLES ifdef SAMPLES
FATE += $(FATE_LAVF_FATE)
FATE += $(FATE_TESTS) $(FATE_TESTS-yes) FATE += $(FATE_TESTS) $(FATE_TESTS-yes)
fate-rsync: fate-rsync:
rsync -vaLW --timeout=60 --contimeout=60 rsync://fate.ffmpeg.org/fate-suite/ $(SAMPLES) rsync -vaLW --timeout=60 --contimeout=60 rsync://fate.ffmpeg.org/fate-suite/ $(SAMPLES)

View File

@ -77,13 +77,17 @@ pcm(){
regtest(){ regtest(){
t="${test#$2-}" t="${test#$2-}"
ref=${base}/ref/$2/$t ref=${base}/ref/$2/$t
${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path" "$threads" "$thread_type" "$tool" ${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path" "$threads" "$thread_type" "$tool" "$samples"
} }
codectest(){ codectest(){
regtest codec $1 tests/$1 regtest codec $1 tests/$1
} }
lavffatetest(){
regtest lavf lavf-fate tests/vsynth1
}
lavftest(){ lavftest(){
regtest lavf lavf tests/vsynth1 regtest lavf lavf tests/vsynth1
} }

View File

@ -13,6 +13,14 @@ eval do_$test=y
ENC_OPTS="$ENC_OPTS -metadata title=lavftest" ENC_OPTS="$ENC_OPTS -metadata title=lavftest"
do_lavf_fate()
{
file=${outfile}lavf.$1
input="${samples}/$2"
do_avconv $file $DEC_OPTS -i "$input" $ENC_OPTS -vcodec copy -acodec copy
do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
}
do_lavf() do_lavf()
{ {
file=${outfile}lavf.$1 file=${outfile}lavf.$1
@ -126,6 +134,10 @@ if [ -n "$do_mkv" ] ; then
do_lavf mkv "-acodec mp2 -ab 64k -vcodec mpeg4" do_lavf mkv "-acodec mp2 -ab 64k -vcodec mpeg4"
fi fi
if [ -n "$do_ogg_vp3" ] ; then
do_lavf_fate ogg "vp3/coeff_level64.mkv"
fi
if [ -n "$do_wtv" ] ; then if [ -n "$do_wtv" ] ; then
do_lavf wtv "-acodec mp2" do_lavf wtv "-acodec mp2"
fi fi

View File

@ -0,0 +1,3 @@
cf4184d736685fb698bb3be4656353bd *./tests/data/lavf-fate/lavf.ogg
417698 ./tests/data/lavf-fate/lavf.ogg
./tests/data/lavf-fate/lavf.ogg CRC=0x45a9df79

View File

@ -11,6 +11,7 @@ target_exec=$4
target_path=$5 target_path=$5
threads=${6:-1} threads=${6:-1}
tool=$8 tool=$8
samples=$9
datadir="./tests/data" datadir="./tests/data"
target_datadir="${target_path}/${datadir}" target_datadir="${target_path}/${datadir}"