idnits 2.17.1 draft-ietf-payload-vp9-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 18, 2016) is 2958 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Downref: Normative reference to an Informational draft: draft-grange-vp9-bitstream (ref. 'I-D.grange-vp9-bitstream') == Outdated reference: A later version (-07) exists of draft-ietf-avtext-lrr-01 ** Obsolete normative reference: RFC 4566 (Obsoleted by RFC 8866) Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Payload Working Group J. Uberti 3 Internet-Draft S. Holmer 4 Intended status: Standards Track M. Flodman 5 Expires: September 19, 2016 Google 6 J. Lennox 7 D. Hong 8 Vidyo 9 March 18, 2016 11 RTP Payload Format for VP9 Video 12 draft-ietf-payload-vp9-02 14 Abstract 16 This memo describes an RTP payload format for the VP9 video codec. 17 The payload format has wide applicability, as it supports 18 applications from low bit-rate peer-to-peer usage, to high bit-rate 19 video conferences. It includes provisions for temporal and spatial 20 scalability. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on September 19, 2016. 39 Copyright Notice 41 Copyright (c) 2016 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 57 2. Conventions, Definitions and Acronyms . . . . . . . . . . . . 3 58 3. Media Format Description . . . . . . . . . . . . . . . . . . 3 59 4. Payload Format . . . . . . . . . . . . . . . . . . . . . . . 4 60 4.1. RTP Header Usage . . . . . . . . . . . . . . . . . . . . 5 61 4.2. VP9 Payload Description . . . . . . . . . . . . . . . . . 6 62 4.2.1. Scalability Structure (SS): . . . . . . . . . . . . . 10 63 4.3. VP9 Payload Header . . . . . . . . . . . . . . . . . . . 12 64 4.4. Frame Fragmentation . . . . . . . . . . . . . . . . . . . 12 65 4.5. Examples of VP9 RTP Stream . . . . . . . . . . . . . . . 12 66 5. Feedback Messages . . . . . . . . . . . . . . . . . . . . . . 12 67 5.1. Reference Picture Selection Indication (RPSI) . . . . . . 12 68 5.2. Slice Loss Indication (SLI) . . . . . . . . . . . . . . . 13 69 5.3. Full Intra Request (FIR) . . . . . . . . . . . . . . . . 13 70 5.4. Layer Refresh Request (LRR) . . . . . . . . . . . . . . . 14 71 6. Payload Format Parameters . . . . . . . . . . . . . . . . . . 14 72 6.1. Media Type Definition . . . . . . . . . . . . . . . . . . 15 73 6.2. SDP Parameters . . . . . . . . . . . . . . . . . . . . . 16 74 6.2.1. Mapping of Media Subtype Parameters to SDP . . . . . 16 75 6.2.2. Offer/Answer Considerations . . . . . . . . . . . . . 17 76 7. Security Considerations . . . . . . . . . . . . . . . . . . . 17 77 8. Congestion Control . . . . . . . . . . . . . . . . . . . . . 17 78 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 79 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 80 10.1. Normative References . . . . . . . . . . . . . . . . . . 18 81 10.2. Informative References . . . . . . . . . . . . . . . . . 19 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19 84 1. Introduction 86 This memo describes an RTP payload specification applicable to the 87 transmission of video streams encoded using the VP9 video codec 88 [I-D.grange-vp9-bitstream]. The format described in this document 89 can be used both in peer-to-peer and video conferencing applications. 91 TODO: VP9 description. Please see [I-D.grange-vp9-bitstream]. 93 2. Conventions, Definitions and Acronyms 95 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 96 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 97 document are to be interpreted as described in [RFC2119]. 99 TODO: Cite terminology from [I-D.grange-vp9-bitstream]. 101 3. Media Format Description 103 The VP9 codec can maintain up to eight reference frames, of which up 104 to three can be referenced or updated by any new frame. 106 VP9 also allows a reference frame to be resampled and used as a 107 reference for another frame of a different resolution. This allows 108 internal resolution changes without requiring the use of key frames. 110 These features together enable an encoder to implement various forms 111 of coarse-grained scalability, including temporal, spatial and 112 quality scalability modes, as well as combinations of these, without 113 the need for explicit scalable coding tools. 115 Temporal layers define different frame rates of video; spatial and 116 quality layers define different and possibly dependent 117 representations of a single input frame. Spatial layers allow a 118 frame to be encoded at different resolutions, whereas quality layers 119 allow a frame to be encoded at the same resolution but at different 120 qualities (and thus with different amounts of coding error). VP9 121 supports quality layers as spatial layers without any resolution 122 changes; hereinafter, the term "spatial layer" is used to represent 123 both spatial and quality layers. 125 This payload format specification defines how such temporal and 126 spatial scalability layers can be described and communicated. 128 Temporal and spatial scalability layers are associated with non- 129 negative integer IDs. The lowest layer of either type has an ID of 130 0. 132 Layers are designed (and MUST be encoded) such that if any layer, and 133 all higher layers, are removed from the bitstream along any of the 134 two dimensions, the remaining bitstream is still correctly decodable. 136 For terminology, this document uses the term "layer frame" to refer 137 to a single encoded VP9 frame for a particular resolution/quality, 138 and "super frame" to refer to all the representations (layer frames) 139 at a single instant in time. A super frame thus consists of one or 140 more layer frames, encoding different spatial layers. 142 Within a super frame, a layer frame with spatial layer ID equal to S, 143 where S > 0, can depend on a layer frame of the same super frame with 144 a lower spatial layer ID. This "inter-layer" dependency can result 145 in additional coding gain compared to the case where only traditional 146 "inter-picture" dependency is used, where a frame depends on 147 previously coded frame in time. For simplicity, this payload format 148 assumes that, within a super frame and if inter-layer dependency is 149 used, a spatial layer S frame can only depend on spatial layer S-1 150 frame when S > 0. Additionally, if inter-picture dependency is used, 151 spatial layer S frame is assumed to only depend on previously coded 152 spatial layer S frame. 154 Given above simplifications for inter-layer and inter-picture 155 dependencies, a flag (the D bit described below) is used to indicate 156 whether a spatial layer S frame depends on spatial layer S-1 frame. 157 Given the D bit, a receiver only needs to additionally know the 158 inter-picture dependency structure for a given spatial layer frame in 159 order to determine its decodability. Two modes of describing the 160 inter-picture dependency structure are possible: "flexible mode" and 161 "non-flexible mode". An encoder can only switch between the two on 162 the very first packet of a key frame with temporal layer ID equal to 163 0. 165 In flexible mode, each packet can contain up to 3 reference indices, 166 which identify all frames referenced by the frame transmitted in the 167 current packet for inter-picture prediction. This (along with the D 168 bit) enables a receiver to identify if a frame is decodable or not 169 and helps it understand the temporal layer structure. Since this is 170 signaled in each packet it makes it possible to have very flexible 171 temporal layer hierarchies and patterns which are changing 172 dynamically. 174 In non-flexible mode, the inter-picture dependency (the reference 175 indices) of a group of frames (GOF) MUST be pre-specified as part of 176 the scalability structure (SS) data. In this mode, each packet MUST 177 have an index to refer to one of the described frames in the GOF, 178 from which the frames referenced by the frame transmitted in the 179 current packet for inter-picture prediction can be identified. 181 The SS data can also be used to specify the resolution of each 182 spatial layer present in the VP9 stream for both flexible and non- 183 flexible modes. 185 4. Payload Format 187 This section describes how the encoded VP9 bitstream is encapsulated 188 in RTP. To handle network losses usage of RTP/AVPF [RFC4585] is 189 RECOMMENDED. All integer fields in the specifications are encoded as 190 unsigned integers in network octet order. 192 4.1. RTP Header Usage 194 The general RTP payload format for VP9 is depicted below. 196 0 1 2 3 197 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 198 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 199 |V=2|P|X| CC |M| PT | sequence number | 200 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 201 | timestamp | 202 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 203 | synchronization source (SSRC) identifier | 204 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 205 | contributing source (CSRC) identifiers | 206 | .... | 207 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 208 | VP9 payload descriptor (integer #octets) | 209 : : 210 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 211 | : VP9 pyld hdr | | 212 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 213 | | 214 + | 215 : Bytes 2..N of VP9 payload : 216 | | 217 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 218 | : OPTIONAL RTP padding | 219 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 221 The VP9 payload descriptor and VP9 payload header will be described 222 in Section 4.2 and Section 4.3. OPTIONAL RTP padding MUST NOT be 223 included unless the P bit is set. The figure specifically shows the 224 format for the first packet in a frame. Subsequent packets will not 225 contain the VP9 payload header, and will have later octets in the 226 frame payload. 228 Figure 1 230 Marker bit (M): MUST be set to 1 for the final packet of the highest 231 spatial layer frame (the final packet of the super frame), and 0 232 otherwise. Unless spatial scalability is in use for this super 233 frame, this will have the same value as the E bit described below. 234 Note this bit MUST be set to 1 for the target spatial layer frame 235 if a stream is being rewritten to remove higher spatial layers. 237 Payload Type (TP): In line with the policy in Section 3 of 238 [RFC3551], applications using the VP9 RTP payload profile MUST 239 assign a dynamic payload type number to be used in each RTP 240 session and provide a mechanism to indicate the mapping. See 241 Section 6.2 for the mechanism to be used with the Session 242 Description Protocol (SDP) [RFC4566]. 244 Timestamp: The RTP timestamp indicates the time when the input frame 245 was sampled, at a clock rate of 90 kHz. If the input frame is 246 encoded with multiple layer frames, all of the layer frames of the 247 super frame MUST have the same timestamp. 249 The remaining RTP Fixed Header Fields (V, P, X, CC, sequence number, 250 SSRC and CSRC identifiers) are used as specified in Section 5.1 of 251 [RFC3550]. 253 4.2. VP9 Payload Description 255 In flexible mode (with the F bit below set to 1), The first octets 256 after the RTP header are the VP9 payload descriptor, with the 257 following structure. 259 0 1 2 3 4 5 6 7 260 +-+-+-+-+-+-+-+-+ 261 |I|P|L|F|B|E|V|-| (REQUIRED) 262 +-+-+-+-+-+-+-+-+ 263 I: |M| PICTURE ID | (REQUIRED) 264 +-+-+-+-+-+-+-+-+ 265 M: | EXTENDED PID | (RECOMMENDED) 266 +-+-+-+-+-+-+-+-+ 267 L: | T |U| S |D| (CONDITIONALLY RECOMMENDED) 268 +-+-+-+-+-+-+-+-+ -\ 269 P,F: | P_DIFF |N| (CONDITIONALLY REQUIRED) - up to 3 times 270 +-+-+-+-+-+-+-+-+ -/ 271 V: | SS | 272 | .. | 273 +-+-+-+-+-+-+-+-+ 275 Figure 2 277 In non-flexible mode (with the F bit below set to 0), The first 278 octets after the RTP header are the VP9 payload descriptor, with the 279 following structure. 281 0 1 2 3 4 5 6 7 282 +-+-+-+-+-+-+-+-+ 283 |I|P|L|F|B|E|V|-| (REQUIRED) 284 +-+-+-+-+-+-+-+-+ 285 I: |M| PICTURE ID | (RECOMMENDED) 286 +-+-+-+-+-+-+-+-+ 287 M: | EXTENDED PID | (RECOMMENDED) 288 +-+-+-+-+-+-+-+-+ 289 L: | T |U| S |D| (CONDITIONALLY RECOMMENDED) 290 +-+-+-+-+-+-+-+-+ 291 | TL0PICIDX | (CONDITIONALLY REQUIRED) 292 +-+-+-+-+-+-+-+-+ 293 V: | SS | 294 | .. | 295 +-+-+-+-+-+-+-+-+ 297 Figure 3 299 I: Picture ID (PID) present. When set to one, the OPTIONAL PID MUST 300 be present after the mandatory first octet and specified as below. 301 Otherwise, PID MUST NOT be present. 303 P: Inter-picture predicted layer frame. When set to zero, the layer 304 frame does not utilize inter-picture prediction. In this case, 305 up-switching to current spatial layer's frame is possible from 306 directly lower spatial layer frame. P SHOULD also be set to zero 307 when encoding a layer synchronization frame in response to an LRR 308 [I-D.ietf-avtext-lrr] message (see Section 5.4). When P is set to 309 zero, the T bit (described below) MUST also be set to 0 (if 310 present). 312 L: Layer indices present. When set to one, the one or two octets 313 following the mandatory first octet and the PID (if present) is as 314 described by "Layer indices" below. If the F bit (described 315 below) is set to 1 (indicating flexible mode), then only one octet 316 is present for the layer indices. Otherwise if the F bit is set 317 to 0 (indicating non-flexible mode), then two octets are present 318 for the layer indices. 320 F: Flexible mode. F set to one indicates flexible mode and if the P 321 bit is also set to one, then the octets following the mandatory 322 first octet, the PID, and layer indices (if present) are as 323 described by "Reference indices" below. This MUST only be set to 324 1 if the I bit is also set to one; if the I bit is set to zero, 325 then this MUST also be set to zero and ignored by receivers. The 326 value of this F bit CAN ONLY CHANGE on the very first packet of a 327 key picture. This is a packet with the P bit equal to zero, S or 328 D bit (described below) equal to zero, and B bit (described below) 329 equal to 1. 331 B: Start of a layer frame. MUST be set to 1 if the first payload 332 octet of the RTP packet is the beginning of a new VP9 layer frame, 333 and MUST NOT be 1 otherwise. Note that this layer frame might not 334 be the very first layer frame of a super frame. 336 E: End of a layer frame. MUST be set to 1 for the final RTP packet 337 of a VP9 layer frame, and 0 otherwise. This enables a decoder to 338 finish decoding the layer frame, where it otherwise may need to 339 wait for the next packet to explicitly know that the layer frame 340 is complete. Note that, if spatial scalability is in use, more 341 layer frames from the same super frame may follow; see the 342 description of the M bit above. 344 V: Scalability structure (SS) data present. When set to one, the 345 OPTIONAL SS data MUST be present in the payload descriptor. 346 Otherwise, the SS data MUST NOT be present. 348 -: Bit reserved for future use. MUST be set to zero and MUST be 349 ignored by the receiver. 351 The mandatory first octet is followed by the extension data fields 352 that are enabled: 354 M: The most significant bit of the first octet is an extension flag. 355 The field MUST be present if the I bit is equal to one. If set, 356 the PID field MUST contain 15 bits; otherwise, it MUST contain 7 357 bits. See PID below. 359 Picture ID (PID): Picture ID represented in 7 or 15 bits, depending 360 on the M bit. This is a running index of the pictures. The field 361 MUST be present if the I bit is equal to one. If M is set to 362 zero, 7 bits carry the PID; else if M is set to one, 15 bits carry 363 the PID in network byte order. The sender may choose between a 7- 364 or 15-bit index. The PID SHOULD start on a random number, and 365 MUST wrap after reaching the maximum ID. The receiver MUST NOT 366 assume that the number of bits in PID stay the same through the 367 session. 369 In the non-flexible mode (when the F bit is set to 0), this PID is 370 used as an index to the GOF specified in the SS data bleow. In 371 this mode, the PID of the key frame corresponds to the very first 372 specified frame in the GOF. Then subsequent PIDs are mapped to 373 subsequently specified frames in the GOF (modulo N_G, specified in 374 the SS data below), respectively. 376 Layer indices: This information is optional but recommended whenever 377 encoding with layers. For both flexible and non-flexible modes, 378 one octet is used to specify a layer frame's temporal layer ID (T) 379 and spatial layer ID (S) as shown both in Figure 2 and Figure 3. 380 Additionally, a bit (U) is used to indicate that the current frame 381 is a "switching up point" frame. Another bit (D) is used to 382 indicate whether inter-layer prediction is used for the current 383 layer frame. 385 In the non-flexible mode (when the F bit is set to 0), another 386 octet is used to represent temporal layer 0 index (TL0PICIDX), as 387 depicted in Figure 3. The TL0PICIDX is present so that all 388 minimally required frames - the base temporal layer frames - can 389 be tracked. 391 The T and S fields indicate the temporal and spatial layers and 392 can help middleboxes and and endpoints quickly identify which 393 layer a packet belongs to. 395 T: The temporal layer ID of current frame. In the case of non- 396 flexible mode, if PID is mapped to a frame in a specified GOF, 397 then the value of T MUST match the corresponding T value of the 398 mapped frame in the GOF. 400 U: Switching up point. If this bit is set to 1 for the current 401 frame with temporal layer ID equal to T, then "switch up" to a 402 higher frame rate is possible as subsequent higher temporal 403 layer frames will not depend on any frame before the current 404 frame (in coding time) with temporal layer ID greater than T. 406 S: The spatial layer ID of current frame. Note that frames with 407 spatial layer S > 0 may be dependent on decoded spatial layer 408 S-1 frame within the same super frame. 410 D: Inter-layer dependency used. MUST be set to one if current 411 spatial layer S frame depends on spatial layer S-1 frame of the 412 same super frame. MUST only be set to zero if current spatial 413 layer S frame does not depend on spatial layer S-1 frame of the 414 same super frame. For the base layer frame with S equal to 0, 415 this D bit MUST be set to zero. 417 TL0PICIDX: 8 bits temporal layer zero index. TL0PICIDX is only 418 present in the non-flexible mode (F = 0). This is a running 419 index for the temporal base layer frames, i.e., the frames with 420 T set to 0. If T is larger than 0, TL0PICIDX indicates which 421 temporal base layer frame the current frame depends on. 422 TL0PICIDX MUST be incremented when T is equal to 0. The index 423 SHOULD start on a random number, and MUST restart at 0 after 424 reaching the maximum number 255. 426 Reference indices: When P and F are both set to one, indicating a 427 non-key frame in flexible mode, then at least one reference index 428 has to be specified as below. Additional reference indices (total 429 of up to 3 reference indices are allowed) may be specified using 430 the N bit below. When either P or F is set to zero, then no 431 reference index is specified. 433 P_DIFF: The reference index (in 7 bits) specified as the relative 434 PID from the current frame. For example, when P_DIFF=3 on a 435 packet containing the frame with PID 112 means that the frame 436 refers back to the frame with PID 109. This calculation is 437 done modulo the size of the PID field, i.e., either 7 or 15 438 bits. 440 N: 1 if there is additional P_DIFF following the current P_DIFF. 442 4.2.1. Scalability Structure (SS): 444 The scalability structure (SS) data describes the resolution of each 445 layer frame within a super frame as well as the inter-picture 446 dependencies for a group of frames (GOF). If the VP9 payload 447 descriptor's "V" bit is set, the SS data is present in the position 448 indicated in Figure 2 and Figure 3. 450 +-+-+-+-+-+-+-+-+ 451 V: | N_S |Y|G|-|-|-| 452 +-+-+-+-+-+-+-+-+ -\ 453 Y: | WIDTH | (OPTIONAL) . 454 + + . 455 | | (OPTIONAL) . 456 +-+-+-+-+-+-+-+-+ . - N_S + 1 times 457 | HEIGHT | (OPTIONAL) . 458 + + . 459 | | (OPTIONAL) . 460 +-+-+-+-+-+-+-+-+ -/ -\ 461 G: | N_G | (OPTIONAL) 462 +-+-+-+-+-+-+-+-+ -\ 463 N_G: | T |U| R |-|-| (OPTIONAL) . 464 +-+-+-+-+-+-+-+-+ -\ . - N_G times 465 | P_DIFF | (OPTIONAL) . - R times . 466 +-+-+-+-+-+-+-+-+ -/ -/ 468 Figure 4 470 N_S: N_S + 1 indicates the number of spatial layers present in the 471 VP9 stream. 473 Y: Each spatial layer's frame resolution present. When set to one, 474 the OPTIONAL WIDTH (2 octets) and HEIGHT (2 octets) MUST be 475 present for each layer frame. Otherwise, the resolution MUST NOT 476 be present. 478 G: GOF description present flag. 480 -: Bit reserved for future use. MUST be set to zero and MUST be 481 ignored by the receiver. 483 N_G: N_G indicates the number of frames in a GOF. If N_G is greater 484 than 0, then the SS data allows the inter-picture dependency 485 structure of the VP9 stream to be pre-declared, rather than 486 indicating it on the fly with every packet. If N_G is greater 487 than 0, then for N_G pictures in the GOF, each frame's temporal 488 layer ID (T), switch up point (U), and the R reference indices 489 (P_DIFFs) are specified. 491 The very first frame specified in the GOF MUST have T set to 0. 493 G set to 0 or N_G set to 0 indicates that either there is only one 494 temporal layer or no fixed inter-picture dependency information is 495 present going forward in the bitstream. 497 Note that for a given super frame, all layer frames follow the 498 same inter-picture dependency structure. However, the frame rate 499 of each spatial layer can be different from each other and this 500 can be controlled with the use of the D bit described above. The 501 specified dependency structure in the SS data MUST be for the 502 highest frame rate layer. 504 In a scalable stream sent with a fixed pattern, the SS data SHOULD be 505 included in the first packet of every key frame. This is a packet 506 with P bit equal to zero, S or D bit equal to zero, and B bit equal 507 to 1. The SS data MUST only be changed on the frame that corresponds 508 to the very first frame specified in the previous SS data's GOF (if 509 the previous SS data's N_G was greater than 0). 511 4.3. VP9 Payload Header 513 TODO: need to describe VP9 payload header. 515 4.4. Frame Fragmentation 517 VP9 frames are fragmented into packets, in RTP sequence number order, 518 beginning with a packet with the B bit set, and ending with a packet 519 with the RTP marker bit M set. There is no mechanism for finer- 520 grained access to parts of a VP9 frame. 522 4.5. Examples of VP9 RTP Stream 524 TODO 526 5. Feedback Messages 528 5.1. Reference Picture Selection Indication (RPSI) 530 TODO: Update to indicate which frame within the picture. 532 The reference picture selection index is a payload-specific feedback 533 message defined within the RTCP-based feedback format. The RPSI 534 message is generated by a receiver and can be used in two ways. 535 Either it can signal a preferred reference picture when a loss has 536 been detected by the decoder -- preferably then a reference that the 537 decoder knows is perfect -- or, it can be used as positive feedback 538 information to acknowledge correct decoding of certain reference 539 pictures. The positive feedback method is useful for VP9 used for 540 point to point (unicast) communication. The use of RPSI for VP9 is 541 preferably combined with a special update pattern of the codec's two 542 special reference frames -- the golden frame and the altref frame -- 543 in which they are updated in an alternating leapfrog fashion. When a 544 receiver has received and correctly decoded a golden or altref frame, 545 and that frame had a PictureID in the payload descriptor, the 546 receiver can acknowledge this simply by sending an RPSI message back 547 to the sender. The message body (i.e., the "native RPSI bit string" 548 in [RFC4585]) is simply the PictureID of the received frame. 550 5.2. Slice Loss Indication (SLI) 552 TODO: Update to indicate which frame within the picture. 554 The slice loss indication is another payload-specific feedback 555 message defined within the RTCP-based feedback format. The SLI 556 message is generated by the receiver when a loss or corruption is 557 detected in a frame. The format of the SLI message is as follows 558 [RFC4585]: 560 0 1 2 3 561 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 562 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 563 | First | Number | PictureID | 564 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 566 Figure 5 568 Here, First is the macroblock address (in scan order) of the first 569 lost block and Number is the number of lost blocks, as defined in 570 [RFC4585]. PictureID is the six least significant bits of the codec- 571 specific picture identifier in which the loss or corruption has 572 occurred. For VP9, this codec-specific identifier is naturally the 573 PictureID of the current frame, as read from the payload descriptor. 574 If the payload descriptor of the current frame does not have a 575 PictureID, the receiver MAY send the last received PictureID+1 in the 576 SLI message. The receiver MAY set the First parameter to 0, and the 577 Number parameter to the total number of macroblocks per frame, even 578 though only part of the frame is corrupted. When the sender receives 579 an SLI message, it can make use of the knowledge from the latest 580 received RPSI message. Knowing that the last golden or altref frame 581 was successfully received, it can encode the next frame with 582 reference to that established reference. 584 5.3. Full Intra Request (FIR) 586 The Full Intra Request (FIR) [RFC5104] RTCP feedback message allows a 587 receiver to request a full state refresh of an encoded stream. 589 Upon receipt of an FIR request, a VP9 sender MUST send a super frame 590 with a keyframe for its spatial layer 0 layer frame, and then send 591 frames without inter-picture prediction (P=0) for any higher layer 592 frames. 594 5.4. Layer Refresh Request (LRR) 596 The Layer Refresh Request [I-D.ietf-avtext-lrr] allows a receiver to 597 request a single layer of a spatially or temporally encoded stream to 598 be refreshed, without necessarily affecting the stream's other 599 layers. 601 +---------------+---------------+ 602 |0|1|2|3|4|5|6|7|0|1|2|3|4|5|6|7| 603 +-------------+-----------------+ 604 | T |R| S | RES | 605 +-------------+-----------------+ 607 Figure 6 609 Figure 6 shows the format of LRR's layer index field for VP9 streams. 610 This is designed to follow the same layout as the "L" byte of the VP9 611 payload header, which carries the stream's layer information. The 612 "R" and "RES" fields MUST be set to 0 on transmission and ingnored on 613 reception. See Section 4.2 for details on the T and S fields. 615 Identification of a layer refresh frame can be derived from the 616 reference IDs of each frame by backtracking the dependency chain 617 until reaching a point where only decodable frames are being 618 referenced. Therefore it's recommended for both the flexible and the 619 non-flexible mode that, when upgrade frames are being encoded in 620 response to a LRR, those packets should contain layer indices and the 621 reference fields so that the decoder or an MCU can make this 622 derivation. 624 Example: 626 LRR {1,0}, {2,1} is sent by an MCU when it is currently relaying 627 {1,0} to a receiver and which wants to upgrade to {2,1}. In response 628 the encoder should encode the next frames in layers {1,1} and {2,1} 629 by only referring to frames in {1,0}, or {0,0}. 631 In the non-flexible mode, periodic upgrade frames can be defined by 632 the layer structure of the SS, thus periodic upgrade frames can be 633 automatically identified by the picture ID. 635 6. Payload Format Parameters 637 This payload format has two optional parameters. 639 6.1. Media Type Definition 641 This registration is done using the template defined in [RFC6838] and 642 following [RFC4855]. 644 Type name: video 646 Subtype name: VP9 648 Required parameters: None. 650 Optional parameters: 651 These parameters are used to signal the capabilities of a receiver 652 implementation. If the implementation is willing to receive 653 media, both parameters MUST be provided. These parameters MUST 654 NOT be used for any other purpose. 656 max-fr: The value of max-fr is an integer indicating the maximum 657 frame rate in units of frames per second that the decoder is 658 capable of decoding. 660 max-fs: The value of max-fs is an integer indicating the maximum 661 frame size in units of macroblocks that the decoder is capable 662 of decoding. 664 The decoder is capable of decoding this frame size as long as 665 the width and height of the frame in macroblocks are less than 666 int(sqrt(max-fs * 8)) - for instance, a max-fs of 1200 (capable 667 of supporting 640x480 resolution) will support widths and 668 heights up to 1552 pixels (97 macroblocks). 670 Encoding considerations: 671 This media type is framed in RTP and contains binary data; see 672 Section 4.8 of [RFC6838]. 674 Security considerations: See Section 7 of RFC xxxx. 675 [RFC Editor: Upon publication as an RFC, please replace "XXXX" 676 with the number assigned to this document and remove this note.] 678 Interoperability considerations: None. 680 Published specification: VP9 bitstream format 681 [I-D.grange-vp9-bitstream] and RFC XXXX. 682 [RFC Editor: Upon publication as an RFC, please replace "XXXX" 683 with the number assigned to this document and remove this note.] 685 Applications which use this media type: 686 For example: Video over IP, video conferencing. 688 Fragment identifier considerations: N/A. 690 Additional information: None. 692 Person & email address to contact for further information: 693 TODO [Pick a contact] 695 Intended usage: COMMON 697 Restrictions on usage: 698 This media type depends on RTP framing, and hence is only defined 699 for transfer via RTP [RFC3550]. 701 Author: TODO [Pick a contact] 703 Change controller: 704 IETF Payload Working Group delegated from the IESG. 706 6.2. SDP Parameters 708 The receiver MUST ignore any fmtp parameter unspecified in this memo. 710 6.2.1. Mapping of Media Subtype Parameters to SDP 712 The media type video/VP9 string is mapped to fields in the Session 713 Description Protocol (SDP) [RFC4566] as follows: 715 o The media name in the "m=" line of SDP MUST be video. 717 o The encoding name in the "a=rtpmap" line of SDP MUST be VP9 (the 718 media subtype). 720 o The clock rate in the "a=rtpmap" line MUST be 90000. 722 o The parameters "max-fs", and "max-fr", MUST be included in the 723 "a=fmtp" line of SDP if SDP is used to declare receiver 724 capabilities. These parameters are expressed as a media subtype 725 string, in the form of a semicolon separated list of 726 parameter=value pairs. 728 6.2.1.1. Example 730 An example of media representation in SDP is as follows: 732 m=video 49170 RTP/AVPF 98 733 a=rtpmap:98 VP9/90000 734 a=fmtp:98 max-fr=30; max-fs=3600; 736 6.2.2. Offer/Answer Considerations 738 TODO: Update this for VP9 740 7. Security Considerations 742 RTP packets using the payload format defined in this specification 743 are subject to the security considerations discussed in the RTP 744 specification [RFC3550], and in any applicable RTP profile such as 745 RTP/AVP [RFC3551], RTP/AVPF [RFC4585], RTP/SAVP [RFC3711], or RTP/ 746 SAVPF [RFC5124]. SAVPF [RFC5124]. However, as "Securing the RTP 747 Protocol Framework: Why RTP Does Not Mandate a Single Media Security 748 Solution" [RFC7202] discusses, it is not an RTP payload format's 749 responsibility to discuss or mandate what solutions are used to meet 750 the basic security goals like confidentiality, integrity and source 751 authenticity for RTP in general. This responsibility lays on anyone 752 using RTP in an application. They can find guidance on available 753 security mechanisms in Options for Securing RTP Sessions [RFC7201]. 754 Applications SHOULD use one or more appropriate strong security 755 mechanisms. The rest of this security consideration section 756 discusses the security impacting properties of the payload format 757 itself. 759 This RTP payload format and its media decoder do not exhibit any 760 significant non-uniformity in the receiver-side computational 761 complexity for packet processing, and thus are unlikely to pose a 762 denial-of-service threat due to the receipt of pathological data. 763 Nor does the RTP payload format contain any active content. 765 8. Congestion Control 767 Congestion control for RTP SHALL be used in accordance with RFC 3550 768 [RFC3550], and with any applicable RTP profile; e.g., RFC 3551 769 [RFC3551]. The congestion control mechanism can, in a real-time 770 encoding scenario, adapt the transmission rate by instructing the 771 encoder to encode at a certain target rate. Media aware network 772 elements MAY use the information in the VP9 payload descriptor in 773 Section 4.2 to identify non-reference frames and discard them in 774 order to reduce network congestion. Note that discarding of non- 775 reference frames cannot be done if the stream is encrypted (because 776 the non-reference marker is encrypted). 778 9. IANA Considerations 780 The IANA is requested to register the following values: 781 - Media type registration as described in Section 6.1. 783 10. References 785 10.1. Normative References 787 [I-D.grange-vp9-bitstream] 788 Grange, A. and H. Alvestrand, "A VP9 Bitstream Overview", 789 draft-grange-vp9-bitstream-00 (work in progress), February 790 2013. 792 [I-D.ietf-avtext-lrr] 793 Lennox, J., Hong, D., Uberti, J., Holmer, S., and M. 794 Flodman, "The Layer Refresh Request (LRR) RTCP Feedback 795 Message", draft-ietf-avtext-lrr-01 (work in progress), 796 October 2015. 798 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 799 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 800 RFC2119, March 1997, 801 . 803 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 804 Jacobson, "RTP: A Transport Protocol for Real-Time 805 Applications", STD 64, RFC 3550, DOI 10.17487/RFC3550, 806 July 2003, . 808 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 809 Description Protocol", RFC 4566, DOI 10.17487/RFC4566, 810 July 2006, . 812 [RFC4585] Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey, 813 "Extended RTP Profile for Real-time Transport Control 814 Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585, DOI 815 10.17487/RFC4585, July 2006, 816 . 818 [RFC4855] Casner, S., "Media Type Registration of RTP Payload 819 Formats", RFC 4855, DOI 10.17487/RFC4855, February 2007, 820 . 822 [RFC5104] Wenger, S., Chandra, U., Westerlund, M., and B. Burman, 823 "Codec Control Messages in the RTP Audio-Visual Profile 824 with Feedback (AVPF)", RFC 5104, DOI 10.17487/RFC5104, 825 February 2008, . 827 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 828 Specifications and Registration Procedures", BCP 13, RFC 829 6838, DOI 10.17487/RFC6838, January 2013, 830 . 832 10.2. Informative References 834 [RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and 835 Video Conferences with Minimal Control", STD 65, RFC 3551, 836 DOI 10.17487/RFC3551, July 2003, 837 . 839 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 840 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 841 RFC 3711, DOI 10.17487/RFC3711, March 2004, 842 . 844 [RFC5124] Ott, J. and E. Carrara, "Extended Secure RTP Profile for 845 Real-time Transport Control Protocol (RTCP)-Based Feedback 846 (RTP/SAVPF)", RFC 5124, DOI 10.17487/RFC5124, February 847 2008, . 849 [RFC7201] Westerlund, M. and C. Perkins, "Options for Securing RTP 850 Sessions", RFC 7201, DOI 10.17487/RFC7201, April 2014, 851 . 853 [RFC7202] Perkins, C. and M. Westerlund, "Securing the RTP 854 Framework: Why RTP Does Not Mandate a Single Media 855 Security Solution", RFC 7202, DOI 10.17487/RFC7202, April 856 2014, . 858 Authors' Addresses 860 Justin Uberti 861 Google, Inc. 862 747 6th Street South 863 Kirkland, WA 98033 864 USA 866 Email: justin@uberti.name 868 Stefan Holmer 869 Google, Inc. 870 Kungsbron 2 871 Stockholm 111 22 872 Sweden 874 Email: holmer@google.com 875 Magnus Flodman 876 Google, Inc. 877 Kungsbron 2 878 Stockholm 111 22 879 Sweden 881 Email: mflodman@google.com 883 Jonathan Lennox 884 Vidyo, Inc. 885 433 Hackensack Avenue 886 Seventh Floor 887 Hackensack, NJ 07601 888 US 890 Email: jonathan@vidyo.com 892 Danny Hong 893 Vidyo, Inc. 894 433 Hackensack Avenue 895 Seventh Floor 896 Hackensack, NJ 07601 897 US 899 Email: danny@vidyo.com