<?xml version="1.0" encoding="US-ASCII"?>
<!--used xml2rfc v1 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
]>
<rfc category="std" consensus="yes" number="7005" submissionType="IETF"
     ipr="trust200902">
  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

  <?rfc toc="yes" ?>
  <?rfc symrefs="yes" ?>
  <?rfc sortrefs="yes"?>
  <?rfc rfcedstyle="yes" ?>
  <?rfc compact="yes" ?>
  <?rfc subcompact="no" ?>

  <front>
    <title abbrev="RTCP XR Jitter Buffer">RTP Control Protocol (RTCP) Extended
    Report (XR) Block for&nbsp;De&nbhy;Jitter&nbsp;Buffer&nbsp;Metric&nbsp;Reporting</title>

    <author fullname="Alan Clark" initials="A." surname="Clark">
      <organization abbrev="Telchemy">Telchemy Incorporated</organization>

      <address>
        <postal>
          <street>2905 Premiere Parkway, Suite 280</street>

          <city>Duluth</city>

          <region>GA</region>

          <code>30097</code>

          <country>USA</country>
        </postal>

        <email>alan.d.clark@telchemy.com</email>
      </address>
    </author>

    <author fullname="Varun Singh" initials="V" surname="Singh">
      <organization>Aalto University</organization>

      <address>
        <postal>
          <street>School of Electrical Engineering</street>

          <street>Otakaari 5 A</street>

          <city>Espoo</city>

          <region>FIN</region>

          <code>02150</code>

          <country>Finland</country>
        </postal>

        <email>varun@comnet.tkk.fi</email>
      </address>
    </author>

    <author fullname="Qin Wu" initials="Q." surname="Wu">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>101 Software Avenue, Yuhua District</street>

          <city>Nanjing</city>

          <region>Jiangsu</region>

          <code>210012</code>

          <country>China</country>
        </postal>

        <email>sunseawq@huawei.com</email>
      </address>
    </author>

    <date month="September" year="2013" />

    <area>Real-time Applications and Infrastructure Area</area>

    <workgroup>Audio/Video Transport Working Group</workgroup>

    <keyword>Real Time Control Protocol</keyword>

    <abstract>
      <t>This document defines an RTP Control Protocol (RTCP) Extended Report
      (XR) block that allows the reporting of de-jitter buffer metrics for a
      range of RTP applications.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="intro" title="Introduction">
      <section title="De-Jitter Buffer Metrics Block">
        <t>This document defines a new block type to augment those defined in
        <xref target="RFC3611"></xref> for use in a range of RTP
        applications.</t>

        <t>The new block type provides information on de-jitter buffer
        configuration and performance.</t>

        <t>The metric belongs to the class of transport-related end-system
        metrics defined in <xref target="RFC6792"></xref>.</t>

        <t>Instances of this metrics block refer by synchronization source
        (SSRC) to the separate auxiliary Measurement Information Block <xref
        target="RFC6776"></xref>, which contains information such as the SSRC
        of the measured stream, and RTP sequence numbers and time intervals
        indicating the span of the report.</t>
      </section>

      <section title="RTCP and RTCP Extended Reports">
        <t>The use of RTCP for reporting is defined in <xref
        target="RFC3550"></xref>. <xref target="RFC3611"></xref> defines an
        extensible structure for reporting using an RTCP Extended Report (XR).
        This document defines a new Extended Report block for use with <xref
        target="RFC3550"></xref> and <xref target="RFC3611"></xref>.</t>
      </section>

      <section title="Performance Metrics Framework">
        <t>"Guidelines for Considering New Performance Metric Development" <xref target="RFC6390"></xref>
        provides guidance on the definition and specification of performance
        metrics. "Guidelines for Use of the RTP Monitoring Framework" <xref
        target="RFC6792"></xref> provides guidance on the reporting block format
        using RTCP XR. Metrics described in this document are in accordance with
        the guidelines in <xref target="RFC6390"></xref>and <xref
        target="RFC6792"></xref>.</t>
      </section>

      <section title="Applicability" anchor="applic">
        <t>Real-time applications employ a de-jitter buffer <xref
        target="RFC5481"></xref> to absorb jitter introduced on the path from
        source to destination. These metrics are used to report how the
        de-jitter buffer at the receiving end of the RTP stream behaves as a
        result of jitter in the network; they are applicable to a range of
        RTP applications.</t>

        <t>These metrics correspond to terminal-related factors that
        affect real-time application quality and are useful for providing a better
        end-user quality of experience (QoE) when these terminal-related
        factors are used as inputs to calculate QoE metrics <xref target="QMB"/>.</t>
      </section>
    </section>

    <section title="Standards Language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
        document are to be interpreted as described in <xref
        target="RFC2119">RFC 2119</xref>.</t>
      </section>

    <section title="De-Jitter Buffer Operation" anchor="DJB_operation">
      <t>A de-jitter buffer is required to absorb delay variation in the network
      delivery of media packets. A de-jitter buffer works by holding media
      data for a period of time after it is received and before it is played
      out. Packets that arrive early are held in the de-jitter buffer longer.
      If packets arrive too early, they may be discarded if there is no
      available de-jitter buffer space. If packets are delayed excessively by
      the network, they may be discarded if they miss their playout time.</t>

      <t>The de-jitter buffer can be considered a time window with the early
      edge aligned with the delay corresponding to the earliest arriving
      packet and the late edge representing the maximum permissible delay before a
      late arriving packet would be discarded. The delay applied to packets
      that arrive on time or at their expected arrival time is known as the
      nominal delay, and this is equivalent to the time difference/buffer size
      difference between the insertion point of the on-time packets and the point at
      which the packets are read out.</t>

      <t>The reference for the expected arrival time may be, for example, the
      first packet in the session or the running average delay. If all packets
      arrived at their expected arrival time, then every packet would be held
      in the de-jitter buffer exactly the nominal delay.</t>

      <t>The de-jitter buffer maximum delay is the delay that is applied to the
      earliest arriving packet that is not discarded and corresponds to the
      early edge of the de-jitter buffer time window.</t>

      <section title="Idealized De-Jitter Buffer">
        <t>In practice, de-jitter buffer implementations vary considerably;
        however, they should behave in a manner conceptually consistent with an
        idealized de-jitter buffer, which is described as follows:

