linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Linphone-developers] Question about speex


From: Sven Westergren
Subject: RE: [Linphone-developers] Question about speex
Date: Fri, 21 May 2010 09:53:49 +0200

Ok, that makes sense. Thanks for the explanation!

The _expression_ could then be reduced to:

  int cbr = s->maxbitrate - 16000;

but maybe that would be even more obfuscating :P

 

While we’re at it, I’m also wondering about the relationship between (speex) quality and bitrate.

There are a number of quality levels in speex that require different bitrates but it seems as if it’s quite possible to set a quality that’s higher than the configured bitrate allows. Will speex then limit itself to the available bitrate or will the quality level override this?

 

I suppose this question might be better answered by the speex devel list but if anyone here knows the answer I’d love to hear it.

 

/Sven

 

From: address@hidden [mailto:address@hidden On Behalf Of Vadim Lebedev
Sent: den 20 maj 2010 18:48
To: address@hidden
Subject: Re: [Linphone-developers] Question about speex

 

I'm trying to guess here
But 50 seems to be packets per second

   so
    maxbitrate/50  ==  bits per packet
    bitsperpacket/8 ==  bytes per packet

    IP header = 20 bytes, UDP header = 8 bytes, and RTP header = 12 bytes
   
    bytes per packet - 40 ==  speex payload bytes per packet

    speex payload bytes per packet * 50  =  speex payload bytes per second
    
   speex payload bytes per second * 8  == speex payload bits per second


Seems correct?

Vadim



On 05/20/2010 03:19 PM, Sven Westergren wrote:

Hi,
 
Can someone explain to me the reasoning behind this recalculation of bitrate in the speex plugin (msspeex.c)?
 
  /* convert from network bitrate to codec bitrate:*/
  /* ((nbr/(50*8)) -20-12-8)*50*8*/
  int cbr=(int)( ((((float)s->maxbitrate)/(50.0*8))-20-12-8)*50*8);
 
I have searched the speex manual but I can't grasp what is going on here.
 
Best regards
Sven Westergren
  
 
 
_______________________________________________
Linphone-developers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/linphone-developers
  

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]