[Speex-dev] 100% CPU usage

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


Hi,

I'm attaching a patch (based on current SVN) that may solve your
problem. Could you confirm. BTW, if it's what I thing, fixed-point
should be unaffected.

	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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: underflow.patch
Type: text/x-patch
Size: 1698 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20050427/d280fa90/underflow-0001.bin


More information about the Speex-dev mailing list