mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 16:22:37 +00:00
tests: Add a convenience function for video-only lavf tests
Rename a test in the process for consistency and simplicity and remove the remnants of the now-unused lavf regression test scripts.
This commit is contained in:
parent
618d02c1fa
commit
f8df5e2f31
@ -60,11 +60,11 @@ PARSERDEMDEC = $(call ALLYES, $(1)_PARSER $(2)_DEMUXER $(3)_DECODER)
|
||||
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-container.mak
|
||||
include $(SRC_PATH)/tests/fate/lavf-image.mak
|
||||
include $(SRC_PATH)/tests/fate/lavf-image2pipe.mak
|
||||
include $(SRC_PATH)/tests/fate/lavf-video.mak
|
||||
include $(SRC_PATH)/tests/fate/seek.mak
|
||||
|
||||
include $(SRC_PATH)/tests/fate/aac.mak
|
||||
|
@ -226,10 +226,12 @@ lavf_image2pipe(){
|
||||
do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file
|
||||
}
|
||||
|
||||
lavftest(){
|
||||
lavf_video(){
|
||||
t="${test#lavf-}"
|
||||
ref=${base}/ref/lavf/$t
|
||||
${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags"
|
||||
outdir="tests/data/lavf"
|
||||
file=${outdir}/lavf.$t
|
||||
do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 $1
|
||||
do_avconv_crc $file $DEC_OPTS -i $target_path/$file $1
|
||||
}
|
||||
|
||||
pixfmt_conversion(){
|
||||
|
@ -1,10 +0,0 @@
|
||||
FATE_LAVF-$(call ENCDEC, GIF, IMAGE2) += gif
|
||||
FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER) += yuv4mpeg
|
||||
|
||||
FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%)
|
||||
|
||||
$(FATE_LAVF): $(AREF) $(VREF)
|
||||
$(FATE_LAVF): CMD = lavftest
|
||||
|
||||
FATE_AVCONV += $(FATE_LAVF)
|
||||
fate-lavf: $(FATE_LAVF)
|
13
tests/fate/lavf-video.mak
Normal file
13
tests/fate/lavf-video.mak
Normal file
@ -0,0 +1,13 @@
|
||||
FATE_LAVF_VIDEO-$(call ENCDEC, GIF, IMAGE2) += gif
|
||||
FATE_LAVF_VIDEO-$(CONFIG_YUV4MPEGPIPE_MUXER) += y4m
|
||||
|
||||
FATE_LAVF_VIDEO = $(FATE_LAVF_VIDEO-yes:%=fate-lavf-%)
|
||||
|
||||
$(FATE_LAVF_VIDEO): CMD = lavf_video
|
||||
$(FATE_LAVF_VIDEO): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%)
|
||||
$(FATE_LAVF_VIDEO): $(VREF)
|
||||
|
||||
fate-lavf-gif: CMD = lavf_video "-pix_fmt rgb24"
|
||||
|
||||
FATE_AVCONV += $(FATE_LAVF_VIDEO)
|
||||
fate-lavf-video fate-lavf: $(FATE_LAVF_VIDEO)
|
@ -178,7 +178,7 @@ FATE_SEEK_LAVF-$(call ENCDEC, TIFF, IMAGE2) += tiff
|
||||
FATE_SEEK_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2, MPEGTS) += ts
|
||||
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-$(CONFIG_YUV4MPEGPIPE_MUXER) += y4m
|
||||
|
||||
fate-seek-lavf-aiff: SRC = lavf/lavf.aiff
|
||||
fate-seek-lavf-al: SRC = lavf/lavf.al
|
||||
@ -214,7 +214,7 @@ fate-seek-lavf-tiff: SRC = images/tiff/%02d.tiff
|
||||
fate-seek-lavf-ts: SRC = lavf/lavf.ts
|
||||
fate-seek-lavf-voc: SRC = lavf/lavf.voc
|
||||
fate-seek-lavf-wav: SRC = lavf/lavf.wav
|
||||
fate-seek-lavf-yuv4mpeg: SRC = lavf/lavf.y4m
|
||||
fate-seek-lavf-y4m: SRC = lavf/lavf.y4m
|
||||
|
||||
FATE_SEEK += $(FATE_SEEK_LAVF-yes:%=fate-seek-lavf-%)
|
||||
|
||||
|
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# automatic regression test for libavformat
|
||||
#
|
||||
#
|
||||
#set -x
|
||||
|
||||
set -e
|
||||
|
||||
. $(dirname $0)/regression-funcs.sh
|
||||
|
||||
eval do_$test=y
|
||||
|
||||
# streamed images
|
||||
# mjpeg
|
||||
#file=${outfile}lavf.mjpeg
|
||||
#do_avconv $file -t 1 -qscale 10 -f image2 -c:v pgmyuv -i $raw_src
|
||||
#do_avconv_crc $file -i $target_path/$file
|
||||
|
||||
if [ -n "$do_gif" ] ; then
|
||||
file=${outfile}lavf.gif
|
||||
do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -pix_fmt rgb24
|
||||
do_avconv_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt rgb24
|
||||
fi
|
||||
|
||||
if [ -n "$do_yuv4mpeg" ] ; then
|
||||
file=${outfile}lavf.y4m
|
||||
do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10
|
||||
do_avconv_crc $file -i $target_path/$file
|
||||
fi
|
@ -1,3 +1,3 @@
|
||||
e6089fd4ef3b9df44090ab3650bdd810 *./tests/data/lavf/lavf.gif
|
||||
2906401 ./tests/data/lavf/lavf.gif
|
||||
./tests/data/lavf/lavf.gif CRC=0xe5605ff6
|
||||
e6089fd4ef3b9df44090ab3650bdd810 *tests/data/lavf/lavf.gif
|
||||
2906401 tests/data/lavf/lavf.gif
|
||||
tests/data/lavf/lavf.gif CRC=0xe5605ff6
|
||||
|
3
tests/ref/lavf/y4m
Normal file
3
tests/ref/lavf/y4m
Normal file
@ -0,0 +1,3 @@
|
||||
ec8178cb152f9cdbfd9cb724d977db2e *tests/data/lavf/lavf.y4m
|
||||
3801808 tests/data/lavf/lavf.y4m
|
||||
tests/data/lavf/lavf.y4m CRC=0x0a941f26
|
@ -1,3 +0,0 @@
|
||||
ec8178cb152f9cdbfd9cb724d977db2e *./tests/data/lavf/lavf.y4m
|
||||
3801808 ./tests/data/lavf/lavf.y4m
|
||||
./tests/data/lavf/lavf.y4m CRC=0x0a941f26
|
@ -1,67 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# common regression functions for avconv
|
||||
#
|
||||
#
|
||||
|
||||
test="${1#regtest-}"
|
||||
test_ref=$2
|
||||
raw_src_dir=$3
|
||||
target_exec=$4
|
||||
target_path=$5
|
||||
threads=${6:-1}
|
||||
cpuflags=${8:-all}
|
||||
|
||||
datadir="./tests/data"
|
||||
target_datadir="${target_path}/${datadir}"
|
||||
|
||||
this="$test.$test_ref"
|
||||
outfile="$datadir/$test_ref/"
|
||||
|
||||
# various files
|
||||
avconv="$target_exec ${target_path}/avconv"
|
||||
raw_src="${target_path}/$raw_src_dir/%02d.pgm"
|
||||
raw_dst="$datadir/$this.out.yuv"
|
||||
pcm_src="$target_datadir/asynth1.sw"
|
||||
crcfile="$datadir/$this.crc"
|
||||
target_crcfile="$target_datadir/$this.crc"
|
||||
|
||||
cleanfiles="$raw_dst $crcfile"
|
||||
trap 'rm -f -- $cleanfiles' EXIT
|
||||
|
||||
[ "${V-0}" -gt 0 ] && echov=echov || echov=:
|
||||
|
||||
echov(){
|
||||
echo "$@" >&3
|
||||
}
|
||||
|
||||
. $(dirname $0)/md5.sh
|
||||
|
||||
AVCONV_OPTS="-nostats -y -cpuflags $cpuflags"
|
||||
COMMON_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact"
|
||||
DEC_OPTS="$COMMON_OPTS -threads $threads"
|
||||
ENC_OPTS="$COMMON_OPTS -threads 1 -dct fastint"
|
||||
|
||||
run_avconv()
|
||||
{
|
||||
$echov $avconv $AVCONV_OPTS $*
|
||||
$avconv $AVCONV_OPTS $*
|
||||
}
|
||||
|
||||
do_avconv()
|
||||
{
|
||||
f="$1"
|
||||
shift
|
||||
set -- $* ${target_path}/$f
|
||||
run_avconv $*
|
||||
do_md5sum $f
|
||||
echo $(wc -c $f)
|
||||
}
|
||||
|
||||
do_avconv_crc()
|
||||
{
|
||||
f="$1"
|
||||
shift
|
||||
run_avconv $* -f crc "$target_crcfile"
|
||||
echo "$f $(cat $crcfile)"
|
||||
}
|
Loading…
Reference in New Issue
Block a user