#include <sys/time.h>
#include <inttypes.h>
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#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;
return ret;
/* init MDCT */
for (i = 0; i < s->nb_block_sizes; i++) {
- ret = imdct_init(s->frame_len_bits - i + 1, 1, &s->mdct_ctx[i]);
+ ret = imdct_init(s->frame_len_bits - i + 1, &s->mdct_ctx[i]);
if (ret < 0)
return ret;
}
/* complex coding */
if (s->use_noise_coding) {
-
for (ch = 0; ch < s->ahi.channels; ch++) {
if (s->channel_coded[ch]) {
int i, m, a;