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

spitzak at gmail.com spitzak at gmail.com
Mon Jan 4 21:48:59 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.

v7: First version with this. Previously you got lots of strange garbage filters
 that depended on the implementation.

Signed-off-by: Bill Spitzak <spitzak at gmail.com>
---
 pixman/pixman-filter.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index 9e50d5c..3237036 100644
--- a/pixman/pixman-filter.c
+++ b/pixman/pixman-filter.c
@@ -332,6 +332,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 = ceil (filters[reconstruct_x].width + sx * filters[sample_x].width);
     if (width <= 1)
     {
@@ -340,6 +342,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 = ceil (filters[reconstruct_y].width + sy * filters[sample_y].width);
     if (height <= 1)
     {
-- 
1.9.1



More information about the Pixman mailing list