summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/out/filter_kernels.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/video/out/filter_kernels.c b/video/out/filter_kernels.c
index 75b7b50b0d..084c7b85ae 100644
--- a/video/out/filter_kernels.c
+++ b/video/out/filter_kernels.c
@@ -132,9 +132,11 @@ static double nearest(kernel *k, double x)
return x > 0.5 ? 0.0 : 1.0;
}
-static double bilinear(kernel *k, double x)
+static double triangle(kernel *k, double x)
{
- return 1.0 - x;
+ if (fabs(x) > 1.0)
+ return 0.0;
+ return 1.0 - fabs(x);
}
static double hanning(kernel *k, double x)
@@ -317,7 +319,7 @@ static double blackman(kernel *k, double x)
const struct filter_kernel mp_filter_kernels[] = {
{"nearest", 0.5, nearest},
- {"bilinear_slow", 1, bilinear},
+ {"triangle", 1, triangle},
{"hanning", 1, hanning},
{"hamming", 1, hamming},
{"quadric", 1.5, quadric},