From: Bill Spitzak <spit...@gmail.com> The position of only one subsample was wrong as ceil() was done on an integer. Use a different function for all odd numbers of subsamples that gets this right.
Signed-off-by: Bill Spitzak <spit...@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 ac89dda..f9ad45f 100644 --- a/pixman/pixman-filter.c +++ b/pixman/pixman-filter.c @@ -252,7 +252,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, ++pos) -- 1.9.1 _______________________________________________ Pixman mailing list Pixman@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/pixman