mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
Implement a lavfitest target for testing regressions in libavfilter.
The target is disabled. See the thread: "[PATCH] libavfilter-soc: regression test for libavfilter". Originally committed as revision 20057 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
d975e5e9b7
commit
40e024091d
18
Makefile
18
Makefile
@ -144,6 +144,7 @@ fulltest test: codectest lavftest seektest
|
|||||||
|
|
||||||
FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
|
FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
|
||||||
LAVF_REFFILE = $(SRC_PATH)/tests/lavf.regression.ref
|
LAVF_REFFILE = $(SRC_PATH)/tests/lavf.regression.ref
|
||||||
|
LAVFI_REFFILE = $(SRC_PATH)/tests/lavfi.regression.ref
|
||||||
ROTOZOOM_REFFILE = $(SRC_PATH)/tests/rotozoom.regression.ref
|
ROTOZOOM_REFFILE = $(SRC_PATH)/tests/rotozoom.regression.ref
|
||||||
SEEK_REFFILE = $(SRC_PATH)/tests/seek.regression.ref
|
SEEK_REFFILE = $(SRC_PATH)/tests/seek.regression.ref
|
||||||
VSYNTH_REFFILE = $(SRC_PATH)/tests/vsynth.regression.ref
|
VSYNTH_REFFILE = $(SRC_PATH)/tests/vsynth.regression.ref
|
||||||
@ -237,14 +238,19 @@ LAVF_TESTS = $(addprefix regtest-, \
|
|||||||
pcx \
|
pcx \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
LAVFI_TESTS = $(addprefix regtest-, \
|
||||||
|
)
|
||||||
|
|
||||||
RESFILES = $(addprefix tests/data/,$(addsuffix .$(1),$(2:regtest-%=%)))
|
RESFILES = $(addprefix tests/data/,$(addsuffix .$(1),$(2:regtest-%=%)))
|
||||||
|
|
||||||
ROTOZOOM_RESFILES = $(call RESFILES,rotozoom.regression,$(CODEC_TESTS))
|
ROTOZOOM_RESFILES = $(call RESFILES,rotozoom.regression,$(CODEC_TESTS))
|
||||||
VSYNTH_RESFILES = $(call RESFILES,vsynth.regression,$(CODEC_TESTS))
|
VSYNTH_RESFILES = $(call RESFILES,vsynth.regression,$(CODEC_TESTS))
|
||||||
|
|
||||||
LAVF_RESFILES = $(call RESFILES,lavf.regression,$(LAVF_TESTS))
|
LAVF_RESFILES = $(call RESFILES,lavf.regression,$(LAVF_TESTS))
|
||||||
|
LAVFI_RESFILES = $(call RESFILES,lavfi.regression,$(LAVFI_TESTS))
|
||||||
|
|
||||||
LAVF_RESFILE = tests/data/lavf.regression
|
LAVF_RESFILE = tests/data/lavf.regression
|
||||||
|
LAVFI_RESFILE = tests/data/lavfi.regression
|
||||||
ROTOZOOM_RESFILE = tests/data/rotozoom.regression
|
ROTOZOOM_RESFILE = tests/data/rotozoom.regression
|
||||||
VSYNTH_RESFILE = tests/data/vsynth.regression
|
VSYNTH_RESFILE = tests/data/vsynth.regression
|
||||||
|
|
||||||
@ -264,18 +270,23 @@ codectest: $(VSYNTH_RESFILE) $(ROTOZOOM_RESFILE)
|
|||||||
lavftest: $(LAVF_RESFILE)
|
lavftest: $(LAVF_RESFILE)
|
||||||
diff -u -w $(LAVF_REFFILE) $(LAVF_RESFILE)
|
diff -u -w $(LAVF_REFFILE) $(LAVF_RESFILE)
|
||||||
|
|
||||||
$(VSYNTH_RESFILE) $(ROTOZOOM_RESFILE) $(LAVF_RESFILE):
|
# lavfitest: $(LAVFI_RESFILE)
|
||||||
|
# diff -u -w $(LAVFI_REFFILE) $(LAVFI_RESFILE)
|
||||||
|
|
||||||
|
$(VSYNTH_RESFILE) $(ROTOZOOM_RESFILE) $(LAVF_RESFILE) $(LAVFI_RESFILE):
|
||||||
cat $^ > $@
|
cat $^ > $@
|
||||||
|
|
||||||
$(LAVF_RESFILE): $(LAVF_RESFILES)
|
$(LAVF_RESFILE): $(LAVF_RESFILES)
|
||||||
|
$(LAVFI_RESFILE): $(LAVFI_RESFILES)
|
||||||
$(ROTOZOOM_RESFILE): $(ROTOZOOM_RESFILES)
|
$(ROTOZOOM_RESFILE): $(ROTOZOOM_RESFILES)
|
||||||
$(VSYNTH_RESFILE): $(VSYNTH_RESFILES)
|
$(VSYNTH_RESFILE): $(VSYNTH_RESFILES)
|
||||||
|
|
||||||
$(VSYNTH_RESFILES) $(ROTOZOOM_RESFILES): $(CODEC_TESTS)
|
$(VSYNTH_RESFILES) $(ROTOZOOM_RESFILES): $(CODEC_TESTS)
|
||||||
|
|
||||||
$(LAVF_RESFILES): $(LAVF_TESTS)
|
$(LAVF_RESFILES): $(LAVF_TESTS)
|
||||||
|
$(LAVFI_RESFILES): $(LAVFI_TESTS)
|
||||||
|
|
||||||
$(CODEC_TESTS) $(LAVF_TESTS): regtest-ref
|
$(CODEC_TESTS) $(LAVF_TESTS) $(LAVFI_TESTS): regtest-ref
|
||||||
|
|
||||||
regtest-ref: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/data/asynth1.sw
|
regtest-ref: ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm tests/data/asynth1.sw
|
||||||
|
|
||||||
@ -286,6 +297,9 @@ $(CODEC_TESTS) regtest-ref: tests/tiny_psnr$(HOSTEXESUF)
|
|||||||
$(LAVF_TESTS):
|
$(LAVF_TESTS):
|
||||||
$(SRC_PATH)/tests/codec-regression.sh $@ lavf tests/vsynth1 b "$(TARGET_EXEC)" "$(TARGET_PATH)"
|
$(SRC_PATH)/tests/codec-regression.sh $@ lavf tests/vsynth1 b "$(TARGET_EXEC)" "$(TARGET_PATH)"
|
||||||
|
|
||||||
|
$(LAVFI_TESTS):
|
||||||
|
$(SRC_PATH)/tests/codec-regression.sh $@ lavfi tests/vsynth1 b "$(TARGET_EXEC)" "$(TARGET_PATH)"
|
||||||
|
|
||||||
seektest: codectest lavftest tests/seek_test$(EXESUF)
|
seektest: codectest lavftest tests/seek_test$(EXESUF)
|
||||||
$(SRC_PATH)/tests/seek-regression.sh $(SEEK_REFFILE) "$(TARGET_EXEC)" "$(TARGET_PATH)"
|
$(SRC_PATH)/tests/seek-regression.sh $(SEEK_REFFILE) "$(TARGET_EXEC)" "$(TARGET_PATH)"
|
||||||
|
|
||||||
|
@ -660,4 +660,42 @@ for pix_fmt in $conversions ; do
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# libavfilter testing
|
||||||
|
|
||||||
|
function do_lavfi() {
|
||||||
|
test_name=$1
|
||||||
|
eval test=\$do_$test_name
|
||||||
|
vfilters=$2
|
||||||
|
|
||||||
|
if [ -n "$test" ] ; then
|
||||||
|
do_video_encoding ${test_name}.avi "-qscale 10" "-vcodec huffyuv -vfilters $vfilters"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# do_lavfi "crop" "crop=100:100:-1:-1"
|
||||||
|
# do_lavfi "crop_scale" "crop=100:100,scale=200:-1"
|
||||||
|
# do_lavfi "scale" "scale=200:200"
|
||||||
|
|
||||||
|
# libavfilter testing
|
||||||
|
|
||||||
|
function do_lavfi() {
|
||||||
|
test_name=$1
|
||||||
|
eval test=\$do_$test_name
|
||||||
|
vfilters=$2
|
||||||
|
|
||||||
|
if [ -n "$test" ] ; then
|
||||||
|
do_video_encoding ${test_name}.avi "-qscale 10" "-vcodec huffyuv -vfilters $vfilters"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# example tests:
|
||||||
|
# do_lavfi "crop" "crop=100:100:-1:-1"
|
||||||
|
# do_lavfi "crop_scale" "crop=100:100,scale=200:-1"
|
||||||
|
# do_lavfi "scale" "scale=200:200"
|
||||||
|
|
||||||
|
# TODO: add tests for
|
||||||
|
# direct rendering,
|
||||||
|
# slices
|
||||||
|
# chains with feedback loops
|
||||||
|
|
||||||
rm -f "$bench" "$bench2"
|
rm -f "$bench" "$bench2"
|
||||||
|
Loading…
Reference in New Issue
Block a user