Jean-Marc Valin
2008-Feb-08 13:03 UTC
[Speex-dev] Determine number of 20ms frames in packet - without decoding
Alexander Chemeris a ?crit :> Hi Jean-Marc, > Is your proposition that ever this code will be written in terms > of internal Speex bits it will be included into libspeex still in force?yes. I'd like to include that if someone writes it using SpeexBits. Cheers, Jean-Marc
Alexander Chemeris
2008-Feb-12 07:47 UTC
[Speex-dev] Determine number of 20ms frames in packet - without decoding
Hi, On 2/9/08, Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> wrote:> Alexander Chemeris a ?crit : > > Hi Jean-Marc, > > Is your proposition that ever this code will be written in terms > > of internal Speex bits it will be included into libspeex still in force? > > yes. I'd like to include that if someone writes it using SpeexBits.Here is first attempt. I'm sending it here for review - am I understand you correctly? If general approach is correct, I'll change code to use modes from modes.c. One question - as far as I understand, to get number of samples we should not parse WB frames even in (U)WB mode, becuase in WB mode "meta"-frame consist of NB frame, and WB frame. Is it correct? -- 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: speex_get_num_samples.c Type: application/octet-stream Size: 2857 bytes Desc: not available Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20080212/3ef4a8e7/speex_get_num_samples.obj
Jean-Marc Valin
2008-Feb-12 13:31 UTC
[Speex-dev] Determine number of 20ms frames in packet - without decoding
Hi Alexander,> Here is first attempt. I'm sending it here for review - am I understand > you correctly? If general approach is correct, I'll change code to use > modes from modes.c.I haven't tested, but it looks sane. Just a few comments: - printf("\tERROR not enough bits left after wb\n"); this is actually now an error. It just means you got to the end of the frame - I suggest speex_get_num_frames() instead. That works for both narrowband and wideband. Number of samples could be misleading because of nb vs wb frame size. - You can change it to use the nb mode info in modes.c, but leave the wideband like it is now. Otherwise, it would cause the wideband stuff to be linked in all the time.> One question - as far as I understand, to get number of samples > we should not parse WB frames even in (U)WB mode, becuase > in WB mode "meta"-frame consist of NB frame, and WB frame. > Is it correct?I don't understand your question. 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
- narrowband embedded in wideband