[Speex-dev] speex on TI C5x fixed-point DSP
Jamey Hicks
jamey.hicks at hp.com
Thu Nov 4 09:03:33 PST 2004
Jean-Marc Valin wrote:
>>One thing I've noticed so far in the filter_mem2 code is the calls to
>>SATURATE(x, 805306368). 805306368 is 0x30000000. I was expecting that
>>to be on a bit boundary, say 0x3fffffff? In which case the arithmetic
>>saturation logic could be used.
>>
>>
>
>I don't think it would make that big of a difference, since the
>saturation is outside of the inner loop. If it's that critical, you
>could probably remove the saturation completely and just make sure your
>signals are scaled properly (i.e. not too close to saturation).
>
>
>
I just realized that. I added counters for each of the arithmetic
macros and discovered that mac16_32_q15 is the most frequent. I'm not
sure I can do much more without understanding the code better. Q15 is
Q1.15 format, right? Looking at
MAC16_32_Q15(long c, short a, long b)
Is b a Q15 represented as Q17.15 so that the implementation does not
depend on saturating hardware? If we do have saturating hardware, can I
keep the b input saturated so that only 1 16x16->32 multiply is required
instead of 2? Essentially, pushing the saturation back into the inner
loop because it's almost free.
Thanks,
Jamey
More information about the Speex-dev
mailing list