[Speex-dev] Speex decode memory usage on an Arm processor (wideband)

tom abcd tom.abcd at gmail.com
Mon Jan 2 19:37:17 PST 2006

I am hoping to use Speex for a embedded project using Philips Arm processor
(50 mips) 512kb flash 32kb ram.  I found in the manual that decode takes
about 0.5 mips so I should have enough processing power and I compiled the
lib and it seems to take less then 64K so the only issue is memory usage.  I
have been testing the speex decode on windows looking at the stack usage and
how much is malloc.  There appear to be three defines that control much of

I have tested lowering these values and then running the speexdec program
and looking for errors.  By trial and error it appears that I can lower
MAX_CHARS_PER_FRAME  = 750,   SB_DEC_STACK = 750*sizeof(spx_sig_t)  and
NB_DEC_STACK = 250*sizeof(spx_sig_t)
and not get any memory errors but have no idea if these are safe values or
not.  I could not tell how much stack spaced was used but would guess 4 kb
would be enough.   After making these changes it appears to Alloc less the

So any pointers on what is the min memory needed for wideband decode on a
ARM process?  Can it all be done in 20 kb or less?  Any suggestions on what
choices cause more memory usage?

I will control how the files are compressed and I am not using the Ogg file
structure but just the simple count data approach given in the manual
example.  I also notice that the Speexdec win32 example skips some of the
first bytes from the decode process.  It seems to be using the LOOK_AHEAD
amount but I can not find anything in the manual about this.   So is some of
the first data out of the decode not used?

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20060102/1948c829/attachment.html

More information about the Speex-dev mailing list