filter_kernels: remove second parameter from kaiser

This filter isn't supposed to have a second parameter in the first
place, all literature only uses a single parameter alpha in both places.

The second parameter doesn't even do anything other than adding a
constant factor, which is normalized by the LUT calculation either way.
This commit is contained in:
Niklas Haas 2015-02-23 18:02:52 +01:00
parent 92d33d06df
commit a3733b53d3
No known key found for this signature in database
GPG Key ID: 3BA77D4BFDB10BCE
1 changed files with 2 additions and 3 deletions

View File

@ -190,9 +190,8 @@ static double bessel_i0(double epsilon, double x)
static double kaiser(kernel *k, double x)
{
double a = k->params[0];
double b = k->params[1];
double epsilon = 1e-12;
double i0a = 1 / bessel_i0(epsilon, b);
double i0a = 1 / bessel_i0(epsilon, a);
return bessel_i0(epsilon, a * sqrt(1 - x * x)) * i0a;
}
@ -342,7 +341,7 @@ const struct filter_kernel mp_filter_kernels[] = {
{"hermite", 1, hermite},
{"quadric", 1.5, quadric},
{"bicubic", 2, bicubic},
{"kaiser", 1, kaiser, .params = {6.33, 6.33} },
{"kaiser", 1, kaiser, .params = {6.33, NAN} },
{"catmull_rom", 2, catmull_rom},
{"mitchell", 2, mitchell, .params = {1.0/3.0, 1.0/3.0} },
{"spline16", 2, spline16},