Subject: [AVT] Frame Interleaving in AMR profile->RFC 3267

From: B Prashanth <[email-masked]>
Date: Wed, 23 Jul 2003 20:01:35 +0530

Dear All
The frame interleaving in the AMR profile (RFC 3267) states that

" The sender of the payload MUST only apply interleaving if the
   receiver has signalled its use through out-of-band means.  Since
   interleaving will increase buffering requirements at the receiver,
   the receiver uses MIME parameter "interleaving=I" to set the maximum
   number of frame-blocks allowed in an interleaving group to I.

   When performing interleaving the sender MUST use a proper number of
   frame-blocks per payload (N) and ILL so that the resulting size of an
   interleave group is less or equal to I, i.e., N*(L+1)<=I. "

ILL is the interleaving Length i.e. number of RTP packets across which 
interleaving happens.
NOTE: The value of ILL starts from 0. Hence, one needs to do ILL +1 in 
the above formula.

Nmax, the maximum value N (number of frame-blocks per payload) can take, 
is calculated by the formula ->
Nmax = (RTP MTU SIZE)/(The frame size of a frame block)

Assuming,

RTP MTU SIZE = 1500 bytes, and
The frame size of a AMR frame block = 13 octets for AMR frame type=0

The above assumption gives:
Nmax = 1500/13 = 115 packets.

The information obtained from out-of-band means, say, SDP is 
"interleaving=30", which means that an interleaving group can have a 
maximum of 30 frames per group such that:
(ILL+1) * N less than or equal to I  
        where    N varies from 0<N<Nmax.
                      ILL is the interleaving Length i.e. number of RTP 
packets across which interleaving happens.

Now, in the case taken by me above, Nmax > I   (i.e. 115>30). So, the 
condition (ILL+1)*N less than or equal to I with N=Nmax doesn't hold good.

So, how does one select the value of N and ILL such that it is less than 
I, in the above case?

Right now, I can think of only one option of handling this:
My option:  Assume the minimum value of ILL, say 1. A value of 2 makes 
sense because one needs at least 2 RTP packets to do interleaving. Based 
on this value calculate N
N = (30/2)-1
N = 14
With this value of N we satisfy both the conditions, namely,
(ILL+1) * N less than or equal to I  -> (2+1)
and
N varies from 0<N<Nmax.

I wanted to ask the others on this list whether this solution is the 
only solution? Or there are other ways of handling this?
Shouldn't the values of N and ILL be very apparent rather than AMR 
profile designer making such assumptions about it?

-- 
Prashanth B.P.
Sr. Design Engr.
NeoMagic Design Center.
Polyplex Building, First Floor
B-37 Sector 1
Noida 
INDIA 201301
E-Mail:  [email-masked]
Tel:     +91-120-2536208
Fax:     +91-120-2536207

---

From: Magnus Westerlund <[email-masked]>
Date: Thu, 24 Jul 2003 09:42:02 +0200

Hi,

When it comes to meeting the limitations the sender side has the freedom 
to select any combination of ILL and number of frames that satisfies the 
restrictions. Another restriction then I that may be used is "maxptime" 
which puts a limit on the number of frames per packet.

