Jean-Marc Valin
2008-Feb-16 04:23 UTC
[Speex-dev] Determine number of 20ms frames in packet - without decoding
> 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.>> 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...> 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. Jean-Marc
Alexander Chemeris
2008-Feb-19 14:55 UTC
[Speex-dev] Determine number of 20ms frames in packet - without decoding
On 2/16/08, Jean-Marc Valin <jean-marc.valin@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
Jean-Marc Valin
2008-Feb-19 15:22 UTC
[Speex-dev] Determine number of 20ms frames in packet - without decoding
Alexander Chemeris wrote:> On 2/16/08, Jean-Marc Valin <jean-marc.valin@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?Oh, your table looked fine. I think it's mine that was wrong for the "null mode" (which nobody ever uses I guess!).> 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.Well, turns out I use frame size for both meanings -- which normally isn't a problem because few people are directly aware of the "layers" in the first place.> Sure. But in SDP you specify mode and not bitrate. ;) So I want > to operate with the same things as in SDP.I see. BTW, you can ask the full bit-rate to the encoder or decoder. It's only the mode that give you the layer's bit-rate (which we might want to change). Jean-Marc
Apparently Analagous Threads
- Determine number of 20ms frames in packet - without decoding
- Determine number of 20ms frames in packet - without decoding
- Determine number of 20ms frames in packet - without decoding
- Determine number of 20ms frames in packet - without decoding
- Determine number of 20ms frames in packet - without decoding