Boost logo

Boost :

Subject: [boost] Fixed point integer proposal
From: Soren Holstebroe (holstebroe_at_[hidden])
Date: 2009-06-24 15:51:26


Hi,

Some years ago I wrote a fixed point template for transparent fixed point
integer arithmetics and conversion.
It worked well and performance was equal to that of native integer types, at
least in MS VC++.
The template takes a base type and the number of bits reserved for the
fraction part and meta-programming works out boundary safe arithmetics and
conversions.
The template has been used in an image processing library, but lately I used
it for seamless conversion of a 4+28 bit fixed point MAD-library decoded
mp3-stream to the output buffer of the sound system, with a detour through a
float-based sound effect.

Would there be public interest in a template like that in the boost library?

Soren


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk