diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c index d0c22d020e..142a61d8d4 100644 --- a/libavcodec/fft-test.c +++ b/libavcodec/fft-test.c @@ -113,6 +113,7 @@ static void fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits) } } +#if CONFIG_MDCT static void imdct_ref(FFTSample *out, FFTSample *in, int nbits) { int n = 1<fft_permute(s, tab); @@ -376,6 +388,7 @@ int main(int argc, char **argv) err = check_diff((FFTSample *)tab_ref, (FFTSample *)tab, fft_size * 2, 1.0); break; #if FFT_FLOAT +#if CONFIG_RDFT case TRANSFORM_RDFT: fft_size_2 = fft_size >> 1; if (do_inverse) { @@ -407,6 +420,8 @@ int main(int argc, char **argv) err = check_diff((float *)tab_ref, (float *)tab2, fft_size, 1.0); } break; +#endif /* CONFIG_RDFT */ +#if CONFIG_DCT case TRANSFORM_DCT: memcpy(tab, tab1, fft_size * sizeof(FFTComplex)); d->dct_calc(d, tab); @@ -417,6 +432,7 @@ int main(int argc, char **argv) } err = check_diff((float *)tab_ref, (float *)tab, fft_size, 1.0); break; +#endif /* CONFIG_DCT */ #endif } @@ -468,19 +484,25 @@ int main(int argc, char **argv) } switch (transform) { +#if CONFIG_MDCT case TRANSFORM_MDCT: ff_mdct_end(m); break; +#endif /* CONFIG_MDCT */ case TRANSFORM_FFT: ff_fft_end(s); break; #if FFT_FLOAT +#if CONFIG_RDFT case TRANSFORM_RDFT: ff_rdft_end(r); break; +#endif /* CONFIG_RDFT */ +#if CONFIG_DCT case TRANSFORM_DCT: ff_dct_end(d); break; +#endif /* CONFIG_DCT */ #endif } diff --git a/tests/fate/fft.mak b/tests/fate/fft.mak index 20d563828f..d2a390404b 100644 --- a/tests/fate/fft.mak +++ b/tests/fate/fft.mak @@ -1,8 +1,8 @@ define DEF_FFT -FATE_FFT += fate-fft-$(1) fate-ifft-$(1) \ - fate-mdct-$(1) fate-imdct-$(1) \ - fate-rdft-$(1) fate-irdft-$(1) \ - fate-dct1d-$(1) fate-idct1d-$(1) +FATE_FFT-$(CONFIG_DCT) += fate-dct1d-$(1) fate-idct1d-$(1) +FATE_FFT-$(CONFIG_FFT) += fate-fft-$(1) fate-ifft-$(1) +FATE_FFT-$(CONFIG_MDCT) += fate-mdct-$(1) fate-imdct-$(1) +FATE_FFT-$(CONFIG_RDFT) += fate-rdft-$(1) fate-irdft-$(1) fate-fft-$(N): ARGS = -n$(1) fate-ifft-$(N): ARGS = -n$(1) -i @@ -16,14 +16,14 @@ endef $(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT,$(N)))) -fate-fft-test: $(FATE_FFT) -$(FATE_FFT): libavcodec/fft-test$(EXESUF) -$(FATE_FFT): CMD = run libavcodec/fft-test $(CPUFLAGS:%=-c%) $(ARGS) -$(FATE_FFT): REF = /dev/null +fate-fft-float: $(FATE_FFT-yes) +$(FATE_FFT-yes): libavcodec/fft-test$(EXESUF) +$(FATE_FFT-yes): CMD = run libavcodec/fft-test $(CPUFLAGS:%=-c%) $(ARGS) +$(FATE_FFT-yes): REF = /dev/null define DEF_FFT_FIXED -FATE_FFT_FIXED += fate-fft-fixed-$(1) fate-ifft-fixed-$(1) \ - fate-mdct-fixed-$(1) fate-imdct-fixed-$(1) +FATE_FFT_FIXED-$(CONFIG_FFT) += fate-fft-fixed-$(1) fate-ifft-fixed-$(1) +FATE_FFT_FIXED-$(CONFIG_MDCT) += fate-mdct-fixed-$(1) fate-imdct-fixed-$(1) fate-fft-fixed-$(1): ARGS = -n$(1) fate-ifft-fixed-$(1): ARGS = -n$(1) -i @@ -33,10 +33,10 @@ endef $(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT_FIXED,$(N)))) -fate-fft-fixed-test: $(FATE_FFT_FIXED) -$(FATE_FFT_FIXED): libavcodec/fft-fixed-test$(EXESUF) -$(FATE_FFT_FIXED): CMD = run libavcodec/fft-fixed-test $(CPUFLAGS:%=-c%) $(ARGS) -$(FATE_FFT_FIXED): REF = /dev/null +fate-fft-fixed: $(FATE_FFT_FIXED-yes) +$(FATE_FFT_FIXED-yes): libavcodec/fft-fixed-test$(EXESUF) +$(FATE_FFT_FIXED-yes): CMD = run libavcodec/fft-fixed-test $(CPUFLAGS:%=-c%) $(ARGS) +$(FATE_FFT_FIXED-yes): REF = /dev/null -FATE-$(call ALLYES, AVCODEC FFT) += $(FATE_FFT) $(FATE_FFT_FIXED) -fate-fft: $(FATE_FFT) $(FATE_FFT_FIXED) +FATE-$(CONFIG_AVCODEC) += $(FATE_FFT-yes) $(FATE_FFT_FIXED-yes) +fate-fft: $(FATE_FFT-yes) $(FATE_FFT_FIXED-yes)