<list style="format (%i)">
            <t>Receive the first packet and delay playout by D ms. Keep
            the RTP timestamp (TS) and receive time as a reference.

<vspace blankLines="1"/>
	    RTP TS[1]
<vspace blankLines="1"/>
	    receive time[1]
<vspace blankLines="1"/>
            Assume that both are normalized in ticks (there are 10,000 ticks in a
            millisecond).</t>

            <t>Receive the next packet.</t>

            <t>Calculate r = RTP TS[n] - RTP TS[1] and t = receive
            time[n] - receive time[1]. If r == t, then the packet arrived on
            time. If r &lt; t, then the packet arrived late, and if r &gt; t,
            then the packet arrived early.</t>

            <t>Delay playout of packet by D + (r-t).</t>

            <t>Go back to (ii).</t>
          </list></t>

        <t>Note that this idealized implementation assumes that the sender's
        RTP clock is synchronized to the clock in the receiver, which is used
        to timestamp packet arrivals. If there is no such inherent
        synchronization, the system may need to use an adaptive de-jitter
        buffer or other techniques to ensure reliable reception.</t>
      </section>

      <section title="Fixed De-Jitter Buffer">
        <t>A fixed de-jitter buffer lacks provision to track the condition of the network
        and has a fixed size, and packets leaving the de-jitter buffer have a
        constant delay. For fixed de-jitter buffer implementation, the nominal
        delay is set to a constant value corresponding to the packets that
        arrive at their expected arrival time, while the maximum delay is set
        to a constant value corresponding to the fixed size of the de-jitter
        buffer.</t>
      </section>

      <section title="Adaptive De-Jitter Buffer">
        <t>An adaptive de-jitter buffer can adapt to the change in the
        network's delay and has variable size or variable delay. It allows the
        nominal delay to be set to a low value initially to minimize user
        perceived delay; however, it can automatically extend the late edge (and
        possibly also retract the early edge) of a buffer window if a
        significant proportion of the packets are arriving late (and hence being
        discarded).</t>
      </section>
    </section>

    <section title="De-Jitter Buffer Metrics Block" anchor="DJBMB">
      <t>This block describes the configuration and operating parameters of
      the de-jitter buffer in the receiver of the RTP end system or RTP mixer
      that sends the report. Instances of this metrics block use the SSRC to
