summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2023-09-16 13:05:19 +0200
committerNiklas Haas <github-daiK1o@haasn.dev>2023-09-16 14:33:45 +0200
commitaef62063f7017dbe35b6739cd8996afd0d5d357b (patch)
tree905ff9211da7b445950af809096e8bec87b6e88e /video
parent06e65778beac1e6f110466b34b5ceb6a8d1ddb42 (diff)
downloadmpv-aef62063f7017dbe35b6739cd8996afd0d5d357b.tar.bz2
mpv-aef62063f7017dbe35b6739cd8996afd0d5d357b.tar.xz
filter_kernels: replace magic jinc radius by constant (cosmetic)
Diffstat (limited to 'video')
-rw-r--r--video/out/filter_kernels.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/video/out/filter_kernels.c b/video/out/filter_kernels.c
index a007f1e71f..8929b6246e 100644
--- a/video/out/filter_kernels.c
+++ b/video/out/filter_kernels.c
@@ -362,6 +362,8 @@ const struct filter_window mp_filter_windows[] = {
{0}
};
+#define JINC_R3 3.2383154841662362
+
const struct filter_kernel mp_filter_kernels[] = {
// Spline filters
{{"spline16", 2, spline16}},
@@ -378,16 +380,16 @@ const struct filter_kernel mp_filter_kernels[] = {
{{"ewa_ginseng", 3, jinc, .resizable = true}, .polar = true, .window = "sinc"},
// Radius is based on the true jinc radius, slightly sharpened as per
// calculations by Nicolas Robidoux. Source: Imagemagick's magick/resize.c
- {{"ewa_lanczossharp", 3.2383154841662362, jinc, .blur = 0.9812505644269356,
- .resizable = true}, .polar = true, .window = "jinc"},
+ {{"ewa_lanczossharp", JINC_R3, jinc, .blur = 0.9812505644269356, .resizable = true},
+ .polar = true, .window = "jinc"},
// Similar to the above, but softened instead. This one makes hash patterns
// disappear completely. Blur determined by trial and error.
- {{"ewa_lanczossoft", 3.2383154841662362, jinc, .blur = 1.015,
- .resizable = true}, .polar = true, .window = "jinc"},
+ {{"ewa_lanczossoft", JINC_R3, jinc, .blur = 1.015, .resizable = true},
+ .polar = true, .window = "jinc"},
// Very soft (blurred) hanning-windowed jinc; removes almost all aliasing.
// Blur parameter picked to match orthogonal and diagonal contributions
- {{"haasnsoft", 3.2383154841662362, jinc, .blur = 1.11, .resizable = true},
- .polar = true, .window = "hanning"},
+ {{"haasnsoft", JINC_R3, jinc, .blur = 1.11, .resizable = true},
+ .polar = true, .window = "hanning"},
// Cubic filters
{{"bicubic", 2, bicubic}},
{{"bcspline", 2, cubic_bc, .params = {0.5, 0.5} }},