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

tests: Convert lavf image tests to non-legacy test scripts

Rename some tests in the process for consistency and simplicity.
This commit is contained in:
Diego Biurrun 2019-02-02 13:54:47 +01:00
parent eb8a811599
commit a957e9379d
19 changed files with 76 additions and 117 deletions

View File

@ -62,6 +62,7 @@ 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-image.mak
include $(SRC_PATH)/tests/fate/lavf-image2pipe.mak
include $(SRC_PATH)/tests/fate/seek.mak

View File

@ -197,6 +197,17 @@ lavf_audio(){
do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file
}
lavf_image(){
t="${test#lavf-}"
outdir="tests/data/images/$t"
mkdir -p "$outdir"
file=${outdir}/%02d.$t
run_avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $1 $ENC_OPTS $2 -frames 12 -y -qscale 10 $target_path/$file
do_md5sum ${outdir}/02.$t
do_avconv_crc $file $DEC_OPTS $2 -i $target_path/$file
echo $(wc -c ${outdir}/02.$t)
}
lavf_image2pipe(){
t="${test#lavf-}"
t="${t%pipe}"

View File

@ -1,31 +1,18 @@
FATE_LAVF-$(call ENCDEC2, MSMPEG4V3, MP2, ASF) += asf
FATE_LAVF-$(call ENCDEC2, MPEG4, MP2, AVI) += avi
FATE_LAVF-$(call ENCDEC, BMP, IMAGE2) += bmp
FATE_LAVF-$(call ENCDEC, DPX, IMAGE2) += dpx
FATE_LAVF-$(call ENCDEC2, DVVIDEO, PCM_S16LE, AVI) += dv_fmt
FATE_LAVF-$(call ENCDEC, FLV, FLV) += flv_fmt
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 ENCDEC2, MPEG4, PCM_ALAW, MOV) += mov
FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2, MPEG1SYSTEM MPEGPS) += mpg
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, 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, SGI, IMAGE2) += sgi
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, XWD, IMAGE2) += xwd
FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg
FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%)

25
tests/fate/lavf-image.mak Normal file
View File

@ -0,0 +1,25 @@
FATE_LAVF_IMAGES-$(call ENCDEC, BMP, IMAGE2) += bmp
FATE_LAVF_IMAGES-$(call ENCDEC, DPX, IMAGE2) += dpx
FATE_LAVF_IMAGES-$(call ENCDEC, MJPEG, IMAGE2) += jpg
FATE_LAVF_IMAGES-$(call ENCDEC, PAM, IMAGE2) += pam
FATE_LAVF_IMAGES-$(call ENCDEC, PCX, IMAGE2) += pcx
FATE_LAVF_IMAGES-$(call ENCDEC, PGM, IMAGE2) += pgm
FATE_LAVF_IMAGES-$(call ENCDEC, PNG, IMAGE2) += png
FATE_LAVF_IMAGES-$(call ENCDEC, PPM, IMAGE2) += ppm
FATE_LAVF_IMAGES-$(call ENCDEC, SGI, IMAGE2) += sgi
FATE_LAVF_IMAGES-$(call ENCDEC, SUNRAST, IMAGE2) += sun
FATE_LAVF_IMAGES-$(call ENCDEC, TARGA, IMAGE2) += tga
FATE_LAVF_IMAGES-$(call ENCDEC, TIFF, IMAGE2) += tiff
FATE_LAVF_IMAGES-$(call ENCDEC, XWD, IMAGE2) += xwd
FATE_LAVF_IMAGES = $(FATE_LAVF_IMAGES-yes:%=fate-lavf-%)
$(FATE_LAVF_IMAGES): CMD = lavf_image
$(FATE_LAVF_IMAGES): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%)
$(FATE_LAVF_IMAGES): $(VREF)
fate-lavf-jpg: CMD = lavf_image "-pix_fmt yuvj420p" "-f image2"
fate-lavf-tiff: CMD = lavf_image "-pix_fmt rgb24"
FATE_AVCONV += $(FATE_LAVF_IMAGES)
fate-lavf-images fate-lavf: $(FATE_LAVF_IMAGES)

View File

