Add muxer test based on stream-copy from FATE sample.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 12 Feb 2012 10:52:10 +0000 (11:52 +0100)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sat, 18 Feb 2012 15:41:39 +0000 (16:41 +0100)
This should test muxing Theora into Ogg.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
configure
tests/Makefile
tests/fate-run.sh
tests/lavf-regression.sh
tests/ref/lavf-fate/ogg_vp3 [new file with mode: 0644]
tests/regression-funcs.sh

index 9608bee..70fc016 100755 (executable)
--- a/configure
+++ b/configure
@@ -1778,7 +1778,7 @@ test_deps _muxer _demuxer                                               \
     pcm_mulaw=mulaw                                                     \
     mxf="mxf mxf_d10"                                                   \
     nut                                                                 \
-    ogg                                                                 \
+    ogg="ogg ogg_vp3"                                                   \
     rawvideo=pixfmt                                                     \
     rm                                                                  \
     swf                                                                 \
@@ -1946,11 +1946,12 @@ find_tests(){
 
 ACODEC_TESTS=$(find_tests acodec)
 VCODEC_TESTS=$(find_tests vsynth1)
+LAVF_FATE_TESTS=$(find_tests lavf-fate)
 LAVF_TESTS=$(find_tests lavf)
 LAVFI_TESTS=$(find_tests lavfi)
 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))
 
@@ -3699,6 +3700,7 @@ print_config CONFIG_ "$config_files" $CONFIG_LIST       \
 cat >>config.mak <<EOF
 ACODEC_TESTS=$(print_enabled -n _test $ACODEC_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)
 LAVFI_TESTS=$(print_enabled  -n _test $LAVFI_TESTS)
 SEEK_TESTS=$(print_enabled   -n _test $SEEK_TESTS)
index 0722906..97f595b 100644 (file)
@@ -81,6 +81,7 @@ FATE_ACODEC  = $(ACODEC_TESTS:%=fate-acodec-%)
 FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
 FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
 FATE_VCODEC  = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
+FATE_LAVF_FATE = $(LAVF_FATE_TESTS:%=fate-lavf-fate-%)
 FATE_LAVF    = $(LAVF_TESTS:%=fate-lavf-%)
 FATE_LAVFI   = $(LAVFI_TESTS:%=fate-lavfi-%)
 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_VSYNTH1): CMD = codectest vsynth1
 $(FATE_VSYNTH2): CMD = codectest vsynth2
+$(FATE_LAVF_FATE): CMD = lavffatetest
 $(FATE_LAVF):    CMD = lavftest
 $(FATE_LAVFI):   CMD = lavfitest
 $(FATE_SEEK):    CMD = seektest
@@ -111,11 +113,13 @@ $(FATE_SEEK):    CMD = seektest
 fate-codec:  fate-acodec fate-vcodec
 fate-acodec: $(FATE_ACODEC)
 fate-vcodec: $(FATE_VCODEC)
+fate-lavf-fate: $(FATE_LAVF_FATE)
 fate-lavf:   $(FATE_LAVF)
 fate-lavfi:  $(FATE_LAVFI)
 fate-seek:   $(FATE_SEEK)
 
 ifdef SAMPLES
+FATE += $(FATE_LAVF_FATE)
 FATE += $(FATE_TESTS) $(FATE_TESTS-yes)
 fate-rsync:
        rsync -vaLW --timeout=60 --contimeout=60 rsync://fate.ffmpeg.org/fate-suite/ $(SAMPLES)
index 2f92a7d..d7b5e7e 100755 (executable)
@@ -77,13 +77,17 @@ pcm(){
 regtest(){
     t="${test#$2-}"
     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(){
     regtest codec $1 tests/$1
 }
 
+lavffatetest(){
+    regtest lavf lavf-fate tests/vsynth1
+}
+
 lavftest(){
     regtest lavf lavf tests/vsynth1
 }
index 49c77e8..316170b 100755 (executable)
@@ -13,6 +13,14 @@ eval do_$test=y
 
 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()
 {
     file=${outfile}lavf.$1
@@ -126,6 +134,10 @@ if [ -n "$do_mkv" ] ; then
 do_lavf mkv "-acodec mp2 -ab 64k -vcodec mpeg4"
 fi
 
+if [ -n "$do_ogg_vp3" ] ; then
+do_lavf_fate ogg "vp3/coeff_level64.mkv"
+fi
+
 if [ -n "$do_wtv" ] ; then
 do_lavf wtv "-acodec mp2"
 fi
diff --git a/tests/ref/lavf-fate/ogg_vp3 b/tests/ref/lavf-fate/ogg_vp3
new file mode 100644 (file)
index 0000000..9f36eee
--- /dev/null
@@ -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
index b0a9b85..1cafb3f 100755 (executable)
@@ -11,6 +11,7 @@ target_exec=$4
 target_path=$5
 threads=${6:-1}
 tool=$8
+samples=$9
 
 datadir="./tests/data"
 target_datadir="${target_path}/${datadir}"