From 67a2b2852c3c75dfbdf49bf6fd352c550ba82dca Mon Sep 17 00:00:00 2001 From: garamond13 <98652255+garamond13@users.noreply.github.com> Date: Wed, 2 Feb 2022 19:38:21 +0100 Subject: filter kernels: add cosine window filter kernels: add cosine window --- video/out/filter_kernels.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'video/out') 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}, -- cgit v1.2.3