Speex tells me that the decoder is always 5 ms, but it says that the encoder is 5 ms for NB, 8.9375 ms for WB, and 10.90625 ms for UWB. Is there an extra frame of delay in the encoder that isn't otherwise accounted for? John Ridges Jean-Marc Valin wrote:> Quoting John Ridges <jridges at masque.com>: > >> I also need to know the precise delays from Speex but I used the >> SPEEX_GET_LOOKAHEAD control requests to determine them (plus the >> "speex_resampler_get_output_latency" function from the resampler). The >> returned values from the Speex lookahead request don't seem to match >> with the values you gave Alexander. Am I doing this wrong? Thanks, >> > > What's the difference between what I wrote and what you get from Speex? > > Jean-Marc > > >> John Ridges >> >> >> speex-dev-request at xiph.org wrote: >> >>> Alexander Chemeris a ?crit : >>> >>> >>>> I want to do a careful measure of mic-to-net and net-to-spkr delays >>>> in sip media engine and to make it really precise I need to know >>>> delays, introduced by Speex algorithms. In particular, I'm interested >>>> in delays of: >>>> 1) encoder in NB, WB and UWB modes, >>>> >>>> >>> NB: 25 ms, WB: ~28 ms, UWB: ~30 ms >>> >>> >>> >>>> 2) decoder (I guess it should be 0?) >>>> >>>> >>> 5 ms >>> >>> >>> >>>> 3) resampler. I think it varies depending on input rate to output rate >>>> ratio. Any generic formula or at least values for specific ratios >>>> >> available? >> >>> The higher the quality, the higher the delay >>> >>> >>> >>>> 4) AEC >>>> >>>> >>> 0 ms >>> >>> >>> >>>> 5) preprocessor >>>> >>>> >>> 1 frame extra delay (i.e. you get back the last frame you sent the last >>> time) >>> >>> Jean-Marc >>> >>> >>> ------------------------------ >>> >>> >>> >>> >> >> > > > > >
Quoting John Ridges <jridges at masque.com>:> Speex tells me that the decoder is always 5 ms, but it says that the > encoder is 5 ms for NB, 8.9375 ms for WB, and 10.90625 ms for UWB. Is > there an extra frame of delay in the encoder that isn't otherwise > accounted for?Oh, delay = frame_size + lookahead If you have a frame size of 20 ms, then there's no choice but to have 20 ms delay (you can't transmit the first sample until you've received the last). However, if you have many algorithms that work on the same frame size, you only pay for that delay once. Jean-Marc> John Ridges > > Jean-Marc Valin wrote: > > Quoting John Ridges <jridges at masque.com>: > > > >> I also need to know the precise delays from Speex but I used the > >> SPEEX_GET_LOOKAHEAD control requests to determine them (plus the > >> "speex_resampler_get_output_latency" function from the resampler). The > >> returned values from the Speex lookahead request don't seem to match > >> with the values you gave Alexander. Am I doing this wrong? Thanks, > >> > > > > What's the difference between what I wrote and what you get from Speex? > > > > Jean-Marc > > > > > >> John Ridges > >> > >> > >> speex-dev-request at xiph.org wrote: > >> > >>> Alexander Chemeris a ?crit : > >>> > >>> > >>>> I want to do a careful measure of mic-to-net and net-to-spkr delays > >>>> in sip media engine and to make it really precise I need to know > >>>> delays, introduced by Speex algorithms. In particular, I'm interested > >>>> in delays of: > >>>> 1) encoder in NB, WB and UWB modes, > >>>> > >>>> > >>> NB: 25 ms, WB: ~28 ms, UWB: ~30 ms > >>> > >>> > >>> > >>>> 2) decoder (I guess it should be 0?) > >>>> > >>>> > >>> 5 ms > >>> > >>> > >>> > >>>> 3) resampler. I think it varies depending on input rate to output rate > >>>> ratio. Any generic formula or at least values for specific ratios > >>>> > >> available? > >> > >>> The higher the quality, the higher the delay > >>> > >>> > >>> > >>>> 4) AEC > >>>> > >>>> > >>> 0 ms > >>> > >>> > >>> > >>>> 5) preprocessor > >>>> > >>>> > >>> 1 frame extra delay (i.e. you get back the last frame you sent the last > >>> time) > >>> > >>> Jean-Marc > >>> > >>> > >>> ------------------------------ > >>> > >>> > >>> > >>> > >> > >> > > > > > > > > > > > > >
Understood. Then I don't have to worry about you changing SPEEX_GET_LOOKAHEAD. BTW thanks for the delay info about the preprocessor, I wasn't aware of that. John Ridges Jean-Marc Valin wrote:> Quoting John Ridges <jridges at masque.com>: > > >> Speex tells me that the decoder is always 5 ms, but it says that the >> encoder is 5 ms for NB, 8.9375 ms for WB, and 10.90625 ms for UWB. Is >> there an extra frame of delay in the encoder that isn't otherwise >> accounted for? >> > > Oh, delay = frame_size + lookahead > > If you have a frame size of 20 ms, then there's no choice but to have 20 ms > delay (you can't transmit the first sample until you've received the last). > However, if you have many algorithms that work on the same frame size, you only > pay for that delay once. > > Jean-Marc > > >> John Ridges >> >> Jean-Marc Valin wrote: >> >>> Quoting John Ridges <jridges at masque.com>: >>> >>> >>>> I also need to know the precise delays from Speex but I used the >>>> SPEEX_GET_LOOKAHEAD control requests to determine them (plus the >>>> "speex_resampler_get_output_latency" function from the resampler). The >>>> returned values from the Speex lookahead request don't seem to match >>>> with the values you gave Alexander. Am I doing this wrong? Thanks, >>>> >>>> >>> What's the difference between what I wrote and what you get from Speex? >>> >>> Jean-Marc >>> >>> >>> >>>> John Ridges >>>> >>>> >>>> speex-dev-request at xiph.org wrote: >>>> >>>> >>>>> Alexander Chemeris a ?crit : >>>>> >>>>> >>>>> >>>>>> I want to do a careful measure of mic-to-net and net-to-spkr delays >>>>>> in sip media engine and to make it really precise I need to know >>>>>> delays, introduced by Speex algorithms. In particular, I'm interested >>>>>> in delays of: >>>>>> 1) encoder in NB, WB and UWB modes, >>>>>> >>>>>> >>>>>> >>>>> NB: 25 ms, WB: ~28 ms, UWB: ~30 ms >>>>> >>>>> >>>>> >>>>> >>>>>> 2) decoder (I guess it should be 0?) >>>>>> >>>>>> >>>>>> >>>>> 5 ms >>>>> >>>>> >>>>> >>>>> >>>>>> 3) resampler. I think it varies depending on input rate to output rate >>>>>> ratio. Any generic formula or at least values for specific ratios >>>>>> >>>>>> >>>> available? >>>> >>>> >>>>> The higher the quality, the higher the delay >>>>> >>>>> >>>>> >>>>> >>>>>> 4) AEC >>>>>> >>>>>> >>>>>> >>>>> 0 ms >>>>> >>>>> >>>>> >>>>> >>>>>> 5) preprocessor >>>>>> >>>>>> >>>>>> >>>>> 1 frame extra delay (i.e. you get back the last frame you sent the last >>>>> time) >>>>> >>>>> Jean-Marc >>>>> >>>>> >>>>> ------------------------------ >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>> >>> >>> >>> >> >> > > > > >
John Ridges
2009-Jul-21 20:01 UTC
[Speex-dev] A technical question about the speex preprocessor.
Hi, I've been trying to re-create the table in the function "hypergeom_gain" in preprocess.c, and I just simply can't get the same values. I get the same value for the first element, so I know I'm computing gamma(1.25)^2 correctly, but I can't get the same numbers for M(-.25;1;-x), which I assume is Kummer's function. Is it possible that the comment is out of date and the values of Kummer's function used to make the table were different? Any help would be greatly appreciated. John Ridges