summaryrefslogtreecommitdiff
path: root/libavcodec/mdct.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-03-21 03:09:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-03-21 03:33:28 +0100
commitd4a50a2100a2b3539d238e64af98e16f47b47a89 (patch)
tree95bc08782f34783dfac34a73142a77adbce4db32 /libavcodec/mdct.c
parent849f80fecbada7c512737e13edec9516541996e3 (diff)
parentcf752d027fafe691951fa00d9c25e2fda032b536 (diff)
Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mdct.c')
-rw-r--r--libavcodec/mdct.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/libavcodec/mdct.c b/libavcodec/mdct.c
index 31e2216dd3..ca686b4ccb 100644
--- a/libavcodec/mdct.c
+++ b/libavcodec/mdct.c
@@ -30,33 +30,6 @@
* MDCT/IMDCT transforms.
*/
-// 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)
-{
- int i, j;
- double sum = 0.0, bessel, tmp;
- double local_window[FF_KBD_WINDOW_MAX];
- double alpha2 = (alpha * M_PI / n) * (alpha * M_PI / n);
-
- assert(n <= FF_KBD_WINDOW_MAX);
-
- for (i = 0; i < n; i++) {
- tmp = i * (n - i) * alpha2;
- bessel = 1.0;
- for (j = BESSEL_I0_ITER; j > 0; j--)
- bessel = bessel * tmp / (j * j) + 1;
- sum += bessel;
- local_window[i] = sum;
- }
-
- sum++;
- for (i = 0; i < n; i++)
- window[i] = sqrt(local_window[i] / sum);
-}
-
-#include "mdct_tablegen.h"
-
/**
* init MDCT or IMDCT computation.
*/
@@ -146,7 +119,7 @@ void ff_imdct_half_c(FFTContext *s, FFTSample *output, const FFTSample *input)
in1 += 2;
in2 -= 2;
}
- ff_fft_calc(s, z);
+ s->fft_calc(s, z);
/* post rotation + reordering */
for(k = 0; k < n8; k++) {
@@ -213,7 +186,7 @@ void ff_mdct_calc_c(FFTContext *s, FFTSample *out, const FFTSample *input)
CMUL(x[j].re, x[j].im, re, im, -tcos[n8 + i], tsin[n8 + i]);
}
- ff_fft_calc(s, x);
+ s->fft_calc(s, x);
/* post rotation */
for(i=0;i<n8;i++) {