1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

tests: Convert lavf container tests with samples to non-legacy test scripts

This commit is contained in:
James Almer 2019-03-14 14:37:44 -03:00
parent fda424b300
commit a200bf8094
14 changed files with 50 additions and 68 deletions

View File

@ -310,6 +310,16 @@ lavf_container_timecode()
lavf_container "" "$1"
}
lavf_container_fate()
{
t="${test#lavf-fate-}"
outdir="tests/data/lavf-fate"
file=${outdir}/lavf.$t
input="${target_samples}/$1"
do_avconv $file $DEC_OPTS $2 -i "$input" "$ENC_OPTS -metadata title=lavftest" -vcodec copy -acodec copy
do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
}
lavf_image(){
t="${test#lavf-}"
outdir="tests/data/images/$t"

View File

@ -12,19 +12,6 @@ $(FATE_LAVF): CMP =
FATE_AVCONV += $(FATE_LAVF)
fate-lavf: $(FATE_LAVF)
FATE_LAVF_FATE-$(call ALLYES, MATROSKA_DEMUXER OGG_MUXER) += ogg_vp3
FATE_LAVF_FATE-$(call ALLYES, MATROSKA_DEMUXER OGV_MUXER) += ogg_vp8
FATE_LAVF_FATE-$(call ALLYES, MOV_DEMUXER LATM_MUXER) += latm
FATE_LAVF_FATE-$(call ALLYES, MP3_DEMUXER MP3_MUXER) += mp3
FATE_LAVF_FATE-$(call ALLYES, MOV_DEMUXER MOV_MUXER) += mov_qtrle_mace6
FATE_LAVF_FATE-$(call ALLYES, AVI_DEMUXER AVI_MUXER) += avi_cram
FATE_LAVF_FATE += $(FATE_LAVF_FATE-yes:%=fate-lavf-fate-%)
$(FATE_LAVF_FATE): CMD = lavffatetest
FATE_SAMPLES_FFMPEG += $(FATE_LAVF_FATE)
fate-lavf-fate: $(FATE_LAVF_FATE)
tests/data/mp4-to-ts.m3u8: TAG = GEN
tests/data/mp4-to-ts.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \

View File

@ -55,3 +55,25 @@ fate-lavf-wtv: CMD = lavf_container "" "-c:a mp2 -threads 1"
FATE_AVCONV += $(FATE_LAVF_CONTAINER)
fate-lavf-container fate-lavf: $(FATE_LAVF_CONTAINER)
FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MATROSKA_DEMUXER OGG_MUXER) += vp3.ogg
FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MATROSKA_DEMUXER OGV_MUXER) += vp8.ogg
FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MOV_DEMUXER LATM_MUXER) += latm
FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MP3_DEMUXER MP3_MUXER) += mp3
FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MOV_DEMUXER MOV_MUXER) += qtrle_mace6.mov
FATE_LAVF_CONTAINER_FATE-$(call ALLYES, AVI_DEMUXER AVI_MUXER) += cram.avi
FATE_LAVF_CONTAINER_FATE = $(FATE_LAVF_CONTAINER_FATE-yes:%=fate-lavf-fate-%)
$(FATE_LAVF_CONTAINER_FATE): REF = $(SRC_PATH)/tests/ref/lavf-fate/$(@:fate-lavf-fate-%=%)
$(FATE_LAVF_CONTAINER_FATE): $(AREF) $(VREF)
fate-lavf-fate-vp3.ogg: CMD = lavf_container_fate "vp3/coeff_level64.mkv" "-idct auto"
fate-lavf-fate-vp8.ogg: CMD = lavf_container_fate "vp8/RRSF49-short.webm" "" "-acodec copy"
fate-lavf-fate-latm: CMD = lavf_container_fate "aac/al04_44.mp4" "" "-acodec copy"
fate-lavf-fate-mp3: CMD = lavf_container_fate "mp3-conformance/he_32khz.bit" "" "-acodec copy"
fate-lavf-fate-qtrle_mace6.mov: CMD = lavf_container_fate "qtrle/Animation-16Greys.mov" "-idct auto"
fate-lavf-fate-cram.avi: CMD = lavf_container_fate "cram/toon.avi" "-idct auto"
FATE_SAMPLES_FFMPEG += $(FATE_LAVF_CONTAINER_FATE)
fate-lavf-fate fate-lavf: $(FATE_LAVF_CONTAINER_FATE)

View File

