Subject: RE: [rohc] Clarification on LSB encoding

From: [email-masked]
Date: Sat, 14 Jun 2003 12:06:38 +0530

Dear zhigang,

Thanks for the response. Please provide the detailed analysis of the query.

Refer to the table below
SN          p           interval                      Comment
4           1           vref-1,vref + (2^k -1) -1           (left shift)
5           0           vref,vref+(2^k-1)             (no shift)
6           1           vref-1,vref + (2^k -1) -1           (left shift)
7           3           vref-3,vref + (2^k -1) -3           (left shift)

When we are using 4 bit compressed header (CH  for SN,  the value of p is 1
which implies that there is a left shift in the interpretation interval ,
where as in case of  5 bit CH p comes out to be 0, which means there is no
shift in the interval. Considering SN=6 , p will be 1, again there is a
left shift in interval. Now this to and fro movement is insuring correct
encoding of misordered packets, How ?

What is the reason behind choosing 4 and 5 in section given for calculation
of p.
Please elaborate on this concept.

regards,
Vishal

[email-masked]@ietf.org on 06/14/2003 12:12:39 AM

Sent by:    [email-masked]

To:    Madhusudan Pawar/HSS@HSS, <[email-masked]>
cc:

Subject:    RE: [rohc] Clarification on LSB encoding

> ##################################################################
> SN: The compressed RTP Sequence Number.
>
>        Compressed with W-LSB.  The interpretation intervals,
> see section
>        4.5.1, are defined as follows:
>
>             p = 1                   if bits(SN) <= 4
>             p = 2^(bits(SN)-5) - 1  if bits(SN) >  4
> ##################################################################
>
> How p = 2^(bits(SN)-5) - 1  if bits(SN) >  4 is devised ?

Hi Madhusudan,

That means p=0 if bits(SN)=5, p=1 if bits(SN)=6, and so on.
I.e., value of p depends on the number of SN bits carried in
a compressed header. The rational is that with more SN bits
(and thus larger compressed header), we want to be able to
encode even misordered (before compressor) RTP packets.

BR,
Zhigang

_______________________________________________
Rohc mailing list
[email-masked]
 https://www1.ietf.org/mailman/listinfo/rohc

_______________________________________________
Rohc mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/rohc

---

From: Alan Kennington <[email-masked]>
Date: Sun, 15 Jun 2003 23:26:50 +0930

On Sat, Jun 14, 2003 at 12:06:38PM +0530, [email-masked] wrote:
[...]
> encoding of misordered packets, How ?

When I first saw the rule for the interpretation interval offset function p(k),
I thought it was a little quirky, probably resulting from a thinking error,
but that it would not cause problems. Now I'm not so sure.
The number k equals bits(SN). Therefore the interpretation
intervals for d = v - v_ref are as follows:

k=bits(SN)	p(k)	interval for d

1		1	[-1, 0]
2		1	[-1, 2]
3		1	[-1, 6]
4		1	[-1, 14]	<== possible, e.g. UO-0
5		0	[ 0, 31]
6		1	[-1, 62]	<== possible, e.g. R-0
7		3	[-3, 124]	<== possible, e.g. R-0-CRC
8		7	[-7, 248]
9		15	[-15, 496]	<== possible, e.g. R-1 extn 0.
10		31	[-31, 992]
etc.

If you ignore the extension type 3, the only possible SN coding widths are
indicated above as "possible". This is for profiles 1, 2 and 3 anyway.
Therefore it seems that it doesn't matter what you do for k = 5.
However, if there was a k=5 packet format for SN fields, there is one
kind of problem that could occur. This is as follows.

Suppose that you have a general algorithm which determines the
smallest number k_min for encoding the difference d = v - v_ref.
If d = -1, your algorithm will say that k_min = 1.
However, it is _not_ true that d = -1 can be encoded with k = 5.
This is because the set of intervals is _not_ a non-decreasing function of k.
The interval for k does not always completely include all of the intervals
for smaller k.
This makes it difficult to design simple algorithms for the compressor
to choose the packet format.

I think it is clear that the interpretation intervals should always
be non-decreasing (in the set-theoretic sense) functions of k.
Otherwise, almost certainly someone will write incorrect implementations
because it is very difficult to code for the above irregular situation.

In the case of RFC 3095, the above problem with the function p(k) is
academic. However, for all future functions p(k), I believe that
the interpretation interval should always include all intervals less than k.

------------------------------
Now the answer to your question, Vishal, is that the "to and fro"
movement of p(k) does not ensure correct encoding of misordered packets.
It is the fact that p > 0 which makes possible the correct encoding
for packets where SN sometimes goes backwards, because then d < 0.
So, for example, when k = 7, you can have a decrease of SN by 1, 2 or 3,
but not 4. This is because p(7) = 3.

Cheers,
Alan Kennington.