David Hogan
2008-Feb-07 19:32 UTC
[Speex-dev] Determine number of 20ms frames in packet - without decoding
Hi, Does anyone know a practical way to determine the number of 20ms speex frames in a given speex packet without actually looping on speex_decode* ? Cheers, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20080208/0a3e84ac/attachment.html
Jean-Marc Valin
2008-Feb-07 19:48 UTC
[Speex-dev] Determine number of 20ms frames in packet - without decoding
David Hogan wrote:> Does anyone know a practical way to determine the number of 20ms speex > frames in a given speex packet without actually looping on speex_decode* ?There's no ready-made function for that. You'd have to write a function that inspects the bits, determines what mode is involved, and jump the right number of bits until a terminator is found or there's no more bytes. The narrowband decoder already does something similar when it encounters wideband data it doesn't want to decode. Jean-Marc
Steve Kann
2008-Feb-08 05:37 UTC
[Speex-dev] Determine number of 20ms frames in packet - without decoding
Jean-Marc Valin wrote:> David Hogan wrote: > >> Does anyone know a practical way to determine the number of 20ms speex >> frames in a given speex packet without actually looping on speex_decode* ? >> > > There's no ready-made function for that. You'd have to write a function > that inspects the bits, determines what mode is involved, and jump the > right number of bits until a terminator is found or there's no more > bytes. The narrowband decoder already does something similar when it > encounters wideband data it doesn't want to decode. >We've written code to do just this, actually. It's included in iaxclient and asterisk in the speex codec modules. I've also written about it to this list (probably with code excerpts). Google is your friend. http://mlblog.osdir.com/audio.compression.speex.devel/2006-01/index.shtml Someone's even ported it to Java, it seems, here: http://www.koders.com/java/fidAEF1846C82020C9EDC1E49EF2C3F2663BC99A242.aspx -SteveK -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20080208/96296708/attachment.html
Possibly Parallel 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