[Speex-dev] draft-ietf-avt-rtp-speex-01.txt

Jean-Marc Valin jean-marc.valin at usherbrooke.ca
Wed May 16 05:50:27 PDT 2007


>> The main idea is that Speex supports many bit-rates, but for one reason
>> or another, some modes may be left out in implementations (e.g. for RAM
>> or network reasons). What we're saying here is that you should make an
>> effoft to at least support (and offer) the 8 kbps mode to maximise
>> compatibility.
> 
> I understood this. But as you may know: the SDP parameters are PROPOSAL
> only and a remote application might use another "mode": this typically
> lead to interoperability issue and you should advise in the specification
> to always support all "modes". I understand this can be seen as a
> limitation, but in real world, it will not be acceptable to support
> only a few mode among the provided ones.

Consider a device that only has enough ROM to store one set of
quantization tables (the limitation could also be about speed, network,
...). If you specify MUST be able to decode, then it means that this
device simply *cannot* implement the spec *at all*. This is bad for
interoperability.

> I understand that speex needs multiple 20ms packets: for speex
> "packetisation interval MUST be a multiple of 20ms", but you have
> to provide a specification compliant with other ones: "ptime" can
> have any other value and there can't be a MUST there.
> 
> Round it up is a much better idea: usually, 30ms is used when
> 20ms would introduce too much bandwidth overhead: if you round
> it down, then you would get less quality.

Fair enough.

> Some application "allocate" a buffer based on the "ptime": thus
> they copy 20ms of PCMU data each time they get a packet even
> if they receive packets each 30ms...
> 
> The sound cards play 2/3 of data received... This happen more
> than you would imagine. Look at this implementation of current
> iLBC in asterisk:

Oh, I've seen a lot worse... like calling speex_encode() with 640 u-law
samples instead of 160 floats (hey, it's the same number of bytes) to
get 4x more compression! Though in this case, no IETF draft can save you :-)

>>> Also, this table exists for narrowband, but still it does not for
>>> wideband or ultrawideband: it would be nice to get also those ones. I
>>> was really lost implementing this in my SIP application.
>>
>> Yes, I just checked that in into svn. Will be part of the 1.2beta2
>> manual (expected soon).
> 
> And will you add thoses tables in the draft?

Hadn't thought about it, but why not. Wouldn't take too much space and
it would make things simpler.

>> Well, the idea is what happens if all modes can't be supported for some
>> reason. This is why we were saying 8 kbps (mode 3) SHOULD be supported.
>> In practice, we can also strongly recommend supporting all modes, but
>> I'm not sure I want to say MUST for that.
> 
> I guess you already have my idea about this: all modes should be supported
> unless you know you won't have issue.
> 
> On good thing with g729 and its extension (g729 annexe b?) is that you
> can still
> receive g729b if you support only g729: this is transparent (as far as I
> understood it).
> 
> For speex, the modes are not transparent and thus, If I was the one
> to choose, I would add in the draft: ALL MODES MUST BE SUPPORTED ON
> THE RECEIVER SIDE. That's experience of real world.

As I said, it's not possible unless you explicitly exclude some devices
from being able to implement this. However, I'm not against saying
something to the effect that if the client/device is physically capable
of encoding/decoding a mode, then it MUST do it -- or something like
that. Again, I'm open to any suggestion that doesn't involve banning
certain devices outright.

Another thing to consider. Even if I'm able to everything and all, if
I'm on a 33.6 modem link and you attempt to send me 24.6 kbps with a
ptime of 20 ms, it won't work, no matter what and the client might as
well try something else (even if that something else is LPC10!).

> The other way would be to make it transparent like g279.

Not sure what kind of transparence you mean? The Speex decoder (unless
you remove some tables) is able to decode anything without even knowing
how it was encoded.

>> I'm just trying to allow that while still taking into account the fact
>> that some clients just don't have enough bandwidth or even enough
>> RAM/ROM/MIPS to handle really handle anything that is sent to them.
>> I'm definitely interested in any suggestion that can make both
>> possible though.
> 
> Make "mode" transparent! or forget about this. My own opinion...

Again, what do you mean exactly by transparent?

> I mean always the same: be prepared to decode all modes, no matter what
> you sent in the SDP as preference.
> 
> For example, xlite used to have a speex "quality" parameter and no
> negotiation was done: if you were sending data with another mode,
> the audio was not decocded. This was exactly the same issue than
> the one described above for iLBC decoder in asterisk.

If all you mean is "do your best to decode anything you get no matter
how different it is from what you asked for", then I agree.

	Jean-Marc



More information about the Speex-dev mailing list