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-02 00:38:35 -0400
commit6e47d8a110099565c0163f9dffc718f505ef436a (patch)
treeddd2a4e7f4928aa600f37cee8d39d20967e2f1f7
parent92ca3a060f25a808dc6836ea8fd70e83ab3e05bf (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 5dbdb48f..c256e658 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;