Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] RTP Jitter calculation (Telephony->RTP Stream Analysis)

From: "RUOFF, LARS (LARS)** CTR **" <lars.ruoff@xxxxxxxxxxxxxxxxxx>
Date: Wed, 6 Apr 2011 18:46:42 +0200
Again, with the line break in the right place (i hope) 

expected_time == R(i-1) + (Si - S(i-1))

current_diff == |Ri - expected_time| == |Ri - (R(i-1) + (Si - S(i-1)))| == |D(i-1,i)|

current_jitter == (15 * J(i-1) + |D(i-1,i)|) / 16 == J(i-1) - J(i-1)/16 + |D(i-1,i)|/16 == J(i)



-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of RUOFF, LARS (LARS)** CTR **
Sent: mercredi 6 avril 2011 18:42
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] RTP Jitter calculation (Telephony->RTP Stream Analysis)

Hi,
Oh my, it's been a long time since I have written that code and i didn't check the diffs that have been contributed since, but i'll give it a try...

(Code uses real time units instead of RTP timestamp units but that doesn't matter for the argument)

Saved values from previous packet:
statinfo->time == R(i-1)
statinfo->lastnominaltime == S(i-1)
statinfo->jitter == J(i-1)

Value from current packet:
current_time == Ri
nominaltime == Si

Thus...
expected_time == R(i-1) + (Si - S(i-1))
current_diff == |Ri - expected_time| == |Ri - (R(i-1) + (Si - S(i-1)))| == |D(i-1,i)| current_jitter == (15 * J(i-1) + |D(i-1,i)|) / 16 == J(i-1) - J(i-1)/16 + |D(i-1,i)|/16 == J(i)

Bingo!

Regards,
Lars
 

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Chaswi Przellczyk
Sent: mercredi 6 avril 2011 17:12
To: Wireshark Dev
Subject: [Wireshark-dev] RTP Jitter calculation (Telephony->RTP Stream Analysis)


Dear all,

I'm trying to match
---------------------------
http://wiki.wireshark.org/RTP_statistics
---------------------------
How jitter is calculated

Wireshark calculates jitter according to RFC3550 (RTP):

If Si is the RTP timestamp from packet i, and Ri is the time of arrival in RTP timestamp units for packet i, then for two packets i and j, D may be expressed as

    * D(i,j) = (Rj - Ri) - (Sj - Si) = (Rj - Sj) - (Ri - Si) 

The interarrival jitter SHOULD be calculated continuously as each data packet i is received from source SSRC_n, using this difference D for that packet and the previous packet i-1 in order of arrival (not necessarily in sequence), according to the formula

    * J(i) = J(i-1) + (|D(i-1,i)| - J(i-1))/16 

---------------------------
to the following code from tap-rtp-common.c (rtp_packet_analyse):
---------------------------
		if( !statinfo->first_packet )
		{ /* Calculate the current jitter(in ms) */
			expected_time    = statinfo->time + (nominaltime - statinfo->lastnominaltime);
			current_diff     = fabs(current_time - expected_time);
			current_jitter   = (15 * statinfo->jitter + current_diff) / 16;

			statinfo->delta  = current_time - (statinfo->time);
			statinfo->jitter = current_jitter;
			statinfo->diff   = current_diff;
		}
		statinfo->lastnominaltime = nominaltime;

---------------------------

And I can't find (m)any similarities between the two.

Can anyone lend a hand?

Thanks!
CP.

--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe