Commit eb8a8115 authored by Diego Biurrun's avatar Diego Biurrun

tests: Convert audio-only lavf tests to non-legacy test scripts

Rename some tests in the process for consistency and simplicity.
parent a70eac7a
...@@ -61,6 +61,7 @@ include $(SRC_PATH)/tests/fate/acodec.mak ...@@ -61,6 +61,7 @@ include $(SRC_PATH)/tests/fate/acodec.mak
include $(SRC_PATH)/tests/fate/vcodec.mak include $(SRC_PATH)/tests/fate/vcodec.mak
include $(SRC_PATH)/tests/fate/avformat.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/lavf-image2pipe.mak
include $(SRC_PATH)/tests/fate/seek.mak include $(SRC_PATH)/tests/fate/seek.mak
......
...@@ -156,6 +156,7 @@ enc_dec(){ ...@@ -156,6 +156,7 @@ enc_dec(){
# functions above and below that should be refactored. # functions above and below that should be refactored.
avconv2="$target_exec ${target_path}/avconv" avconv2="$target_exec ${target_path}/avconv"
raw_src="${target_path}/tests/vsynth1/%02d.pgm" raw_src="${target_path}/tests/vsynth1/%02d.pgm"
pcm_src="${target_path}/tests/data/asynth1.sw"
crcfile="tests/data/$test.lavf.crc" crcfile="tests/data/$test.lavf.crc"
target_crcfile="${target_path}/$crcfile" target_crcfile="${target_path}/$crcfile"
...@@ -188,6 +189,14 @@ do_avconv_crc(){ ...@@ -188,6 +189,14 @@ do_avconv_crc(){
echo "$f $(cat $crcfile)" 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(){ lavf_image2pipe(){
t="${test#lavf-}" t="${test#lavf-}"
t="${t%pipe}" t="${t%pipe}"
......
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 ENCDEC2, MSMPEG4V3, MP2, ASF) += asf
FATE_LAVF-$(call ENCDEC, PCM_S16BE, AU) += au
FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI) += avi FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI) += avi
FATE_LAVF-$(call ENCDEC, BMP, IMAGE2) += bmp FATE_LAVF-$(call ENCDEC, BMP, IMAGE2) += bmp
FATE_LAVF-$(call ENCDEC, DPX, IMAGE2) += dpx FATE_LAVF-$(call ENCDEC, DPX, IMAGE2) += dpx
...@@ -11,31 +8,23 @@ FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif ...@@ -11,31 +8,23 @@ FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif
FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF) += gxf FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF) += gxf
FATE_LAVF-$(call ENCDEC, MJPEG, IMAGE2) += jpg FATE_LAVF-$(call ENCDEC, MJPEG, IMAGE2) += jpg
FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, MATROSKA) += mkv 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, MPEG4, PCM_ALAW, MOV) += mov
FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg 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) += mxf
FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF) += mxf_d10 FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF) += mxf_d10
FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT) += nut 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, PAM, IMAGE2) += pam
FATE_LAVF-$(call ENCDEC, PCX, IMAGE2) += pcx FATE_LAVF-$(call ENCDEC, PCX, IMAGE2) += pcx
FATE_LAVF-$(call ENCDEC, PGM, IMAGE2) += pgm FATE_LAVF-$(call ENCDEC, PGM, IMAGE2) += pgm
FATE_LAVF-$(call ENCDEC, PNG, IMAGE2) += png FATE_LAVF-$(call ENCDEC, PNG, IMAGE2) += png
FATE_LAVF-$(call ENCDEC, PPM, IMAGE2) += ppm FATE_LAVF-$(call ENCDEC, PPM, IMAGE2) += ppm
FATE_LAVF-$(call ENCMUX, RV10 AC3_FIXED, RM) += rm 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, SGI, IMAGE2) += sgi
FATE_LAVF-$(call ENCDEC, PCM_S16LE, SOX) += sox
FATE_LAVF-$(call ENCDEC, SUNRAST, IMAGE2) += sunrast FATE_LAVF-$(call ENCDEC, SUNRAST, IMAGE2) += sunrast
FATE_LAVF-$(call ENCDEC, FLV, SWF) += swf FATE_LAVF-$(call ENCDEC, FLV, SWF) += swf
FATE_LAVF-$(call ENCDEC, TARGA, IMAGE2) += tga FATE_LAVF-$(call ENCDEC, TARGA, IMAGE2) += tga
FATE_LAVF-$(call ENCDEC, TIFF, IMAGE2) += tiff FATE_LAVF-$(call ENCDEC, TIFF, IMAGE2) += tiff
FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts 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-$(call ENCDEC, XWD, IMAGE2) += xwd
FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg
......
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)
...@@ -145,7 +145,7 @@ FATE_SEEK += $(FATE_SEEK_VSYNTH2-yes:%=fate-seek-vsynth2-%) ...@@ -145,7 +145,7 @@ FATE_SEEK += $(FATE_SEEK_VSYNTH2-yes:%=fate-seek-vsynth2-%)
# files from fate-lavf # files from fate-lavf
FATE_SEEK_LAVF-$(call ENCDEC, PCM_S16BE, AIFF) += aiff 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 ENCDEC2, MSMPEG4V3, MP2, ASF) += asf
FATE_SEEK_LAVF-$(call ENCDEC, PCM_S16BE, AU) += au FATE_SEEK_LAVF-$(call ENCDEC, PCM_S16BE, AU) += au
FATE_SEEK_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI) += avi FATE_SEEK_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI) += avi
...@@ -159,7 +159,7 @@ FATE_SEEK_LAVF-$(call ENCDEC2, MPEG4, MP2, MATROSKA) += mkv ...@@ -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 ENCDEC, ADPCM_YAMAHA, MMF) += mmf
FATE_SEEK_LAVF-$(call ENCDEC2, MPEG4, PCM_ALAW, MOV) += mov FATE_SEEK_LAVF-$(call ENCDEC2, MPEG4, PCM_ALAW, MOV) += mov
FATE_SEEK_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg 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) += mxf
FATE_SEEK_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF) += mxf_d10 FATE_SEEK_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF) += mxf_d10
FATE_SEEK_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT) += nut FATE_SEEK_LAVF-$(call ENCDEC2, MPEG4, MP2, NUT) += nut
...@@ -180,8 +180,8 @@ FATE_SEEK_LAVF-$(call ENCDEC, PCM_U8, VOC) += voc ...@@ -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-$(call ENCDEC, PCM_S16LE, WAV) += wav
FATE_SEEK_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg FATE_SEEK_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg
fate-seek-lavf-aiff: SRC = lavf/lavf.aif fate-seek-lavf-aiff: SRC = lavf/lavf.aiff
fate-seek-lavf-alaw: SRC = lavf/lavf.al fate-seek-lavf-al: SRC = lavf/lavf.al
fate-seek-lavf-asf: SRC = lavf/lavf.asf fate-seek-lavf-asf: SRC = lavf/lavf.asf
fate-seek-lavf-au: SRC = lavf/lavf.au fate-seek-lavf-au: SRC = lavf/lavf.au
fate-seek-lavf-avi: SRC = lavf/lavf.avi fate-seek-lavf-avi: SRC = lavf/lavf.avi
...@@ -195,7 +195,7 @@ fate-seek-lavf-mkv: SRC = lavf/lavf.mkv ...@@ -195,7 +195,7 @@ fate-seek-lavf-mkv: SRC = lavf/lavf.mkv
fate-seek-lavf-mmf: SRC = lavf/lavf.mmf fate-seek-lavf-mmf: SRC = lavf/lavf.mmf
fate-seek-lavf-mov: SRC = lavf/lavf.mov fate-seek-lavf-mov: SRC = lavf/lavf.mov
fate-seek-lavf-mpg: SRC = lavf/lavf.mpg 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: SRC = lavf/lavf.mxf
fate-seek-lavf-mxf_d10: SRC = lavf/lavf.mxf_d10 fate-seek-lavf-mxf_d10: SRC = lavf/lavf.mxf_d10
fate-seek-lavf-nut: SRC = lavf/lavf.nut fate-seek-lavf-nut: SRC = lavf/lavf.nut
......
...@@ -30,13 +30,6 @@ do_image_formats() ...@@ -30,13 +30,6 @@ do_image_formats()
echo $(wc -c ${outfile}02.$1) 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 if [ -n "$do_avi" ] ; then
do_lavf avi "" "-c:a mp2 -ar 44100" do_lavf avi "" "-c:a mp2 -ar 44100"
fi fi
...@@ -168,52 +161,6 @@ if [ -n "$do_sunrast" ] ; then ...@@ -168,52 +161,6 @@ if [ -n "$do_sunrast" ] ; then
do_image_formats sun do_image_formats sun
fi 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 # pix_fmt conversions
if [ -n "$do_pixfmt" ] ; then if [ -n "$do_pixfmt" ] ; then
......
9d9e55431800bf6aea46a7d67509da4e *./tests/data/lavf/lavf.aif 9d9e55431800bf6aea46a7d67509da4e *tests/data/lavf/lavf.aiff
88254 ./tests/data/lavf/lavf.aif 88254 tests/data/lavf/lavf.aiff
./tests/data/lavf/lavf.aif CRC=0x3a1da17e tests/data/lavf/lavf.aiff CRC=0x3a1da17e
652d96e474869ddb01403743deb35117 *tests/data/lavf/lavf.al
44100 tests/data/lavf/lavf.al
tests/data/lavf/lavf.al CRC=0xf9643112
652d96e474869ddb01403743deb35117 *./tests/data/lavf/lavf.al
44100 ./tests/data/lavf/lavf.al
./tests/data/lavf/lavf.al CRC=0xf9643112
b9396e3775ea009094e751e7128d614e *./tests/data/lavf/lavf.au b9396e3775ea009094e751e7128d614e *tests/data/lavf/lavf.au
88224 ./tests/data/lavf/lavf.au 88224 tests/data/lavf/lavf.au
./tests/data/lavf/lavf.au CRC=0x3a1da17e tests/data/lavf/lavf.au CRC=0x3a1da17e
1a3bbf19a41668c1e928bcafce88ff3e *./tests/data/lavf/lavf.mmf 1a3bbf19a41668c1e928bcafce88ff3e *tests/data/lavf/lavf.mmf
22617 ./tests/data/lavf/lavf.mmf 22617 tests/data/lavf/lavf.mmf
./tests/data/lavf/lavf.mmf CRC=0x8dea1388 tests/data/lavf/lavf.mmf CRC=0x8dea1388
ad492935e361f830f2f8302aa102701d *./tests/data/lavf/lavf.ul
44100 ./tests/data/lavf/lavf.ul
./tests/data/lavf/lavf.ul CRC=0x4515fa26
8ca901bc8d24b80ebe79e387e454d1e9 *./tests/data/lavf/lavf.ogg 8ca901bc8d24b80ebe79e387e454d1e9 *tests/data/lavf/lavf.ogg
13476 ./tests/data/lavf/lavf.ogg 13476 tests/data/lavf/lavf.ogg
./tests/data/lavf/lavf.ogg CRC=0x3a1da17e tests/data/lavf/lavf.ogg CRC=0x3a1da17e
443b72346065d6318ca18c8395aa1d87 *./tests/data/lavf/lavf.rso 443b72346065d6318ca18c8395aa1d87 *tests/data/lavf/lavf.rso
44108 ./tests/data/lavf/lavf.rso 44108 tests/data/lavf/lavf.rso
./tests/data/lavf/lavf.rso CRC=0x298fd284 tests/data/lavf/lavf.rso CRC=0x298fd284
e55a9c632cfeab90bcfb9ff29a71728c *tests/data/lavf/lavf.s16.voc
176613 tests/data/lavf/lavf.s16.voc
tests/data/lavf/lavf.s16.voc CRC=0xe61e3bd0
683635d5cb1344e44fa96df90c3a993c *./tests/data/lavf/lavf.sox 683635d5cb1344e44fa96df90c3a993c *tests/data/lavf/lavf.sox
176432 ./tests/data/lavf/lavf.sox 176432 tests/data/lavf/lavf.sox
./tests/data/lavf/lavf.sox CRC=0x3a1da17e tests/data/lavf/lavf.sox CRC=0x3a1da17e
ad492935e361f830f2f8302aa102701d *tests/data/lavf/lavf.ul
44100 tests/data/lavf/lavf.ul
tests/data/lavf/lavf.ul CRC=0x4515fa26
ae01db5200e569371d4c27316575344c *./tests/data/lavf/lavf.voc ae01db5200e569371d4c27316575344c *tests/data/lavf/lavf.voc
44305 ./tests/data/lavf/lavf.voc 44305 tests/data/lavf/lavf.voc
./tests/data/lavf/lavf.voc CRC=0x298fd284 tests/data/lavf/lavf.voc CRC=0x298fd284
e55a9c632cfeab90bcfb9ff29a71728c *./tests/data/lavf/lavf.s16.voc
176613 ./tests/data/lavf/lavf.s16.voc
./tests/data/lavf/lavf.s16.voc CRC=0xe61e3bd0
41410d9bbe0603740d1c17050746f475 *./tests/data/lavf/lavf.wav 41410d9bbe0603740d1c17050746f475 *tests/data/lavf/lavf.wav
88246 ./tests/data/lavf/lavf.wav 88246 tests/data/lavf/lavf.wav
./tests/data/lavf/lavf.wav CRC=0x3a1da17e tests/data/lavf/lavf.wav CRC=0x3a1da17e
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