diff options
author | Diego Biurrun <diego@biurrun.de> | 2019-02-02 13:49:53 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2019-02-16 18:15:22 +0100 |
commit | eb8a8115994434b548523cf0bca6a4a74784e79c (patch) | |
tree | 76c5ec1ede8cb64d118d770d885f95b668a475f8 | |
parent | a70eac7a9b193e8434b5bed90bd72aa4cb688363 (diff) | |
download | ffmpeg-eb8a8115994434b548523cf0bca6a4a74784e79c.tar.gz |
tests: Convert audio-only lavf tests to non-legacy test scripts
Rename some tests in the process for consistency and simplicity.
-rw-r--r-- | tests/Makefile | 1 | ||||
-rwxr-xr-x | tests/fate-run.sh | 9 | ||||
-rw-r--r-- | tests/fate/avformat.mak | 11 | ||||
-rw-r--r-- | tests/fate/lavf-audio.mak | 24 | ||||
-rw-r--r-- | tests/fate/seek.mak | 10 | ||||
-rwxr-xr-x | tests/lavf-regression.sh | 53 | ||||
-rw-r--r-- | tests/ref/lavf/aiff | 6 | ||||
-rw-r--r-- | tests/ref/lavf/al | 3 | ||||
-rw-r--r-- | tests/ref/lavf/alaw | 3 | ||||
-rw-r--r-- | tests/ref/lavf/au | 6 | ||||
-rw-r--r-- | tests/ref/lavf/mmf | 6 | ||||
-rw-r--r-- | tests/ref/lavf/mulaw | 3 | ||||
-rw-r--r-- | tests/ref/lavf/ogg | 6 | ||||
-rw-r--r-- | tests/ref/lavf/rso | 6 | ||||
-rw-r--r-- | tests/ref/lavf/s16.voc | 3 | ||||
-rw-r--r-- | tests/ref/lavf/sox | 6 | ||||
-rw-r--r-- | tests/ref/lavf/ul | 3 | ||||
-rw-r--r-- | tests/ref/lavf/voc | 6 | ||||
-rw-r--r-- | tests/ref/lavf/voc_s16 | 3 | ||||
-rw-r--r-- | tests/ref/lavf/wav | 6 | ||||
-rw-r--r-- | tests/ref/seek/lavf-al (renamed from tests/ref/seek/lavf-alaw) | 0 | ||||
-rw-r--r-- | tests/ref/seek/lavf-ul (renamed from tests/ref/seek/lavf-mulaw) | 0 |
22 files changed, 72 insertions, 102 deletions
diff --git a/tests/Makefile b/tests/Makefile index 1884f5e437..6ad54eba71 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -61,6 +61,7 @@ include $(SRC_PATH)/tests/fate/acodec.mak include $(SRC_PATH)/tests/fate/vcodec.mak include $(SRC_PATH)/tests/fate/avformat.mak +include $(SRC_PATH)/tests/fate/lavf-audio.mak include $(SRC_PATH)/tests/fate/lavf-image2pipe.mak include $(SRC_PATH)/tests/fate/seek.mak diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 0221e5c1dc..b20e013d6b 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -156,6 +156,7 @@ enc_dec(){ # functions above and below that should be refactored. avconv2="$target_exec ${target_path}/avconv" raw_src="${target_path}/tests/vsynth1/%02d.pgm" +pcm_src="${target_path}/tests/data/asynth1.sw" crcfile="tests/data/$test.lavf.crc" target_crcfile="${target_path}/$crcfile" @@ -188,6 +189,14 @@ do_avconv_crc(){ echo "$f $(cat $crcfile)" } +lavf_audio(){ + t="${test#lavf-}" + outdir="tests/data/lavf" + file=${outdir}/lavf.$t + do_avconv $file $DEC_OPTS $1 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $2 + do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file +} + lavf_image2pipe(){ t="${test#lavf-}" t="${t%pipe}" diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak index a4a0988bb2..d840227914 100644 --- a/tests/fate/avformat.mak +++ b/tests/fate/avformat.mak @@ -1,7 +1,4 @@ -FATE_LAVF-$(call ENCDEC, PCM_S16BE, AIFF) += aiff -FATE_LAVF-$(call ENCDEC, PCM_ALAW, PCM_ALAW) += alaw FATE_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF) += asf -FATE_LAVF-$(call ENCDEC, PCM_S16BE, AU) += au FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI) += avi FATE_LAVF-$(call ENCDEC, BMP, IMAGE2) += bmp FATE_LAVF-$(call ENCDEC, DPX, IMAGE2) += dpx @@ -11,31 +8,23 @@ FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF) += gxf FATE_LAVF-$(call ENCDEC, MJPEG, IMAGE2) += jpg FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, MATROSKA) += mkv -FATE_LAVF-$(call ENCDEC, ADPCM_YAMAHA, MMF) += mmf FATE_LAVF-$(call ENCDEC2, MPEG4, PCM_ALAW, MOV) += mov FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg -FATE_LAVF-$(call ENCDEC, PCM_MULAW, PCM_MULAW) += mulaw FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += mxf FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF) += mxf_d10 FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT) += nut -FATE_LAVF-$(call ENCDEC, FLAC, OGG) += ogg FATE_LAVF-$(call ENCDEC, PAM, IMAGE2) += pam FATE_LAVF-$(call ENCDEC, PCX, IMAGE2) += pcx FATE_LAVF-$(call ENCDEC, PGM, IMAGE2) += pgm FATE_LAVF-$(call ENCDEC, PNG, IMAGE2) += png FATE_LAVF-$(call ENCDEC, PPM, IMAGE2) += ppm FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED, RM) += rm -FATE_LAVF-$(call ENCDEC, PCM_U8, RSO) += rso FATE_LAVF-$(call ENCDEC, SGI, IMAGE2) += sgi -FATE_LAVF-$(call ENCDEC, PCM_S16LE, SOX) += sox FATE_LAVF-$(call ENCDEC, SUNRAST, IMAGE2) += sunrast FATE_LAVF-$(call ENCDEC, FLV, SWF) += swf FATE_LAVF-$(call ENCDEC, TARGA, IMAGE2) += tga FATE_LAVF-$(call ENCDEC, TIFF, IMAGE2) += tiff FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts -FATE_LAVF-$(call ENCDEC, PCM_U8, VOC) += voc -FATE_LAVF-$(call ENCDEC, PCM_S16LE, VOC) += voc_s16 -FATE_LAVF-$(call ENCDEC, PCM_S16LE, WAV) += wav FATE_LAVF-$(call ENCDEC, XWD, IMAGE2) += xwd FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg diff --git a/tests/fate/lavf-audio.mak b/tests/fate/lavf-audio.mak new file mode 100644 index 0000000000..13440e42a1 --- /dev/null +++ b/tests/fate/lavf-audio.mak @@ -0,0 +1,24 @@ +FATE_LAVF_AUDIO-$(call ENCDEC, PCM_S16BE, AIFF) += aiff +FATE_LAVF_AUDIO-$(call ENCDEC, PCM_ALAW, PCM_ALAW) += al +FATE_LAVF_AUDIO-$(call ENCDEC, PCM_S16BE, AU) += au +FATE_LAVF_AUDIO-$(call ENCDEC, ADPCM_YAMAHA, MMF) += mmf +FATE_LAVF_AUDIO-$(call ENCDEC, FLAC, OGG) += ogg +FATE_LAVF_AUDIO-$(call ENCDEC, PCM_U8, RSO) += rso +FATE_LAVF_AUDIO-$(call ENCDEC, PCM_S16LE, SOX) += sox +FATE_LAVF_AUDIO-$(call ENCDEC, PCM_MULAW, PCM_MULAW) += ul +FATE_LAVF_AUDIO-$(call ENCDEC, PCM_U8, VOC) += voc +FATE_LAVF_AUDIO-$(call ENCDEC, PCM_S16LE, VOC) += s16.voc +FATE_LAVF_AUDIO-$(call ENCDEC, PCM_S16LE, WAV) += wav + +FATE_LAVF_AUDIO = $(FATE_LAVF_AUDIO-yes:%=fate-lavf-%) + +$(FATE_LAVF_AUDIO): CMD = lavf_audio +$(FATE_LAVF_AUDIO): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%) +$(FATE_LAVF_AUDIO): $(AREF) + +fate-lavf-al fate-lavf-ul: CMD = lavf_audio "" "" "-ar 44100" +fate-lavf-ogg: CMD = lavf_audio "" "-c:a flac" +fate-lavf-s16.voc: CMD = lavf_audio "-ac 2" "-c:a pcm_s16le" + +FATE_AVCONV += $(FATE_LAVF_AUDIO) +fate-lavf-audio fate-lavf: $(FATE_LAVF_AUDIO) diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak index 60adab2085..e232d6af5a 100644 --- a/tests/fate/seek.mak +++ b/tests/fate/seek.mak @@ -145,7 +145,7 @@ FATE_SEEK += $(FATE_SEEK_VSYNTH2-yes:%=fate-seek-vsynth2-%) # files from fate-lavf FATE_SEEK_LAVF-$(call ENCDEC, PCM_S16BE, AIFF) += aiff -FATE_SEEK_LAVF-$(call ENCDEC, PCM_ALAW, PCM_ALAW) += alaw +FATE_SEEK_LAVF-$(call ENCDEC, PCM_ALAW, PCM_ALAW) += al FATE_SEEK_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF) += asf FATE_SEEK_LAVF-$(call ENCDEC, PCM_S16BE, AU) += au FATE_SEEK_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI) += avi @@ -159,7 +159,7 @@ FATE_SEEK_LAVF-$(call ENCDEC2, MPEG4, MP2, MATROSKA) += mkv FATE_SEEK_LAVF-$(call ENCDEC, ADPCM_YAMAHA, MMF) += mmf FATE_SEEK_LAVF-$(call ENCDEC2, MPEG4, PCM_ALAW, MOV) += mov FATE_SEEK_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg -FATE_SEEK_LAVF-$(call ENCDEC, PCM_MULAW, PCM_MULAW) += mulaw +FATE_SEEK_LAVF-$(call ENCDEC, PCM_MULAW, PCM_MULAW) += ul FATE_SEEK_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF) += mxf FATE_SEEK_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF) += mxf_d10 FATE_SEEK_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT) += nut @@ -180,8 +180,8 @@ FATE_SEEK_LAVF-$(call ENCDEC, PCM_U8, VOC) += voc FATE_SEEK_LAVF-$(call ENCDEC, PCM_S16LE, WAV) += wav FATE_SEEK_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg -fate-seek-lavf-aiff: SRC = lavf/lavf.aif -fate-seek-lavf-alaw: SRC = lavf/lavf.al +fate-seek-lavf-aiff: SRC = lavf/lavf.aiff +fate-seek-lavf-al: SRC = lavf/lavf.al fate-seek-lavf-asf: SRC = lavf/lavf.asf fate-seek-lavf-au: SRC = lavf/lavf.au fate-seek-lavf-avi: SRC = lavf/lavf.avi @@ -195,7 +195,7 @@ fate-seek-lavf-mkv: SRC = lavf/lavf.mkv fate-seek-lavf-mmf: SRC = lavf/lavf.mmf fate-seek-lavf-mov: SRC = lavf/lavf.mov fate-seek-lavf-mpg: SRC = lavf/lavf.mpg -fate-seek-lavf-mulaw: SRC = lavf/lavf.ul +fate-seek-lavf-ul: SRC = lavf/lavf.ul fate-seek-lavf-mxf: SRC = lavf/lavf.mxf fate-seek-lavf-mxf_d10: SRC = lavf/lavf.mxf_d10 fate-seek-lavf-nut: SRC = lavf/lavf.nut diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index fecc36c0fd..65d28fb29b 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -30,13 +30,6 @@ do_image_formats() echo $(wc -c ${outfile}02.$1) } -do_audio_only() -{ - file=${outfile}lavf.$1 - do_avconv $file $DEC_OPTS $2 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $3 - do_avconv_crc $file $DEC_OPTS $4 -i $target_path/$file -} - if [ -n "$do_avi" ] ; then do_lavf avi "" "-c:a mp2 -ar 44100" fi @@ -168,52 +161,6 @@ if [ -n "$do_sunrast" ] ; then do_image_formats sun fi -# audio only - -if [ -n "$do_wav" ] ; then -do_audio_only wav -fi - -if [ -n "$do_alaw" ] ; then -do_audio_only al "" "" "-ar 44100" -fi - -if [ -n "$do_mulaw" ] ; then -do_audio_only ul "" "" "-ar 44100" -fi - -if [ -n "$do_au" ] ; then -do_audio_only au -fi - -if [ -n "$do_mmf" ] ; then -do_audio_only mmf -fi - -if [ -n "$do_aiff" ] ; then -do_audio_only aif -fi - -if [ -n "$do_voc" ] ; then -do_audio_only voc -fi - -if [ -n "$do_voc_s16" ] ; then -do_audio_only s16.voc "-ac 2" "-c:a pcm_s16le" -fi - -if [ -n "$do_ogg" ] ; then -do_audio_only ogg "" "-c:a flac" -fi - -if [ -n "$do_rso" ] ; then -do_audio_only rso -fi - -if [ -n "$do_sox" ] ; then -do_audio_only sox -fi - # pix_fmt conversions if [ -n "$do_pixfmt" ] ; then diff --git a/tests/ref/lavf/aiff b/tests/ref/lavf/aiff index c713d02909..479f7d7cea 100644 --- a/tests/ref/lavf/aiff +++ b/tests/ref/lavf/aiff @@ -1,3 +1,3 @@ -9d9e55431800bf6aea46a7d67509da4e *./tests/data/lavf/lavf.aif -88254 ./tests/data/lavf/lavf.aif -./tests/data/lavf/lavf.aif CRC=0x3a1da17e +9d9e55431800bf6aea46a7d67509da4e *tests/data/lavf/lavf.aiff +88254 tests/data/lavf/lavf.aiff +tests/data/lavf/lavf.aiff CRC=0x3a1da17e diff --git a/tests/ref/lavf/al b/tests/ref/lavf/al new file mode 100644 index 0000000000..c383c36284 --- /dev/null +++ b/tests/ref/lavf/al @@ -0,0 +1,3 @@ +652d96e474869ddb01403743deb35117 *tests/data/lavf/lavf.al +44100 tests/data/lavf/lavf.al +tests/data/lavf/lavf.al CRC=0xf9643112 diff --git a/tests/ref/lavf/alaw b/tests/ref/lavf/alaw deleted file mode 100644 index d93d6fc0ee..0000000000 --- a/tests/ref/lavf/alaw +++ /dev/null @@ -1,3 +0,0 @@ -652d96e474869ddb01403743deb35117 *./tests/data/lavf/lavf.al -44100 ./tests/data/lavf/lavf.al -./tests/data/lavf/lavf.al CRC=0xf9643112 diff --git a/tests/ref/lavf/au b/tests/ref/lavf/au index 71cfdcb552..49ddd31107 100644 --- a/tests/ref/lavf/au +++ b/tests/ref/lavf/au @@ -1,3 +1,3 @@ -b9396e3775ea009094e751e7128d614e *./tests/data/lavf/lavf.au -88224 ./tests/data/lavf/lavf.au -./tests/data/lavf/lavf.au CRC=0x3a1da17e +b9396e3775ea009094e751e7128d614e *tests/data/lavf/lavf.au +88224 tests/data/lavf/lavf.au +tests/data/lavf/lavf.au CRC=0x3a1da17e diff --git a/tests/ref/lavf/mmf b/tests/ref/lavf/mmf index 947abc746b..fd308a4948 100644 --- a/tests/ref/lavf/mmf +++ b/tests/ref/lavf/mmf @@ -1,3 +1,3 @@ -1a3bbf19a41668c1e928bcafce88ff3e *./tests/data/lavf/lavf.mmf -22617 ./tests/data/lavf/lavf.mmf -./tests/data/lavf/lavf.mmf CRC=0x8dea1388 +1a3bbf19a41668c1e928bcafce88ff3e *tests/data/lavf/lavf.mmf +22617 tests/data/lavf/lavf.mmf +tests/data/lavf/lavf.mmf CRC=0x8dea1388 diff --git a/tests/ref/lavf/mulaw b/tests/ref/lavf/mulaw deleted file mode 100644 index bd540847de..0000000000 --- a/tests/ref/lavf/mulaw +++ /dev/null @@ -1,3 +0,0 @@ -ad492935e361f830f2f8302aa102701d *./tests/data/lavf/lavf.ul -44100 ./tests/data/lavf/lavf.ul -./tests/data/lavf/lavf.ul CRC=0x4515fa26 diff --git a/tests/ref/lavf/ogg b/tests/ref/lavf/ogg index ea827acd4c..53724028fa 100644 --- a/tests/ref/lavf/ogg +++ b/tests/ref/lavf/ogg @@ -1,3 +1,3 @@ -8ca901bc8d24b80ebe79e387e454d1e9 *./tests/data/lavf/lavf.ogg -13476 ./tests/data/lavf/lavf.ogg -./tests/data/lavf/lavf.ogg CRC=0x3a1da17e +8ca901bc8d24b80ebe79e387e454d1e9 *tests/data/lavf/lavf.ogg +13476 tests/data/lavf/lavf.ogg +tests/data/lavf/lavf.ogg CRC=0x3a1da17e diff --git a/tests/ref/lavf/rso b/tests/ref/lavf/rso index 5878f434a1..6b2f03e181 100644 --- a/tests/ref/lavf/rso +++ b/tests/ref/lavf/rso @@ -1,3 +1,3 @@ -443b72346065d6318ca18c8395aa1d87 *./tests/data/lavf/lavf.rso -44108 ./tests/data/lavf/lavf.rso -./tests/data/lavf/lavf.rso CRC=0x298fd284 +443b72346065d6318ca18c8395aa1d87 *tests/data/lavf/lavf.rso +44108 tests/data/lavf/lavf.rso +tests/data/lavf/lavf.rso CRC=0x298fd284 diff --git a/tests/ref/lavf/s16.voc b/tests/ref/lavf/s16.voc new file mode 100644 index 0000000000..6cd6ba9141 --- /dev/null +++ b/tests/ref/lavf/s16.voc @@ -0,0 +1,3 @@ +e55a9c632cfeab90bcfb9ff29a71728c *tests/data/lavf/lavf.s16.voc +176613 tests/data/lavf/lavf.s16.voc +tests/data/lavf/lavf.s16.voc CRC=0xe61e3bd0 diff --git a/tests/ref/lavf/sox b/tests/ref/lavf/sox index fc368b1357..fc3953e128 100644 --- a/tests/ref/lavf/sox +++ b/tests/ref/lavf/sox @@ -1,3 +1,3 @@ -683635d5cb1344e44fa96df90c3a993c *./tests/data/lavf/lavf.sox -176432 ./tests/data/lavf/lavf.sox -./tests/data/lavf/lavf.sox CRC=0x3a1da17e +683635d5cb1344e44fa96df90c3a993c *tests/data/lavf/lavf.sox +176432 tests/data/lavf/lavf.sox +tests/data/lavf/lavf.sox CRC=0x3a1da17e diff --git a/tests/ref/lavf/ul b/tests/ref/lavf/ul new file mode 100644 index 0000000000..cf025937b3 --- /dev/null +++ b/tests/ref/lavf/ul @@ -0,0 +1,3 @@ +ad492935e361f830f2f8302aa102701d *tests/data/lavf/lavf.ul +44100 tests/data/lavf/lavf.ul +tests/data/lavf/lavf.ul CRC=0x4515fa26 diff --git a/tests/ref/lavf/voc b/tests/ref/lavf/voc index 3131960237..2d1fbc73e9 100644 --- a/tests/ref/lavf/voc +++ b/tests/ref/lavf/voc @@ -1,3 +1,3 @@ -ae01db5200e569371d4c27316575344c *./tests/data/lavf/lavf.voc -44305 ./tests/data/lavf/lavf.voc -./tests/data/lavf/lavf.voc CRC=0x298fd284 +ae01db5200e569371d4c27316575344c *tests/data/lavf/lavf.voc +44305 tests/data/lavf/lavf.voc +tests/data/lavf/lavf.voc CRC=0x298fd284 diff --git a/tests/ref/lavf/voc_s16 b/tests/ref/lavf/voc_s16 deleted file mode 100644 index deb7999485..0000000000 --- a/tests/ref/lavf/voc_s16 +++ /dev/null @@ -1,3 +0,0 @@ -e55a9c632cfeab90bcfb9ff29a71728c *./tests/data/lavf/lavf.s16.voc -176613 ./tests/data/lavf/lavf.s16.voc -./tests/data/lavf/lavf.s16.voc CRC=0xe61e3bd0 diff --git a/tests/ref/lavf/wav b/tests/ref/lavf/wav index fa8a859cd0..e34535e91b 100644 --- a/tests/ref/lavf/wav +++ b/tests/ref/lavf/wav @@ -1,3 +1,3 @@ -41410d9bbe0603740d1c17050746f475 *./tests/data/lavf/lavf.wav -88246 ./tests/data/lavf/lavf.wav -./tests/data/lavf/lavf.wav CRC=0x3a1da17e +41410d9bbe0603740d1c17050746f475 *tests/data/lavf/lavf.wav +88246 tests/data/lavf/lavf.wav +tests/data/lavf/lavf.wav CRC=0x3a1da17e diff --git a/tests/ref/seek/lavf-alaw b/tests/ref/seek/lavf-al index 4b1f8fbc02..4b1f8fbc02 100644 --- a/tests/ref/seek/lavf-alaw +++ b/tests/ref/seek/lavf-al diff --git a/tests/ref/seek/lavf-mulaw b/tests/ref/seek/lavf-ul index 4b1f8fbc02..4b1f8fbc02 100644 --- a/tests/ref/seek/lavf-mulaw +++ b/tests/ref/seek/lavf-ul |