From: Bill Spitzak <spit...@gmail.com> Due to normalization these filters must all be identical (a single 1.0).
Also make IMPULSE.IMPULSE produce a width=1 filter, rather than zero (which did not work). v7: Replaced earlier tests for BOX.IMPULSE Signed-off-by: Bill Spitzak <spit...@gmail.com> --- pixman/pixman-filter.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c index b49ee32..9e50d5c 100644 --- a/pixman/pixman-filter.c +++ b/pixman/pixman-filter.c @@ -332,11 +332,21 @@ pixman_filter_create_separable_convolution (int *n_values, int subsample_x, subsample_y; int width, height; + width = ceil (filters[reconstruct_x].width + sx * filters[sample_x].width); + if (width <= 1) + { + width = 1; + subsample_bits_x = 0; + } subsample_x = (1 << subsample_bits_x); - subsample_y = (1 << subsample_bits_y); - width = ceil (filters[reconstruct_x].width + sx * filters[sample_x].width); height = ceil (filters[reconstruct_y].width + sy * filters[sample_y].width); + if (height <= 1) + { + height = 1; + subsample_bits_y = 0; + } + subsample_y = (1 << subsample_bits_y); *n_values = 4 + width * subsample_x + height * subsample_y; -- 1.9.1 _______________________________________________ Pixman mailing list Pixman@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pixman