[Pixman] [PATCH 11/13] pixman-filter: Turn off subsampling for width=1 filters
spitzak at gmail.com
spitzak at gmail.com
Sun Jan 3 19:12:15 PST 2016
From: Bill Spitzak <spitzak at 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).
---
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 35bd603..dba5c74 100644
--- a/pixman/pixman-filter.c
+++ b/pixman/pixman-filter.c
@@ -299,11 +299,21 @@ pixman_filter_create_separable_convolution (int *n_values,
int subsample_x, subsample_y;
int width, height;
+ width = filter_width (reconstruct_x, sample_x, sx);
+ if (width <= 1)
+ {
+ width = 1;
+ subsample_bits_x = 0;
+ }
subsample_x = (1 << subsample_bits_x);
- subsample_y = (1 << subsample_bits_y);
- width = filter_width (reconstruct_x, sample_x, sx);
height = filter_width (reconstruct_y, sample_y, sy);
+ 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
More information about the Pixman
mailing list