Subject: Re: PCM8 vs. PCM16/LINEAR?
To: None <mike.long@analog.com>
From: Brett Lymn <blymn@awadi.com.AU>
List: tech-kern
Date: 08/01/1995 12:25:36
According to Mike Long:
>
>I know; my point was that ANY data conversion done in software slows
>down the system. That includes the ULAW <-> PCM8 conversion already
>provided.
>
If you are really serious about the performance the best you could do
is use a lookup table. Pre-calculate the values, whack them into a
table and use the incoming value as a lookup. Costs you an extra
memory operation, 'tis all. For 16 bit a lookup table may be a bit
excessive ;-) in this case you could make a smaller table and use a
linear interpolation (or quadratic if you want to get really fancy) -
the trade off being the size of the table vs accuracy of the
interpolation vs the time to do the calculation.
I once used this method to calculate sine & cos values in fixed point
numbers on a M68010 using assembly language.... the answers were
pretty accurate and fast enough to keep up with real time changes in
the system.
--
Brett Lymn, Computer Systems Administrator, AWA Defence Industries
===============================================================================
"It's fifteen hundred miles to Ankh-Morpork" he said. "We've got
three hundred and sixty three elephants, fifty carts of forage, the
monsoon's about to break and we're wearing ... we're wearing ... sort
of things, like glass, only dark... dark glass things on our eyes..."
- Terry Pratchett "Moving Pictures".