@ -13,43 +13,6 @@ eval do_$test=y
ENC_OPTS="$ENC_OPTS -metadata title=lavftest"
do_lavf_fate()
{
file=${outfile}lavf.$1
input="${target_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
}
if [ -n "$do_mp3" ] ; then
do_lavf_fate mp3 "mp3-conformance/he_32khz.bit" "-acodec copy"
fi
if [ -n "$do_latm" ] ; then
do_lavf_fate latm "aac/al04_44.mp4" "-acodec copy"
fi
if [ -n "$do_ogg_vp3" ] ; then
# -idct simple causes different results on different systems
DEC_OPTS="$DEC_OPTS -idct auto"
do_lavf_fate ogg "vp3/coeff_level64.mkv"
fi
if [ -n "$do_ogg_vp8" ] ; then
do_lavf_fate ogv "vp8/RRSF49-short.webm" "-acodec copy"
fi
if [ -n "$do_mov_qtrle_mace6" ] ; then
DEC_OPTS="$DEC_OPTS -idct auto"
do_lavf_fate mov "qtrle/Animation-16Greys.mov"
fi
if [ -n "$do_avi_cram" ] ; then
DEC_OPTS="$DEC_OPTS -idct auto"
do_lavf_fate avi "cram/toon.avi"
fi
# streamed images
# mjpeg
#file=${outfile}lavf.mjpeg

View File

@ -1,3 +0,0 @@
6fc88702c23b895c305c5e1f51a0904e *./tests/data/lavf-fate/lavf.avi
928260 ./tests/data/lavf-fate/lavf.avi
./tests/data/lavf-fate/lavf.avi CRC=0xa4770de2

View File

@ -0,0 +1,3 @@
6fc88702c23b895c305c5e1f51a0904e *tests/data/lavf-fate/lavf.cram.avi
928260 tests/data/lavf-fate/lavf.cram.avi
tests/data/lavf-fate/lavf.cram.avi CRC=0xa4770de2

View File

@ -1,3 +1,3 @@
eb13788e71c9b5bc7d62ceb748312bbb *./tests/data/lavf-fate/lavf.latm
67876 ./tests/data/lavf-fate/lavf.latm
./tests/data/lavf-fate/lavf.latm CRC=0xcf94c59d
eb13788e71c9b5bc7d62ceb748312bbb *tests/data/lavf-fate/lavf.latm
67876 tests/data/lavf-fate/lavf.latm
tests/data/lavf-fate/lavf.latm CRC=0xcf94c59d

View File

@ -1,3 +0,0 @@
f0ae34fb90e11342624e092094273aef *./tests/data/lavf-fate/lavf.mov
1270415 ./tests/data/lavf-fate/lavf.mov
./tests/data/lavf-fate/lavf.mov CRC=0x9320cd26

View File

@ -1,3 +1,3 @@
f231c5316357fd747573cbcb02f889c5 *./tests/data/lavf-fate/lavf.mp3
96016 ./tests/data/lavf-fate/lavf.mp3
./tests/data/lavf-fate/lavf.mp3 CRC=0x6c9850fe
f231c5316357fd747573cbcb02f889c5 *tests/data/lavf-fate/lavf.mp3
96016 tests/data/lavf-fate/lavf.mp3
tests/data/lavf-fate/lavf.mp3 CRC=0x6c9850fe

View File

@ -1,3 +0,0 @@
4bd51dac3194fa88ae33767c25b4b1e6 *./tests/data/lavf-fate/lavf.ogg
417621 ./tests/data/lavf-fate/lavf.ogg
./tests/data/lavf-fate/lavf.ogg CRC=0x037e3e79

View File

@ -1,3 +0,0 @@
c56d8dce728d46d4f0ab4c7cc9f86abc *./tests/data/lavf-fate/lavf.ogv
95009 ./tests/data/lavf-fate/lavf.ogv
./tests/data/lavf-fate/lavf.ogv CRC=0x8c067a66

View File

@ -0,0 +1,3 @@
f0ae34fb90e11342624e092094273aef *tests/data/lavf-fate/lavf.qtrle_mace6.mov
1270415 tests/data/lavf-fate/lavf.qtrle_mace6.mov
tests/data/lavf-fate/lavf.qtrle_mace6.mov CRC=0x9320cd26

View File

@ -0,0 +1,3 @@
4bd51dac3194fa88ae33767c25b4b1e6 *tests/data/lavf-fate/lavf.vp3.ogg
417621 tests/data/lavf-fate/lavf.vp3.ogg
tests/data/lavf-fate/lavf.vp3.ogg CRC=0x037e3e79

View File

@ -0,0 +1,3 @@
c56d8dce728d46d4f0ab4c7cc9f86abc *tests/data/lavf-fate/lavf.vp8.ogg
95009 tests/data/lavf-fate/lavf.vp8.ogg
tests/data/lavf-fate/lavf.vp8.ogg CRC=0x8c067a66