[FFmpeg-devel] SVN 22969: missing dependency for decoder wmavoice

Daniel Verkamp daniel
Tue Apr 27 20:30:55 CEST 2010


On Tue, Apr 27, 2010 at 1:02 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Thierry Foucu <tfoucu <at> gmail.com> writes:
>
>> /usr/local/fmpeg/svn/libavcodec/wmavoice.c:361: undefined reference to
>> `ff_sine_window_init'
>
> Please read http://ffmpeg.org/bugreports.html if you do not intend to send a patch.
>

This looks like a result of fft using the sine tables but not
depending on mdct, which is where the tables are defined
(mdct_tablegen.h, which is included by mdct.c).  However, just putting
fft_select="mdct" in configure obviously won't work, as that's a
circular dependency (and adds unnecessary code when mdct isn't
actually needed).

The attached works, but it's ugly/messy IMO...

-- Daniel Verkamp
-------------- next part --------------
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 9aa70e2..8fbe30e 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -31,7 +31,7 @@ OBJS-$(CONFIG_DCT)                     += dct.o
 OBJS-$(CONFIG_DWT)                     += dwt.o
 OBJS-$(CONFIG_DXVA2)                   += dxva2.o
 FFT-OBJS-$(CONFIG_HARDCODED_TABLES)    += cos_tables.o
-OBJS-$(CONFIG_FFT)                     += avfft.o fft.o $(FFT-OBJS-yes)
+OBJS-$(CONFIG_FFT)                     += avfft.o fft.o mdct.o $(FFT-OBJS-yes)
 OBJS-$(CONFIG_GOLOMB)                  += golomb.o
 OBJS-$(CONFIG_H264DSP)                 += h264dsp.o h264idct.o h264pred.o
 OBJS-$(CONFIG_LPC)                     += lpc.o
diff --git a/libavcodec/mdct.c b/libavcodec/mdct.c
index 69e1bbf..b8fb41d 100644
--- a/libavcodec/mdct.c
+++ b/libavcodec/mdct.c
@@ -30,6 +30,10 @@
  * MDCT/IMDCT transforms.
  */
 
+#include "mdct_tablegen.h"
+
+#if CONFIG_MDCT
+
 // Generate a Kaiser-Bessel Derived Window.
 #define BESSEL_I0_ITER 50 // default: 50 iterations of Bessel I0 approximation
 av_cold void ff_kbd_window_init(float *window, float alpha, int n)
@@ -53,8 +57,6 @@ av_cold void ff_kbd_window_init(float *window, float alpha, int n)
        window[i] = sqrt(local_window[i] / sum);
 }
 
-#include "mdct_tablegen.h"
-
 /**
  * init MDCT or IMDCT computation.
  */
@@ -230,3 +232,5 @@ av_cold void ff_mdct_end(FFTContext *s)
     av_freep(&s->tcos);
     ff_fft_end(s);
 }
+
+#endif /* CONFIG_MDCT */



More information about the ffmpeg-devel mailing list