On Mon, 2005-02-28 at 19:42 -0500, Jean-Marc Valin wrote:> > jean-marc: i think we can remove spx_sig_t *orig. > > but am not sure about exc2Buf. is it for extension? > > orig is already removed in SVN (which you should probably use). As for > exc2, it can be removed, but I'm not sure if you can just use exc > instead (maybe yes). >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@sxdesign.com> SX Design
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> 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 > >-- Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca> Universit? de Sherbrooke
Alfred E. Heggestad wrote:>On Mon, 2005-02-28 at 19:42 -0500, Jean-Marc Valin wrote: > > >>>jean-marc: i think we can remove spx_sig_t *orig. >>>but am not sure about exc2Buf. is it for extension? >>> >>> >>orig is already removed in SVN (which you should probably use). As for >>exc2, it can be removed, but I'm not sure if you can just use exc >>instead (maybe yes). >> >> >> >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.. > >It will probably be very close, if you can do it. I did a bunch of tests of encoder performance (on an Athlon XP 1700+) a while back, and found that, for 8kbps CBR complexity 1, I got: (encode/decode speed) basic compile: 29.2x / 168x -O3 -ffast-math -funroll-all-loops -march=pentium3 -fprefetch-loop-arrays -fsingle-precision-constant: 53.4x / 361x With -msse: 65x/386x The actual numbers don't matter much, but it does mean that encoding is almost 6x as expensive as decoding, so expect that you're going to use 60-90% of your CPU for speex encode.. -SteveK -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20050301/9ec69bc2/attachment.html
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@sxdesign.com> SX Design
> > 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.. > > > > It will probably be very close, if you can do it.I don't think encoding should be a problem. The encoder has been speeded up a lot recently (more than the decoder).> I did a bunch of tests of encoder performance (on an Athlon XP 1700+) > a while back, and found that, for 8kbps CBR complexity 1, I got: > > (encode/decode speed) > basic compile: 29.2x / 168x > > -O3 -ffast-math -funroll-all-loops > -march=pentium3 -fprefetch-loop-arrays -fsingle-precision-constant: > 53.4x / 361x > > With -msse: 65x/386xNote that you need to define _USE_SSE to enable SSE. Jean-Marc -- Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca> Universite de Sherbrooke