idnits 2.17.1 draft-uberti-payload-vp9-01.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 : ---------------------------------------------------------------------------- ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 9, 2015) is 3336 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') ** Obsolete normative reference: RFC 4566 (Obsoleted by RFC 8866) Summary: 3 errors (**), 0 flaws (~~), 1 warning (==), 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 10, 2015 Google 6 J. Lennox 7 D. Hong 8 Vidyo 9 March 9, 2015 11 RTP Payload Format for VP9 Video 12 draft-uberti-payload-vp9-01 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 10, 2015. 39 Copyright Notice 41 Copyright (c) 2015 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 . . . . . . . . . . . . 2 58 3. Media Format Description . . . . . . . . . . . . . . . . . . 3 59 4. Payload Format . . . . . . . . . . . . . . . . . . . . . . . 4 60 4.1. RTP Header Usage . . . . . . . . . . . . . . . . . . . . 4 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. Using VP9 with RPSI and SLI Feedback . . . . . . . . . . . . 12 67 5.1. RPSI . . . . . . . . . . . . . . . . . . . . . . . . . . 12 68 5.2. SLI . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 69 5.3. Example . . . . . . . . . . . . . . . . . . . . . . . . . 13 70 6. Payload Format Parameters . . . . . . . . . . . . . . . . . . 15 71 6.1. Media Type Definition . . . . . . . . . . . . . . . . . . 15 72 6.2. SDP Parameters . . . . . . . . . . . . . . . . . . . . . 17 73 6.2.1. Mapping of Media Subtype Parameters to SDP . . . . . 17 74 6.2.2. Offer/Answer Considerations . . . . . . . . . . . . . 17 75 7. Security Considerations . . . . . . . . . . . . . . . . . . . 17 76 8. Congestion Control . . . . . . . . . . . . . . . . . . . . . 18 77 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 78 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19 81 1. Introduction 83 This memo describes an RTP payload specification applicable to the 84 transmission of video streams encoded using the VP9 video codec 85 [I-D.grange-vp9-bitstream]. The format described in this document 86 can be used both in peer-to-peer and video conferencing applications. 88 TODO: VP9 description. Please see [I-D.grange-vp9-bitstream]. 90 2. Conventions, Definitions and Acronyms 92 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 93 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 94 document are to be interpreted as described in [RFC2119]. 96 3. Media Format Description 98 The VP9 codec can maintain up to eight reference frames, of which up 99 to three can be referenced or updated by any new frame. 101 VP9 also allows a reference frame to be resampled and used as a 102 reference for another frame of a different resolution. This allows 103 internal resolution changes without requiring the use of key frames. 105 These features together enable an encoder to implement various forms 106 of coarse-grained scalability, including temporal, spatial and 107 quality scalability modes, as well as combinations of these, without 108 the need for explicit scalable coding tools. 110 Temporal layers define different frame rates of video; spatial and 111 quality layers define different and possibly dependent 112 representations of a single input frame. Spatial layers allow a 113 frame to be encoded at different resolutions, whereas quality layers 114 allow a frame to be encoded at the same resolution but at different 115 qualities (and thus with different amounts of coding error). VP9 116 supports quality layers as spatial layers without any resolution 117 changes; hereinafter, the term "spatial layer" is used to represent 118 both spatial and quality layers. 120 This payload format specification defines how such temporal and 121 spatial scalability layers can be described and communicated. 123 Layers are designed (and MUST be encoded) such that if any layer, and 124 all higher layers, are removed from the bitstream along any of the 125 two dimensions, the remaining bitstream is still correctly decodable. 127 For terminology, this document uses the term "layer frame" to refer 128 to a single encoded VP9 frame for a particular resolution/quality, 129 and "super frame" to refer to all the representations (layer frames) 130 at a single instant in time. A super frame thus consists of one or 131 more layer frames, encoding different spatial layers. 133 Within a super frame, a layer frame with spatial layer ID equal to S, 134 where S > 0, can depend on a frame with a lower spatial layer ID. 135 This "inter-layer" dependency results in additional coding gain to 136 the traditional "inter-picture" dependency, where a frame depends on 137 previously coded frame in time. For simplicity, this payload format 138 assumes that, within a super frame if inter-layer dependency is used, 139 a spatial layer S frame can only depend on spatial layer S-1 frame 140 when S > 0. Additionally, if inter-picture dependency is used, 141 spatial layer S frame is assumed to only depend on prevously coded 142 spatial layer S frame. 144 TODO: Describe how simulcast can be supported? 146 Given above simplifications for inter-layer and inter-picture 147 dependencies, a flag (the D bit described below) is used to indicate 148 whether a spatial layer S frame depends on spatial layer S-1 frame. 149 Then a receiver only needs to know the inter-picture dependency 150 structure for a given spatial layer frame in order to determine its 151 decodability. Two modes of describing the inter-picture dependency 152 structure are possible: "flexible mode" and "non-flexible mode". An 153 encoder can only switch between the two on the very first packet of a 154 key frame with temporal layer ID equal to 0. 156 In flexible mode, each packet can contain up to 3 reference indices, 157 which identifies all frames referenced by the frame transmitted in 158 the current packet for inter-picture prediction. This (along with 159 the D bit) enables a receiver to identify if a frame is decodable or 160 not and helps it understand the temporal layer structure so that it 161 can drop packets as it sees fit. Since this is signaled in each 162 packet it makes it possible to have very flexible temporal layer 163 hierarchies and patterns which are changing dynamically. 165 In non-flexible mode, the inter-picture dependency (the reference 166 indices) of a group of frames (GOF) MUST be pre-specified as part of 167 the scalability structure (SS) data. In this mode, each packet will 168 have an index to refer to one of the described frames, from which the 169 frames referenced by the frame transmitted in the current packet for 170 inter-picture prediction can be identified. 172 The SS data can also be used to specify the resolution of each 173 spatial layer present in the VP9 stream. 175 4. Payload Format 177 This section describes how the encoded VP9 bitstream is encapsulated 178 in RTP. To handle network losses usage of RTP/AVPF [RFC4585] is 179 RECOMMENDED. All integer fields in the specifications are encoded as 180 unsigned integers in network octet order. 182 4.1. RTP Header Usage 183 The general RTP payload format for VP9 is depicted below. 185 0 1 2 3 186 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 187 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 188 |V=2|P|X| CC |M| PT | sequence number | 189 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 190 | timestamp | 191 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 192 | synchronization source (SSRC) identifier | 193 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 194 | contributing source (CSRC) identifiers | 195 | .... | 196 +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 197 | VP9 payload descriptor (integer #bytes) | 198 : : 199 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 200 | : VP9 pyld hdr | | 201 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 202 | | 203 + | 204 : Bytes 2..N of VP9 payload : 205 | | 206 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 207 | : OPTIONAL RTP padding | 208 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 210 The VP9 payload descriptor and VP9 payload header will be described 211 in the next section. OPTIONAL RTP padding MUST NOT be included 212 unless the P bit is set. 214 Figure 1 216 Marker bit (M): MUST be set to 1 for the final packet of the highest 217 spatial layer frame (the final packet of the super frame), and 0 218 otherwise. Unless spatial scalability is in use for this super 219 frame, this will have the same value as the E bit described below. 220 Note that a MANE MUST set this value to 1 for the target spatial 221 layer frame when shaping out higher spatial layers. 223 Timestamp: The RTP timestamp indicates the time when the input frame 224 was sampled, at a clock rate of 90 kHz. If the input frame is 225 encoded with multiple layer frames, all of the layer frames of the 226 super frame MUST have the same timestamp. 228 Sequence number: The sequence numbers are monotonically increasing 229 in order of the encoded bitstream. 231 The remaining RTP header fields are used as specified in [RFC3550]. 233 4.2. VP9 Payload Description 235 In flexible mode (with the F bit below set to 1), The first octets 236 after the RTP header are the VP9 payload descriptor, with the 237 following structure. 239 0 1 2 3 4 5 6 7 240 +-+-+-+-+-+-+-+-+ 241 |I|P|L|F|B|E|V|-| (REQUIRED) 242 +-+-+-+-+-+-+-+-+ 243 I: |M| PICTURE ID | (RECOMMENDED) 244 +-+-+-+-+-+-+-+-+ 245 M: | EXTENDED PID | (RECOMMENDED) 246 +-+-+-+-+-+-+-+-+ 247 L: | T |U| S |D| (CONDITIONALLY RECOMMENDED) 248 +-+-+-+-+-+-+-+-+ -\ 249 P,F: | P_DIFF |X|N| (CONDITIONALLY RECOMMENDED) . 250 +-+-+-+-+-+-+-+-+ . - up to 3 times 251 X: |EXTENDED P_DIFF| (OPTIONAL) . 252 +-+-+-+-+-+-+-+-+ -/ 253 V: | SS | 254 | .. | 255 +-+-+-+-+-+-+-+-+ 257 Figure 2 259 In non-flexible mode (with the F bit below set to 0), The first 260 octets after the RTP header are the VP9 payload descriptor, with the 261 following structure. 263 0 1 2 3 4 5 6 7 264 +-+-+-+-+-+-+-+-+ 265 |I|P|L|F|B|E|V|-| (REQUIRED) 266 +-+-+-+-+-+-+-+-+ 267 I: |M| PICTURE ID | (RECOMMENDED) 268 +-+-+-+-+-+-+-+-+ 269 M: | EXTENDED PID | (RECOMMENDED) 270 +-+-+-+-+-+-+-+-+ 271 L: |GOF_IDX| S |D| (CONDITIONALLY RECOMMENDED) 272 +-+-+-+-+-+-+-+-+ 273 | TL0PICIDX | (CONDITIONALLY REQUIRED) 274 +-+-+-+-+-+-+-+-+ 275 V: | SS | 276 | .. | 277 +-+-+-+-+-+-+-+-+ 279 Figure 3 281 I: Picture ID (PID) present. When set to one, the OPTIONAL PID MUST 282 be present after the mandatory first octet and specified as below. 283 Otherwise, PID MUST NOT be present. 285 P: Inter-picture predicted layer frame. When set to zero, the layer 286 frame does not utilize inter-picture prediction. In this case, 287 up-switching to current spatial layer's frame is possible from 288 directly lower spatial layer frame. P SHOULD also be set to zero 289 when encoding a layer synchronization frame in response to an LRR 290 [I-D.lennox-avtext-lrr]. 292 L: Layer indices present. When set to one, the one or two octets 293 following the mandatory first octet and the PID (if present) is as 294 described by "Layer indices" below. If the F bit (described 295 below) is set to 1 (indicating flexible mode), then only one octet 296 is present for the layer indices. Otherwise if the F bit is set 297 to 0 (indicating non-flexible mode), then two octets are present 298 for the layer indices. 300 F: Flexible mode. F set to one indicates flexible mode and if the P 301 bit is also set to one, then the octets following the mandatory 302 first octet, the PID, and layer indices (if present) are as 303 described by "Reference indices" below. This MUST only be set to 304 one if the I bit is also set to one; if the I bit is set to zero, 305 then this MUST also be set to zero and ignored by receivers. The 306 value of this F bit CAN ONLY CHANGE on the very first packet of a 307 key picture. This is a packet with the P bit equal to zero, S or 308 D bit (described below) equal to zero, B bit (described below) 309 equal to 1, and temporal layer ID equal to 0. 311 B: Start of a layer frame. MUST be set to 1 if the first payload 312 octet of the RTP packet is the beginning of a new VP9 layer frame, 313 and MUST NOT be 1 otherwise. Note that this layer frame might not 314 be the very first layer frame of a super frame. 316 E: End of a layer frame. MUST be set to 1 for the final RTP packet 317 of a VP9 layer frame, and 0 otherwise. This enables a decoder to 318 finish decoding the layer frame, where it otherwise may need to 319 wait for the next packet to explicitly know that the layer frame 320 is complete. Note that, if spatial scalability is in use, more 321 layer frames from the same super frame may follow; see the 322 description of the M bit above. 324 V: Scalability structure (SS) data present. When set to one, the 325 OPTIONAL SS data MUST be present in the payload descriptor. 326 Otherwise, the SS data MUST NOT be present. 328 -: Bit reserved for future use. MUST be set to zero and MUST be 329 ignored by the receiver. 331 The mandatory first octet is followed by the extension data fields 332 that are enabled: 334 M: The most significant bit of the first octet is an extension flag. 335 The field MUST be present if the I bit is equal to one. If set, 336 the PID field MUST contain 15 bits; otherwise, it MUST contain 7 337 bits. See PID below. 339 Picture ID (PID): Picture ID represented in 7 or 15 bits, depending 340 on the M bit. This is a running index of the pictures. The field 341 MUST be present if the I bit is equal to one. If M is set to 342 zero, 7 bits carry the PID; else if M is set to one, 15 bits carry 343 the PID. The sender may choose between 7 or 15 bits index. The 344 PID SHOULD start on a random number, and MUST wrap after reaching 345 the maximum ID. The receiver MUST NOT assume that the number of 346 bits in PID stay the same through the session. 348 Layer indices: This information is optional but recommended whenever 349 encoding with layers. In the flexible mode (when the F bit is set 350 to 1), one octet is used to specify a layer frame's temporal layer 351 ID (T) and spatial layer ID (S) as shown in Figure 2. 352 Additionally, a bit (U) is used to indcate that the current frame 353 is a "switching up point" frame. Another bit (D) is used to 354 indicate whether inter-layer prediction is used for the current 355 layer frame. 357 In the non-flexible mode (when the F bit is set to 0), two octets 358 are used as depicted in Figure 3. Like the flexible mode, the 359 first byte contains the spatial layer ID and the D bit. Unlike 360 the flexible mode, instead of the T and U fields, a group of 361 frames index (GOF_IDX) is specified, which can be used to obtain 362 the values of T and U fields from the scalable structure (SS) data 363 described below. An additional octet to represent the temporal 364 layer 0 index, TL0PICIDX, is present so that all minimally 365 required frames can be tracked. 367 The T and S fields, whether obtained directly or indirectly from 368 the SS data, indicate the temporal and spatial layers and can help 369 MCUs measure bitrates per layer and can help them make a quick 370 decision on whether to relay a packet or not. They can also help 371 receivers determine what layers they are currently decoding. 373 T: The temporal layer ID of current frame. This field is only 374 present in the flexible mode (F = 1). 376 U: Switching up point. This bit is only present in the flexible 377 mode (F = 1). If this bit is set to 1 for the current frame 378 with temporal layer ID equal to T, then "switch up" to a higher 379 frame rate is possible as subsequent higher temporal layer 380 frames will not depend on any frame before the current frame 381 (in coding time) with temporal layer ID greater than T. 383 S: The spatial layer ID of current frame. Note that frames with 384 spatial layer S > 0 may be dependent on decoded spatial layer 385 S-1 frame within the same super frame. 387 D: Inter-layer dependency used. MUST be set to one if current 388 spatial layer S frame depends on spatial layer S-1 frame of the 389 same super frame. MUST only be set to zero if current spatial 390 layer S frame does not depend on spatial layer S-1 frame of the 391 same super frame. For the base layer frame with S equal to 0, 392 this D bit MUST be set to zero. 394 GOF_IDX: An index to a frame in the group of frames (GOF) 395 described by the SS data. This field is only present in the 396 non-flexible mode (F = 0). In this mode, the SS data SHOULD 397 have been received and the temporal characteristics of each 398 frame must have been speficied as group of frames in the SS 399 data (see the description of "Scalability structure" below). 400 Here, the values of the T and the U fields are derived from the 401 SS data. Additionally, the frame's inter-picture dependecy can 402 also be obtained from the SS data. In the case no SS data has 403 been received or the received SS data does not specify GOF (N_G 404 is set to 0), then GOF_IDX MUST be ignored and the stream is 405 assumed to have no temporal hierarchy with both T and U equal 406 to 0. 408 TL0PICIDX: 8 bits temporal layer zero index. TL0PICIDX is only 409 present in the non-flexible mode (F = 0). This is a running 410 index for the temporal base layer frames, i.e., the frames with 411 temporal layer ID (TID) set to 0. If TID is larger than 0, 412 TL0PICIDX indicates which temporal base layer frame the current 413 frame depends on. TL0PICIDX MUST be incremented when TID is 0. 414 The index SHOULD start on a random number, and MUST restart at 415 0 after reaching the maximum number 255. 417 Reference indices: These bytes are optional, but recommended when 418 encoding with temporal layers in the flexible mode. When P and F 419 are both set to one, then at least one reference index has to be 420 specified as below. Additional reference indices (total of up to 421 3 reference indices are allowed) may be specified using the N bit 422 below. When either P or F is set to zero, then no reference index 423 is specified. 425 P_DIFF: The reference index specified as the relative PID from 426 the current frame. For example, when P_DIFF=3 on a packet 427 containing the frame with PID 112 means that the frame refers 428 back to the frame with PID 109. This calculation is done 429 modulo the size of the PID field, i.e., either 7 or 15 bits. 430 For most layer structures a 6-bit relative PID will be enough; 431 however, the X bit can be used to refer to older frames. 433 X: 1 if this layer index has an extended P_DIFF. 435 N: 1 if there is additional P_DIFF following the current P_DIFF. 437 4.2.1. Scalability Structure (SS): 439 The scalability structure (SS) data describes the resolution of each 440 layer frame within a super frame as well as the inter-picture 441 dependencies for a group of frames (GOF). If the VP9 payload 442 descriptor's "V" bit is set, the SS data is present in the position 443 indicated in Figure 2 and Figure 3. 445 +-+-+-+-+-+-+-+-+ 446 V: | N_S |Y| N_G | 447 +-+-+-+-+-+-+-+-+ -\ 448 Y: | WIDTH | (OPTIONAL) . 449 + + . 450 | | (OPTIONAL) . 451 +-+-+-+-+-+-+-+-+ . - N_S + 1 times 452 | HEIGHT | (OPTIONAL) . 453 + + . 454 | | (OPTIONAL) . 455 +-+-+-+-+-+-+-+-+ -/ -\ 456 N_G: | T |U| R |-|-| (OPTIONAL) . 457 +-+-+-+-+-+-+-+-+ -\ . - N_G + 1 times 458 | P_DIFF | (OPTIONAL) . - R times . 459 +-+-+-+-+-+-+-+-+ -/ -/ 461 Figure 4 463 N_S: N_S + 1 indicates the number of spatial layers present in the 464 VP9 stream. 466 Y: Each spatial layer's frame resolution present. When set to one, 467 the OPTIONAL WIDTH (2 octets) and HEIGHT (2 octets) MUST be 468 present for each layer frame. Otherwise, the resolution MUST NOT 469 be present. 471 N_G: N_G + 1 indicates the number of frames in a GOF. If N_G is 472 greater than 0, then the SS data allows the inter-picture 473 dependency structure of the VP9 stream to be pre-declared, rather 474 than indicating it on the fly with every packet. If N_G is 475 greater than 0, then for N_G + 1 pictures in the GOF, each frame's 476 temporal layer ID (T), switch up point (U), and the R reference 477 indices (P_DIFFs) are specified. 479 N_G=0 indicates that either there is only one temporal layer or no 480 fixed inter-picture dependency information is present going 481 forward in the bitstream. 483 Note that for a given super frame, all layer frames follow the 484 same inter-picture dependency structure. However, the frame rate 485 of each spatial layer can be different from each other and this 486 can be controlled with the use of the D bit described above. The 487 specified dependency structure in the SS data MUST be for the 488 highest frame rate layer. 490 In a scalable stream sent with a fixed pattern, the SS data SHOULD be 491 included in the first packet of every key frame. This is a packet 492 with P bit equal to zero, S or D bit equal to zero, B bit equal to 1, 493 and temporal layer ID (TID) equal to 0. The SS data SHOULD also be 494 included in the first packet of the first frame in which the SS 495 changes. If the SS data is included in a frame with TID not equal to 496 0, it MUST also be repeated in the first packet of the first frame 497 with a lower TID, until TID equals to 0. 499 4.3. VP9 Payload Header 501 TODO: need to describe VP9 payload header. 503 4.4. Frame Fragmentation 505 VP9 frames are fragmented into packets, in RTP sequence number order, 506 beginning with a packet with the B bit set, and ending with a packet 507 with the RTP marker bit set. There is no mechanism for finer-grained 508 access to parts of a VP9 frame. 510 4.5. Examples of VP9 RTP Stream 512 TODO 514 5. Using VP9 with RPSI and SLI Feedback 516 The VP9 payload descriptor defined in Section 4.2 above contains an 517 optional PictureID parameter. One use of this parameter is included 518 to enable use of reference picture selection index (RPSI) and slice 519 loss indication (SLI), both defined in [RFC4585]. 521 5.1. RPSI 523 TODO: Update to indicate which frame within the picture. 525 The reference picture selection index is a payload-specific feedback 526 message defined within the RTCP-based feedback format. The RPSI 527 message is generated by a receiver and can be used in two ways. 528 Either it can signal a preferred reference picture when a loss has 529 been detected by the decoder -- preferably then a reference that the 530 decoder knows is perfect -- or, it can be used as positive feedback 531 information to acknowledge correct decoding of certain reference 532 pictures. The positive feedback method is useful for VP9 used as 533 unicast. The use of RPSI for VP9 is preferably combined with a 534 special update pattern of the codec's two special reference frames -- 535 the golden frame and the altref frame -- in which they are updated in 536 an alternating leapfrog fashion. When a receiver has received and 537 correctly decoded a golden or altref frame, and that frame had a 538 PictureID in the payload descriptor, the receiver can acknowledge 539 this simply by sending an RPSI message back to the sender. The 540 message body (i.e., the "native RPSI bit string" in [RFC4585]) is 541 simply the PictureID of the received frame. 543 5.2. SLI 545 TODO: Update to indicate which frame within the picture. 547 The slice loss indication is another payload-specific feedback 548 message defined within the RTCP-based feedback format. The SLI 549 message is generated by the receiver when a loss or corruption is 550 detected in a frame. The format of the SLI message is as follows 551 [RFC4585]: 553 0 1 2 3 554 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 555 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 556 | First | Number | PictureID | 557 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 559 Figure 5 561 Here, First is the macroblock address (in scan order) of the first 562 lost block and Number is the number of lost blocks. PictureID is the 563 six least significant bits of the codec-specific picture identifier 564 in which the loss or corruption has occurred. For VP9, this codec- 565 specific identifier is naturally the PictureID of the current frame, 566 as read from the payload descriptor. If the payload descriptor of 567 the current frame does not have a PictureID, the receiver MAY send 568 the last received PictureID+1 in the SLI message. The receiver MAY 569 set the First parameter to 0, and the Number parameter to the total 570 number of macroblocks per frame, even though only parts of the frame 571 is corrupted. When the sender receives an SLI message, it can make 572 use of the knowledge from the latest received RPSI message. Knowing 573 that the last golden or altref frame was successfully received, it 574 can encode the next frame with reference to that established 575 reference. 577 5.3. Example 579 TODO: this example is copied from the VP8 payload format 580 specification, and has not been updated for VP9. It may be 581 incorrect. 583 The use of RPSI and SLI is best illustrated in an example. In this 584 example, the encoder may not update the altref frame until the last 585 sent golden frame has been acknowledged with an RPSI message. If an 586 update is not received within some time, a new golden frame update is 587 sent instead. Once the new golden frame is established and 588 acknowledged, the same rule applies when updating the altref frame. 590 +-------+-------------------+-------------------------+-------------+ 591 | Event | Sender | Receiver | Established | 592 | | | | reference | 593 +-------+-------------------+-------------------------+-------------+ 594 | 1000 | Send golden frame | | | 595 | | PictureID = 0 | | | 596 | | | | | 597 | | | Receive and decode | | 598 | | | golden frame | | 599 | | | | | 600 | 1001 | | Send RPSI(0) | | 601 | | | | | 602 | 1002 | Receive RPSI(0) | | golden | 603 | | | | | 604 | ... | (sending regular | | | 605 | | frames) | | | 606 | | | | | 607 | 1100 | Send altref frame | | | 608 | | PictureID = 100 | | | 609 | | | | | 610 | | | Altref corrupted or | golden | 611 | | | lost | | 612 | | | | | 613 | 1101 | | Send SLI(100) | golden | 614 | | | | | 615 | 1102 | Receive SLI(100) | | | 616 | | | | | 617 | 1103 | Send frame with | | | 618 | | reference to | | | 619 | | golden | | | 620 | | | | | 621 | | | Receive and decode | golden | 622 | | | frame (decoder state | | 623 | | | restored) | | 624 | | | | | 625 | ... | (sending regular | | | 626 | | frames) | | | 627 | | | | | 628 | 1200 | Send altref frame | | | 629 | | PictureID = 200 | | | 630 | | | | | 631 | | | Receive and decode | golden | 632 | | | altref frame | | 633 | | | | | 634 | 1201 | | Send RPSI(200) | | 635 | | | | | 636 | 1202 | Receive RPSI(200) | | altref | 637 | | | | | 638 | ... | (sending regular | | | 639 | | frames) | | | 640 | | | | | 641 | 1300 | Send golden frame | | | 642 | | PictureID = 300 | | | 643 | | | | | 644 | | | Receive and decode | altref | 645 | | | golden frame | | 646 | | | | | 647 | 1301 | | Send RPSI(300) | altref | 648 | | | | | 649 | 1302 | RPSI lost | | | 650 | | | | | 651 | 1400 | Send golden frame | | | 652 | | PictureID = 400 | | | 653 | | | | | 654 | | | Receive and decode | altref | 655 | | | golden frame | | 656 | | | | | 657 | 1401 | | Send RPSI(400) | | 658 | | | | | 659 | 1402 | Receive RPSI(400) | | golden | 660 +-------+-------------------+-------------------------+-------------+ 662 Table 1: Example signaling between sender and receiver 664 Note that the scheme is robust to loss of the feedback messages. If 665 the RPSI is lost, the sender will try to update the golden (or 666 altref) again after a while, without releasing the established 667 reference. Also, if an SLI is lost, the receiver can keep sending 668 SLI messages at any interval allowed by the RTCP sending timing 669 restrictions as specified in [RFC4585], as long as the picture is 670 corrupted. 672 6. Payload Format Parameters 674 This payload format has two required parameters. 676 6.1. Media Type Definition 678 This registration is done using the template defined in [RFC6838] and 679 following [RFC4855]. 681 Type name: video 682 Subtype name: VP9 684 Required parameters: 685 These parameters MUST be used to signal the capabilities of a 686 receiver implementation. These parameters MUST NOT be used for 687 any other purpose. 689 max-fr: The value of max-fr is an integer indicating the maximum 690 frame rate in units of frames per second that the decoder is 691 capable of decoding. 693 max-fs: The value of max-fs is an integer indicating the maximum 694 frame size in units of macroblocks that the decoder is capable 695 of decoding. 697 The decoder is capable of decoding this frame size as long as 698 the width and height of the frame in macroblocks are less than 699 int(sqrt(max-fs * 8)) - for instance, a max-fs of 1200 (capable 700 of supporting 640x480 resolution) will support widths and 701 heights up to 1552 pixels (97 macroblocks). 703 Optional parameters: none 705 Encoding considerations: 706 This media type is framed in RTP and contains binary data; see 707 Section 4.8 of [RFC6838]. 709 Security considerations: See Section 7 of RFC xxxx. 710 [RFC Editor: Upon publication as an RFC, please replace "XXXX" 711 with the number assigned to this document and remove this note.] 713 Interoperability considerations: None. 715 Published specification: VP9 bitstream format 716 [I-D.grange-vp9-bitstream] and RFC XXXX. 717 [RFC Editor: Upon publication as an RFC, please replace "XXXX" 718 with the number assigned to this document and remove this note.] 720 Applications which use this media type: 721 For example: Video over IP, video conferencing. 723 Additional information: None. 725 Person & email address to contact for further information: 726 TODO [Pick a contact] 728 Intended usage: COMMON 729 Restrictions on usage: 730 This media type depends on RTP framing, and hence is only defined 731 for transfer via RTP [RFC3550]. 733 Author: TODO [Pick a contact] 735 Change controller: 736 IETF Payload Working Group delegated from the IESG. 738 6.2. SDP Parameters 740 The receiver MUST ignore any fmtp parameter unspecified in this memo. 742 6.2.1. Mapping of Media Subtype Parameters to SDP 744 The media type video/VP9 string is mapped to fields in the Session 745 Description Protocol (SDP) [RFC4566] as follows: 747 o The media name in the "m=" line of SDP MUST be video. 749 o The encoding name in the "a=rtpmap" line of SDP MUST be VP9 (the 750 media subtype). 752 o The clock rate in the "a=rtpmap" line MUST be 90000. 754 o The parameters "max-fs", and "max-fr", MUST be included in the 755 "a=fmtp" line of SDP. These parameters are expressed as a media 756 subtype string, in the form of a semicolon separated list of 757 parameter=value pairs. 759 6.2.1.1. Example 761 An example of media representation in SDP is as follows: 763 m=video 49170 RTP/AVPF 98 764 a=rtpmap:98 VP9/90000 765 a=fmtp:98 max-fr=30; max-fs=3600; 767 6.2.2. Offer/Answer Considerations 769 TODO: Update this for VP9 771 7. Security Considerations 773 RTP packets using the payload format defined in this specification 774 are subject to the security considerations discussed in the RTP 775 specification [RFC3550], and in any applicable RTP profile. The main 776 security considerations for the RTP packet carrying the RTP payload 777 format defined within this memo are confidentiality, integrity and 778 source authenticity. Confidentiality is achieved by encryption of 779 the RTP payload. Integrity of the RTP packets through suitable 780 cryptographic integrity protection mechanism. Cryptographic system 781 may also allow the authentication of the source of the payload. A 782 suitable security mechanism for this RTP payload format should 783 provide confidentiality, integrity protection and at least source 784 authentication capable of determining if an RTP packet is from a 785 member of the RTP session or not. Note that the appropriate 786 mechanism to provide security to RTP and payloads following this memo 787 may vary. It is dependent on the application, the transport, and the 788 signaling protocol employed. Therefore a single mechanism is not 789 sufficient, although if suitable the usage of SRTP [RFC3711] is 790 recommended. This RTP payload format and its media decoder do not 791 exhibit any significant non-uniformity in the receiver-side 792 computational complexity for packet processing, and thus are unlikely 793 to pose a denial-of-service threat due to the receipt of pathological 794 data. Nor does the RTP payload format contain any active content. 796 8. Congestion Control 798 Congestion control for RTP SHALL be used in accordance with RFC 3550 799 [RFC3550], and with any applicable RTP profile; e.g., RFC 3551 800 [RFC3551]. The congestion control mechanism can, in a real-time 801 encoding scenario, adapt the transmission rate by instructing the 802 encoder to encode at a certain target rate. Media aware network 803 elements MAY use the information in the VP9 payload descriptor in 804 Section 4.2 to identify non-reference frames and discard them in 805 order to reduce network congestion. Note that discarding of non- 806 reference frames cannot be done if the stream is encrypted (because 807 the non-reference marker is encrypted). 809 9. IANA Considerations 811 The IANA is requested to register the following values: 812 - Media type registration as described in Section 6.1. 814 10. References 816 [I-D.grange-vp9-bitstream] 817 Grange, A. and H. Alvestrand, "A VP9 Bitstream Overview", 818 draft-grange-vp9-bitstream-00 (work in progress), February 819 2013. 821 [I-D.lennox-avtext-lrr] 822 Lennox, J., Uberti, J., Holmer, S., and M. Flodman, "The 823 Layer Refresh Request (LRR) RTCP Feedback MessageVideo", 824 draft-lennox-avtext-lrr-00 (work in progress), March 2015. 826 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 827 Requirement Levels", BCP 14, RFC 2119, March 1997. 829 [RFC3550] Schulzrinne, H., Casner, S., Frederick, R., and V. 830 Jacobson, "RTP: A Transport Protocol for Real-Time 831 Applications", STD 64, RFC 3550, July 2003. 833 [RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and 834 Video Conferences with Minimal Control", STD 65, RFC 3551, 835 July 2003. 837 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 838 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 839 RFC 3711, March 2004. 841 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 842 Description Protocol", RFC 4566, July 2006. 844 [RFC4585] Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey, 845 "Extended RTP Profile for Real-time Transport Control 846 Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585, July 847 2006. 849 [RFC4855] Casner, S., "Media Type Registration of RTP Payload 850 Formats", RFC 4855, February 2007. 852 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 853 Specifications and Registration Procedures", BCP 13, RFC 854 6838, January 2013. 856 Authors' Addresses 858 Justin Uberti 859 Google, Inc. 860 747 6th Street South 861 Kirkland, WA 98033 862 USA 864 Email: justin@uberti.name 866 Stefan Holmer 867 Google, Inc. 868 Kungsbron 2 869 Stockholm 111 22 870 Sweden 871 Magnus Flodman 872 Google, Inc. 873 Kungsbron 2 874 Stockholm 111 22 875 Sweden 877 Jonathan Lennox 878 Vidyo, Inc. 879 433 Hackensack Avenue 880 Seventh Floor 881 Hackensack, NJ 07601 882 US 884 Email: jonathan@vidyo.com 886 Danny Hong 887 Vidyo, Inc. 888 433 Hackensack Avenue 889 Seventh Floor 890 Hackensack, NJ 07601 891 US 893 Email: danny@vidyo.com