refer to 
      the separate auxiliary Measurement Information Block <xref
      target="RFC6776"></xref>, which describes the measurement periods in
      use (see <xref target="RFC6776"/>, Section 4.2). This metrics block relies on the measurement interval in the
      Measurement Information Block indicating the span of the report and MUST
      be sent in the same compound RTCP packet as the Measurement Information
      Block. If the measurement interval is not received in the same compound
      RTCP packet as this metrics block, this metrics block MUST be
      discarded.</t>

      <section title="Report Block Structure">
        <t>De-Jitter Buffer (DJB) Metrics Block<figure
            title="Figure 1: Report Block Structure">
            <artwork>
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     BT=23    | I |C|  resv    |       Block Length=3          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           SSRC of Source                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |          DJB nominal          |        DJB maximum            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     DJB high-water mark       |      DJB low-water mark       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
          </figure></t>
      </section>

      <section title="Definition of Fields in De-Jitter Buffer Metrics Block" anchor="def_fields">
        <t><list style="hanging">
            <t hangText="Block Type (BT): 8 bits"><vspace blankLines="1" /> A
            De-Jitter Buffer Metrics Report Block is identified by the
            constant 23.<vspace blankLines="1" /></t>

            <t hangText="Interval Metric flag (I): 2 bits"><vspace
            blankLines="1" />This field is used to indicate whether the
            de-jitter buffer metrics are Sampled, Interval, or Cumulative
            metrics: <list>
                <t>I=01: Sampled Value - the reported value is a sampled
                instantaneous value.</t>

                <t>I=10: Interval Duration - the reported value applies to the
                most recent measurement interval duration between successive
                metrics reports.</t>

                <t>I=11: Cumulative Duration - the reported value applies to
                the accumulation period characteristic of cumulative
                measurements.</t>
              </list>In this document, de-jitter buffer metrics can only be
            sampled and cannot be measured over definite intervals. Also,
            the value I=00 is reserved for future use. Senders MUST NOT use
            the values I=00, I=10, or I=11. If a block is received with I=00,
            I=10, or I=11, the receiver MUST discard the block.
<vspace blankLines="1" />
</t>

            <t hangText="Jitter Buffer Configuration (C): 1 bit"><vspace
            blankLines="1" /> This field is used to identify the de-jitter
            buffer method in use at the receiver, according to the following
            code:<list>
                <t>0 = Fixed de-jitter buffer</t>

                <t>1 = Adaptive de-jitter buffer</t>
              </list>
<vspace blankLines="1" /></t>

            <t hangText="Reserved (resv): 5 bits"><vspace
            blankLines="1" />These bits are reserved. They MUST be set to zero
            by senders and ignored by receivers (see <xref
            target="RFC6709"></xref>, Section 4.2). <vspace
            blankLines="1" /></t>

            <t hangText="Block Length: 16 bits"><vspace blankLines="1" />The
            length of this report block in 32-bit words, minus one, in
            accordance with the definition in <xref target="RFC3611"></xref>.
            This field MUST be set to 3 to match the fixed length of the
            report block. <vspace blankLines="1" /></t>

<t hangText="SSRC of Source: 32 bits">
<vspace blankLines="1" />
      As defined in Section 4.1 of <xref target="RFC3611"></xref>.
