[Speex-dev] 100% CPU usage

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Tue Apr 26 23:06:53 PDT 2005


Hi,

I think it's a problem related to how underflows are handled. What
version are you using? I think I fixed the problem in 1.1.x and in
1.0.3. If you're using a newer version than that, then I may have missed
something. As far as I remember, the problem was mainly on P4 (and P3?),
but the Athlon wasn't hit too much. Could you test on an Athlon see if
the problem is still there (that would confirm my suspicions).

	Jean-Marc

Le mardi 26 avril 2005 à 22:35 -0700, Tay YueWeng a écrit :
> Hi Jean,
> 
> > > > Well, just trace it, how many times are you
> > calling
> > > > speex_decode_int()?
> > > 
> > > Maximum is 51 times per second. Will this cause
> > any
> > > CPU high utilization?
> > 
> > That's normal... What CPU are you using? If it's a
> > fixed-point CPU, then
> > the reason is probably just the fact that the packet
> > loss concealment
> > hasn't been completely converted to fixed-point.
> 
> I am using intel x86 CPU.
> 
> The high CPU utilization go away after I put the
> following code protection code:
> 
> // when no packet arrived do the following...
> if(!m_IsZeroData)
> {
> speex_decode_int(decoder_state, NULL, shortData);  
> //check if shortData[] array is zero bytes.
> m_IsZeroData = IsZeroData(shortData);
> }
> 
> m_IsZeroData will be set to false when new voice
> packet arrive.
> 
> It seems to me that speex_decode_int() can not be
> execute too many times after shortData[] become zero.
> 
> Regards,
> YueWeng
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
> 
-- 
Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
Université de Sherbrooke



More information about the Speex-dev mailing list