> FT_MulFix optimized like this on line 543:
> if ( ua <= 2048 && ub <= 1048576L )
> ua = ( ua * ub + 0x8000UL ) >> 16;
>
> Of course, when we anchor 2048 and use unsigned multiplication, it
> should safely have been
> if ( ua <= 2048 && ub <= 2097135L )
>
> but that's not my point. I do not know why 2048 is chosen, but we
> can relax the condition similarly to the recent FT_MulDiv change. We
> can use this to cover the old range *completely* and grab some more:
>
> if ( ua + ( ub >> 8 ) <= 8191UL )
>
> So, what was so special about 2048?
I can't remember, sorry. The git archive doesn't show a result
either, so I guess it was an ad-hoc assumption. If you can provide a
better version: This is OK with me :-) To verify the function, it
might be prudent to write a small test program, comparing the old and
the new results...
Werner
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel