<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced. 
     An alternate method (rfc include) is described in the references. -->
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2326 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2326.xml">
<!ENTITY RFC2974 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2974.xml">
<!ENTITY RFC3264 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3264.xml">
<!ENTITY RFC3550 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3550.xml">
<!ENTITY RFC3551 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3551.xml">
<!ENTITY RFC4175 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4175.xml">
<!ENTITY RFC4855 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4855.xml">
<!ENTITY RFC5234 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml">
<!ENTITY RFC5371 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5371.xml">
<!ENTITY RFC5888 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5888.xml">
<!ENTITY RFC6838 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6838.xml">
<!ENTITY I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-ietf-payload-rtp-ancillary-05"
     ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

    <title abbrev="RTP Payload for Ancillary Data">RTP Payload for SMPTE ST
    291 Ancillary Data</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Thomas G. Edwards" initials="T.G." surname="Edwards">
      <organization>FOX</organization>

      <address>
        <postal>
          <street>10201 W. Pico Blvd.</street>

          <!-- Reorder these if your country does things differently -->

          <city>Los Angeles</city>

          <region>CA</region>

          <code>90035</code>

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

        <phone>+1 310 369 6696</phone>

        <email>thomas.edwards@fox.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <date month="August" year="2016"/>

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
         in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>General</area>

    <workgroup>A/V Transport Payloads Working Group</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>template</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>This memo describes an RTP Payload format for SMPTE Ancillary data,
      as defined by SMPTE ST 291-1. SMPTE Ancillary data is generally used along with professional video formats to carry a
      range of ancillary data types, including time code, Closed
      Captioning, and the Active Format Description (AFD).</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>This memo describes an RTP Payload format for the Society of Motion Picture and Television Engineers (SMPTE) Ancillary data (ANC),
        as defined by <xref target="ST291">SMPTE ST 291-1</xref>. ANC can carry a
      range of data types, including time code, Closed
      Captioning, and the Active Format Description (AFD).</t>
      
      <t>ANC is
      generally associated with the carriage of metadata within the bit stream
      of a Serial Digital Interface (SDI) such as
        <xref target="ST259">SMPTE ST 259</xref>,
      the standard definition (SD) Serial Digital Interface (with ANC data inserted as per 
        <xref target="ST125">SMPTE ST 125</xref>), or 
        <xref target="ST292">SMPTE ST 292-1</xref>,
        the 1.5 Gb/s
      Serial Digital Interface for high definition (HD) television applications.</t>
      
      <t>ANC data packet
      payload definitions for a specific application are specified by a SMPTE
      Standard, Recommended Practice, Registered Disclosure Document, or by
      a document generated by another organization, a company, or an
      individual (an Entity). When a payload format is registered with SMPTE,
      an application document describing the payload format is required, and
      the registered ancillary data packet is identified by a registered data
      identification word.</t>
      
      <t>This memo describes an RTP payload that supports ANC data packets
      regardless of whether they originate from an SD or HD interface, or if
      the ANC data packet is from the vertical ancillary space (VANC) or the horizontal ancillary space (HANC), or if the ANC packet is located in the luma (Y) or color-difference (C) channel. Sufficient
      information is provided to enable the ANC data packets at the output of the
      decoder to be restored to their original locations in the
      serial digital video signal raster (if that is desired).</t>
      
      <t>It should be noted that the ancillary data flag (ADF) word is not specifically carried in this RTP payload.  The ADF may be specified in a document defining an interconnecting digital video interface,
          otherwise a default ADF is specified by <xref target="ST291">SMPTE ST 291-1</xref>.</t>
      
      <t>This ANC payload
      can be used by itself, or used along with a range of RTP video formats.  In particular, it
      has been designed so that it could be used along with
        <xref target="RFC4175">RFC 4175</xref>
      "RTP Payload Format for Uncompressed Video" or 
        <xref target="RFC5371">RFC 5371</xref>
      "RTP Payload Format for JPEG 2000 Video Streams."</t>
      <t>The data model in this document for the ANC data RTP payload is based on the data model of <xref target="ST2038">SMPTE ST 2038</xref>, which standardizes the carriage of ANC data packets in an MPEG-2 Transport Stream.</t>
      
      <section title="Requirements 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>

    <section anchor="payload_format" title="RTP Payload Format for SMPTE ST 291 Ancillary Data">
 
      <t>The format of an RTP packet containing SMPTE ST 291 Ancillary Data is shown below:</t>