@ -19,17 +19,6 @@ do_lavf()
do_avconv_crc $file $DEC_OPTS -i $target_path/$file $4
}
do_image_formats()
{
outfile="$datadir/images/$1/"
mkdir -p "$outfile"
file=${outfile}%02d.$1
run_avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $2 $ENC_OPTS $3 -frames 12 -y -qscale 10 $target_path/$file
do_md5sum ${outfile}02.$1
do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file
echo $(wc -c ${outfile}02.$1)
}
if [ -n "$do_avi" ] ; then
do_lavf avi "" "-c:a mp2 -ar 44100"
fi
@ -107,60 +96,6 @@ do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qsca
do_avconv_crc $file -i $target_path/$file
fi
# image formats
if [ -n "$do_pgm" ] ; then
do_image_formats pgm
fi
if [ -n "$do_ppm" ] ; then
do_image_formats ppm
fi
if [ -n "$do_png" ] ; then
do_image_formats png
fi
if [ -n "$do_bmp" ] ; then
do_image_formats bmp
fi
if [ -n "$do_tga" ] ; then
do_image_formats tga
fi
if [ -n "$do_tiff" ] ; then
do_image_formats tiff "-pix_fmt rgb24"
fi
if [ -n "$do_sgi" ] ; then
do_image_formats sgi
fi
if [ -n "$do_jpg" ] ; then
do_image_formats jpg "-pix_fmt yuvj420p" "-f image2"
fi
if [ -n "$do_pam" ] ; then
do_image_formats pam
fi
if [ -n "$do_pcx" ] ; then
do_image_formats pcx
fi
if [ -n "$do_xwd" ] ; then
do_image_formats xwd
fi
if [ -n "$do_dpx" ] ; then
do_image_formats dpx
fi
if [ -n "$do_sunrast" ] ; then
do_image_formats sun
fi
# pix_fmt conversions
if [ -n "$do_pixfmt" ] ; then

View File

@ -1,3 +1,3 @@
71f4d64a6b3c71f43a4eff526f84841c *./tests/data/images/bmp/02.bmp
./tests/data/images/bmp/%02d.bmp CRC=0x3447369b
304182 ./tests/data/images/bmp/02.bmp
71f4d64a6b3c71f43a4eff526f84841c *tests/data/images/bmp/02.bmp
tests/data/images/bmp/%02d.bmp CRC=0x3447369b
304182 tests/data/images/bmp/02.bmp

View File

@ -1,3 +1,3 @@
d2f0b4e854fda2d3b3bee84cef80593c *./tests/data/images/dpx/02.dpx
./tests/data/images/dpx/%02d.dpx CRC=0x28c7369b
305792 ./tests/data/images/dpx/02.dpx
d2f0b4e854fda2d3b3bee84cef80593c *tests/data/images/dpx/02.dpx
tests/data/images/dpx/%02d.dpx CRC=0x28c7369b
305792 tests/data/images/dpx/02.dpx

View File

@ -1,3 +1,3 @@
131878fee153a086d740543fbf2ab359 *./tests/data/images/jpg/02.jpg
./tests/data/images/jpg/%02d.jpg CRC=0x9d770966
28406 ./tests/data/images/jpg/02.jpg
131878fee153a086d740543fbf2ab359 *tests/data/images/jpg/02.jpg
tests/data/images/jpg/%02d.jpg CRC=0x9d770966
28406 tests/data/images/jpg/02.jpg

View File

@ -1,3 +1,3 @@
0dce5565222cf0f8b309467f279aecd2 *./tests/data/images/pam/02.pam
./tests/data/images/pam/%02d.pam CRC=0x28c7369b
304191 ./tests/data/images/pam/02.pam
0dce5565222cf0f8b309467f279aecd2 *tests/data/images/pam/02.pam
tests/data/images/pam/%02d.pam CRC=0x28c7369b
304191 tests/data/images/pam/02.pam

View File

@ -1,3 +1,3 @@
2df1d747fba23d03b6ff9c91b8b465c9 *./tests/data/images/pcx/02.pcx
./tests/data/images/pcx/%02d.pcx CRC=0x28c7369b
364147 ./tests/data/images/pcx/02.pcx
2df1d747fba23d03b6ff9c91b8b465c9 *tests/data/images/pcx/02.pcx
tests/data/images/pcx/%02d.pcx CRC=0x28c7369b
364147 tests/data/images/pcx/02.pcx

