Simon W Day
2007-Sep-22 09:02 UTC
[Speex-dev] SPEEX in a DSPIC - optimisation of iir_mem16() for speed - can it be 16 bit ?
Dear Sirs, I would be interested to hear your views on whether SPEEX could be made to run fast on a DSPIC33 by the following strategy: Make iir_mem16() (for example) purely 16 bit by restricting the number of bits in the signal to say 10 using SATURATE and then making the LPC co-efficients just 6 bits. At present (with standard code) the encode function is taking about 140ms which is seven times too long ! Any thoughts welcome ? Best wishes for sunny September days. Simon
Jean-Marc Valin
2007-Sep-22 15:15 UTC
[Speex-dev] SPEEX in a DSPIC - optimisation of iir_mem16() for speed - can it be 16 bit ?
iir_mem16() and filter_mem16() is already at the limit of what can be tolerated in terms of precision, so there's no way to do what you're suggesting without completely corrupting the signal (and probably making everything unstable). That being said, I'm sure the 16x16=32 multiplications I'm using should be fast. Just make sure the compiler isn't generating 32x32 multiplies. Jean-Marc Simon W Day wrote:> Dear Sirs, > > I would be interested to hear your views on whether SPEEX could be made > to run fast on a DSPIC33 by the following strategy: > > Make iir_mem16() (for example) purely 16 bit by restricting the number > of bits in the signal to say 10 using SATURATE and then making the LPC > co-efficients just 6 bits. > > At present (with standard code) the encode function is taking about > 140ms which is seven times too long ! > > Any thoughts welcome ? Best wishes for sunny September days. Simon > > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev > >
David Willmore
2007-Sep-23 18:53 UTC
[Speex-dev] SPEEX in a DSPIC - optimisation of iir_mem16() for speed - can it be 16 bit ?
On 9/22/07, Simon W Day <swd@phasor-design.uk.com> wrote:> I would be interested to hear your views on whether SPEEX could be made to > run fast on a DSPIC33 by the following strategy:Congratulations with this effort. I'd like to do that some day, but other restructions on my time prevent it.> Make iir_mem16() (for example) purely 16 bit by restricting the number of > bits in the signal to say 10 using SATURATE and then making the LPC > co-efficients just 6 bits. > > At present (with standard code) the encode function is taking about 140ms > which is seven times too long ! > > Any thoughts welcome ? Best wishes for sunny September days. SimonSimon, Why are you concerned with limiting things to 16 bit? The 33F has a 40bit accumulator in the DSP portion. Are you trying to use just the MPU portion of the chip? If you were porting to the 24F, I could see that--but I would never recomment trying to run speex on the 24F family. :) Cheers, David