32 for (n = 0; n <
N; n++)
37 for (n = 0; n <
N; n++)
38 lut[n] = 1.-fabs((n-(N-1)/2.)/((N-1)/2.));
42 for (n = 0; n <
N; n++)
43 lut[n] = .5*(1-cos(2*
M_PI*n/(N-1)));
47 for (n = 0; n <
N; n++)
48 lut[n] = .54-.46*cos(2*
M_PI*n/(N-1));
52 for (n = 0; n <
N; n++)
53 lut[n] = .42659-.49656*cos(2*
M_PI*n/(N-1))+.076849*cos(4*
M_PI*n/(N-1));
57 for (n = 0; n <
N; n++)
58 lut[n] = 1.-(n-(N-1)/2.)/((N-1)/2.)*(n-(N-1)/2.)/((N-1)/2.);
62 for (n = 0; n <
N; n++)
63 lut[n] = 1.-1.985844164102*cos( 2*
M_PI*n/(N-1))+1.791176438506*cos( 4*
M_PI*n/(N-1))-
64 1.282075284005*cos( 6*
M_PI*n/(N-1))+0.667777530266*cos( 8*
M_PI*n/(N-1))-
65 0.240160796576*cos(10*
M_PI*n/(N-1))+0.056656381764*cos(12*
M_PI*n/(N-1))-
66 0.008134974479*cos(14*
M_PI*n/(N-1))+0.000624544650*cos(16*
M_PI*n/(N-1))-
67 0.000019808998*cos(18*
M_PI*n/(N-1))+0.000000132974*cos(20*
M_PI*n/(N-1));
71 for (n = 0; n <
N; n++)
72 lut[n] = 0.35875-0.48829*cos(2*
M_PI*n/(N-1))+0.14128*cos(4*
M_PI*n/(N-1))-0.01168*cos(6*
M_PI*n/(N-1));
76 for (n = 0; n <
N; n++)
77 lut[n] = 0.3635819-0.4891775*cos(2*
M_PI*n/(N-1))+0.1365995*cos(4*
M_PI*n/(N-1))-0.0106411*cos(6*
M_PI*n/(N-1));
81 for (n = 0; n <
N; n++)
82 lut[n] = 0.62-0.48*fabs(n/(
double)(N-1)-.5)-0.38*cos(2*
M_PI*n/(N-1));
86 for (n = 0; n <
N; n++)
87 lut[n] = sin(
M_PI*n/(N-1));
91 for (n = 0; n <
N; n++)
92 lut[n] = 0.355768-0.487396*cos(2*
M_PI*n/(N-1))+0.144232*cos(4*
M_PI*n/(N-1))-0.012604*cos(6*
M_PI*n/(N-1));
96 #define SINC(x) (!(x)) ? 1 : sin(M_PI * (x))/(M_PI * (x));
97 for (n = 0; n <
N; n++)
98 lut[n] =
SINC((2.*n)/(N-1)-1);
102 #define SQR(x) ((x)*(x))
103 for (n = 0; n <
N; n++)
104 lut[n] =
exp(-0.5 *
SQR((n-(N-1)/2)/(0.4*(N-1)/2.f)));
108 for (n = 0; n <
N; n++) {
111 if (
FFABS(n - M) >= 0.3 *
M) {
112 lut[
n] = 0.5 * (1 + cos((
M_PI*(
FFABS(n - M) - 0.3 * M))/((1 - 0.3) * M)));
#define av_assert0(cond)
assert() equivalent, that is always enabled.
simple assert() macros that are a bit more flexible than ISO C assert().
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
void ff_generate_window_func(float *lut, int N, int win_func, float *overlap)