BitmapScaleSuper: make it easy to change the percision

Desktop / LibreOffice - Tomaž Vajngerl [collabora.co.uk] - 13 April 2019 11:31 EDT

Most calculations work with integers for speed, which sacrifices some bits of an integer type for decimal values (fixed-point precision). In this case we used 7 bits for decimal values. This change makes the precision easily adjustable.

In addition the actual type of bilinar weights, which was until now the type long (that hasn't a standardized bit length), but is now changed to sal_Int32 (so we know exactly how much bits we can use) and can be changed to sal_Int64 in the future if necessary by just adjusting the typedef.

Change-Id: I8d41751c20e14cd1b9b64b055ff66bd1ca7c9f1d Reviewed-on: https://gerrit.libreoffice.org/70694

e90b92129122 BitmapScaleSuper: make it easy to change the percision
vcl/source/bitmap/BitmapScaleSuperFilter.cxx | 417 ++++++++++++++-------------
1 file changed, 215 insertions(+), 202 deletions(-)

Upstream: cgit.freedesktop.org


  • Share