[speex-dev] speed and memory

Marc Gimpel marc at wimba.com
Mon Nov 3 02:02:25 PST 2003



    Hi Ulrich,

    I've never had any OutOfMEmoryExceptions in my tests, and I think 
I've been rather thourough, although probably much more thourought 
testing narrowband than wideband. Having said this, it is very hard to 
get memory leaks in java, so I am sceptical about that. That memory 
might not be used optimally is more likely the case. More often then not 
reducing memory use increases processor use. Although is you feel like 
doing some profiling of the code and find where the problem is, I wouild 
be glad to improve things.
    As far as processor is concerned. Speex is not the hungriest of 
codecs out ther, but it is a CELP codec and therefore more advanced and 
processor intensive then older codecs such as GSM or ADPCM. It's doing 
quite a bit of signal processing. The code in Java is running in a 
virtual machine so it's not going to perform as well as native C. I 
haven't done too many test on dual processor machines, but on singal 
processor machines 350 MHz really pretty close to the minimum 
requirement for real time encoding. You had better not have anything 
else running on your computer at the same time though. There are several 
things that reduce the resources required. Narrowband uses less than 
wideband or UWB. Lower quality uses less resources than higher quality. 
Finally there is also an encoder setting called complexity.Reducing that 
also reduces the required resources. Also the Use of VBR could slightly 
increase the processor usage, and stereo too (if both stereo channels 
are identical, best to reduce it to mono and encode mono rather than 
encode stereo). But the best thing to do is play around with the various 
settings and see which settings suit you best with the given resources 
on your hardware.

    Good luck

    Marc Gimpel
    Head of research
    Wimba

Ulrich B. Staudinger wrote:

> hello,
>
> i switched to use the encoder.processData() and 
> encoder.getProcessedData() of jspeex. however it looks to me like a 
> memory leak ... memory usage is increasing very fast and there is no 
> visible stop ... after about five minutes java.lang.OutOfMemory 
> occurs. I think it must be the jspeex component, because before i 
> added jspeex to my app usage was constant at about 5mb.
>
> is it possible to be jspeex ?
>
> another issue is speed - when doing UWB, quality 3, 44100 stereo 
> encoding my cpu load goes up to 100% on a dual 350MHz  - is it correct 
> that lower quality uses significantly less cpu resources?
>
> thanks in advance,
> ulrich
>
> p.s. the quality for that bandwidth is really awesome ! Must be cool 
> wavelets and other stuff or something alike ... ! Wow!
>
> --- >8 ----
> List archives:  http://www.xiph.org/archives/
> Ogg project homepage: http://www.xiph.org/ogg/
> To unsubscribe from this list, send a message to 
> 'speex-dev-request at xiph.org'
> containing only the word 'unsubscribe' in the body.  No subject is 
> needed.
> Unsubscribe messages sent to the list will be ignored/filtered.
>
>

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Speex-dev mailing list