<vspace blankLines="1" /></t>

            <t
            hangText="De-jitter buffer nominal delay (DJB nominal): 16 bits"><vspace
            blankLines="1" />This is the current nominal de-jitter buffer
            delay (in milliseconds) that corresponds to the nominal de-jitter
            buffer delay for packets that arrive exactly on time. It is
            calculated based on the time spent in the de-jitter buffer for the
            packet that arrives exactly on time. This parameter MUST be
            provided for both fixed and adaptive de-jitter buffer
            implementations.</t>

	    <t>The measured value is an 
            unsigned value. If the measured value exceeds 0xFFFD, the value
            0xFFFE MUST be reported to indicate an over-range measurement. If
            the measurement is unavailable, the value 0xFFFF MUST be
            reported.
<vspace blankLines="1" /></t>

            <t
            hangText="De-jitter buffer maximum delay (DJB maximum): 16 bits"><vspace
            blankLines="1" />This is the current maximum de-jitter buffer
            delay (in milliseconds) that corresponds to the earliest arriving
            packet that would not be discarded. It is calculated based on the
            time spent in the de&nbhy;jitter buffer for the earliest arriving
            packet. In simple queue implementations, this may correspond to the
            size of the de&nbhy;jitter buffer. In adaptive de-jitter buffer
            implementations, this value may vary dynamically. This parameter
            MUST be provided for both fixed and adaptive de-jitter buffer
            implementations. </t>

	    <t>The measured value is
            an unsigned value. If the measured value exceeds 0xFFFD, the value
            0xFFFE MUST be reported to indicate an over-range measurement. If
            the measurement is unavailable, the value 0xFFFF MUST be
            reported.</t>

            <t
            hangText="De-jitter buffer high-water mark (DJB high-water mark):
16 bits"><vspace blankLines="1" />This is the highest value of the de-jitter
buffer 
            nominal delay (in milliseconds) that occurred at any time during
            the reporting interval. This parameter MUST be provided for
            adaptive de-jitter buffer implementations, and its value MUST be
            set to DJB maximum for fixed de-jitter buffer implementations.
            </t>
	    <t>The measured value is an unsigned value. If
            the measured value exceeds 0xFFFD, the value 0xFFFE MUST be
            reported to indicate an over-range measurement. If the measurement
            is unavailable, the value 0xFFFF MUST be reported.
<vspace blankLines="1" />
</t>

            <t
            hangText="De-jitter buffer low-water mark (DJB low-water mark): 16 bits"><vspace
            blankLines="1" />This is the lowest value of the de-jitter buffer
            nominal delay (in milliseconds) that occurred at any time during
            the reporting interval. This parameter MUST be provided for
            adaptive de-jitter buffer implementations, and its value MUST be
            set to DJB maximum for fixed de-jitter buffer implementations.
            </t>
	    <t>The measured value is an unsigned value. If
            the measured value exceeds 0xFFFD, the value 0xFFFE MUST be
            reported to indicate an over-range measurement. If the measurement
            is unavailable, the value 0xFFFF MUST be reported.</t>
          </list></t>
      </section>
    </section>

    <section title="SDP Signaling">
      <t>[RFC3611] defines the use of the Session Description Protocol (SDP) <xref
      target="RFC4566"></xref> for signaling the use of XR blocks. However, XR
      blocks MAY be used without prior signaling (see Section 5 of
      RFC 3611).</t>

      <section title="SDP rtcp-xr-attrib Attribute Extension">
        <t>This section augments the SDP <xref target="RFC4566"></xref>
        attribute "rtcp-xr" defined in <xref target="RFC3611"></xref> by
        providing an additional value of "xr-format" to signal the use of the
        report block defined in this document.<figure>
            <artwork>
xr-format =/ xr-djb-block

