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

Alexander Chemeris Alexander.Chemeris at sipez.com
Wed Feb 13 13:38:04 PST 2008


For clarity I attached modified testenc.c I used to test my code.

On 2/14/08, Jean-Marc Valin <jean-marc.valin at usherbrooke.ca> wrote:
> > I also think that having rame_num.c in libspeex, code size could be
> > reduced and simplified slightly by using speex_skip_wb_frame() in
> > nb_decode() instead of duplicating code.
>
> Well, the code is a bit different (e.g. handling of in-band data), so
> I'm not sure it's possible in a way that is worth it.

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.

> 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. 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.

-- 
Regards,
Alexander Chemeris.

SIPez LLC.
SIP VoIP, IM and Presence Consulting
http://www.SIPez.com
tel: +1 (617) 273-4000
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testenc.c
Type: application/octet-stream
Size: 4367 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20080214/6893d212/testenc.obj


More information about the Speex-dev mailing list