RE: [rohc] The discussion on slope(s)

zhigang.c.liu@nokia.com Thu, 02 December 2004 22:48 UTC

Received: from ietf-mx.ietf.org (ietf-mx.ietf.org [132.151.6.1]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id RAA09426 for <rohc-web-archive@ietf.org>; Thu, 2 Dec 2004 17:48:33 -0500 (EST)
Received: from megatron.ietf.org ([132.151.6.71]) by ietf-mx.ietf.org with esmtp (Exim 4.33) id 1CZzqC-0001SP-OJ for rohc-web-archive@ietf.org; Thu, 02 Dec 2004 17:54:25 -0500
Received: from localhost.localdomain ([127.0.0.1] helo=megatron.ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1CZyxl-0001lX-7q; Thu, 02 Dec 2004 16:58:09 -0500
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org) by megatron.ietf.org with esmtp (Exim 4.32) id 1CZy6Z-00037l-0A for rohc@megatron.ietf.org; Thu, 02 Dec 2004 16:03:11 -0500
Received: from ietf-mx.ietf.org (ietf-mx.ietf.org [132.151.6.1]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id QAA29308 for <rohc@ietf.org>; Thu, 2 Dec 2004 16:03:08 -0500 (EST)
From: zhigang.c.liu@nokia.com
Received: from mgw-x1.nokia.com ([131.228.20.21]) by ietf-mx.ietf.org with esmtp (Exim 4.33) id 1CZyC9-000767-WD for rohc@ietf.org; Thu, 02 Dec 2004 16:08:58 -0500
Received: from esdks003.ntc.nokia.com (esdks003.ntc.nokia.com [172.21.138.158]) by mgw-x1.nokia.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id iB2L2vv23326; Thu, 2 Dec 2004 23:02:59 +0200 (EET)
X-Scanned: Thu, 2 Dec 2004 23:02:28 +0200 Nokia Message Protector V1.3.31 2004060815 - RELEASE
Received: (from root@localhost) by esdks003.ntc.nokia.com (8.12.9/8.12.9) id iB2L2S1b030395; Thu, 2 Dec 2004 23:02:28 +0200
Received: from mgw-int1.ntc.nokia.com (172.21.143.96) by esdks003.ntc.nokia.com 00FoScs1; Thu, 02 Dec 2004 23:02:26 EET
Received: from daebh002.NOE.Nokia.com (daebh002.americas.nokia.com [10.241.35.122]) by mgw-int1.ntc.nokia.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id iB2L1Ja17228; Thu, 2 Dec 2004 23:01:19 +0200 (EET)
Received: from ajebe001.NOE.Nokia.com ([172.18.151.16]) by daebh002.NOE.Nokia.com with Microsoft SMTPSVC(5.0.2195.6881); Thu, 2 Dec 2004 14:59:27 -0600
content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Subject: RE: [rohc] The discussion on slope(s)
X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1
Date: Thu, 02 Dec 2004 15:54:23 -0500
Message-ID: <7B5AF06E216CB74DA8A5960A3181B5B82891B7@ajebe001.americas.nokia.com>
Thread-Topic: [rohc] The discussion on slope(s)
Thread-Index: AcTYTmX+BasxjL9OQtaDUqRk7EpqDgAYIFQw
To: lars-erik.jonsson@ericsson.com, cabo@tzi.org
X-OriginalArrivalTime: 02 Dec 2004 20:59:27.0213 (UTC) FILETIME=[CF4FA1D0:01C4D8B1]
X-Spam-Score: 0.3 (/)
X-Scan-Signature: 6d95a152022472c7d6cdf886a0424dc6
Content-Transfer-Encoding: quoted-printable
Cc: rohc@ietf.org, ghyslain.pelletier@ericsson.com
X-BeenThere: rohc@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Robust Header Compression <rohc.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/rohc>, <mailto:rohc-request@ietf.org?subject=unsubscribe>
List-Post: <mailto:rohc@ietf.org>
List-Help: <mailto:rohc-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/rohc>, <mailto:rohc-request@ietf.org?subject=subscribe>
Sender: rohc-bounces@ietf.org
Errors-To: rohc-bounces@ietf.org
X-Spam-Score: 0.3 (/)
X-Scan-Signature: 2857c5c041d6c02d7181d602c22822c8
Content-Transfer-Encoding: quoted-printable

Hello Folks,

As Lars-Erik asked, below is the clarification text I proposed
back in April, based on my own interpretation of text in 3095 
written by myself. I also included some examples to show exactly 
how encoding/decoding works. Those were actually discussed
when we developed 3095. But it's good to give them again to
show enough technical details.

Again, the clarification may be too verbose. My intention is to 
make it as clear as possible.

As always, comments and questions are welcome.

Br, Zhigang

------------------------------------------------------------
As it is described in section 4.5.3 and other places in RFC
3095, TS_STRIDE is the factor by which an RTP Timestamp is
downscaled before compression. Obviously, it cannot be 0 (zero).

The wording of TS_STRIDE definition in section 2 is confusing
and may be incorrectly interpreted as TS_STRIDE is always equal
to the increase in TS value between two RTP packets with
consecutive sequence number. This is not the intent of the
specification. It is the compressor that decides whether TS 
scaling should be used and if yes, what is the best value of 
TS_STRIDE. See section 4.5.3 for information. How this is done 
is an implementation issue. However, an implementation must follow 
section 4.5.3, 4.5.6 and 5.7 on how to initialize, encode, and 
synchronize TS_STRIDE between the compressor and decompressor.

Note: TS_STRIDE is not the same as slope described in section 
5.5.1.2 and 5.7. Here, slope has the general meaning in mathematics.
Namely, slope(X) equals the change of a non-SN field X between
two packets divided by the change of SN field between the same
two packets. It is one of the two parameters (the other one
being offset) that define a linear function from SN to field X.
The concept can also be visualized as a line, with SN being
the horizontal coordinate and the field X being the vertical 
coordinate. For TS, this applies regardless whether it is scaled 
or not. In case the TS is scaled, the linear function (or equivalently
its slope and offset) is from SN to the TS_SCALED.

Note: it should be clear from section 4.5.3 that when scale is
used for TS, two steps are involved: 1) downscale of the 
original TS to TS_SCALED; and 2) compression of TS_SCALED.
The decompressor follows the reverse procedure with two steps.
Following are two examples to further illustrate this.

