mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/window_func: use a constant instead of acosh()
Should fix compilation with non C99 compilers like msvc 2012, where acosh() is not available. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
18ce63a60e
commit
27ee70290e
|
@ -117,7 +117,7 @@ void ff_generate_window_func(float *lut, int N, int win_func, float *overlap)
|
||||||
*overlap = 0.33;
|
*overlap = 0.33;
|
||||||
break;
|
break;
|
||||||
case WFUNC_DOLPH: {
|
case WFUNC_DOLPH: {
|
||||||
double b = cosh(acosh(pow(10., 3)) / (N-1)), sum, t, c, norm = 0;
|
double b = cosh(7.6009022095419887 / (N-1)), sum, t, c, norm = 0;
|
||||||
int j;
|
int j;
|
||||||
for (c = 1 - 1 / (b*b), n = (N-1) / 2; n >= 0; --n) {
|
for (c = 1 - 1 / (b*b), n = (N-1) / 2; n >= 0; --n) {
|
||||||
for (sum = !n, b = t = j = 1; j <= n && sum != t; b *= (n-j) * (1./j), ++j)
|
for (sum = !n, b = t = j = 1; j <= n && sum != t; b *= (n-j) * (1./j), ++j)
|
||||||
|
|
Loading…
Reference in New Issue