diff options
author | Alexei Podtelezhnikov <apodtele@gmail.com> | 2013-02-22 23:58:57 -0500 |
---|---|---|
committer | Alexei Podtelezhnikov <apodtele@gmail.com> | 2013-02-22 23:58:57 -0500 |
commit | 2ba18ba1ce730ed79672801b20f986f10a628c95 (patch) | |
tree | 81d3e6dd9d06fc3f2913a5d5f04725431171b40b | |
parent | f9434dba81a08ee20822c68133b463209db5c65b (diff) | |
download | freetype2-baserock/morph.tar.gz |
[base] Fix commit ab02d9e8.baserock/morph
* src/base/ftbbox.c (BBox_Cubic_Check): Change scaling to msb of 22.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/base/ftbbox.c | 16 |
2 files changed, 14 insertions, 8 deletions
@@ -1,3 +1,9 @@ +2013-02-23 Alexei Podtelezhnikov <apodtele@gmail.com> + + [base] Fix commit ab02d9e8. + + * src/base/ftbbox.c (BBox_Cubic_Check): Change scaling to msb of 22. + 2013-02-19 Alexei Podtelezhnikov <apodtele@gmail.com> [base] New bisecting BBox_Cubic_Check (disabled). diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c index 8a240ef29..64f06f469 100644 --- a/src/base/ftbbox.c +++ b/src/base/ftbbox.c @@ -412,11 +412,11 @@ /* These values must fit into a single 16.16 value. */ /* */ /* We normalize a, b, and c to `8.16' fixed-point values to ensure */ - /* that its product is held in a `16.16' value. Necessarily, */ - /* we need to shift `a', `b', and `c' so that the most significant */ - /* bit of their absolute values is at _most_ at position 23. */ + /* that their product is held in a `16.16' value including the sign. */ + /* Necessarily, we need to shift `a', `b', and `c' so that the most */ + /* significant bit of their absolute values is at position 22. */ /* */ - /* This also means that we are using 24 bits of precision to compute */ + /* This also means that we are using 23 bits of precision to compute */ /* the zeros, independently of the range of the original polynomial */ /* coefficients. */ /* */ @@ -427,11 +427,11 @@ shift = FT_MSB( FT_ABS( a ) | FT_ABS( b ) | FT_ABS( c ) ); - if ( shift > 23 ) + if ( shift > 22 ) { - shift -= 23; + shift -= 22; - /* this loses some bits of precision, but we use 24 of them */ + /* this loses some bits of precision, but we use 23 of them */ /* for the computation anyway */ a >>= shift; b >>= shift; @@ -439,7 +439,7 @@ } else { - shift = 23 - shift; + shift = 22 - shift; a <<= shift; b <<= shift; |