xr-djb-block = "de-jitter-buffer"
</artwork>
          </figure></t>
      </section>

      <section title="Offer/Answer Usage">
        <t>When SDP is used in Offer/Answer context <xref
        target="RFC3264"></xref>, the SDP Offer/Answer usage defined in <xref
        target="RFC3611"></xref> for unilateral "rtcp-xr" attribute parameters
        applies. For detailed usage of Offer/Answer for unilateral parameters,
        refer to Section 5.2 of <xref target="RFC3611"></xref>.</t>
      </section>
    </section>

    <section title="IANA Considerations">
      <t>New block types for RTCP XR are subject to IANA registration. For
      general guidelines on IANA considerations for RTCP XR, refer to <xref
      target="RFC3611"></xref>.</t>

      <section title="New RTCP XR Block Type Value">
        <t>This document assigns the block type value 23 in the IANA "RTP
        Control Protocol Extended Reports (RTCP XR) Block Type Registry" to
        the "De-Jitter Buffer Metrics Block".</t>

      </section>

      <section title="New RTCP XR SDP Parameter">
        <t>This document also registers a new parameter "de-jitter-buffer" in
        the "RTP Control Protocol Extended Reports (RTCP XR) Session
        Description Protocol (SDP) Parameters Registry".</t>
      </section>

      <section title="Contact Information for Registrations">
        <t>The contact information for registrations is:<figure>
            <artwork>
Qin Wu (sunseawq@huawei.com)
101 Software Avenue, Yuhua District
Nanjing, Jiangsu  210012
China
</artwork>
          </figure></t>
      </section>
    </section>

    <section title="Security Considerations">
      <t>It is believed that this RTCP XR block introduces no
      new security considerations beyond those described in <xref
      target="RFC3611"></xref>. This block does not provide per-packet
      statistics, so the risk to confidentiality documented in Section 7,
      paragraph 3 of <xref target="RFC3611"></xref> does not apply.</t>
    </section>

    <section title="Contributors">
      <t>Geoff Hunt wrote the initial draft of this document.</t>
    </section>

    <section title="Acknowledgments">
      <t>The authors gratefully acknowledge reviews and feedback provided by
      Bruce Adams, Philip Arden, Amit Arora, Claire Bi, Bob Biskner, Benoit
      Claise, Kevin Connor, Claus
      Dahm, Spencer Dawkins, Randy Ethier, Roni Even, Jim Frauenthal, Kevin Gross, Albert Higashi, Tom Hock,
      Shane Holthaus, Paul Jones, Rajesh Kumar, Keith Lantz, Mohamed Mostafa,
      Amy Pendleton, Colin Perkins, Mike Ramalho, Ravi Raviraj, Dan
      Romascanu, Albrecht
      Schwarz, Tom Taylor, Hideaki Yamada, and Glen Zorn.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      
  <?rfc include="reference.RFC.2119" ?>
  <?rfc include="reference.RFC.3264" ?>
  <?rfc include="reference.RFC.3611" ?>
  <?rfc include="reference.RFC.3550" ?>
  <?rfc include="reference.RFC.4566" ?>
  <?rfc include="reference.RFC.6776" ?>

    </references>

    <references title="Informative References">
     
  <?rfc include="reference.RFC.5481" ?>
  <?rfc include="reference.RFC.6390" ?>
  <?rfc include="reference.RFC.6709" ?>
  <?rfc include="reference.RFC.6792" ?>


