3 # (c) 2002 Fabrice Bellard
7 VPATH=$(SRC_PATH_BARE)/tests
8 SRC_DIR=$(SRC_PATH)/tests
11 REFFILE1=$(SRC_DIR)/ffmpeg.regression.ref
12 REFFILE2=$(SRC_DIR)/rotozoom.regression.ref
14 SERVER_REFFILE=$(SRC_DIR)/ffserver.regression.ref
16 LIBAV_REFFILE=$(SRC_DIR)/libav.regression.ref
18 all fulltest test: codectest libavtest test-server
20 test-server: vsynth1/00.pgm asynth1.sw
21 @$(SRC_DIR)/server-regression.sh $(SERVER_REFFILE) $(SRC_DIR)/test.conf
23 # fast regression tests for all codecs
24 codectest mpeg4 mpeg ac3 snow snowll: vsynth1/00.pgm vsynth2/00.pgm asynth1.sw tiny_psnr$(EXESUF)
25 @$(SRC_DIR)/regression.sh $@ $(REFFILE1) vsynth1
26 @$(SRC_DIR)/regression.sh $@ $(REFFILE2) vsynth2
28 # fast regression for libav formats
29 ifeq ($(CONFIG_GPL),yes)
30 libavtest: vsynth1/00.pgm asynth1.sw
31 @$(SRC_DIR)/regression.sh $@ $(LIBAV_REFFILE) vsynth1
35 @echo "This test requires FFmpeg to be compiled with --enable-gpl."
41 vsynth1/00.pgm: videogen$(EXESUF)
45 vsynth2/00.pgm: rotozoom$(EXESUF)
47 ./rotozoom 'vsynth2/' $(SRC_DIR)/lena.pnm
49 videogen$(EXESUF): videogen.c
50 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
52 rotozoom$(EXESUF): rotozoom.c
53 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
57 asynth1.sw: audiogen$(EXESUF)
60 audiogen$(EXESUF): audiogen.c
61 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
63 tiny_psnr$(EXESUF): tiny_psnr.c
64 $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
66 DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \
67 $(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h \
68 $(SRC_PATH)/libavcodec/i386/dsputil_mmx_rnd.h \
69 $(SRC_PATH)/libavcodec/i386/fdct_mmx.c \
70 $(SRC_PATH)/libavcodec/i386/idct_mmx.c \
71 $(SRC_PATH)/libavcodec/i386/motion_est_mmx.c \
72 $(SRC_PATH)/libavcodec/i386/simple_idct_mmx.c \
73 $(SRC_PATH)/libavcodec/dsputil.c \
74 $(SRC_PATH)/libavcodec/dsputil.h \
75 $(SRC_PATH)/libavcodec/simple_idct.c
77 DSPCFLAGS = -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. \
78 -I$(SRC_PATH)/libavutil/ -I$(SRC_PATH)/libavcodec/i386 \
79 -I$(SRC_PATH)/libavcodec/ -lm
81 dsptestpic: dsptest.c $(DSPDEPS)
82 $(CC) -fPIC -DPIC $(DSPCFLAGS) -o $@ $<
83 dsptest: dsptest.c $(DSPDEPS)
84 $(CC) $(DSPCFLAGS) -o $@ $<
87 rm -rf vsynth1 vsynth2 data
88 rm -f asynth1.sw *~ audiogen$(EXESUF) videogen$(EXESUF) rotozoom$(EXESUF) tiny_psnr$(EXESUF)
90 .PHONY: all fulltest test codectest libavtest test-server
91 .PHONY: mpeg4 mpeg ac3 snow snowll distclean clean