[Speex-dev] memory usage

Alfred E. Heggestad alfredh at sxdesign.com
Tue Mar 1 14:06:20 PST 2005


On Tue, 2005-03-01 at 04:31 -0500, Jean-Marc Valin wrote:
> Hi,
> 
> I just checked in some changes that remove some unnecessary buffers
> (exc2 and buf2) and that reduce other buffers to the minimum. That
> should save 7800 bytes for the encoder.
> 
> 	Jean-Marc
> 
thanks, I have merged the diff in

  $ svn merge-r 8996:8997 http://svn.xiph.org/trunk/speex

to my codebase. it works as expected, nb_celp.c stacksize
is reduced to:

encoder:
 stack usage: 8811
 stack size : 9000

decoder:
 stack usage: 2719
 stack size : 2800


what about this value in bits.c:

#define MAX_BYTES_PER_FRAME 2000


now there is _almost_ enough RAM to allocate both encoder and decoder ;)



/alfred



> > when removing "spx_sig_t *orig;" in the encoder, the stack usage
> > went from 17091 to 16451 bytes,
> > 
> > I have already got a working decoder running on my Ubicom IP3K,
> > using 10-15% of the CPU, with a decoder stack size of 4058 bytes.
> > The encoder is next..
> > 
> > 
> > /alfred
> > 
> > > 	Jean-Marc
> > > 
-- 
Alfred E. Heggestad <alfredh at sxdesign.com>
SX Design



More information about the Speex-dev mailing list