[Pixman] [PATCH 12/13] pixman-filter: Made reconstruct==impulse and scale < 1 set scale to 1

spitzak at gmail.com spitzak at gmail.com
Sun Jan 3 19:12:16 PST 2016


From: Bill Spitzak <spitzak at gmail.com>

This replaces settings that don't work (because the filter cannot be normalized)
with something that produces an image.
---
 pixman/pixman-filter.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index dba5c74..77fdf01 100644
--- a/pixman/pixman-filter.c
+++ b/pixman/pixman-filter.c
@@ -299,6 +299,8 @@ pixman_filter_create_separable_convolution (int             *n_values,
     int subsample_x, subsample_y;
     int width, height;
 
+    if (reconstruct_x == PIXMAN_KERNEL_IMPULSE && sx < 1.0)
+	sx = 1.0;
     width = filter_width (reconstruct_x, sample_x, sx);
     if (width <= 1)
     {
@@ -307,6 +309,8 @@ pixman_filter_create_separable_convolution (int             *n_values,
     }
     subsample_x = (1 << subsample_bits_x);
 
+    if (reconstruct_y == PIXMAN_KERNEL_IMPULSE && sy < 1.0)
+	sy = 1.0;
     height = filter_width (reconstruct_y, sample_y, sy);
     if (height <= 1)
     {
-- 
1.9.1



More information about the Pixman mailing list