Re: [AVTCORE] RFC3550: RTP Jitter value calculation

Nataraja Hosahalli <Nataraja.Hosahalli@dspg.com> Wed, 26 March 2014 16:20 UTC

Return-Path: <Nataraja.Hosahalli@dspg.com>
X-Original-To: avt@ietfa.amsl.com
Delivered-To: avt@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8F7561A033D for <avt@ietfa.amsl.com>; Wed, 26 Mar 2014 09:20:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, UNPARSEABLE_RELAY=0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DZTn8e13t7VM for <avt@ietfa.amsl.com>; Wed, 26 Mar 2014 09:20:50 -0700 (PDT)
Received: from mail1.bemta12.messagelabs.com (mail1.bemta12.messagelabs.com [216.82.251.17]) by ietfa.amsl.com (Postfix) with ESMTP id BDBBF1A017D for <avt@ietf.org>; Wed, 26 Mar 2014 09:20:49 -0700 (PDT)
Received: from [216.82.249.179:42641] by server-17.bemta-12.messagelabs.com id 07/39-09033-06EF2335; Wed, 26 Mar 2014 16:20:48 +0000
X-Env-Sender: Nataraja.Hosahalli@dspg.com
X-Msg-Ref: server-16.tower-44.messagelabs.com!1395850843!1156115!1
X-Originating-IP: [194.90.94.169]
X-StarScan-Received:
X-StarScan-Version: 6.11.1; banners=dspg.com,-,-
X-VirusChecked: Checked
Received: (qmail 31703 invoked from network); 26 Mar 2014 16:20:45 -0000
Received: from smtpout.dsp.co.il (HELO IL-EXCH-02.dspg.com) (194.90.94.169) by server-16.tower-44.messagelabs.com with AES128-SHA encrypted SMTP; 26 Mar 2014 16:20:45 -0000
Received: from IL-EXCH-01.dspg.com ([fe80::6485:7965:b11c:4f5d]) by IL-EXCH-02.dspg.com ([fe80::f8d1:ac24:f562:3b8b%11]) with mapi id 14.02.0309.002; Wed, 26 Mar 2014 18:20:43 +0200
From: Nataraja Hosahalli <Nataraja.Hosahalli@dspg.com>
To: Kevin Gross <kevin.gross@avanw.com>
Thread-Topic: [AVTCORE] RFC3550: RTP Jitter value calculation
Thread-Index: AQHPSPrrENe9MD4IJkCyjMfrBDOxfJrzhUmA
Date: Wed, 26 Mar 2014 16:20:42 +0000
Message-ID: <349A84ECFABF2A4F98D9102C4AFD83FA55D63D91@IL-EXCH-01.dspg.com>
References: <349A84ECFABF2A4F98D9102C4AFD83FA55D63BAF@IL-EXCH-01.dspg.com> <CALw1_Q0wpm==DwcK7pfBfUccWZeyoiDS9bPO6-y3XomVhXHc5g@mail.gmail.com>
In-Reply-To: <CALw1_Q0wpm==DwcK7pfBfUccWZeyoiDS9bPO6-y3XomVhXHc5g@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [194.90.94.167]
Content-Type: multipart/related; boundary="_008_349A84ECFABF2A4F98D9102C4AFD83FA55D63D91ILEXCH01dspgcom_"; type="multipart/alternative"
MIME-Version: 1.0
Archived-At: http://mailarchive.ietf.org/arch/msg/avt/ZApMt8ojjsrDbCBgcoABaSi0i34
Cc: "avt@ietf.org" <avt@ietf.org>
Subject: Re: [AVTCORE] RFC3550: RTP Jitter value calculation
X-BeenThere: avt@ietf.org
X-Mailman-Version: 2.1.15
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: Wed, 26 Mar 2014 16:20:54 -0000

Hi Kevin,

Yes you are right. I ran both the formulae and also your improved formula for 500 times with constant d value, the value rr->jitter is converging near to average delay d after couple of iterations (~100 for d=2 for example).
However your new formula below is resulting to more accurate average.
rr->jitter = (s->jitter + 8) >> 4;
Older formula is almost always lagging by nearly 1 ms (0.5 ms floating value) with the average delay.

May be your new formula can be updated in RFC.

Thank you.

Regards,
Nataraj

From: Kevin Gross [mailto:kevin.gross@avanw.com]
Sent: Wednesday, 26 March, 2014 7:22 PM
To: Nataraja Hosahalli
Cc: avt@ietf.org
Subject: Re: [AVTCORE] RFC3550: RTP Jitter value calculation

The formula looks basically correct. You need to look at the settling value for rr->jitter, not s->jitter (which is a state variable). In your example, s->jitter will settle at 32 and the correct value (2) will be reported for rr->jitter.


I think the accuracy of the reporting could be improved by changing the second line to:

        rr->jitter = (s->jitter + 8) >> 4;





Kevin Gross - AVA Networks

On Wed, Mar 26, 2014 at 6:55 AM, Nataraja Hosahalli <Nataraja.Hosahalli@dspg.com<mailto:Nataraja.Hosahalli@dspg.com>> wrote:
Dear avtcore members,

I have a query on the RTP RFC 3550 which looks be an issue in RFC to me, please help by provide your expert advice.

RFC 3556 specifies 2 formulae for calculating RTP jitter in section 3.8. Couples of the RTCP RFC implementations are following these formulae.

          Section 3.8/ RFC 3550

      int transit = arrival - r->ts;

      int d = transit - s->transit;

      s->transit = transit;

      if (d < 0) d = -d;


One calculation option proposed,

        s->jitter += (1./16.) * ((double)d - s->jitter);

        rr->jitter = (u_int32) s->jitter;


other calculation option proposed
        s->jitter += d - ((s->jitter + 8) >> 4);

        rr->jitter = s->jitter >> 4;

RFC 3550 says both formulae are same. But if I look with sample numbers I see that the second formulae may not be appropriate.
The result of the formula "s->jitter += d - ((s->jitter + 8) >> 4)" LHS always keep increasing infinitely and could not be a reflecting an average value of jitter.

For example, in an hypothetical case if d = 2 each time, Jitter will be 2, 4, 6, 8, ... ever increasing, with the second formula.
Whereas with the first formulae each time it will be corrected towards d by fraction of 1/16. That is If d=2, rr->jitter will  be near to 2 in long run.

I request your opinion on this.

Thanks in advance.

Regards,
Nataraj

[1 (Custom) (2)]<http://www.dspg.com/>
[dsp_mal signature-Tali_180613-14]<mailto:Nataraja.Hosahalli@dspg.com>[dsp_mal signature-Tali_180613-15]<http://www.dspg.com/>[dsp_mal signature-Tali_180613-16]<https://www.facebook.com/#!/DSPGroup2013>[dsp_mal signature-Tali_180613-17]<http://www.linkedin.com/company/6894?trk=tyah>

Nataraja Hosahalli

Phone: +91 80 4024 8408<tel:%2B91%2080%204024%208408>
Mobile: +91 99860 25262<tel:%2B91%2099860%2025262>








______________________________________________________________________
DSP Group, Inc. automatically scans all emails and attachments using MessageLabs Email Security System.
_____________________________________________________________________

_______________________________________________
Audio/Video Transport Core Maintenance
avt@ietf.org<mailto:avt@ietf.org>
https://www.ietf.org/mailman/listinfo/avt


______________________________________________________________________
DSP Group, Inc. automatically scans all emails and attachments using MessageLabs Email Security System.
_____________________________________________________________________

______________________________________________________________________
DSP Group, Inc. automatically scans all emails and attachments using MessageLabs Email Security System.
_____________________________________________________________________