<!-- draft-ietf-xrblock-rtcp-xr-qoe-08, Active -->
      <reference anchor="QMB">
        <front>
          <title>RTP Control Protocol (RTCP) Extended Report (XR) Blocks for
          QoE Metric Reporting</title>

          <author fullname="Alan Clark" initials="A." surname="Clark">
            <organization></organization>
          </author>

          <date month="May" year="2013" />
        </front>

        <seriesInfo name="Work in" value="Progress" />
      </reference>
    </references>

    <section title="Metrics Represented Using the Template from RFC 6390">

      <t><list style="letters">
          <t>De-Jitter Buffer Nominal Delay Metric<list style="symbols">
              <t>Metric Name: De-jitter buffer nominal delay in RTP</t>

              <t>Metric Description: The "expected arrival time" is the time
              that an RTP packet would arrive if there was no delay variation.
              The delay applied to packets that arrive at their expected time
              is known as the Nominal Delay. </t>

              <t>Method of Measurement or Calculation: See <xref target="def_fields"/>,
              de&nbhy;jitter buffer nominal delay definition.</t>

              <t>Units of Measurement: See <xref target="def_fields"/>, de-jitter buffer
              nominal delay definition.</t>

              <t>Measurement Point(s) with Potential Measurement Domain: See
              <xref target="DJBMB"/>. </t>

              <t>Measurement Timing: See <xref target="DJBMB"/>
              for measurement timing and <xref target="def_fields"/> for
              Interval Metric flag. </t>

              <t>Use and Applications: See <xref target="applic"/>.</t>

              <t>Reporting Model: See RFC 3611.</t>
            </list></t>

          <t>De-Jitter Buffer Maximum Delay Metric<list style="symbols">
              <t>Metric Name: De-jitter buffer maximum delay in RTP.</t>

              <t>Metric Description: It is the current maximum de-jitter
              buffer delay for RTP traffic that corresponds to the earliest
              arriving packet that would not be discarded. </t>

              <t>Method of Measurement or Calculation: See <xref target="def_fields"/>,
              de&nbhy;jitter buffer maximum delay definition and <xref target="DJB_operation"/>, the
              last paragraph.</t>

              <t>Units of Measurement: See <xref target="def_fields"/>, de-jitter buffer
              maximum delay definition.</t>

              <t>Measurement Point(s) with Potential Measurement Domain: See
              <xref target="DJBMB"/>.</t>

              <t>Measurement Timing: See <xref target="DJBMB"/>
              for measurement timing and <xref target="def_fields"/> for
              Interval Metric flag. </t>

              <t>Use and Applications: See <xref target="applic"/>.</t>

              <t>Reporting Model: See RFC 3611.</t>
            </list></t>

          <t>De-Jitter Buffer High-Water Mark Metric<list style="symbols">
              <t>Metric Name: De-jitter buffer high-water mark in RTP.</t>

              <t>Metric Description: It is the highest value of the de-jitter
              buffer nominal delay for RTP traffic which occurred at any time
              during the reporting interval.</t>

              <t>Method of Measurement or Calculation: See <xref target="def_fields"/>,
              de&nbhy;jitter buffer high-water mark definition.</t>

              <t>Units of Measurement: See <xref target="def_fields"/>, de-jitter buffer
              nominal delay definition.</t>

              <t>Measurement Point(s) with Potential Measurement Domain: See
              <xref target="DJBMB"/>.</t>

              <t>Measurement Timing: See <xref target="DJBMB"/>
              for measurement timing and <xref target="def_fields"/> for
              Interval Metric flag. </t>

              <t>Use and Applications: See <xref target="applic"/>.</t>

              <t>Reporting Model: See RFC 3611.</t>
            </list></t>

          <t>De-Jitter Buffer Low-Water Mark Metric<list style="symbols">
              <t>Metric Name: De-jitter buffer low-water mark in RTP.</t>

              <t>Metric Description: It is the lowest value of the de-jitter
              buffer nominal delay (for RTP traffic) that occurred at any time
              during the reporting interval. </t>

              <t>Method of Measurement or Calculation: See <xref target="def_fields"/>,
              de&nbhy;jitter buffer low-water mark definition.</t>

              <t>Units of Measurement: See <xref target="def_fields"/>, de-jitter buffer low
              water mark definition.</t>

              <t>Measurement Point(s) with Potential Measurement Domain: See
              <xref target="DJBMB"/>, 1st paragraph.</t>

              <t>Measurement Timing: See <xref target="DJBMB"/>
              for measurement timing and <xref target="def_fields"/> for
              Interval Metric flag.</t>

              <t>Use and Applications: See <xref target="applic"/>.</t>

              <t>Reporting Model: See RFC 3611.</t>
            </list></t>
        </list></t>
    </section>

   
  
  </back>
</rfc>
