shithub: opus

Download patch

ref: 300cb5b86ab6f47ac7240441e6a1e1c788323679
parent: bc60f8b3460e89f879e57084638d53184f8bacb9
author: Jean-Marc Valin <[email protected]>
date: Mon Mar 3 12:52:11 EST 2008

First attempt at adding a suffix to kiss_fft functions so we can have multiple
copies of the FFT.

--- a/libcelt/kiss_fft.h
+++ b/libcelt/kiss_fft.h
@@ -48,6 +48,22 @@
 # endif
 #endif
 
+
+/* This adds a suffix to all the kiss_fft functions so we
+   can easily link with more than one copy of the fft */
+#define KF_SUFFIX _celt_single
+#define CAT_SUFFIX(a,b) a ## b
+#define SUF(a,b) CAT_SUFFIX(a, b)
+
+#define kiss_fft_alloc SUF(kiss_fft_alloc,KF_SUFFIX)
+#define kf_work SUF(kf_work,KF_SUFFIX)
+#define ki_work SUF(ki_work,KF_SUFFIX)
+#define kiss_fft SUF(kiss_fft,KF_SUFFIX)
+#define kiss_ifft SUF(kiss_ifft,KF_SUFFIX)
+#define kiss_fft_stride SUF(kiss_fft_stride,KF_SUFFIX)
+#define kiss_ifft_stride SUF(kiss_ifft_stride,KF_SUFFIX)
+
+
 typedef struct {
     kiss_fft_scalar r;
     kiss_fft_scalar i;
@@ -115,12 +131,6 @@
    buffer and can be simply free()d when no longer needed*/
 #define kiss_fft_free celt_free
 
-/**
- Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up 
- your compiler output to call this before you exit.
-*/
-void kiss_fft_cleanup(void);
-	
 
 #ifdef __cplusplus
 }