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

tom abcd tom.abcd at gmail.com
Tue Jan 3 06:43:40 PST 2006


> > 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 16kb.
>
> Best is to set these values by trial and error. I've used values I'm
> confident with for fixed-point and float at the same time. Actually,
> even better is to use a compiler that supports C99 variable-size arrays
> (gcc does) or at least alloca. That way, the real stack is used instead
> of that artificial stack, reducing overall memory.

I am using GCC version 3.4.4 for the Arm so I assume it supports the
C99 variable size arrays so what do I need to do to have it use the
real stack?   I assume even with this selected the code will still
malloc space for other items?

Does the amount of space needed vary based on the quality and
complexity used to compress the file or on the type of sound in the
file?  (so I know what combinations I need to test with)

Thanks
Tom


More information about the Speex-dev mailing list