Re: [AVTCORE] RFC3550: RTP Jitter value calculation

Kevin Gross <kevin.gross@avanw.com> Wed, 26 March 2014 13:54 UTC

Return-Path: <kevin.gross@avanw.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 1ABF71A0306 for <avt@ietfa.amsl.com>; Wed, 26 Mar 2014 06:54:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.498
X-Spam-Level:
X-Spam-Status: No, score=-0.498 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, SPF_NEUTRAL=0.779] 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 8qsmNrr59rMb for <avt@ietfa.amsl.com>; Wed, 26 Mar 2014 06:54:32 -0700 (PDT)
Received: from qmta12.emeryville.ca.mail.comcast.net (qmta12.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:44:76:96:27:227]) by ietfa.amsl.com (Postfix) with ESMTP id 365921A0326 for <avt@ietf.org>; Wed, 26 Mar 2014 06:54:32 -0700 (PDT)
Received: from omta22.emeryville.ca.mail.comcast.net ([76.96.30.89]) by qmta12.emeryville.ca.mail.comcast.net with comcast id iDdD1n0041vN32c01DuX9C; Wed, 26 Mar 2014 13:54:31 +0000
Received: from mail-yh0-f41.google.com ([209.85.213.41]) by omta22.emeryville.ca.mail.comcast.net with comcast id iDsW1n00W0u9HVt8iDsWdo; Wed, 26 Mar 2014 13:52:31 +0000
Received: by mail-yh0-f41.google.com with SMTP id v1so2074056yhn.14 for <avt@ietf.org>; Wed, 26 Mar 2014 06:52:30 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=yBZqJfnNewp6qgSxpx+E8U/fPA9YJsLaRJvsSu7gRJ8=; b=RSNjrxNMEQaMiwPI6r+5T5xTOajnmqlfVy8jlBXwpPBv75IY8GFNUhxBAxx31jJ81v sSbQkxtaDVm91KQY+pzm5PWe7R09pTjbhzzZxxC4QDpuA0fIfRM0BRuvxe1eVsbVQTqA +qwTMQ8+MM8uQMEjNu+f38V/XCV7L+dPdlG+PW7KPQ/GxikTS3pPqMnDBVeYxi3JUigG KO8iwBXyGGbE8RMqp9XrAhKqoy45wRZSJB4q9AXAUp3jTTw+28c3d6BOhsZbj8mbK7g3 UJr/lfbF8Lik3cOmlkKhu6PlIaBKriUup2daSPsgWHMZI2R7BfHV7krrUVA38npTjtg6 nBtg==
MIME-Version: 1.0
X-Received: by 10.236.19.99 with SMTP id m63mr1785110yhm.134.1395841950354; Wed, 26 Mar 2014 06:52:30 -0700 (PDT)
Received: by 10.170.216.197 with HTTP; Wed, 26 Mar 2014 06:52:29 -0700 (PDT)
In-Reply-To: <349A84ECFABF2A4F98D9102C4AFD83FA55D63BAF@IL-EXCH-01.dspg.com>
References: <349A84ECFABF2A4F98D9102C4AFD83FA55D63BAF@IL-EXCH-01.dspg.com>
Date: Wed, 26 Mar 2014 07:52:29 -0600
Message-ID: <CALw1_Q0wpm==DwcK7pfBfUccWZeyoiDS9bPO6-y3XomVhXHc5g@mail.gmail.com>
From: Kevin Gross <kevin.gross@avanw.com>
To: Nataraja Hosahalli <Nataraja.Hosahalli@dspg.com>
Content-Type: multipart/related; boundary="089e01634dd49d297e04f582c74e"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1395842071; bh=yBZqJfnNewp6qgSxpx+E8U/fPA9YJsLaRJvsSu7gRJ8=; h=Received:Received:Received:MIME-Version:Received:Date:Message-ID: Subject:From:To:Content-Type; b=odbMWXy3PwQaPK6pi/VC3WEDs0tyjNtwCSGobIrCaOmmFZieGmLsJ06JD5WUwfXbu 0mndBHn/pxEGRi6C39gaqpE5ImnvG9CTuTXj3XkJWY9KkZDfYqj6+Gs2TS2dQ15zi+ QN4pAnL0jeegee3jOn1wYVT6gekNU2cJxSD4+AkkM8EIjoQamWhBtUigB04xGmbsYX H9xV6lzTf/qJ5sP/GkqI57P3flpD7Bvb6amNiO+JZPsRT2TrFL9D+3nXzZIYm+PTyM 54dyQfZK541fSPFGRfrwRzxRHn6UjEq6zKogkT65a4azijmVivnSOEQjQ3ORq5JklV cuwDygIEHmKTw==
Archived-At: http://mailarchive.ietf.org/arch/msg/avt/zX2hJ-tZrHOCNYMb0PNsm9GDc-k
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 13:54:35 -0000

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> 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
>
>
>
> [image: 1 (Custom) (2)] <http://www.dspg.com/>
>
> [image: dsp_mal signature-Tali_180613-14] <Nataraja.Hosahalli@dspg.com>[image:
> dsp_mal signature-Tali_180613-15] <http://www.dspg.com/>[image: dsp_mal
> signature-Tali_180613-16] <https://www.facebook.com/#!/DSPGroup2013>[image:
> 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
>
>
>
>
>
>
>
>
>
>
>
>
>
> ______________________________________________________________________
> DSP Group, Inc. automatically scans all emails and attachments using
> MessageLabs Email Security System.
> _____________________________________________________________________
>
> _______________________________________________
> Audio/Video Transport Core Maintenance
> avt@ietf.org
> https://www.ietf.org/mailman/listinfo/avt
>
>