With the other patch to put error on the center pixel, this produces
the same result as BOX.IMPULSE filter.
---
 pixman/pixman-filter.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index 00126cd..64981cd 100644
--- a/pixman/pixman-filter.c
+++ b/pixman/pixman-filter.c
@@ -327,7 +327,9 @@ pixman_filter_create_separable_convolution (int             
*n_values,
     subsample_y = (1 << subsample_bits_y);
 
     width = filter_width (reconstruct_x, sample_x, sx);
+    if (width < 1) width = 1;
     height = filter_width (reconstruct_y, sample_y, sy);
+    if (height < 1) height = 1;
 
     *n_values = 4 + width * subsample_x + height * subsample_y;
 
-- 
1.7.9.5

_______________________________________________
Pixman mailing list
Pixman@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pixman

Reply via email to