In your example with I=30 the sender has the choice to go from ILL=0 (No 
interleaving, with 30 frames in a single RTP packet, up to ILL=14 and 
only two frames per packet. It is assumed that the sender will use the 
combination most suitable for the current network performance and 
congestion state.

There is no need for the payload format to put in more limitations. The 
RTP payload format has great flexibility and for any receiver 
implementing the interleaving mode can decode these payloads independent 
  of which ratio between ILL and N that are used. The I restriction 
value is there to put a limit on buffering and interleaving induced 
delay. However using many AMR frames per packet is generally not a good 
idea. If one would use the 130 frames per packet that you calculate, I 
hope you are aware that this represent 2.6 seconds. That can be a whole 
sentence lost if this single packet is lost. So filling voice packet to 
the limit is not suitable in environments where losses occur. However if 
one has retransmission or uses a reliable channel more frames per 
packets may give satisfactory performance. My opinion is that more than 
5-10 frames per packet is to much. And if one is going as high as 10 
frames per packet one should definitely consider using interleaving with 
fairly decent length.

[Chairs hat on]

RFC 3267 is a payload format NOT a profile. A RTP profile is something 
else and must not be confused with payload formats. I have seen this 
mistake being done also by others. The current available profiles are 
RFC 1890 (AVP) or rather draft-ietf-avt-profile-new-13. Two new profiles 
are with the IESG, SRTP (SAVP) draft-ietf-avt-srtp-09 and Extended RTCP 
feedback (AVPF) draft-ietf-avt-rtcp-feedback-07.

[chairs hat off]

Best Regards

Magnus

-- 

Magnus Westerlund

Multimedia Technologies, Ericsson Research EAB/TVA/A
----------------------------------------------------------------------
Ericsson AB                | Phone +46 8 4048287
Torshamsgatan 23           | Fax   +46 8 7575550
S-164 80 Stockholm, Sweden | mailto: [email-masked]

_______________________________________________
Audio/Video Transport Working Group
[email-masked]
https://www1.ietf.org/mailman/listinfo/avt

---

From: B Prashanth <[email-masked]>
Date: Thu, 24 Jul 2003 15:44:31 +0530

Hi Magnus!

    Thanks for replying in detail. It has cleared lot of my doubts.

Regards,
Prashanth

Magnus Westerlund wrote:

> Hi,
>
> When it comes to meeting the limitations the sender side has the 
> freedom to select any combination of ILL and number of frames that 
> satisfies the restrictions. Another restriction then I that may be 
> used is "maxptime" which puts a limit on the number of frames per packet.
>
> In your example with I=30 the sender has the choice to go from ILL=0 
> (No interleaving, with 30 frames in a single RTP packet, up to ILL=14 
> and only two frames per packet. It is assumed that the sender will use 
> the combination most suitable for the current network performance and 
> congestion state.
>
> There is no need for the payload format to put in more limitations. 
> The RTP payload format has great flexibility and for any receiver 
> implementing the interleaving mode can decode these payloads 
> independent  of which ratio between ILL and N that are used. The I 
> restriction value is there to put a limit on buffering and 
> interleaving induced delay. However using many AMR frames per packet 
> is generally not a good idea. If one would use the 130 frames per 
> packet that you calculate, I hope you are aware that this represent 
> 2.6 seconds. That can be a whole sentence lost if this single packet 
> is lost. So filling voice packet to the limit is not suitable in 
> environments where losses occur. However if one has retransmission or 
> uses a reliable channel more frames per packets may give satisfactory 
> performance. My opinion is that more than 5-10 frames per packet is to 
> much. And if one is going as high as 10 frames per packet one should 
> definitely consider using interleaving with fairly decent length.
>
>
> [Chairs hat on]
>
> RFC 1890 (AVP) or rather draft-ietf-avt-profile-new-13. Two new 
> profiles are with the IESG, SRTP (SAVP) draft-ietf-avt-srtp-09 and 
> Extended RTCP feedback (AVPF) draft-ietf-avt-rtcp-feedback-07.
>
> [chairs hat off]
>
> Best Regards
>
>
> Magnus
>
>
> B Prashanth wrote:
>
>> Dear All
>> ILL is the interleaving Length i.e. number of RTP packets across 
>> which interleaving happens.
>> NOTE: The value of ILL starts from 0. Hence, one needs to do ILL +1 
>> in the above formula.
>>
>> Nmax, the maximum value N (number of frame-blocks per payload) can 
>> take, is calculated by the formula ->
>> (ILL+1) * N less than or equal to I          where    N varies from 
>> 0<N<Nmax.
>>                       ILL is the interleaving Length i.e. number of 
>> RTP packets across which interleaving happens.
>>
>> So, how does one select the value of N and ILL such that it is less 
>> than I, in the above case?
>>
>> My option:  Assume the minimum value of ILL, say 1. A value of 2 
>> makes sense because one needs at least 2 RTP packets to do 
>> interleaving. Based on this value calculate N
>> N = (30/2)-1
>> N = 14
>> Noida INDIA 201301