From a3733b53d3bd13d7bb03d8d9e2cb26899733bfc9 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 23 Feb 2015 18:02:52 +0100 Subject: 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. --- video/out/filter_kernels.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'video') diff --git a/video/out/filter_kernels.c b/video/out/filter_kernels.c index e0b45afe4d..b7769986e4 100644 --- a/video/out/filter_kernels.c +++ b/video/out/filter_kernels.c @@ -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}, -- cgit v1.2.3