| 1 | define DEF_FFT |
| 2 | FATE_FFT-$(CONFIG_DCT) += fate-dct1d-$(1) fate-idct1d-$(1) |
| 3 | FATE_FFT-$(CONFIG_FFT) += fate-fft-$(1) fate-ifft-$(1) |
| 4 | FATE_FFT-$(CONFIG_MDCT) += fate-mdct-$(1) fate-imdct-$(1) |
| 5 | FATE_FFT-$(CONFIG_RDFT) += fate-rdft-$(1) fate-irdft-$(1) |
| 6 | |
| 7 | fate-fft-$(N): ARGS = -n$(1) |
| 8 | fate-ifft-$(N): ARGS = -n$(1) -i |
| 9 | fate-mdct-$(N): ARGS = -n$(1) -m |
| 10 | fate-imdct-$(N): ARGS = -n$(1) -m -i |
| 11 | fate-rdft-$(N): ARGS = -n$(1) -r |
| 12 | fate-irdft-$(N): ARGS = -n$(1) -r -i |
| 13 | fate-dct1d-$(N): ARGS = -n$(1) -d |
| 14 | fate-idct1d-$(N): ARGS = -n$(1) -d -i |
| 15 | endef |
| 16 | |
| 17 | $(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT,$(N)))) |
| 18 | |
| 19 | fate-fft-float: $(FATE_FFT-yes) |
| 20 | $(FATE_FFT-yes): libavcodec/fft-test$(EXESUF) |
| 21 | $(FATE_FFT-yes): CMD = run libavcodec/fft-test $(CPUFLAGS:%=-c%) $(ARGS) |
| 22 | $(FATE_FFT-yes): REF = /dev/null |
| 23 | |
| 24 | define DEF_FFT_FIXED |
| 25 | FATE_FFT_FIXED-$(CONFIG_FFT) += fate-fft-fixed-$(1) fate-ifft-fixed-$(1) |
| 26 | FATE_FFT_FIXED-$(CONFIG_MDCT) += fate-mdct-fixed-$(1) fate-imdct-fixed-$(1) |
| 27 | |
| 28 | fate-fft-fixed-$(1): ARGS = -n$(1) |
| 29 | fate-ifft-fixed-$(1): ARGS = -n$(1) -i |
| 30 | fate-mdct-fixed-$(1): ARGS = -n$(1) -m |
| 31 | fate-imdct-fixed-$(1): ARGS = -n$(1) -m -i |
| 32 | endef |
| 33 | |
| 34 | $(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT_FIXED,$(N)))) |
| 35 | |
| 36 | fate-fft-fixed: $(FATE_FFT_FIXED-yes) |
| 37 | $(FATE_FFT_FIXED-yes): libavcodec/fft-fixed-test$(EXESUF) |
| 38 | $(FATE_FFT_FIXED-yes): CMD = run libavcodec/fft-fixed-test $(CPUFLAGS:%=-c%) $(ARGS) |
| 39 | $(FATE_FFT_FIXED-yes): REF = /dev/null |
| 40 | |
| 41 | define DEF_FFT_FIXED32 |
| 42 | FATE_FFT_FIXED32 += fate-fft-fixed32-$(1) fate-ifft-fixed32-$(1) \ |
| 43 | fate-mdct-fixed32-$(1) fate-imdct-fixed32-$(1) |
| 44 | |
| 45 | fate-fft-fixed32-$(1): ARGS = -n$(1) |
| 46 | fate-ifft-fixed32-$(1): ARGS = -n$(1) -i |
| 47 | #fate-mdct-fixed32-$(1): ARGS = -n$(1) -m |
| 48 | fate-imdct-fixed32-$(1): ARGS = -n$(1) -m -i |
| 49 | endef |
| 50 | |
| 51 | $(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT_FIXED32,$(N)))) |
| 52 | |
| 53 | fate-fft-fixed32-test: $(FATE_FFT_FIXED32) |
| 54 | $(FATE_FFT_FIXED32): libavcodec/fft-fixed32-test$(EXESUF) |
| 55 | $(FATE_FFT_FIXED32): CMD = run libavcodec/fft-fixed32-test $(CPUFLAGS:%=-c%) $(ARGS) |
| 56 | $(FATE_FFT_FIXED32): REF = /dev/null |
| 57 | |
| 58 | FATE-$(call ALLYES, AVCODEC FFT MDCT) += $(FATE_FFT-yes) $(FATE_FFT_FIXED-yes) $(FATE_FFT_FIXED32) |
| 59 | fate-fft: $(FATE_FFT-yes) $(FATE_FFT_FIXED-yes) $(FATE_FFT_FIXED32) |