summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-04 00:23:31 +0200
committerwm4 <wm4@nowhere>2014-06-04 00:23:31 +0200
commit80907d007bb3673bf15588b76cfc3d43f4e8f9fa (patch)
treecdeadc2d1e8451715fd5d283c764ff5bfa662f3f /video
parenta3b466e88df6964a4e0e9b6627dc63264e948c8e (diff)
downloadmpv-80907d007bb3673bf15588b76cfc3d43f4e8f9fa.tar.bz2
mpv-80907d007bb3673bf15588b76cfc3d43f4e8f9fa.tar.xz
filter_kernels: fix nearest scaler
The previous commit assumed the filter would be 1x1 (then constant weight is correct) - but our code in fact uses at least a 2x2 filter. A 1x1 filter would generally be useless, except for nearest scaling - so it didn't exist. Insteasd of adding such a 1x1 filter, just turn the nearest weight function into a scare function, which should take care of the issue.
Diffstat (limited to 'video')
-rw-r--r--video/out/filter_kernels.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/filter_kernels.c b/video/out/filter_kernels.c
index c56b432f9b..ed181ef38a 100644
--- a/video/out/filter_kernels.c
+++ b/video/out/filter_kernels.c
@@ -108,7 +108,7 @@ typedef struct filter_kernel kernel;
static double nearest(kernel *k, double x)
{
- return 1.0;
+ return x > 0.5 ? 0.0 : 1.0;
}
static double bilinear(kernel *k, double x)