Subject: [rohc] question: default slope for TS for Tsc = 0 or 1

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

On page 75 of RFC 3095, section 5.7, there's this:

======================================================
   TS: The compressed RTP Timestamp value.

      If value(TIME_STRIDE) > 0, timer-based compression of the RTP
      Timestamp is used (see section 4.5.4).

      If value(Tsc) = 1, Scaled RTP Timestamp encoding is used before
      compression (see section 4.5.3), and default-slope(TS) = 1.

      If value(Tsc) = 0, the Timestamp value is compressed as-is, and
      default-slope(TS) = value(TS_STRIDE).
======================================================

This doesn't seem right to me.
Surely if Tsc = 1, then default-slope(TS) = value(TS_STRIDE), and
if Tsc = 0, then default-slope(TS) = 1.

Is this an error? Or have I misunderstood something?
There's nothing on this in the Implementer's guide.

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

---

From: Alan Kennington <[email-masked]>
Date: Mon, 16 Jun 2003 20:55:08 +0930

> On page 75 of RFC 3095, section 5.7, there's this:

To (partly_ answer my own query, I think I understand now what
the _intention_ of the above excerpt from RFC 3095 is.
I think what is meant is:

========================================================
   If value(Tsc) = 1, Scaled RTP Timestamp encoding is used before
   compression (see section 4.5.3), and default-slope(TS) = value(TS_STRIDE).
========================================================

The rest seems to be consistent with the rest of the RFC.

I interpret the above (corrected) 2 lines to mean that if two packets
are to be encoded by the compressor with Tsc = 1, where

SN_1 = SN of reference packet
TS_1 = TS of reference packet

SN_2 = SN of current packet
TS_2 = TS of current packet

then the predicted value for TS_2 is

TS_2(predicted) = (TS_1 + (SN_2 - SN_1) * TS_STRIDE) modulo 2^32.

This is (probably) the meaning of "default slope", although I don't think 
this is ever fully clarified in RFC 3095.

Therefore the difference D = (TS_2 - TS_2(predicted)) modulo 2^32 remains
to be compressed and transmitted if it is non-zero.

Then the transmitted field is:

	floor(TS_2/TS_STRIDE) modulo 2^k

I assume that it is TS_2 which is sent in this way and not D.
In other words, I assume that the TS _offset_ from SN is not encoded, but
rather the TS value itself.
It seems to follow, therefore, that the "default slope" only determines
whether the TS must be encoded in the packet or can remain implicit.
But when it _is_ encoded, the default slope has no effect.

---------------------------
It follows from the above that _most_ of the time, the compressed
TS field will have a "slope" of 1, but this is not true when a
wrap-around of TS occurs, because then the scaled TS makes a jump of
-floor((2^32 - 1)/TS_STRIDE) and the compressed scaled TS makes a jump of
(-floor((2^32 - 1)/TS_STRIDE)) modulo 2^k.
(Note that RFC 3095, 4.5.3, page 30, does not say "floor" here although
it should say this.)

I think that this is the most reasonable interpretation of page 75
of RFC 3095 for the TS encoding for Tsc = 1.
Can anyone tell me if this interpretation is correct?

In the case of Tsc = 0, the encoding must use TS stride = 1,
although the "default slope" for prediction of TS_2 is still
value(TS_STRIDE).

Cheers,
Alan Kennington.

--------------------------------------------------------------------
    name: Dr. Alan Kennington
 website: http://www.topology.org/
    city: Adelaide, South Australia
  coords: 138.59 E, 34.88 S
timezone: UTC+0930 http://www.topology.org/site/timezone.html
 pgp-key: http://www.topology.org/ak/key_ak2.asc
_______________________________________________
Rohc mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/rohc