summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorgaramond13 <98652255+garamond13@users.noreply.github.com>2022-02-02 19:38:21 +0100
committerNiklas Haas <github-daiK1o@haasn.dev>2022-02-03 01:25:50 +0100
commit67a2b2852c3c75dfbdf49bf6fd352c550ba82dca (patch)
treeaaaf9dd552c339ba51362fec9c5090f1218ca166 /video/out
parent899850bedc95751f224da36e7d02bb8fab33909a (diff)
downloadmpv-67a2b2852c3c75dfbdf49bf6fd352c550ba82dca.tar.bz2
mpv-67a2b2852c3c75dfbdf49bf6fd352c550ba82dca.tar.xz
filter kernels: add cosine window
filter kernels: add cosine window
Diffstat (limited to 'video/out')
-rw-r--r--video/out/filter_kernels.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/filter_kernels.c b/video/out/filter_kernels.c
index 4ebc033eec..bf0ceba0ee 100644
--- a/video/out/filter_kernels.c
+++ b/video/out/filter_kernels.c
@@ -187,6 +187,11 @@ static double triangle(params *p, double x)
return fmax(0.0, 1.0 - fabs(x / p->radius));
}
+static double cosine(params *p, double x)
+{
+ return cos(x);
+}
+
static double hanning(params *p, double x)
{
return 0.5 + 0.5 * cos(M_PI * x);
@@ -339,6 +344,7 @@ const struct filter_window mp_filter_windows[] = {
{"box", 1, box},
{"triangle", 1, triangle},
{"bartlett", 1, triangle},
+ {"cosine", M_PI_2, cosine},
{"hanning", 1, hanning},
{"tukey", 1, hanning, .taper = 0.5},
{"hamming", 1, hamming},