summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2015-02-23 18:02:52 +0100
committerNiklas Haas <git@nand.wakku.to>2015-02-23 18:02:52 +0100
commita3733b53d3bd13d7bb03d8d9e2cb26899733bfc9 (patch)
treebae78e5e643d734d592be8b5343464815fd598f6 /video/out
parent92d33d06dfaef29f1c012d26da553266ecee7b46 (diff)
downloadmpv-a3733b53d3bd13d7bb03d8d9e2cb26899733bfc9.tar.bz2
mpv-a3733b53d3bd13d7bb03d8d9e2cb26899733bfc9.tar.xz
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.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/filter_kernels.c5
1 files changed, 2 insertions, 3 deletions
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},