View File

@ -1,3 +1,3 @@
388f5c51a678ca6a52cc006095c12f08 *./tests/data/images/pgm/02.pgm
./tests/data/images/pgm/%02d.pgm CRC=0xa6866b82
101391 ./tests/data/images/pgm/02.pgm
388f5c51a678ca6a52cc006095c12f08 *tests/data/images/pgm/02.pgm
tests/data/images/pgm/%02d.pgm CRC=0xa6866b82
101391 tests/data/images/pgm/02.pgm

View File

@ -1,3 +1,3 @@
c162094e51dc1a3203de43e496086dfd *./tests/data/images/png/02.png
./tests/data/images/png/%02d.png CRC=0x28c7369b
248612 ./tests/data/images/png/02.png
c162094e51dc1a3203de43e496086dfd *tests/data/images/png/02.png
tests/data/images/png/%02d.png CRC=0x28c7369b
248612 tests/data/images/png/02.png

View File

@ -1,3 +1,3 @@
16d5dadf0b362fc8ba3cb676c5dde985 *./tests/data/images/ppm/02.ppm
./tests/data/images/ppm/%02d.ppm CRC=0x28c7369b
304143 ./tests/data/images/ppm/02.ppm
16d5dadf0b362fc8ba3cb676c5dde985 *tests/data/images/ppm/02.ppm
tests/data/images/ppm/%02d.ppm CRC=0x28c7369b
304143 tests/data/images/ppm/02.ppm

View File

@ -1,3 +1,3 @@
d446e540a7c18da5fd3cc0e9942cd46f *./tests/data/images/sgi/02.sgi
./tests/data/images/sgi/%02d.sgi CRC=0x28c7369b
307287 ./tests/data/images/sgi/02.sgi
d446e540a7c18da5fd3cc0e9942cd46f *tests/data/images/sgi/02.sgi
tests/data/images/sgi/%02d.sgi CRC=0x28c7369b
307287 tests/data/images/sgi/02.sgi

3
tests/ref/lavf/sun Normal file
View File

@ -0,0 +1,3 @@
07518bcb0841bc677ce6aea8464ea240 *tests/data/images/sun/02.sun
tests/data/images/sun/%02d.sun CRC=0x3447369b
304123 tests/data/images/sun/02.sun

View File

@ -1,3 +0,0 @@
07518bcb0841bc677ce6aea8464ea240 *./tests/data/images/sun/02.sun
./tests/data/images/sun/%02d.sun CRC=0x3447369b
304123 ./tests/data/images/sun/02.sun

View File

@ -1,3 +1,3 @@
c0305c53e6d79d4ed9f35f04f671246c *./tests/data/images/tga/02.tga
./tests/data/images/tga/%02d.tga CRC=0x3447369b
304172 ./tests/data/images/tga/02.tga
c0305c53e6d79d4ed9f35f04f671246c *tests/data/images/tga/02.tga
tests/data/images/tga/%02d.tga CRC=0x3447369b
304172 tests/data/images/tga/02.tga

View File

@ -1,3 +1,3 @@
b3299346a8959553a437e486d8f3bf76 *./tests/data/images/tiff/02.tiff
./tests/data/images/tiff/%02d.tiff CRC=0x28c7369b
307131 ./tests/data/images/tiff/02.tiff
b3299346a8959553a437e486d8f3bf76 *tests/data/images/tiff/02.tiff
tests/data/images/tiff/%02d.tiff CRC=0x28c7369b
307131 tests/data/images/tiff/02.tiff

View File

@ -1,3 +1,3 @@
50baa5560b7d1aa3188b19c1162bf7dc *./tests/data/images/xwd/02.xwd
./tests/data/images/xwd/%02d.xwd CRC=0x28c7369b
304239 ./tests/data/images/xwd/02.xwd
50baa5560b7d1aa3188b19c1162bf7dc *tests/data/images/xwd/02.xwd
tests/data/images/xwd/%02d.xwd CRC=0x28c7369b
304239 tests/data/images/xwd/02.xwd