]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - imdct.c
move sine window stuff from imdct.c to wmadec_filter.c.
[paraslash.git] / imdct.c
diff --git a/imdct.c b/imdct.c
index 222fff1559c34ef8b8e5eabefa5e957b4b8ff993..61498f73c8dd0ed656bb665e92480fb110cada12 100644 (file)
--- a/imdct.c
+++ b/imdct.c
@@ -29,8 +29,6 @@
 
 typedef float fftsample_t;
 
-#define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
-#define DECLARE_ALIGNED_16(t, v) DECLARE_ALIGNED(16, t, v)
 #define M_SQRT1_2      0.70710678118654752440  /* 1/sqrt(2) */
 
 struct fft_complex {
@@ -42,7 +40,6 @@ struct fft_context {
        int inverse;
        uint16_t *revtab;
        struct fft_complex *exptab;
-       struct fft_complex *tmp_buf;
 };
 
 struct mdct_context {
@@ -333,7 +330,6 @@ static int fft_init(struct fft_context *s, int nbits, int inverse)
        s->nbits = nbits;
        n = 1 << nbits;
 
-       s->tmp_buf = NULL;
        s->exptab = para_malloc((n / 2) * sizeof(struct fft_complex));
        s->revtab = para_malloc(n * sizeof(uint16_t));
        s->inverse = inverse;
@@ -350,7 +346,6 @@ static int fft_init(struct fft_context *s, int nbits, int inverse)
        for (i = 0; i < n; i++)
                s->revtab[-split_radix_permutation(
                        i, n, s->inverse) & (n - 1)] = i;
-       s->tmp_buf = para_malloc(n * sizeof(struct fft_complex));
        return 0;
 }
 
@@ -358,28 +353,6 @@ static void fft_end(struct fft_context *ctx)
 {
        freep(&ctx->revtab);
        freep(&ctx->exptab);
-       freep(&ctx->tmp_buf);
-}
-
-DECLARE_ALIGNED(16, float, ff_sine_128[128]);
-DECLARE_ALIGNED(16, float, ff_sine_256[256]);
-DECLARE_ALIGNED(16, float, ff_sine_512[512]);
-DECLARE_ALIGNED(16, float, ff_sine_1024[1024]);
-DECLARE_ALIGNED(16, float, ff_sine_2048[2048]);
-DECLARE_ALIGNED(16, float, ff_sine_4096[4096]);
-
-float *ff_sine_windows[6] = {
-       ff_sine_128, ff_sine_256, ff_sine_512, ff_sine_1024,
-       ff_sine_2048, ff_sine_4096
-};
-
-// Generate a sine window.
-void sine_window_init(float *window, int n)
-{
-       int i;
-
-       for (i = 0; i < n; i++)
-               window[i] = sinf((i + 0.5) * (M_PI / (2.0 * n)));
 }
 
 /**