diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-09-10 09:44:40 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-09-16 17:54:46 -0400 |
commit | 75506e63677208c1ec4364ab1a4b4fb73a0ca6c8 (patch) | |
tree | e455d89b3490e04eb66a3a1b6c76993636be84e2 | |
parent | 9899a7bae8a00c6a92ed27d4dc2fe6f178c8acc8 (diff) |
pixman-filter.c: Use 65536, not 65535, for fixed point conversion
Converting a double precision number to 16.16 fixed point should be
done by multiplying with 65536.0, not 65535.0.
The bug could potentially cause certain filters that would otherwise
leave the image bit-for-bit unchanged under an identity
transformation, to not do so, but the numbers are close enough that
there weren't any visual differences.
-rw-r--r-- | pixman/pixman-filter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c index 5ff7b6ea..b2bf53fe 100644 --- a/pixman/pixman-filter.c +++ b/pixman/pixman-filter.c @@ -275,7 +275,7 @@ create_1d_filter (int *width, } total += c; - *p++ = (pixman_fixed_t)(c * 65535.0 + 0.5); + *p++ = (pixman_fixed_t)(c * 65536.0 + 0.5); } /* Normalize */ |