24 #define BESSEL_I0_ITER 50 // default: 50 iterations of Bessel I0 approximation
29 double sum = 0.0,
bessel, tmp;
31 double alpha2 = (alpha *
M_PI /
n) * (alpha *
M_PI / n);
35 for (i = 0; i <
n; i++) {
36 tmp = i * (n - i) * alpha2;
39 bessel = bessel * tmp / (j * j) + 1;
41 local_window[i] = sum;
45 for (i = 0; i <
n; i++)
46 window[i] = sqrt(local_window[i] / sum);
55 for (i = 0; i <
n; i++)
56 window[i] = (
int)floor(2147483647.0 * local_window[i] + 0.5);