[Pixman] [PATCH pixman 04/13] pixman-filter: put error on center of odd-sized filters

Bill Spitzak spitzak at gmail.com
Thu Sep 11 19:12:21 PDT 2014


---
 pixman/pixman-filter.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index a9af72c..816d085 100644
--- a/pixman/pixman-filter.c
+++ b/pixman/pixman-filter.c
@@ -294,7 +294,7 @@ create_1d_filter (int             *width,
 	}
 
 	if (new_total != pixman_fixed_1)
-	    *(p - *width / 2) += (pixman_fixed_1 - new_total);
+	    *(p - (*width + 1) / 2) += (pixman_fixed_1 - new_total);
     }
 
     return params;
-- 
1.7.9.5



More information about the Pixman mailing list