[Pixman] [PATCH 11/15] pixman-filter: made IMPULSE.IMPULSE not produce a zero-wide filter
spitzak at gmail.com
spitzak at gmail.com
Sat Dec 12 10:06:40 PST 2015
From: Bill Spitzak <spitzak at gmail.com>
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.9.1
More information about the Pixman
mailing list