T Murali Mohan
2007-May-30 22:21 UTC
[Speex-dev] Regarding mismatch in data rates of speex codec
Hi all, Accoring to the Table.8.1 and Table.8.2 of speex manual (Version 1.2 Beta 2), the data rates supported by speex codec for narrowband are 3.95, 5,95 ,8 ,11 ,15 ,18.2 and 24.6kbps. But when I run the code(downloaded from www.speex.org), I am getting data rates of 4,6,8,11.2,15,2,18.4 and 24.8 kbps. That is, for an input of 20ms frame the number of output bits I am getting are 80,120,160,224,304,368 and 496 whereas the number of bits given in the Table.8.1 are 79, 119, 160, 220, 300, 364 and 492 . Can anybody help me in finding out the reason behind this mismatch. Thank you Murali The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail immediately and permanently delete the message and any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20070531/ca11d115/attachment.html
Jean-Marc Valin
2007-May-30 22:34 UTC
[Speex-dev] Regarding mismatch in data rates of speex codec
T Murali Mohan wrote:> Accoring to the Table.8.1 and Table.8.2 of speex manual (Version 1.2 > Beta 2), the > data rates supported by speex codec for narrowband are *3.95, 5,95 ,8 > ,11 ,15 ,18.2 and 24.6kbps*. > > But when I run the code(downloaded from www.speex.org > <http://www.speex.org>), I am getting data rates of > *4,6,8,11.2,15,2,18.4 and 24.8 kbps.* > ** > That is, for an input of 20ms frame the number of output bits I am > getting are *80,120,160,224,304,368 and 496* whereas > the number of bits given in the Table.8.1 are *79, 119, 160, 220, 300, > 364 and 492 .* > ** > Can anybody help me in finding out the reason behind this mismatch.Easy. Most of the time when you're encoding, the number of bits gets rounded up to the next full byte. However, if you were to pack 8 frames in a packet, you'd see the same values as the manual has. Jean-Marc
Alexander Chemeris
2007-May-31 03:31 UTC
[Speex-dev] Regarding mismatch in data rates of speex codec
Hello, On 5/31/07, Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> wrote:> T Murali Mohan wrote: > > Accoring to the Table.8.1 and Table.8.2 of speex manual (Version 1.2 > > Beta 2), the > > data rates supported by speex codec for narrowband are *3.95, 5,95 ,8 > > ,11 ,15 ,18.2 and 24.6kbps*. > > > > But when I run the code(downloaded from www.speex.org > > <http://www.speex.org>), I am getting data rates of > > *4,6,8,11.2,15,2,18.4 and 24.8 kbps.* > > ** > > That is, for an input of 20ms frame the number of output bits I am > > getting are *80,120,160,224,304,368 and 496* whereas > > the number of bits given in the Table.8.1 are *79, 119, 160, 220, 300, > > 364 and 492 .* > > ** > > Can anybody help me in finding out the reason behind this mismatch. > > Easy. Most of the time when you're encoding, the number of bits gets > rounded up to the next full byte. However, if you were to pack 8 frames > in a packet, you'd see the same values as the manual has.I think it's a common misunderstanding, so wouldn't it be nice to have a "Note: " with warning about rounding to 8 bits and/or table or column in existing table with values for 20ms frames. It may be helpful for people who just want use Speex. -- Regards, Alexander Chemeris. SIPez LLC. SIP VoIP, IM and Presence Consulting http://www.SIPez.com tel: +1 (617) 273-4000