diff options
author | James Ross-Gowan <rossy@jrg.systems> | 2017-08-29 18:38:50 +1000 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-09-03 21:18:06 +0200 |
commit | 9a28088e7457a41c61be7f534618c69b4307d693 (patch) | |
tree | b1d3f289aea01668163aa1839d6157e95c9f178b /video/out/filter_kernels.c | |
parent | d280b3db930eadb49646eac2b523adee5ced58a3 (diff) | |
download | mpv-9a28088e7457a41c61be7f534618c69b4307d693.tar.bz2 mpv-9a28088e7457a41c61be7f534618c69b4307d693.tar.xz |
filter_kernels: correct spline64 kernel
This seems to have had some copy/paste errors. It should now match the
implementation in fmtconv:
https://github.com/EleonoreMizo/fmtconv/blob/00453a86dd73/src/fmtcl/ContFirSpline64.cpp#L58-L76
Diffstat (limited to 'video/out/filter_kernels.c')
-rw-r--r-- | video/out/filter_kernels.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/video/out/filter_kernels.c b/video/out/filter_kernels.c index 6c10eb30b5..87fd129714 100644 --- a/video/out/filter_kernels.c +++ b/video/out/filter_kernels.c @@ -293,13 +293,13 @@ static double spline36(params *p, double x) static double spline64(params *p, double x) { if (x < 1.0) { - return ((49.0/41.0 * x - 6387.0/2911.0) * x - 3.0/911.0) * x + 1.0; + return ((49.0/41.0 * x - 6387.0/2911.0) * x - 3.0/2911.0) * x + 1.0; } else if (x < 2.0) { - return ((-24.0/42.0 * (x-1) + 4032.0/2911.0) * (x-1) - 2328.0/ 2911.0) * (x-1); + return ((-24.0/41.0 * (x-1) + 4032.0/2911.0) * (x-1) - 2328.0/2911.0) * (x-1); } else if (x < 3.0) { - return ((6.0/41.0 * (x-2) - 1008.0/2911.0) * (x-2) + 582.0/2911.0) * (x-2); + return ((6.0/41.0 * (x-2) - 1008.0/2911.0) * (x-2) + 582.0/2911.0) * (x-2); } else { - return ((-1.0/41.0 * (x-3) - 168.0/2911.0) * (x-3) + 97.0/2911.0) * (x-3); + return ((-1.0/41.0 * (x-3) + 168.0/2911.0) * (x-3) - 97.0/2911.0) * (x-3); } } |