<figure align="center" anchor="rtp_payload_figure" title="SMPTE Ancillary Data RTP Packet Format">
<artwork align="center">
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|V=2|P|X| CC    |M|    PT       |        sequence number        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           timestamp                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           synchronization source (SSRC) identifier            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Extended Sequence Number    |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ANC_Count     |C|   Line_Number       |   Horizontal_Offset   | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        DID        |        SDID       |   Data_Count      | R |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 		    	     User_Data_Words...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Checksum_Word   |                word_align                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   (next ANC data packet)...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
      </figure>
      <t>RTP packet header fields SHALL be interpreted as per <xref target="RFC3550">RFC 3550</xref>, with the following specifics:
        <list hangIndent="8" style="hanging">
          <t hangText="Timestamp: 32 bits"><vspace blankLines="0"/>The timestamp field is interpreted in a similar fashion to <xref target="RFC4175">RFC 4175</xref>:</t>
          <t>For progressive scan video, the timestamp SHALL denote the sampling instant of the frame to which the ancillary data in the RTP packet belongs.  RTP packets MUST NOT include ANC data from multiple frames, and all RTP packets with ANC data belonging to the same frame MUST have the same timestamp.</t>
          <t>For interlaced video, the timestamp SHALL denote the sampling instant of the field to which the ancillary data in the RTP packet belongs.  RTP packets MUST NOT include ANC data from multiple fields, and all RTP packets belonging to the same field MUST have the same timestamp.</t>
          <t>If the sampling instant does not correspond to an integer value of the clock, the value SHALL be truncated to the next lowest integer, with no ambiguity.  Section 3.1 describes recommended timestamp clock rates.</t>
          <t hangText="Marker bit (M): 1 bit"><vspace blankLines="0"/>The marker bit set to "1" SHALL indicate the last ANC RTP packet for a frame (for progressive scan video)
            or the last ANC RTP packet for a field (for interlaced video).</t>
        </list></t>
    
      <section title="Payload Header Definitions">
      <t>The ANC RTP payload header fields are defined as:
      <list hangIndent="8" style="hanging">
        <t hangText="Extended Sequence Number: 16 bits"><vspace blankLines="0"/>
          The high order bits of the extended 32-bit sequence number, in network byte order.  This is the same as the Extended Sequence Number field in <xref target="RFC4175">RFC 4175</xref>.
        </t>
        <t hangText="Length: 16 bits"><vspace blankLines="0"/>Number of octets of the ANC RTP payload, beginning with the "C" bit of the first ANC packet data.</t>
         <t hangText="ANC_Count: 8 bits"><vspace blankLines="0"/>This field is the count of the total number of ANC data packets carried in the RTP payload.  A single ANC RTP packet payload SHALL NOT carry more than 255 ANC data packets.<vspace blankLines="0"/>
             If more than 255 ANC data packets need to be carried in a field or frame, additional
             RTP packets carrying ANC data may be sent with the same RTP timestamp but with
             different sequence numbers.  ANC_Count of 0 SHALL indicate that there are no ANC data
             packets in the payload (for example, for an RTP packet with the marker
            bit set indicating the last ANC RTP packet in a field/frame, even if that RTP packet carries no
            actual ANC data packets.)</t>
      </list></t>
        <t>For each ANC data packet in the payload, the following ANC data packet header fields MUST be present:
        <list hangIndent="8" style="hanging">
        <t hangText="C: 1 bit"><vspace blankLines="0"/>For HD signals, this flag, when set to "1", indicates that the ANC data corresponds to the color-difference channel (C).
          When set to "0", this flag indicates that the ANC data corresponds to the luma (Y) channel. For SD signals, this flag SHALL be set to "0".</t>
        <t hangText="Line_Number: 11 bits"><vspace blankLines="0"/>This field contains the line number (as defined in <xref target="BT1700">ITU-R BT.1700</xref> for SD video or <xref target="BT1120">ITU-R BT.1120</xref> for HD video) that corresponds to the location of the ANC data packet in an SDI raster. A value of 0x7FF
            (all bits in the field are '1') SHALL indicate that the ANC data is carried without
            a specific line location within the field or frame.</t>
            <t>Note that the lines that are available to convey ANC data are as defined in the applicable sample structure specification (e.g., <xref target="ST274">SMPTE 274M</xref>, <xref target="ST296">SMPTE ST 296</xref>, <xref target="BT656">ITU-R BT.656</xref>) and may be further restricted per <xref target="RP168">SMPTE RP 168</xref>. </t>
        <t hangText="Horizontal_Offset: 12 bits"><vspace blankLines="0"/>This field defines the location of the ANC data packet in an SDI raster relative to the start of active video (SAV). A value of 0 means that the Ancillary Data Flag (ADF) of the ANC data packet begins immediately following SAV. For HD, this SHALL be in units of luma sample numbers as specified by the defining document of the particular image (e.g., <xref target="ST274">SMPTE 274M</xref> for 1920 x 1080 active images, or <xref target="ST296">SMPTE ST 296</xref> for 1280 x 720 progressive active images). For SD, this SHALL be in units of (27MHz) multiplexed word numbers, as specified in <xref target="ST125">SMPTE ST 125</xref>.  A value of 0xFFF (all bits in the field are '1') SHALL indicate that the ANC data is carried without any specific location within the line.</t>
            <t>Note that HANC space in the digital blanking area will generally have higher luma sample numbers than any samples in the active digital line.</t>
        </list></t>
        <t>An ANC data packet with the header fields Line_Number of 0x7FF and Horizontal_Offset of 0xFFF SHALL be considered to be carried without any specific location within the field or frame, and in such
            a case the "C" field SHALL be ignored.</t>
        <t>For each ANC data packet in the payload, immediately after the ANC data packet header fields, the following data fields MUST be present, with
        the fields DID, SDID, Data_Count, User_Data_Words, and Checksum_Word representing the 10-bit words carried in the ANC data packet, as per <xref target="ST291">SMPTE ST 291-1</xref>:
          <list hangIndent="8" style="hanging">
            <t hangText="DID: 10 bits"><vspace blankLines="0"/>Data Identification Word</t>
            <t hangText="SDID: 10 bits"><vspace blankLines="0"/>Secondary Data Identification Word.  Used only for a "Type 2" ANC data packet.  Note that in a "Type 1" ANC data packet, this word will actually carry the Data Block Number (DBN).</t>
            <t hangText="Data_Count: 10 bits"><vspace blankLines="0"/>The lower 8 bits of Data_Count, corresponding to bits b7 (MSB) through b0 (LSB) of the 10-bit Data_Count word, contain the actual count of 10-bit words in User_Data_Words.  Bit b8 is the even parity for bits b7 through b0, and bit b9 is the inverse (logical NOT) of bit b8.</t>
            <t hangText="R: 2 reserved bits"><vspace blankLines="0"/>R is a field of two reserved bits that MUST be set to zero.</t>
            <t hangText="User_Data_Words: integer number of 10 bit words"><vspace blankLines="0"/>User_Data_Words (UDW) are used to convey information of a type as identified by the DID word or the DID and SDID words.  The number of 10-bit words in the UDW is defined by the Data_Count field.</t>
            <t hangText="Checksum_Word: 10 bits"><vspace blankLines="0"/>The Checksum_Word can be used to determine the validity of the ANC data packet from the DID word through the UDW.  It consists of 10 bits, where bits b8 (MSB) through b0 (LSB) define the checksum value and
                bit b9 is the inverse (logical NOT) of bit b8.  The checksum value is equal to the nine least significant bits of the sum of the nine least significant bits of the DID word, the SDID word, the Data_Count word, and all User_Data_Words in the ANC data packet.  The checksum is initialized to zero before calculation, and any end carry resulting from the checksum calculation is ignored.</t>
            <t hangText="word_align: bits as needed to complete 32-bit word"><vspace blankLines="0"/>Word align contains enough "0" bits as needed to complete the last 32-bit word of ANC packet's data in the RTP payload.  If an ANC data packet in the RTP payload ends aligned with a word boundary,
                there is no need to add any word alignment bits.  Word align should be used even for the last ANC data packet in an RTP packet.</t>
          </list></t> 
        <t>When reconstructing an SDI signal based on this payload, it is important to place ANC data packets into the locations indicated by the ANC payload header fields Line_Number and
            Horizontal_Offset, and also to follow the requirements of
            <xref target="ST291">SMPTE ST 291-1</xref> Section 7 "Ancillary Data Space Formatting (Component or Composite Interface)", which include rules on the placement of initial ANC data into allowed
                spaces as well as the contiguity of ANC data packet sequences within those spaces in order to assure
                that the resulting ANC data packets in the SDI signal are valid.</t>
        <t>Senders of this payload SHOULD transmit available ANC data packets as soon as practical to reduce end-to-end latency, especially if receivers will be
            embedding the received ANC data packet into an SDI signal emission. One millisecond is a reasonable upper bound for the amount of time between when an ANC
            data packet becomes available to a sender and the emission of an RTP payload containing that ANC data packet.</t>
        <t>ANC data packets with headers that specify specific location within a field or frame SHOULD be sent in raster scan order, both in terms of packing
            position within an RTP packet and in terms of transmission time of RTP packets.</t>
    </section>
    </section>
    <section title="Payload Format Parameters">
      <t>This RTP payload format is identified using the video/smpte291 media type, which is registered in accordance with <xref target="RFC4855">RFC 4855</xref>, and using the template of <xref target="RFC6838">RFC 6838</xref>.</t>
      <t>Note that the Media Type Definition is in the "video" tree due to the expected use of SMPTE ST 291 Ancillary Data along with video formats.</t>
      <section title="Media Type Definition" anchor="media_type_definition">
     
        <t>Type name: video</t>
        <t>Subtype name: smpte291</t>
        <t>Required parameters:
        <list>
          <t>Rate: RTP timestamp clock rate.  When an ANC RTP stream is to be associated with an RTP video stream, the RTP timestamp rates SHOULD be the same to ensure that ANC data packets can be associated with the appropriate frame or field.  Otherwise, a 90 kHz rate SHOULD be used.</t>
        </list></t>
        <t>Optional parameters:
        <list>
          <t>DID_SDID: Data identification and Secondary data identification words.</t>

          <t>The presence of the DID_SDID parameters signals that all ancillary data packets of this stream are of a particular type or types, i.e., labeled with a particular DIDs and SDIDs.
              DID and SDID values of SMPTE Registered ANC packet types can be found on the SMPTE Registry for Data Identification Word Assignments at:</t>
          <t><eref target="http://www.smpte-ra.org/smpte-ancillary-data-smpte-st-291">http://www.smpte-ra.org/smpte-ancillary-data-smpte-st-291</eref></t>
          <t> "Type 1" ANC packets (which do not have SDIDs defined) SHALL be labeled with SDID=0x00.</t>
          <t>DID and SDID values can be registered with SMPTE as per <xref target="ST291">SMPTE ST 291-1</xref>.</t>
          </list></t>
        <t>Encoding considerations:  This media type is framed and binary; see Section 4.8 of <xref target="RFC6838">RFC 6838</xref>.</t>
        <t>Security considerations: See Section <xref target="Security" format="counter"></xref> of [this RFC]</t>
        <t>Interoperability considerations:  Data items in smpte291 can be very diverse.  Receivers might only be capable of interpreting a subset of the possible data items.  Some implementations may care about the location of the ANC data packets in the SDI raster, but other implementations may not care.</t>
        <t>Published specification:  [this RFC]</t>
        <t>Applications that use this media type:  Devices that stream real-time professional video, especially those that must interoperate with legacy serial digital interfaces (SDI).</t>
        <t>Additional Information:
            <list>
            <t>Deprecated alias names for this type: N/A</t>
            <t>Magic number(s): N/A</t>
            <t>File extension(s): N/A</t>
            <t>Macintosh file type code(s): N/A</t>
            </list>
        </t>
        <t>Person &amp; email address to contact for further information: T. Edwards &lt;thomas.edwards@fox.com&gt;, IETF Payload Working Group &lt;payload@ietf.org&gt;</t>
        <t>Intended usage: COMMON</t>
        <t>Restrictions on usage:  This media type depends on RTP framing, and hence is only defined for transfer via RTP <xref target="RFC3550">RFC 3550</xref>.  Transport within other framing protocols is not defined at this time.</t>
        <t>Author: T. Edwards &lt;thomas.edwards@fox.com&gt;</t>
        <t>Change controller:  IETF Audio/Video Transport Payloads working group delegated
            from the IESG.</t>
      </section>
      
    <section title="Mapping to SDP">
      <t>The mapping of the above defined payload format media type and its parameters SHALL be done according to Section 3 of <xref target="RFC4855">RFC 4855</xref>.</t>
      <t><list style="symbols">
        <t>The type name ("video") goes in SDP "m=" as the media name.</t>
        
        <t>The subtype name ("smpte291") goes in SDP "a=rtpmap" as
          the encoding name.</t>
        <t>The optional DID_SDID parameters go in the SDP "a=fmtp" attribute as a semicolon-separated list of parameter=value pairs.</t>
      </list></t>
      <t>DID and SDID values SHALL be specified in hexadecimal with a "0x" prefix (such as "0x61").
          The ABNF as per <xref target="RFC5234">RFC 5234</xref> of the fmtp line shall be:</t>
          <figure>
            <artwork>
        TwoHex = "0x" 1*2(HEXDIG)
        DidSdid = "DID_SDID={" TwoHex "," TwoHex "}"
        FormatSpecificParameters = DidSdid *(";" DidSdid)
           </artwork>
          </figure>
          <t>For example, EIA 608 Closed Caption data would be signalled with the parameter DID_SDID={0x61,0x02}.  If a DID_SDID parameter is not specified, then the ancillary data stream may potentially contain ancillary data packets of any type.</t>
      <t>Multiple DID_SDID parameters may be specified (separated by semicolons) to signal the presence of multiple types of ANC data in the stream. DID_SDID={0x61,0x02};DID_SDID={0x41,0x05}, for example,
          signals the presence of EIA 608 Closed Captions as well as AFD/Bar Data.</t>
      
      <t>A sample SDP mapping for ancillary data is as follows:</t>
      <figure><artwork>
        m=video 30000 RTP/AVP 112
        a=rtpmap:112 smpte291/90000
        a=fmtp:112 DID_SDID={0x61,0x02};DID_SDID={0x41,0x05}</artwork>
      </figure>
      <t>In this example, a dynamic payload type 112 is used for ancillary data.  The 90 kHz RTP timestamp rate is specified in the "a=rtpmap" line after the subtype.  The RTP sampling clock is 90 kHz.  In the "a=fmtp:" line, DID 0x61 and SDID 0x02 are specified (registered to EIA 608 Closed Caption Data by SMPTE), and also DID 0x41 and SDID 0x05 (registered to AFD/Bar Data).</t>
      <section title="Grouping ANC data RTP Streams with Associated Video Streams">
          <t>The ANC RTP payload format will often be used in groupings with associated video essence streams.  Any legal SDP grouping mechanism could be used.  Implementers may wish to use the Lip Synchronization (LS) grouping defined in <xref target="RFC5888">RFC 5888</xref>, which requires that "m" lines that are grouped together using LS semantics MUST synchronize the playout of the corresponding media streams.
          </t>
          <t>A sample SDP mapping for grouping ANC data with RFC 4175 video using LS semantics is as follows:</t>
          <figure><artwork>
        v=0
        o=Al 123456 11 IN IP4 host.example.com
        s=Professional Networked Media Test
        i=A test of synchronized video and ANC data
        t=0 0
        a=group:LS V1 M1
        m=video 50000 RTP/AVP 96
        c=IN IP4 233.252.0.1/255
        a=rtpmap:96 raw/90000
        a=fmtp:96 sampling=YCbCr-4:2:2; width=1280; height=720; depth=10
        a=mid:V1
        m=video 50010 RTP/AVP 97
        c=IN IP4 233.252.0.2/255
        a=rtpmap:97 smpte291/90000
        a=fmtp:97 DID_SDID={0x61,0x02};DID_SDID={0x41,0x05}
        a=mid:M1
          </artwork>
          </figure>
      </section>
    </section>
    <section title="Offer/Answer Model and Declarative Considerations">
      <t>Receivers may with to receive ANC data streams with specific DID_SDID parameters.  Thus
         when offering ANC data streams using the Session Description Protocol (SDP) in an Offer/Answer model <xref target="RFC3264"></xref> or in a declarative manner
        (e.g., SDP in the Real-Time Streaming Protocol (RTSP) <xref target="RFC2326"></xref> or the Session Announcement Protocol (SAP) <xref target="RFC2974"></xref>), the offerer may provide a list of ANC streams available with specific DID_SDID parameters in the fmtp line. The answerer may respond with a all or a subset of the streams offered along with fmtp lines with all or a subset of the DID_SDID parameters offered.  Or the answerer may reject the offer.</t>
    </section>
    </section>
  
    <section anchor="IANA" title="IANA Considerations">
      <t>One media type (video/smpte291) has been defined and needs registration
        in the media types registry.  See <xref target="media_type_definition" format="default"></xref> </t>

    </section>

    <section anchor="Security" title="Security Considerations">
      <t>RTP packets using the payload format defined in this specification
        are subject to the security considerations discussed in the RTP
        specification <xref target="RFC3550"></xref> and any applicable RTP profile, e.g., AVP <xref target="RFC3551"></xref>.
      </t>
      <t>To avoid potential buffer overflow attacks, receivers should take care to validate that the ANC data packets in the RTP payload are of the appropriate length (using the Data_Count field) for the ANC data type specified by DID &amp; SDID.  Also the Checksum_Word should be checked against the ANC data packet to ensure that its data has not been damaged in transit.</t>
      <t>Some receivers will simply move the ANC data packet bits from the RTP payload into a serial digital interface (SDI).  It may still be a good idea for these "re-embedders" to perform the above mentioned validity tests to avoid downstream SDI systems from becoming confused by bad ANC data packets, which could be used for a denial of service attack.</t>
      <t>"Re-embedders" into SDI should also double check that the Line_Number and Horizontal_Offset leads to the ANC data packet being inserted into a legal area to carry ancillary data in the SDI video bit stream of the output video format.</t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->

      <reference anchor="BT1120">      
        <front>
          <title>BT.1120-8, Digital Interfaces for HDTV Studio Signals</title>
          
          <author>
            <organization>ITU-R </organization>
          </author>
          
          <date year="2012" month="January"/>
        </front>
      </reference>
      
      <reference anchor="BT1700">      
        <front>
          <title>BT.1700, Characteristics of Composite Video Signals for Conventional Analogue Television Systems</title>
          
          <author>
            <organization>ITU-R </organization>
          </author>
          
          <date year="2005" month="February"/>
        </front>
      </reference>
      
      &RFC2119;
      &RFC3550;
      &RFC4855;
      &RFC5234;
      &RFC6838;

      <reference anchor="ST291">
        <front>
          <title>ST 291-1:2011, Ancillary Data Packet and Space Formatting</title>
          <author>
            <organization>SMPTE</organization>
          </author>
          <date year="2011"/>
        </front>
      </reference>
 
    </references>

    <references title="Informative References">
      <!-- Here we use entities that we defined at the beginning. -->
      
      &RFC2326;
      
      &RFC2974;
      
      &RFC3551;
      
      &RFC3264;
      
      &RFC4175;
 
      &RFC5371;
      
      &RFC5888;
      
      <reference anchor="BT656">      
        <front>
          <title>BT.656-5, Interfaces for Digital Component Video Signals in 525-Line and 625-Line Television Systems Operating at the 4:2:2 Level of Recommendation ITU-R BT.601</title>
          
          <author>
            <organization>ITU-R </organization>
          </author>
          
          <date year="2007" month="December"/>
        </front>
      </reference>
      
      <reference anchor="RP168">
        <!-- the following is the minimum to make xml2rfc happy -->
        
        <front>
          <title>RP 168:2009, Definition of Vertical Interval Switching Point for Synchronous Video Switching</title>
          
          <author>
            <organization>SMPTE</organization>
          </author>
          
          <date year="2009"/>
        </front>
      </reference>
      
      <reference anchor="ST125">        
        <front>
          <title>ST 125:2013, SDTV Component Video Signal Coding 4:4:4 and 4:2:2 for 13.5 MHz and 18 MHz Systems</title>
          <author>
            <organization>SMPTE</organization>
          </author>
          <date year="2013"/>
        </front>
      </reference>
      
      <reference anchor="ST259">        
        <front>
          <title>ST 259:2008, SDTV Digital Signal/Data - Serial Digital Interface</title>
          <author>
            <organization>SMPTE</organization>
          </author>
          <date year="2008"/>
        </front>
      </reference>
      
      <reference anchor="ST274">        
        <front>
          <title>ST 274:2008, 1920 x 1080 Image Sample Structure, Digital Representation and Digital Timing Reference Sequences for Multiple Picture Rates</title>
          <author>
            <organization>SMPTE</organization>
          </author>
          <date year="2008"/>
        </front>
      </reference>
      
      <reference anchor="ST292">
        <front>
          <title>ST 292-1:2012, 1.5 Gb/s Signal/Data Serial Interface</title>
          
          <author>
            <organization>SMPTE</organization>
          </author>
          
          <date year="2012"/>
        </front>
      </reference>
      
      <reference anchor="ST296">
        <!-- the following is the minimum to make xml2rfc happy -->
        
        <front>
          <title>ST 296:2012, 1280 x 720 Progressive Image 4:2:2 and 4:4:4 Sample Structure - Analog and Digital Representation and Analog Interface</title>
          
          <author>
            <organization>SMPTE</organization>
          </author>
          <date year="2012"/>
        </front>
      </reference>
      
      <reference anchor="ST2038">
        <front>
          <title>ST 2038:2008, Carriage of Ancillary Data Packets in an MPEG-2 Transport Stream</title>
          <author>
            <organization>SMPTE</organization>
          </author>
          <date year="2008"/>
        </front>
      </reference>
      
    </references>
  </back>
</rfc>
