Re: [AVTCORE] RFC3550: RTP Jitter value calculation

Stephen Casner <casner@acm.org> Wed, 26 March 2014 14:56 UTC

Return-Path: <casner@acm.org>
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 B8BF71A02D8 for <avt@ietfa.amsl.com>; Wed, 26 Mar 2014 07:56:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.235
X-Spam-Level:
X-Spam-Status: No, score=-1.235 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_SOFTFAIL=0.665] autolearn=no
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 twriGAq7tGUK for <avt@ietfa.amsl.com>; Wed, 26 Mar 2014 07:56:13 -0700 (PDT)
Received: from mailman.packetdesign.com (firewall-gw-dirty-u.packetdesign.com [65.192.41.2]) by ietfa.amsl.com (Postfix) with ESMTP id 478341A0146 for <avt@ietf.org>; Wed, 26 Mar 2014 07:56:13 -0700 (PDT)
Received: from packetdesign.com (vpn2-int.packetdesign.com [192.168.0.181]) by mailman.packetdesign.com (8.13.1/8.13.1) with ESMTP id s2QEuAhm024006; Wed, 26 Mar 2014 07:56:10 -0700
Date: Wed, 26 Mar 2014 07:56:09 -0700
From: Stephen Casner <casner@acm.org>
To: Nataraja Hosahalli <Nataraja.Hosahalli@dspg.com>
In-Reply-To: <349A84ECFABF2A4F98D9102C4AFD83FA55D63BAF@IL-EXCH-01.dspg.com>
Message-ID: <alpine.OSX.1.10.1403260752330.92304@auge.gateway.2wire.net>
References: <349A84ECFABF2A4F98D9102C4AFD83FA55D63BAF@IL-EXCH-01.dspg.com>
User-Agent: Alpine 1.10 (OSX 962 2008-03-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset="US-ASCII"
Archived-At: http://mailarchive.ietf.org/arch/msg/avt/pLAccHXc788wOWJ3DeeN9ugciM8
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 14:56:15 -0000

Nataraja,

s->jitter is a scaled integer value holding the actual value times 16.
If the input is a constat d = 2, then the value we are looking for
s->jitter to settle on is 32.  All of the values 2,4,6,8 are
fractional values which become 0 in rr->jitter.  You did not carry
your example sequence far enough.

                                                        -- Steve

On Wed, 26 Mar 2014, Nataraja Hosahalli 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
> Mobile: +91 99860 25262