diff options
author | wm4 <wm4@nowhere> | 2014-06-04 00:23:31 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-04 00:23:31 +0200 |
commit | 80907d007bb3673bf15588b76cfc3d43f4e8f9fa (patch) | |
tree | cdeadc2d1e8451715fd5d283c764ff5bfa662f3f /video/out/filter_kernels.c | |
parent | a3b466e88df6964a4e0e9b6627dc63264e948c8e (diff) | |
download | mpv-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/out/filter_kernels.c')
-rw-r--r-- | video/out/filter_kernels.c | 2 |
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) |