[FFmpeg-cvslog] avcodec/tests/fft: Fix building with CONFIG_MDCT disabled

Martin Storsjö git at videolan.org
Mon Nov 7 10:48:53 EET 2022


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Mon Nov  7 10:31:15 2022 +0200| [202b7a9ae7be232a819acee666ed7b9835fd67ff] | committer: Martin Storsjö

avcodec/tests/fft: Fix building with CONFIG_MDCT disabled

Since e6afa61be97674312e36c9b6f8bb5fba009232e7, no components in
libavcodec enable CONFIG_MDCT. This fixes building "make testprogs".

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=202b7a9ae7be232a819acee666ed7b9835fd67ff
---

 libavcodec/tests/fft.c | 4 ++++
 1 file changed, 4 insertions(+)

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);



More information about the ffmpeg-cvslog mailing list