[Speex-dev] Determine number of 20ms frames in packet - without decoding

Alexander Chemeris Alexander.Chemeris at sipez.com
Tue Feb 19 14:55:07 PST 2008


On 2/16/08, Jean-Marc Valin <jean-marc.valin at usherbrooke.ca> wrote:
> > Oh, you're right, inband handling is different, but it's a matter of one
> > flag, passed to functioin. Probably not that much to keep code DRY.
>
> Well, let's first merge your code and then we'll see about possible
> simplifications.

Waiting for your decision ;)
I guess you stopped on the fact you need to check my statement
about wb_skip_table?

> >> frame: 20 ms encoding
> >> sub-frame: 5 ms encoding (internal)
> >> layer: one frame of nb or sb
> >> sb: sub-band
> >> wb: nb+sb
> >> uwb: nb+sb+sb
> >
> > Hum... Then SPEEX_SUBMODE_BITS_PER_FRAME macro have
> > wrong name.
>
> Well, I haven't quite defined whether a frame includes all "layers" or
> just one...

It would be good to define - it is very misleading for newcomers
as it is now. And I would like to say, that from user point of view
"frame" meaning all "layers" is natural, because most of users
are not aware of any "layers" - they want to operate with encoded
packet as a whole and do not think of internals. Actually, I've got
some idea about "layers" only when was forced to write sample
number calculation code.

> > This is what I was trying to ask in my previous mail.
> > Now it return number of bits in one layer (nb or sb), while I expected
> > it to return number of bits in one frame (nb or wb or uwb). I want
> > to get information about frame sizes to estimate bitrate for CBR
> > operation and bitrate bounds for VBR operation.
>
> You know you can already specify the bit-rate directly instead of the
> quality, right? Also, VBR now supports a "max rate" option.

Sure. But in SDP you specify mode and not bitrate. ;) So I want
to operate with the same things as in SDP.

-- 
Regards,
Alexander Chemeris.

SIPez LLC.
SIP VoIP, IM and Presence Consulting
http://www.SIPez.com
tel: +1 (617) 273-4000


More information about the Speex-dev mailing list