You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.8KB

  1. #
  2. # Makefile for tests
  3. # (c) 2002 Fabrice Bellard
  4. #
  5. include ../config.mak
  6. VPATH=$(SRC_PATH_BARE)/tests
  7. SRC_DIR=$(SRC_PATH)/tests
  8. BUILD_DIR=$(BUILD_ROOT)/tests
  9. CFLAGS=-O2 -Wall -g
  10. REFFILE1=$(SRC_DIR)/ffmpeg.regression.ref
  11. REFFILE2=$(SRC_DIR)/rotozoom.regression.ref
  12. SERVER_REFFILE=$(SRC_DIR)/ffserver.regression.ref
  13. LIBAV_REFFILE=$(SRC_DIR)/libav.regression.ref
  14. all fulltest test: codectest libavtest
  15. test-server: vsynth1/00.pgm asynth1.sw
  16. @echo
  17. @echo "Unfortunately ffserver is broken and therefore its regression"
  18. @echo "test fails randomly. Treat the results accordingly."
  19. @echo
  20. @$(SRC_DIR)/server-regression.sh $(SERVER_REFFILE) $(SRC_DIR)/test.conf
  21. # fast regression tests for all codecs
  22. codectest mpeg4 mpeg ac3 snow snowll: vsynth1/00.pgm vsynth2/00.pgm asynth1.sw tiny_psnr$(EXESUF)
  23. @$(SRC_DIR)/regression.sh $@ $(REFFILE1) vsynth1
  24. @$(SRC_DIR)/regression.sh $@ $(REFFILE2) vsynth2
  25. # fast regression for libav formats
  26. ifeq ($(CONFIG_GPL),yes)
  27. libavtest: vsynth1/00.pgm asynth1.sw
  28. @$(SRC_DIR)/regression.sh $@ $(LIBAV_REFFILE) vsynth1
  29. else
  30. libavtest:
  31. @echo
  32. @echo "This test requires FFmpeg to be compiled with --enable-gpl."
  33. @echo
  34. endif
  35. ifeq ($(CONFIG_SWSCALER),yes)
  36. test-server codectest mpeg4 mpeg ac3 snow snowll libavtest: swscale_error
  37. swscale_error:
  38. @echo
  39. @echo "This regression test is incompatible with --enable-swscaler."
  40. @echo
  41. @exit 1
  42. endif
  43. # video generation
  44. vsynth1/00.pgm: videogen$(EXESUF)
  45. @mkdir -p vsynth1
  46. $(BUILD_DIR)/$< 'vsynth1/'
  47. vsynth2/00.pgm: rotozoom$(EXESUF)
  48. @mkdir -p vsynth2
  49. $(BUILD_DIR)/$< 'vsynth2/' $(SRC_DIR)/lena.pnm
  50. videogen$(EXESUF): videogen.c
  51. $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
  52. rotozoom$(EXESUF): rotozoom.c
  53. $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
  54. # audio generation
  55. asynth1.sw: audiogen$(EXESUF)
  56. $(BUILD_DIR)/$< $@
  57. audiogen$(EXESUF): audiogen.c
  58. $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
  59. tiny_psnr$(EXESUF): tiny_psnr.c
  60. $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
  61. DSPDEPS = $(SRC_PATH)/libavcodec/i386/dsputil_mmx.c \
  62. $(SRC_PATH)/libavcodec/i386/dsputil_mmx_avg.h \
  63. $(SRC_PATH)/libavcodec/i386/dsputil_mmx_rnd.h \
  64. $(SRC_PATH)/libavcodec/i386/fdct_mmx.c \
  65. $(SRC_PATH)/libavcodec/i386/idct_mmx.c \
  66. $(SRC_PATH)/libavcodec/i386/motion_est_mmx.c \
  67. $(SRC_PATH)/libavcodec/i386/simple_idct_mmx.c \
  68. $(SRC_PATH)/libavcodec/dsputil.c \
  69. $(SRC_PATH)/libavcodec/dsputil.h \
  70. $(SRC_PATH)/libavcodec/simple_idct.c
  71. DSPCFLAGS = -O4 -fomit-frame-pointer -DHAVE_AV_CONFIG_H -I.. \
  72. -I$(SRC_PATH)/libavutil/ -I$(SRC_PATH)/libavcodec/i386 \
  73. -I$(SRC_PATH)/libavcodec/ -lm
  74. dsptestpic: dsptest.c $(DSPDEPS)
  75. $(CC) -fPIC -DPIC $(DSPCFLAGS) -o $@ $<
  76. dsptest: dsptest.c $(DSPDEPS)
  77. $(CC) $(DSPCFLAGS) -o $@ $<
  78. distclean clean:
  79. rm -rf vsynth1 vsynth2 data
  80. rm -f asynth1.sw *~ audiogen$(EXESUF) videogen$(EXESUF) rotozoom$(EXESUF) tiny_psnr$(EXESUF)
  81. .PHONY: all fulltest test codectest libavtest test-server
  82. .PHONY: mpeg4 mpeg ac3 snow snowll distclean clean