Example 1 (audio stream with TS_STRIDE = 160):

            <------ String 1 ------>    <-- String 2 --->
SN           11  12  13  14 ...   60    61    62    63 ...
TS          200 360 420 580 ... 8040 16040 16200 16360 ... 
TS_SCALED     1   2   3   4 ...   50   100   101   102 ...
TS_OFFSET    40  40  40  40       40    40    40    40 ...
slope       <--------  1 ---------->    <----- 1 ------->
offset      <-------- (-10)-------->    <----- (39) ---->

Example 2 (video stream with TS_STRIDE = 3000):

            <------ String 1 ------>  <-- String 2 --->
SN            11   12   13 ...    25   26   27   28 ...
TS          4000 4000 4000 ...  4000 7000 7000 7000 ... 
TS_SCALED      1    1    1 ...     1    2    2    2 ...
TS_OFFSET   1000 1000 1000 ...  1000 1000 1000 1000 ... 
slope       <--------  0 ---------->  <----- 0 ------->
offset      <--------- 1 ---------->  <----- 2 ------->

Note: the default-slope(X) specified in section 5.7 is to be used 
by the compressor and decompressor to initialize the slope of the 
linear function from SN to field X. This is an optimization to 
save synchronization overhead at the beginning of an RTP packet 
stream. Namely, if the actual slope of X in the first string matches 
the default-slope(X), the compressor can enter SO state and send 
Type 0 packets once it is confident that one - instead of two in 
the normal case - packet carrying field(X) has been correctly 
decompressed by the decompressor. This is enough for the decompressor
to determine the other parameter, i.e. offset, for the linear function
from SN to X. After the fist string, the decompressor will update the
linear function from SN to X depending on how many packets carrying
field(X) have been correctly decompressed. If the number is 1,
the decompressor will assume the new slope(X) = previously established
slope(X), and the update offset(X) based on field(X) received. If the 
number is 2, the decompressor will update both slope(X) and offset(X).
Note that the decompressor always uses the latest received packet(s)
to update the function.

For instance, in Example 1 above, the compressor can enter SO state once
it is confident that one packet carrying TS has been correctly decompressed 
by the decompressor. This is because the actual slope of TS (after scaling)
equals the default-slope. Of course, the TS_STRIDE = 3000 must be 
synchronized also, which can be done within the same packet. 

Example 2 is different. The actual slope (= 0) of scaled TS does not equal
the default-slope (= 1). Therefore, during the first string of the packet 
stream, the compressor has to ensure that two packets carrying TS info
have been correctly decompressed by the decompressor. This allows the
decompressor to establish both the slope and offset for function from
SN to scaled TS. However, for subsequent strings, only one correctly
decompressed packet is needed since slope = 0 has already been established
and thus can be reused.
--------------------------------------------------------------------

_______________________________________________
Rohc mailing list
Rohc@ietf.org
https://www1.ietf.org/mailman/listinfo/rohc