[Pixman] [PATCH v9 08/15] pixman-filter: fix subsample_bits = 0

spitzak at gmail.com spitzak at gmail.com
Fri Jan 22 01:42:06 PST 2016


From: Bill Spitzak <spitzak at gmail.com>

This was not calculating the correct x to compute the filter at.

v9: First version with this patch
Signed-off-by: Bill Spitzak <spitzak at gmail.com>
---
 pixman/pixman-filter.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index 768e1f6..d10891f 100644
--- a/pixman/pixman-filter.c
+++ b/pixman/pixman-filter.c
@@ -255,7 +255,10 @@ create_1d_filter (int              width,
 	 * and sample positions.
 	 */
 
-	pos = ceil (frac - width / 2.0 - 0.5) + 0.5 - frac;
+	if (n_phases & 1)
+	    pos = frac - width / 2.0;
+	else
+	    pos = ceil (frac - width / 2.0 - 0.5) + 0.5 - frac;
 
 	total = 0;
         for (x = 0; x < width; ++x)
-- 
1.9.1



More information about the Pixman mailing list