Re: [AVTCORE] I-D Action: draft-ietf-avtcore-clksrc-06.txt

Magnus Westerlund <magnus.westerlund@ericsson.com> Thu, 12 September 2013 11:46 UTC

Return-Path: <magnus.westerlund@ericsson.com>
X-Original-To: avt@ietfa.amsl.com
Delivered-To: avt@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 653BF21E80B7 for <avt@ietfa.amsl.com>; Thu, 12 Sep 2013 04:46:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.812
X-Spam-Level:
X-Spam-Status: No, score=-104.812 tagged_above=-999 required=5 tests=[AWL=-0.119, BAYES_00=-2.599, HELO_EQ_SE=0.35, J_CHICKENPOX_15=0.6, J_CHICKENPOX_18=0.6, RCVD_IN_DNSWL_MED=-4, SARE_SUB_6CONS_WORD=0.356, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rmk-XMSPlZRk for <avt@ietfa.amsl.com>; Thu, 12 Sep 2013 04:46:46 -0700 (PDT)
Received: from mailgw7.ericsson.se (mailgw7.ericsson.se [193.180.251.48]) by ietfa.amsl.com (Postfix) with ESMTP id B884011E821E for <avt@ietf.org>; Thu, 12 Sep 2013 04:46:44 -0700 (PDT)
X-AuditID: c1b4fb30-b7f9a8e000005620-59-5231a9a16013
Received: from ESESSHC010.ericsson.se (Unknown_Domain [153.88.253.124]) by mailgw7.ericsson.se (Symantec Mail Security) with SMTP id C2.26.22048.2A9A1325; Thu, 12 Sep 2013 13:46:42 +0200 (CEST)
Received: from [127.0.0.1] (153.88.183.147) by smtp.internal.ericsson.com (153.88.183.50) with Microsoft SMTP Server id 14.2.328.9; Thu, 12 Sep 2013 13:46:41 +0200
Message-ID: <5231A9CD.9080108@ericsson.com>
Date: Thu, 12 Sep 2013 13:47:25 +0200
From: Magnus Westerlund <magnus.westerlund@ericsson.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
MIME-Version: 1.0
To: Aidan Williams <aidan.williams@audinate.com>
References: <20130911001349.28088.35324.idtracker@ietfa.amsl.com> <52301853.4070306@ericsson.com> <18036806.1238.1378969595799.JavaMail.aidan@praxis.audinate.com>
In-Reply-To: <18036806.1238.1378969595799.JavaMail.aidan@praxis.audinate.com>
X-Enigmail-Version: 1.5.2
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGLMWRmVeSWpSXmKPExsUyM+Jvje6ilYZBBjuPWVjce3yLyeJlz0p2 i0lft7NavDjUzubA4vHj7ysWj39XtzN7LFnyk8njy+XPbAEsUVw2Kak5mWWpRfp2CVwZG2a8 ZCtYbFvRefMQcwPjdb0uRk4OCQETiRvbVjND2GISF+6tZ+ti5OIQEjjMKPHvzH1mCGc5o8Sh MwdZQap4BbQl/sw5AdbBIqAqse78WiYQm03AQuLmj0Y2EFtUIFiifftXNoh6QYmTM5+wgNgi AgYShzu2gNnMAqkS/4+fBesVFnCWWLp8NivEskWMEjdX/2IHSXAK+Ers3r2GFeI8SYlti46x QzRrSrRu/w1ly0s0b50NdpAQ0HENTR2sExiFZiHZPQtJyywkLQsYmVcxsucmZuakl5tvYgSG 9cEtvw12MG66L3aIUZqDRUmcd7PemUAhgfTEktTs1NSC1KL4otKc1OJDjEwcnFINjGfWJ2Tf LrlYnRITp3RkiU24U8Hcp0If6nVV75xY89Pbv/ZiyGHZ9NqEw0/Px4Wv3Hz51UfBooRbd4+d Yo9UdZ2z5wpf48qXD15n6n1X0eDdlXPo36QMoWClqAqL3qv/5v1LOvtFwOS6Z+crzZ4XL+Rm /Y5JXLtiu0/KEz/Gui5hho0cLxNtXymxFGckGmoxFxUnAgCuwvKtOQIAAA==
Cc: avt@ietf.org, draft-ietf-avtcore-clksrc@tools.ietf.org
Subject: Re: [AVTCORE] I-D Action: draft-ietf-avtcore-clksrc-06.txt
X-BeenThere: avt@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Audio/Video Transport Core Maintenance <avt.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/avt>, <mailto:avt-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/avt>
List-Post: <mailto:avt@ietf.org>
List-Help: <mailto:avt-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/avt>, <mailto:avt-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 12 Sep 2013 11:46:52 -0000

On 2013-09-12 09:06, Aidan Williams wrote:
> Hi Magnus,
> 
> Thanks for your comments - they were very helpful.  I was going to
> respond to your previous email point by point, but you've beaten me to it.
> 
> 
> ------------------------------------------------------------------------
> 
>     *From: *"Magnus Westerlund" <magnus.westerlund@ericsson.com>
>     *To: *avt@ietf.org, draft-ietf-avtcore-clksrc@tools.ietf.org
>     *Sent: *Wednesday, 11 September, 2013 5:14:27 PM
>     *Subject: *Re: [AVTCORE] I-D Action: draft-ietf-avtcore-clksrc-06.txt
> 
>     Hi,
> 
>     Great to see a new version. I have checked this version against my
>     previous comments and believe that it cares of all except the below two
>     issues.
> 
>     Section 5.2:
> 
>        The signalling optionally indicates a media clock offset value.  The
>        offset indicates the RTP timestamp value at the epoch (time of
>        origin) of the reference clock.  If no offset is signalled, the
>        offset can be inferred at the receiver by examining RTCP sender
>        reports which contain NTP and RTP timestamps which combined define a
>        mapping.
> 
> 
>     > First, I am not certain that I understand the offset. So the indicated
>     > value is an RTP timestamp, i.e. the integer representation of the
>     32-bit
>     > value of the RTP timestamp. So the epoch time is dependent on the
>     clock
>     > system, but the current epoch for an NTP reference clock would be
>     1 jan
>     > at 0:00 year 1900. Thus you need to take all the leap seconds etc into
>     > account to determine how many time has actually passed since then and
>     > then calculate how many wrapping of the timestamp this means. This
>     seems
>     > error prone, at least without being more explicit of how to do it for
>     > the various reference clocks.
> 
>     I still think I need an author response on this to determine if there is
>     an issue here.
> 
> Kevin and I discussed this off list - we decided not to describe how to
> count all the leap seconds but to recommend the use of a non-leapsecond
> bearing clock (e.g. TAI):
> 
> Implementations SHOULD use a TAI timestamp reference clock
> to avoid complications due to leap seconds.  The NTP/RTP timestamp
> mapping provided by RTCP SRs takes precedence over that provided by   
> the SDP, however the media clock rate implied by the SRs MUST be
> consistent with the rate announced in the SDP.
> 
> Are you OK with this as a resolution?

I personally think this is a little to dense to be easily understood. I
think it assumes a fairly good understanding of clocks and different
representations and potential issues to do correctly. I would definitely
like the text to be more explicit about several things.

First what the basic calculation that needs to be done is. Secondly, the
to be clear about the pitfalls with leap seconds, especially to put the
TAI recommendation into perspective.

The full paragraph currently says:

   The signalling optionally indicates a media clock offset value.  The
   offset indicates the RTP timestamp value at the epoch (time of
   origin) of the reference clock.  If no offset is signalled, the
   offset can be inferred at the receiver by examining RTCP sender
   reports which contain NTP and RTP timestamps which combined define a
   mapping.  Implementations SHOULD use a TAI timestamp reference clock
   to avoid complications due to leap seconds.  The NTP/RTP timestamp
   mapping provided by RTCP SRs takes precedence over that provided by
   the SDP, however the media clock rate implied by the SRs MUST be
   consistent with the rate announced in the SDP.

I would suggest this to be changed to something more like this:


The signalling optionally indicates a media clock offset value.  The
offset indicates the RTP timestamp value at the epoch (time of origin)
of the reference clock. So for example if the reference clock used is
NTP that is UTC based, then the epoch was the 0:00:00 on the 1st of
January 1900. As the offset is the value the RTP timestamp would have
had at the time of the epoch, one needs to determine the amount of time
since the epoch. In formats that includes leap seconds, like NTP this
isn't simply to take the reference clock value multiplied by the
timestamp rate and subtract that from the RTP Timestamp media clock
value for the correspondingly used reference clock value modulus 2^32.
For example for UTC compared to the leap second less TAI format there is
a 35 second time difference at the time of writing. To get this
correctly for systems with leap seconds, the leap seconds must be
tracked. Implementations SHOULD use a TAI timestamp reference clock to
avoid complications due to leap seconds. If no offset is signalled, the
   offset can be inferred at the receiver by examining RTCP sender
   reports which contain NTP and RTP timestamps which combined define a
   mapping.    The NTP/RTP timestamp
   mapping provided by RTCP SRs takes precedence over that provided by
   the SDP, however the media clock rate implied by the SRs MUST be
   consistent with the rate announced in the SDP.

Trying to write the above I actually got confused about the epoch for
NTP. After some reasoning I deduced that it must be the format epoch,
i.e. 1900 rather than the epoch of the UTC time which I believe is 0h 1
January 1972.

I think it is important to remember that some of the implementors of
this specification will basically get an order: Go implement this for
our system. They may additionally know which clock system it is
coordinated with.

> 
>     > 5. Section 5.2 and Figure 7:
>     >
>     >    A rate modifier may be specified.  The modifier is expressed as the
>     >    ratio of two integers and modifies the rate specified or implied by
>     >    the media description by this ratio.  If omitted, the rate is
>     assumed
>     >    to be the exact rate specified or implied by the media format.  For
>     >    example, without a rate specification, the media clock for an 8 kHz
>     >    G.711 audio stream will advance exactly 8000 units for each second
>     >    advance in the reference clock from which it is derived.
>     >
>     > and looking at this example in Figure 7:
>     >
>     >           m=audio 5004 RTP/AVP 96
>     >           a=rtpmap:96 L24/44100/2
>     >           a=sendonly
>     >           a=ts-refclk:ptp=IEEE1588-2008:39-A7-94-FF-FE-07-CB-D0:0
>     >           a=mediaclk:direct=963214424 rate=1000/1001
>     >
>     > I realize that I don't understand what the rate modifier means.
>     Without
>     > the rate modifier there would be 44100 RTP timestamp ticks per
>     second of
>     > reference clock. Does the rate modifier multiply with the nominal rate
>     > so that this example means 441000*1000/1001 RTP TS ticks per second of
>     > reference clock?
>     >
>     > Some clarification may be required here.
> 
>     Also this I would like to receive some answer to.
> 
> The rate modifier means exactly what you think it does.
> So it would appear that the text is sufficiently clear .. ;-)
> 
> Do you still feel more clarification is needed?

Maybe not, even if I would prefer a clarification.

Cheers

Magnus Westerlund

----------------------------------------------------------------------
Multimedia Technologies, Ericsson Research EAB/TVM
----------------------------------------------------------------------
Ericsson AB                | Phone  +46 10 7148287
Färögatan 6                | Mobile +46 73 0949079
SE-164 80 Stockholm, Sweden| mailto: magnus.westerlund@ericsson.com
----------------------------------------------------------------------