$(FATE_FFT_FIXED32): CMD = run libavcodec/tests/fft-fixed32 $(CPUFLAGS:%=-c%) $(ARGS)
$(FATE_FFT_FIXED32): REF = /dev/null
+define DEF_AV_FFT
+FATE_AV_DCT-$(CONFIG_DCT) += fate-av-dct1d-$(1) fate-av-idct1d-$(1)
+FATE_AV_FFT-$(CONFIG_FFT) += fate-av-fft-$(1) fate-av-ifft-$(1)
+FATE_AV_MDCT-$(CONFIG_MDCT) += fate-av-mdct-$(1) fate-av-imdct-$(1)
+FATE_AV_RDFT-$(CONFIG_RDFT) += fate-av-rdft-$(1) fate-av-irdft-$(1)
+
+fate-av-fft-$(N): ARGS = -n$(1)
+fate-av-ifft-$(N): ARGS = -n$(1) -i
+fate-av-mdct-$(N): ARGS = -n$(1) -m
+fate-av-imdct-$(N): ARGS = -n$(1) -m -i
+fate-av-rdft-$(N): ARGS = -n$(1) -r
+fate-av-irdft-$(N): ARGS = -n$(1) -r -i
+fate-av-dct1d-$(N): ARGS = -n$(1) -d
+fate-av-idct1d-$(N): ARGS = -n$(1) -d -i
+endef
+
+$(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_AV_FFT,$(N))))
+
+fate-av-dct-float: $(FATE_AV_DCT-yes)
+fate-av-fft-float: $(FATE_AV_FFT-yes)
+fate-av-mdct-float: $(FATE_AV_MDCT-yes)
+fate-av-rdft-float: $(FATE_AV_RDFT-yes)
+
+FATE_AV_FFT_ALL = $(FATE_AV_DCT-yes) $(FATE_AV_FFT-yes) $(FATE_AV_MDCT-yes) $(FATE_AV_RDFT-yes)
+
+$(FATE_AV_FFT_ALL): libavcodec/tests/avfft$(EXESUF)
+$(FATE_AV_FFT_ALL): CMD = run libavcodec/tests/avfft $(CPUFLAGS:%=-c%) $(ARGS)
+$(FATE_AV_FFT_ALL): REF = /dev/null
+
fate-dct: fate-dct-float
fate-fft: fate-fft-float fate-fft-fixed fate-fft-fixed32
fate-mdct: fate-mdct-float fate-mdct-fixed
fate-rdft: fate-rdft-float
-FATE-$(call ALLYES, AVCODEC FFT MDCT) += $(FATE_FFT_ALL) $(FATE_FFT_FIXED_ALL) $(FATE_FFT_FIXED32)
-fate-fft-all: $(FATE_FFT_ALL) $(FATE_FFT_FIXED_ALL) $(FATE_FFT_FIXED32)
+FATE-$(call ALLYES, AVCODEC FFT MDCT) += $(FATE_FFT_ALL) $(FATE_FFT_FIXED_ALL) $(FATE_FFT_FIXED32) $(FATE_AV_FFT_ALL)
+fate-fft-all: $(FATE_FFT_ALL) $(FATE_FFT_FIXED_ALL) $(FATE_FFT_FIXED32) $(FATE_AV_FFT_ALL)