2002-05-18 23:18:22 +00:00
|
|
|
#
|
|
|
|
# Makefile for tests
|
2002-05-25 22:47:17 +00:00
|
|
|
# (c) 2002 Fabrice Bellard
|
2002-05-18 23:18:22 +00:00
|
|
|
#
|
|
|
|
include ../config.mak
|
|
|
|
|
|
|
|
VPATH=$(SRC_PATH)/tests
|
|
|
|
CFLAGS=-O2 -Wall -g
|
2002-08-27 22:20:01 +00:00
|
|
|
|
2006-08-17 16:29:52 +00:00
|
|
|
REFFILE1=$(VPATH)/ffmpeg.regression.ref
|
|
|
|
REFFILE2=$(VPATH)/rotozoom.regression.ref
|
2002-08-27 22:20:01 +00:00
|
|
|
|
2006-07-05 14:33:17 +00:00
|
|
|
SERVER_REFFILE=$(VPATH)/ffserver.regression.ref
|
2002-12-12 19:53:05 +00:00
|
|
|
|
2006-07-05 14:33:17 +00:00
|
|
|
LIBAV_REFFILE=$(VPATH)/libav.regression.ref
|
2002-05-18 23:18:22 +00:00
|
|
|
|
2006-10-02 16:55:06 +00:00
|
|
|
all fulltest test: codectest libavtest test-server
|
2002-12-12 19:53:05 +00:00
|
|
|
|
2006-10-15 12:08:42 +00:00
|
|
|
test-server: vsynth1/00.pgm asynth1.sw
|
2006-07-05 14:33:17 +00:00
|
|
|
@$(VPATH)/server-regression.sh $(SERVER_REFFILE) $(VPATH)/test.conf
|
2002-05-18 23:18:22 +00:00
|
|
|
|
|
|
|
# fast regression tests for all codecs
|
2006-10-15 12:08:42 +00:00
|
|
|
codectest mpeg4 mpeg ac3 snow snowll: vsynth1/00.pgm vsynth2/00.pgm asynth1.sw tiny_psnr$(EXESUF)
|
2006-07-05 14:33:17 +00:00
|
|
|
@$(VPATH)/regression.sh $@ $(REFFILE1) vsynth1
|
|
|
|
@$(VPATH)/regression.sh $@ $(REFFILE2) vsynth2
|
2002-05-18 23:18:22 +00:00
|
|
|
|
2002-05-20 16:20:05 +00:00
|
|
|
# fast regression for libav formats
|
2006-10-18 10:09:16 +00:00
|
|
|
ifeq ($(CONFIG_GPL),yes)
|
2006-10-15 12:08:42 +00:00
|
|
|
libavtest: vsynth1/00.pgm asynth1.sw
|
2006-10-18 10:09:16 +00:00
|
|
|
@$(VPATH)/regression.sh $@ $(LIBAV_REFFILE) vsynth1
|
|
|
|
else
|
|
|
|
libavtest:
|
2006-10-15 12:10:46 +00:00
|
|
|
@echo
|
|
|
|
@echo "This test requires FFmpeg to be compiled with --enable-gpl."
|
|
|
|
@echo
|
2006-10-18 10:09:16 +00:00
|
|
|
endif
|
2002-05-18 23:18:22 +00:00
|
|
|
|
2002-05-27 08:39:04 +00:00
|
|
|
# video generation
|
2002-05-18 23:18:22 +00:00
|
|
|
|
2006-10-15 12:08:42 +00:00
|
|
|
vsynth1/00.pgm: videogen$(EXESUF)
|
2002-05-18 23:18:22 +00:00
|
|
|
@mkdir -p vsynth1
|
|
|
|
./videogen 'vsynth1/'
|
|
|
|
|
2006-10-15 12:08:42 +00:00
|
|
|
vsynth2/00.pgm: rotozoom$(EXESUF)
|
2003-04-11 13:43:17 +00:00
|
|
|
@mkdir -p vsynth2
|
2006-07-05 14:33:17 +00:00
|
|
|
./rotozoom 'vsynth2/' $(VPATH)/lena.pnm
|
2003-04-11 13:43:17 +00:00
|
|
|
|
2006-07-19 10:52:22 +00:00
|
|
|
videogen$(EXESUF): videogen.c
|
2002-05-18 23:18:22 +00:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
|
|
|
|
|
2006-07-19 10:52:22 +00:00
|
|
|
rotozoom$(EXESUF): rotozoom.c
|
2003-04-11 13:43:17 +00:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
|
|
|
|
|
2002-05-18 23:18:22 +00:00
|
|
|
# audio generation
|
|
|
|
|
2006-08-03 17:27:33 +00:00
|
|
|
asynth1.sw: audiogen$(EXESUF)
|
2002-05-18 23:18:22 +00:00
|
|
|
./audiogen $@
|
|
|
|
|
2006-07-19 10:52:22 +00:00
|
|
|
audiogen$(EXESUF): audiogen.c
|
2002-05-18 23:18:22 +00:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
|
|
|
|
|
2006-07-19 10:52:22 +00:00
|
|
|
tiny_psnr$(EXESUF): tiny_psnr.c
|
2003-04-10 21:29:31 +00:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2002-05-23 13:34:22 +00:00
|
|
|
DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \
|
2002-05-27 08:39:04 +00:00
|
|
|
$(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h \
|
2002-05-29 20:55:16 +00:00
|
|
|
$(SRC_PATH)/libavcodec/i386/dsputil_mmx_rnd.h \
|
2002-05-27 08:39:04 +00: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 13:34:22 +00:00
|
|
|
|
2006-08-17 12:23:35 +00: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 14:57:11 +00:00
|
|
|
dsptestpic: dsptest.c $(DSPDEPS)
|
2006-08-17 12:23:35 +00:00
|
|
|
$(CC) -fPIC -DPIC $(DSPCFLAGS) -o $@ $<
|
2002-05-23 13:34:22 +00:00
|
|
|
dsptest: dsptest.c $(DSPDEPS)
|
2006-08-17 12:23:35 +00:00
|
|
|
$(CC) $(DSPCFLAGS) -o $@ $<
|
2002-05-23 13:34:22 +00:00
|
|
|
|
2006-01-16 14:59:54 +00:00
|
|
|
distclean clean:
|
2003-04-11 13:43:17 +00:00
|
|
|
rm -rf vsynth1 vsynth2 data
|
2006-07-19 10:52:22 +00:00
|
|
|
rm -f asynth1.sw *~ audiogen$(EXESUF) videogen$(EXESUF) rotozoom$(EXESUF) tiny_psnr$(EXESUF)
|
2006-10-03 17:42:17 +00:00
|
|
|
|
|
|
|
.PHONY: all fulltest test codectest libavtest test-server
|
|
|
|
.PHONY: mpeg4 mpeg ac3 snow snowll distclean clean
|