From 202b7a9ae7be232a819acee666ed7b9835fd67ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 7 Nov 2022 10:31:15 +0200 Subject: avcodec/tests/fft: Fix building with CONFIG_MDCT disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since e6afa61be97674312e36c9b6f8bb5fba009232e7, no components in libavcodec enable CONFIG_MDCT. This fixes building "make testprogs". Signed-off-by: Martin Storsjö --- libavcodec/tests/fft.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavcodec') diff --git a/libavcodec/tests/fft.c b/libavcodec/tests/fft.c index cc951b0dd4..163f3e89c4 100644 --- a/libavcodec/tests/fft.c +++ b/libavcodec/tests/fft.c @@ -226,6 +226,7 @@ static inline void fft_init(FFTContext **s, int nbits, int inverse) #endif } +#if CONFIG_MDCT static inline void mdct_init(FFTContext **s, int nbits, int inverse, double scale) { #if AVFFT @@ -252,6 +253,7 @@ static inline void imdct_calc(struct FFTContext *s, FFTSample *output, const FFT s->imdct_calc(s, output, input); #endif } +#endif static inline void fft_permute(FFTContext *s, FFTComplex *z) { @@ -592,12 +594,14 @@ int main(int argc, char **argv) time_start = av_gettime_relative(); for (it = 0; it < nb_its; it++) { switch (transform) { +#if CONFIG_MDCT case TRANSFORM_MDCT: if (do_inverse) imdct_calc(m, &tab->re, &tab1->re); else mdct_calc(m, &tab->re, &tab1->re); break; +#endif case TRANSFORM_FFT: memcpy(tab, tab1, fft_size * sizeof(FFTComplex)); fft_calc(s, tab); -- cgit v1.2.3