summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <soren.sandmann@gmail.com>2016-09-02 00:38:35 -0400
committerSøren Sandmann Pedersen <soren.sandmann@gmail.com>2016-09-06 15:44:20 -0400
commit3b9b0d6b49d3d60d32f18fc67ba9ca5c33a156da (patch)
treebcdc33ec5e55b6a4c1da3ff7de7a216996eb497c
parent89e51000e56e91003b294f739b8e0d9db2002037 (diff)
-rw-r--r--pixman/pixman-filter.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
index 17668234..bbde9467 100644
--- a/pixman/pixman-filter.c
+++ b/pixman/pixman-filter.c
@@ -243,15 +243,23 @@ create_1d_filter (int width,
for (i = 0; i < n_phases; ++i)
{
- double frac = (n_phases == 1)? 0.5 : (i / (double)n_phases);
+ double frac = 0.5;
pixman_fixed_t new_total;
int x, x1, x2;
double total, e;
+ int first;
/* Sample convolution of reconstruction and sampling
* filter. See rounding.txt regarding the rounding
* and sample positions.
*/
+ if (width & 1)
+ first = 0;
+
+ for (i = n_phases - 1; i >= 0; --i)
+ {
+ int phase = frac
+ }
x1 = ceil (frac - width / 2.0 - 0.5);
x2 = x1 + width;
@@ -259,6 +267,8 @@ create_1d_filter (int width,
total = 0;
for (x = x1; x < x2; ++x)
{
+ (n_phases == 1)? 0.5 : (i / (double)n_phases);
+
double pos = x + 0.5 - frac;
double rlow = - filters[reconstruct].width / 2.0;
double rhigh = rlow + filters[reconstruct].width;