]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
move sine window stuff from imdct.c to wmadec_filter.c.
authorAndre Noll <maan@systemlinux.org>
Fri, 16 Oct 2009 19:17:20 +0000 (21:17 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 18 Nov 2009 18:34:14 +0000 (19:34 +0100)
imdct.c
imdct.h
wma.h
wmadec_filter.c

diff --git a/imdct.c b/imdct.c
index a87ad2018df6306f83ec2e620af2823e57355c79..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 {
@@ -357,27 +355,6 @@ static void fft_end(struct fft_context *ctx)
        freep(&ctx->exptab);
 }
 
-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)));
-}
-
 /**
  * Init MDCT or IMDCT computation.
  */
diff --git a/imdct.h b/imdct.h
index 46fc4033c1e2f199c3b761c02765bab04d364ea9..ab66bab02baf2bc01869877c2fde79b361260677 100644 (file)
--- a/imdct.h
+++ b/imdct.h
@@ -2,8 +2,6 @@
 
 struct mdct_context;
 
-float *ff_sine_windows[6];
-void sine_window_init(float *window, int n);
 int imdct_init(int nbits, int inverse, struct mdct_context **result);
 void imdct(struct mdct_context *s, float *output, const float *input);
 void imdct_end(struct mdct_context *s);
diff --git a/wma.h b/wma.h
index c4703c25a5e9b7751b94e39c61e12c30053a7038..4b3134270cf917b4d395c46ee4beb785402406ba 100644 (file)
--- a/wma.h
+++ b/wma.h
@@ -22,3 +22,5 @@ const char *search_pattern(const char *pattern, int pattern_len,
 int read_asf_header(char *buf, int loaded, struct asf_header_info *ahi);
 #define M_PI           3.14159265358979323846  /* pi */
 #define WMA_FRAME_SKIP 31
+#define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
+#define DECLARE_ALIGNED_16(t, v) DECLARE_ALIGNED(16, t, v)
index 15bb39253672dae4e4dd39e2d105c7ab41e026ba..b26ab3b57f1f4223c4f558a95206d4219bcb9139 100644 (file)
@@ -131,6 +131,27 @@ struct private_wmadec_data {
 #define VLCBITS 9
 #define VLCMAX ((22+VLCBITS-1)/VLCBITS)
 
+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]);
+
+static 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. */
+static 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)));
+}
+
 static int wmadec_cleanup(struct private_wmadec_data *s)
 {
        int i;