2002-05-19 02:18:22 +03:00
|
|
|
#
|
|
|
|
# Makefile for tests
|
2002-05-26 01:47:17 +03:00
|
|
|
# (c) 2002 Fabrice Bellard
|
2002-05-19 02:18:22 +03:00
|
|
|
#
|
|
|
|
include ../config.mak
|
|
|
|
|
2006-11-08 02:02:15 +02:00
|
|
|
VPATH=$(SRC_PATH_BARE)/tests
|
|
|
|
SRC_DIR=$(SRC_PATH)/tests
|
2006-12-23 02:22:15 +02:00
|
|
|
BUILD_DIR=$(BUILD_ROOT)/tests
|
2002-05-19 02:18:22 +03:00
|
|
|
CFLAGS=-O2 -Wall -g
|
2002-08-28 01:20:01 +03:00
|
|
|
|
2006-11-08 02:02:15 +02:00
|
|
|
REFFILE1=$(SRC_DIR)/ffmpeg.regression.ref
|
|
|
|
REFFILE2=$(SRC_DIR)/rotozoom.regression.ref
|
2002-08-28 01:20:01 +03:00
|
|
|
|
2006-11-08 02:02:15 +02:00
|
|
|
SERVER_REFFILE=$(SRC_DIR)/ffserver.regression.ref
|
2002-12-12 21:53:05 +02:00
|
|
|
|
2006-11-08 02:02:15 +02:00
|
|
|
LIBAV_REFFILE=$(SRC_DIR)/libav.regression.ref
|
2002-05-19 02:18:22 +03:00
|
|
|
|
2007-02-05 20:15:03 +02:00
|
|
|
SEEK_REFFILE=$(SRC_DIR)/seek.regression.ref
|
|
|
|
|
2007-04-22 22:19:43 +03:00
|
|
|
all fulltest test: codectest libavtest seektest
|
2002-12-12 21:53:05 +02:00
|
|
|
|
2006-10-15 15:08:42 +03:00
|
|
|
test-server: vsynth1/00.pgm asynth1.sw
|
2007-01-25 14:56:14 +02:00
|
|
|
@echo
|
|
|
|
@echo "Unfortunately ffserver is broken and therefore its regression"
|
|
|
|
@echo "test fails randomly. Treat the results accordingly."
|
|
|
|
@echo
|
2006-11-08 02:02:15 +02:00
|
|
|
@$(SRC_DIR)/server-regression.sh $(SERVER_REFFILE) $(SRC_DIR)/test.conf
|
2002-05-19 02:18:22 +03:00
|
|
|
|
|
|
|
# fast regression tests for all codecs
|
2006-10-15 15:08:42 +03:00
|
|
|
codectest mpeg4 mpeg ac3 snow snowll: vsynth1/00.pgm vsynth2/00.pgm asynth1.sw tiny_psnr$(EXESUF)
|
2006-11-08 02:02:15 +02:00
|
|
|
@$(SRC_DIR)/regression.sh $@ $(REFFILE1) vsynth1
|
|
|
|
@$(SRC_DIR)/regression.sh $@ $(REFFILE2) vsynth2
|
2002-05-19 02:18:22 +03:00
|
|
|
|
2002-05-20 19:20:05 +03:00
|
|
|
# fast regression for libav formats
|
2006-10-18 13:09:16 +03:00
|
|
|
ifeq ($(CONFIG_GPL),yes)
|
2006-10-15 15:08:42 +03:00
|
|
|
libavtest: vsynth1/00.pgm asynth1.sw
|
2006-11-08 02:02:15 +02:00
|
|
|
@$(SRC_DIR)/regression.sh $@ $(LIBAV_REFFILE) vsynth1
|
2006-10-18 13:09:16 +03:00
|
|
|
else
|
|
|
|
libavtest:
|
2006-10-15 15:10:46 +03:00
|
|
|
@echo
|
|
|
|
@echo "This test requires FFmpeg to be compiled with --enable-gpl."
|
|
|
|
@echo
|
2006-10-18 13:09:16 +03:00
|
|
|
endif
|
2002-05-19 02:18:22 +03:00
|
|
|
|
2007-01-10 22:40:02 +02:00
|
|
|
ifeq ($(CONFIG_SWSCALER),yes)
|
|
|
|
test-server codectest mpeg4 mpeg ac3 snow snowll libavtest: swscale_error
|
|
|
|
swscale_error:
|
|
|
|
@echo
|
|
|
|
@echo "This regression test is incompatible with --enable-swscaler."
|
|
|
|
@echo
|
|
|
|
@exit 1
|
|
|
|
endif
|
|
|
|
|
2007-02-05 20:15:03 +02:00
|
|
|
seektest: seek_test$(EXESUF)
|
|
|
|
@$(SRC_DIR)/seek_test.sh $(SEEK_REFFILE)
|
|
|
|
|
2002-05-27 11:39:04 +03:00
|
|
|
# video generation
|
2002-05-19 02:18:22 +03:00
|
|
|
|
2006-10-15 15:08:42 +03:00
|
|
|
vsynth1/00.pgm: videogen$(EXESUF)
|
2002-05-19 02:18:22 +03:00
|
|
|
@mkdir -p vsynth1
|
2006-12-23 02:22:15 +02:00
|
|
|
$(BUILD_DIR)/$< 'vsynth1/'
|
2002-05-19 02:18:22 +03:00
|
|
|
|
2006-10-15 15:08:42 +03:00
|
|
|
vsynth2/00.pgm: rotozoom$(EXESUF)
|
2003-04-11 16:43:17 +03:00
|
|
|
@mkdir -p vsynth2
|
2006-12-23 02:22:15 +02:00
|
|
|
$(BUILD_DIR)/$< 'vsynth2/' $(SRC_DIR)/lena.pnm
|
2003-04-11 16:43:17 +03:00
|
|
|
|
2006-07-19 13:52:22 +03:00
|
|
|
videogen$(EXESUF): videogen.c
|
2002-05-19 02:18:22 +03:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
|
|
|
|
|
2006-07-19 13:52:22 +03:00
|
|
|
rotozoom$(EXESUF): rotozoom.c
|
2003-04-11 16:43:17 +03:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
|
|
|
|
|
2002-05-19 02:18:22 +03:00
|
|
|
# audio generation
|
|
|
|
|
2006-08-03 20:27:33 +03:00
|
|
|
asynth1.sw: audiogen$(EXESUF)
|
2006-12-23 02:22:15 +02:00
|
|
|
$(BUILD_DIR)/$< $@
|
2002-05-19 02:18:22 +03:00
|
|
|
|
2006-07-19 13:52:22 +03:00
|
|
|
audiogen$(EXESUF): audiogen.c
|
2002-05-19 02:18:22 +03:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
|
|
|
|
|
2006-07-19 13:52:22 +03:00
|
|
|
tiny_psnr$(EXESUF): tiny_psnr.c
|
2003-04-11 00:29:31 +03:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
|
2005-12-17 20:14:38 +02:00
|
|
|
|
2007-04-22 21:30:14 +03:00
|
|
|
LIBAV = ../libavformat/libavformat.a ../libavcodec/libavcodec.a ../libavutil/libavutil.a
|
|
|
|
|
2007-02-05 20:15:03 +02:00
|
|
|
#FIXME cleanup shit below
|
2007-04-22 21:30:14 +03:00
|
|
|
seek_test$(EXESUF): seek_test.c $(LIBAV)
|
2007-05-09 12:05:30 +03:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavutil -o $@ $< $(SRC_PATH)/libavformat/libavformat.a $(SRC_PATH)/libavcodec/libavcodec.a $(SRC_PATH)/libavutil/libavutil.a $(EXTRALIBS)
|
2007-02-05 20:15:03 +02:00
|
|
|
|
2002-05-23 16:34:22 +03:00
|
|
|
DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \
|
2002-05-27 11:39:04 +03:00
|
|
|
$(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h \
|
2002-05-29 23:55:16 +03:00
|
|
|
$(SRC_PATH)/libavcodec/i386/dsputil_mmx_rnd.h \
|
2002-05-27 11:39:04 +03:00
|
|
|
$(SRC_PATH)/libavcodec/i386/fdct_mmx.c \
|
|
|
|
$(SRC_PATH)/libavcodec/i386/idct_mmx.c \
|
|
|
|
$(SRC_PATH)/libavcodec/i386/motion_est_mmx.c \
|
|
|
|
$(SRC_PATH)/libavcodec/i386/simple_idct_mmx.c \
|
|
|
|
$(SRC_PATH)/libavcodec/dsputil.c \
|
|
|
|
$(SRC_PATH)/libavcodec/dsputil.h \
|
|
|
|
$(SRC_PATH)/libavcodec/simple_idct.c
|
2002-05-23 16:34:22 +03:00
|
|
|
|
2006-08-17 15:23:35 +03:00
|
|
|
DSPCFLAGS = -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. \
|
|
|
|
-I$(SRC_PATH)/libavutil/ -I$(SRC_PATH)/libavcodec/i386 \
|
|
|
|
-I$(SRC_PATH)/libavcodec/ -lm
|
|
|
|
|
2002-05-23 17:57:11 +03:00
|
|
|
dsptestpic: dsptest.c $(DSPDEPS)
|
2006-08-17 15:23:35 +03:00
|
|
|
$(CC) -fPIC -DPIC $(DSPCFLAGS) -o $@ $<
|
2002-05-23 16:34:22 +03:00
|
|
|
dsptest: dsptest.c $(DSPDEPS)
|
2006-08-17 15:23:35 +03:00
|
|
|
$(CC) $(DSPCFLAGS) -o $@ $<
|
2002-05-23 16:34:22 +03:00
|
|
|
|
2006-01-16 16:59:54 +02:00
|
|
|
distclean clean:
|
2003-04-11 16:43:17 +03:00
|
|
|
rm -rf vsynth1 vsynth2 data
|
2006-07-19 13:52:22 +03:00
|
|
|
rm -f asynth1.sw *~ audiogen$(EXESUF) videogen$(EXESUF) rotozoom$(EXESUF) tiny_psnr$(EXESUF)
|
2006-10-03 20:42:17 +03:00
|
|
|
|
2007-02-06 23:31:05 +02:00
|
|
|
.PHONY: all fulltest test codectest libavtest test-server seektest
|
2006-10-03 20:42:17 +03:00
|
|
|
.PHONY: mpeg4 mpeg ac3 snow snowll distclean clean
|