From 80907d007bb3673bf15588b76cfc3d43f4e8f9fa Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 4 Jun 2014 00:23:31 +0200 Subject: 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. --- video/out/filter_kernels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3