Re: using integer audio data
Re: using integer audio data
- Subject: Re: using integer audio data
- From: Paul Russell <email@hidden>
- Date: Wed, 22 Aug 2001 23:45:15 -0700
I wonder if there is a faster way to do it for signed 16 bit ints. If you
look at the code segment presented, the reason there are two stores is
that it is synthesizing a double precision floating point quantity. You
have to do two stores to write out the full 64 bit quantity. That is
unnecessary for a 16 bit int, which can be held in its entirety with
adequate precision in a single precision float. This should save a store
and simplify the store / load sequence and may avoid a problem that
prevents data forwarding if the sizes of the stores and loads are not the
same. The PPC Compiler writers guide (IBM) discusses the general technique
used by Metrowerks. I bet it could be adjusted for single precision FP.
You can probably just count leading zero bits (after taking care of
the sign) and do an appropriate shift and exponent generation for
anything up to 24 bit integers, I would have thought.
//Paul
--
| Paul Russell work: +1 831 420 1733 fax: +1 831 420 1732 |
| ARC Software Ltd home: +1 831 471 2154 email@hidden |
| Santa Cruz, CA cell: +1 831 325 7392
http://www.arc-software.com |