You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-29 05:57:37 +02:00
Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user