[xiph-commits] r10958 - in branches/theora-mmx: . doc doc/spec lib
j at svn.xiph.org
j at svn.xiph.org
Sat Feb 25 14:56:17 PST 2006
Author: j
Date: 2006-02-25 14:56:09 -0800 (Sat, 25 Feb 2006)
New Revision: 10958
Modified:
branches/theora-mmx/
branches/theora-mmx/Makefile.am
branches/theora-mmx/doc/draft-barbato-avt-rtp-theora-00.txt
branches/theora-mmx/doc/draft-barbato-avt-rtp-theora-00.xml
branches/theora-mmx/doc/spec/spec.tex
branches/theora-mmx/lib/comment.c
branches/theora-mmx/lib/encoder_toplevel.c
branches/theora-mmx/lib/idct.c
Log:
merge changes from trunk
Property changes on: branches/theora-mmx
___________________________________________________________________
Name: branch-point
- 10495
+ 10957
Modified: branches/theora-mmx/Makefile.am
===================================================================
--- branches/theora-mmx/Makefile.am 2006-02-25 22:49:40 UTC (rev 10957)
+++ branches/theora-mmx/Makefile.am 2006-02-25 22:56:09 UTC (rev 10958)
@@ -9,17 +9,21 @@
# to pick up on the lowercase changelog file and add ChangeLog to DIST_COMMON
# because of it, breaking make dist. This works just as well.
EXTRA_DIST = \
- COPYING autogen.sh win32 libtheora.spec libtheora.spec.in \
- theora-uninstalled.pc.in \
- debian
+ CHANGES COPYING autogen.sh win32 \
+ libtheora.spec libtheora.spec.in \
+ theora-uninstalled.pc.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = theora.pc
dist-hook:
- rm -rf `find $(distdir)/debian -name .svn`
- rm -rf `find $(distdir)/debian -name "Makefile*"`
- rm -rf `find $(distdir)/win32 -name .svn`
+ for item in $(EXTRA_DIST); do \
+ if test -d $$item; then \
+ echo -n "cleaning $$item dir for distribution..."; \
+ rm -rf `find $(distdir)/$$item -name .svn`; \
+ echo "OK"; \
+ fi; \
+ done
debug:
$(MAKE) all CFLAGS="@DEBUG@"
Modified: branches/theora-mmx/doc/draft-barbato-avt-rtp-theora-00.txt
===================================================================
--- branches/theora-mmx/doc/draft-barbato-avt-rtp-theora-00.txt 2006-02-25 22:49:40 UTC (rev 10957)
+++ branches/theora-mmx/doc/draft-barbato-avt-rtp-theora-00.txt 2006-02-25 22:56:09 UTC (rev 10958)
@@ -4,7 +4,7 @@
AVT Working Group L. Barbato
Internet-Draft Xiph.Org
-Expires: April 18, 2006 October 15, 2005
+Expires: August 28, 2006 February 24, 2006
draft-barbato-avt-rtp-theora-00
@@ -12,12 +12,10 @@
Status of this Memo
- This document is an Internet-Draft and is subject to all provisions
- of Section 3 of RFC 3667. By submitting this Internet-Draft, each
- author represents that any applicable patent or other IPR claims of
- which he or she is aware have been or will be disclosed, and any of
- which he or she become aware will be disclosed, in accordance with
- RFC 3668.
+ By submitting this Internet-Draft, each author represents that any
+ applicable patent or other IPR claims of which he or she is aware
+ have been or will be disclosed, and any of which he or she becomes
+ aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
@@ -35,33 +33,31 @@
The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
- This Internet-Draft will expire on April 18, 2006.
+ This Internet-Draft will expire on August 28, 2006.
Copyright Notice
- Copyright (C) The Internet Society (2005).
+ Copyright (C) The Internet Society (2006).
Abstract
This document describes a RTP payload format for transporting Theora
encoded video. It details the RTP encapsulation mechanism for raw
- Theora data and configuration headers consisting of the quantization
- matrices and the Huffman codebooks for the DCT coefficients, and a
- table of limit values for the deblocking filter.
+ Theora data and configuration headers necessary to configure the
+ decoder.
Also included within the document are the necessary details for the
+ use of Theora with MIME and Session Description Protocol (SDP).
+Editors Note
-Barbato Expires April 18, 2006 [Page 1]
+
+Barbato Expires August 28, 2006 [Page 1]
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
- use of Theora with MIME and Session Description Protocol (SDP).
-
-Editors Note
-
All references to RFC XXXX are to be replaced by references to the
RFC number of this memo, when published.
@@ -69,7 +65,7 @@
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3
- 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
+ 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
2. Payload Format . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1. RTP Header . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2. Payload Header . . . . . . . . . . . . . . . . . . . . . . 5
@@ -79,21 +75,25 @@
3.1. In-band Header Transmission . . . . . . . . . . . . . . . 9
3.1.1. Packed Configuration . . . . . . . . . . . . . . . . . 9
3.2. Out of Band Transmission . . . . . . . . . . . . . . . . . 10
- 3.2.1. Packed Headers . . . . . . . . . . . . . . . . . . . . 10
- 3.3. Loss of Configuration Headers . . . . . . . . . . . . . . 12
- 4. Comment Headers . . . . . . . . . . . . . . . . . . . . . . . 12
- 5. Frame Packetizing . . . . . . . . . . . . . . . . . . . . . . 13
- 5.1. Example Fragmented Theora Packet . . . . . . . . . . . . . 14
- 5.2. Packet Loss . . . . . . . . . . . . . . . . . . . . . . . 16
- 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17
- 6.1. Mapping MIME Parameters into SDP . . . . . . . . . . . . . 18
- 7. Security Considerations . . . . . . . . . . . . . . . . . . . 19
- 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 19
- 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 19
- 9.1. Normative References . . . . . . . . . . . . . . . . . . . 19
- 9.2. Informative References . . . . . . . . . . . . . . . . . . 20
- Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 21
- Intellectual Property and Copyright Statements . . . . . . . . . . 22
+ 3.2.1. Packed Headers . . . . . . . . . . . . . . . . . . . . 11
+ 3.3. Loss of Configuration Headers . . . . . . . . . . . . . . 13
+ 4. Comment Headers . . . . . . . . . . . . . . . . . . . . . . . 13
+ 5. Frame Packetizing . . . . . . . . . . . . . . . . . . . . . . 14
+ 5.1. Example Fragmented Theora Packet . . . . . . . . . . . . . 15
+ 5.2. Packet Loss . . . . . . . . . . . . . . . . . . . . . . . 17
+ 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18
+ 6.1. Mapping MIME Parameters into SDP . . . . . . . . . . . . . 19
+ 6.1.1. SDP Example . . . . . . . . . . . . . . . . . . . . . 20
+ 6.2. Usage with the SDP Offer/Answer Model . . . . . . . . . . 20
+ 7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
+ 7.1. Stream Video . . . . . . . . . . . . . . . . . . . . . . . 21
+ 8. Security Considerations . . . . . . . . . . . . . . . . . . . 21
+ 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 22
+ 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 22
+ 10.1. Normative References . . . . . . . . . . . . . . . . . . . 22
+ 10.2. Informative References . . . . . . . . . . . . . . . . . . 23
+ Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 24
+ Intellectual Property and Copyright Statements . . . . . . . . . . 25
@@ -109,16 +109,16 @@
-Barbato Expires April 18, 2006 [Page 2]
+Barbato Expires August 28, 2006 [Page 2]
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
1. Introduction
Theora is a general purpose, lossy video codec. It is based on the
- VP3.1 video codec produced by On2 Technologies and has been donated
- to the Xiph.org Foundation.
+ VP3 video codec produced by On2 Technologies and has been donated to
+ the Xiph.org Foundation.
Theora I is a block-based lossy transform codec that utilizes an 8 x
8 Type-II Discrete Cosine Transform and block-based motion
@@ -129,33 +129,47 @@
frames (I frames in MPEG) and inter frames (P frames in MPEG).
Theora provides none of its own framing, synchronization, or
- protection against transmission errors. Theora is a free-form
- variable bit rate (VBR) codec, and packets have no minimum size,
- maximum size, or fixed/expected size. Theora packets are thus
+ protection against transmission errors. Instead, the codec expects
+ to receive a discrete sequence of data packets. Theora is a free-
+ form variable bit rate (VBR) codec, and these packets have no minimum
+ size, maximum size, or fixed/expected size. Theora packets are thus
intended to be used with a transport mechanism that provides free-
form framing, synchronization, positioning, and error correction in
- accordance with these design assumptions, such as Ogg [1]. or RTP/AVP
+ accordance with these design assumptions, such as Ogg [1] or RTP/AVP
[3].
Theora I currently supports progressive video data of arbitrary
- dimensions at a constant frame rate in one of several YCbCr color
+ dimensions at a constant frame rate in one of several Y'CbCr color
spaces. Three different chroma subsampling formats are supported:
4:2:0, 4:2:2, and 4:4:4. The Theora I format does not support
interlaced material, variable frame rates, bit-depths larger than 8
bits per component, nor alternate color spaces such as RGB or
arbitrary multi-channel spaces. Black and white content can be
efficiently encoded, however, because the uniform chroma planes
- compress well.
+ compress well. Arbitrary frame size will be encoded rounding to the
+ upper multiple of 16 both dimension for performance reason. The
+ original width and height will be encoded in the header and the
+ decoder will use this information to clip the decoded frame to the
+ right dimensions.
- Theora is similar to Vorbis audio [10] in that it requires the
- inclusion of the entire probability model for the DCT coefficients
- and all the quantization parameters in the bitstream headers to be
- sent ahead of the video data. It is therefore impossible to decode
- any frame in the stream without having previously fetched the codec
- info and codec setup headers, although Theora can initiate decode at
- an arbitrary intra-frame packet within a bitstream so long as the
- codec has been initialized with the setup headers.
+ Theora is similar to the Vorbis audio [10] in that it the decoder
+ reads the probability model for the entropy coder and all
+ quantization parameters from special "header" packets at the start of
+ the compressed data. It is therefore impossible to decode any video
+ data without having previously fetched the codec info and codec setup
+ headers, although Theora can initiate decode at an arbitrary intra-
+ frame packet so long as the codec has been initialized with the
+ associated headers.
+
+
+
+
+Barbato Expires August 28, 2006 [Page 3]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
1.1. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
@@ -163,23 +177,18 @@
document are to be interpreted as described in RFC 2119 [2].
-
-
-Barbato Expires April 18, 2006 [Page 3]
-
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
-
-
2. Payload Format
- Each frame of digital video is packetized into one or more RTP
- packets. If the data for a complete frame exceeds the network MTU,
- it SHOULD be fragmented into multiple RTP packets, each smaller than
- the MTU. A single RTP packet MAY contain data for more than one
- Theora frame.
+ For RTP based transportation of Theora encoded video the standard RTP
+ header is followed by a 4 octets payload header, then the payload
+ data. The payload headers are used to associate the Theora data with
+ its associated decoding codebooks as well as indicating if the
+ following packet contains fragmented Theora data and/or the number of
+ whole Theora data frames. The payload data contains the raw Theora
+ bitstream information.
- For RTP based transportation of Theora encoded video the standard RTP
- header is followed by a 4 octet payload header, then the payload
+ For RTP based transport of Theora encoded video the standard RTP
+ header is followed by a 4 octets payload header, then the payload
data.
2.1. RTP Header
@@ -209,6 +218,14 @@
Version (V): 2 bits
+
+
+
+Barbato Expires August 28, 2006 [Page 4]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
This field identifies the version of RTP. The version used by this
specification is two (2).
@@ -219,13 +236,6 @@
Extension (X): 1 bit
-
-
-Barbato Expires April 18, 2006 [Page 4]
-
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
-
-
The Extension bit is used in accordance with [3].
CSRC count (CC): 4 bits
@@ -250,10 +260,9 @@
Timestamp: 32 bits
- A timestamp representing the sampling time of the first sample of the
- first Theora packet in the RTP packet. The clock frequency MUST be
- set to the sample rate of the encoded video data and is conveyed out-
- of-band as an SDP attribute.
+ A timestamp representing the presentation time of the first sample of
+ the first Theora packet in the RTP packet. The clock frequency MUST
+ be set to 90kHz.
SSRC/CSRC identifiers:
@@ -262,10 +271,17 @@
2.2. Payload Header
- After the RTP Header section the following five octets are the
- Payload Header. This header is split into a number of bitfields
- detailing the format of the following Payload Data packets.
+ The 4 octets following the RTP Header section are the Payload Header.
+ This header is split into a number of bitfields detailing the format
+ of the following Payload Data packets.
+
+
+Barbato Expires August 28, 2006 [Page 5]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -274,14 +290,6 @@
+-+-+-+-+-+-+-+-+
-
-
-
-Barbato Expires April 18, 2006 [Page 5]
-
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
-
-
Figure 2: Payload Header
Configuration Ident: 24 bits
@@ -291,34 +299,45 @@
Fragment type (F): 2 bit
- This field is set accordingly the following list
+ This field is set according to the following list
0 = Not Fragmented
1 = Start Fragment
2 = Continuation Fragment
3 = End Fragment
+ This field must be zero if the number of packets field is non-zero.
+
Theora Data Type (TDT): 2 bits
This field sets the packet payload type for the Theora data. There
- are currently two type of Vorbis payloads.
+ are currently three Theora payload types.
0 = Raw Theora payload
1 = Theora Packed Configuration payload
2 = Legacy Theora Comment payload
3 = Reserved
- The last 4 bits are the number of complete packets in this payload.
- This provides for a maximum number of 15 Theora packets in the
- payload. If the packet contains fragmented data the number of
+ The packets with a TDT of value 3 MUST be ignored
+
+ The last 4 bits represent the number of complete packets in this
+ payload. This provides for a maximum number of 15 Theora packets in
+ the payload. If the packet contains fragmented data the number of
packets MUST be set to 0.
2.3. Payload Data
- Each Theora payload section starts with a two octet length header
+ Each Theora payload section starts with a two octets length header
that is used to represent the size of the following data payload,
- followed by the raw Theora data.
+ followed by the raw Theora packet data.
+
+
+Barbato Expires August 28, 2006 [Page 6]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -329,23 +348,16 @@
The Theora codec uses relatively unstructured raw packets containing
binary integer fields of arbitrary width that often do not fall on an
- octet boundary. When this happens the bitstream is packed to an
-
-
-
-Barbato Expires April 18, 2006 [Page 6]
-
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
-
-
octet boundary. When a Theora encoder produces packets, unused space
in the last byte of a packet is always zeroed during the encoding
process. Thus, should this unused space be read, it will return
binary zeros.
For payloads which consist of multiple Theora packets the payload
- data consists of the payload length field followed by the payload
- data for each of the Theora packets in the payload.
+ data consists of the payload length field followed by the first
+ Theora packet's data, then the payload length followed by the second
+ Theora packet, and so on for each of the Theora packets in the
+ payload.
2.4. Example RTP Packet
@@ -358,7 +370,7 @@
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 2 |0|0| 0 |0| PT | sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | timestamp (in sample rate units) |
+ | timestamp |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| synchronisation source (SSRC) identifier |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
@@ -370,10 +382,22 @@
Payload Data:
+
+
+
+
+
+
+
+Barbato Expires August 28, 2006 [Page 7]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Configuration Ident | 0 | 0 | 2 pks |
+ | Configuration Ident | 0 | 0 | 2 pks |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload Length | ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -386,39 +410,31 @@
Figure 5: Example Theora Payload Packet
+ The payload portion of the packet begins with the 24 bit
+ Configuration ident field followed by 8 bits describing the payload.
+ The Fragment type field is set to 0, indicating that this packet
+ contains whole Theora frame data. The Data type field is set to 0
+ since it is theora raw data. The number of whole Theora data packets
+ is set to 2.
+ Each of the payload blocks starts with the two octets length field
+ followed by the variable length Theora packet data.
-Barbato Expires April 18, 2006 [Page 7]
-
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
-
-
- The payload portion of the packet starts with the 24 bit
- Configuration ident field followed by the 8 bit bitfield. The
- Fragment type field is set to 0, indicating that this packet contains
- whole Theora frame data. The Data type field is set to 0 since it is
- theora raw data. The number of whole Theora data packets is set to
- 2.
-
- Each of the payload blocks starts with the two octet length field and
- then follows by the variable length Theora data.
-
-
3. Configuration Headers
- To decode a Theora stream three configuration header blocks are
- needed. The first header, the Identification Header, indicates the
+ To decode a Theora stream three configuration header packets are
+ needed. The first, called the Identification Header, indicates the
frame dimensions, quality, blocks used and the version of the Theora
- encoder used. The second header, the Comment Header, contains stream
- metadata and the third header, the Setup Header, details which
- contains dequantization and Huffman tables.
+ encoder used. The second, called the Comment Header, contains stream
+ metadata and the third, called the Setup Header, contains details of
+ the dequantization and Huffman tables.
Since this information must be transmitted reliably, and as the RTP
- stream may change certain configuration data mid-session there are
+ stream may change certain configuration data mid-session, there are
different methods for delivering this configuration data to a client,
- both in-band and out-of-band which is detailed below. SDP delivery
- is used to set-up an initial state for the client application. The
+ both in-band and out-of-band which are detailed below. SDP delivery
+ is used to set up an initial state for the client application. The
changes may be due to different dequantization and Huffman tables as
well as different bitrates of the stream.
@@ -426,6 +442,14 @@
indicate the method and the optional URI where the Vorbis Packed
Configuration (Section 3.1.1) Packets could be fetched. Different
delivery methods MAY be advertised for the same session. The in-band
+
+
+
+Barbato Expires August 28, 2006 [Page 8]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
codebook delivery SHOULD be considered as baseline, out-of-band
delivery methods that don't use RTP will not be described in this
document. For non chained streams, the Configuration delivery method
@@ -433,23 +457,13 @@
SDP as explained in the IANA considerations (Section 6.1)
The 24 bit Ident field is used to map which Configuration will be
- used to decodea packet. When the Ident field changes, it indicates
+ used to decode a packet. When the Ident field changes, it indicates
that a change in the stream has taken place. The client application
MUST have in advance the correct configuration and if the client
detects a change in the Ident value and does not have this
information it MUST NOT decode the raw data associated until it
fetches the correct Configuration.
-
-
-
-
-
-Barbato Expires April 18, 2006 [Page 8]
-
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
-
-
3.1. In-band Header Transmission
The Packed Configuration (Section 3.1.1) Payload is sent in-band with
@@ -461,11 +475,37 @@
A Theora Packed Configuration is indicated with the payload type
field set to 1. Of the three headers, defined in the Theora I
- specification [12], the identification and the setup will be packed
- together, the comment header is completely suppressed. Is up to the
- client provide a minimal size comment header to the decoder if
+ specification [16], the identification and the setup will be packed
+ together, the comment header is completely suppressed. It is up to
+ the client to provide a minimal size comment header to the decoder if
required by the implementation.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Barbato Expires August 28, 2006 [Page 9]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -479,7 +519,7 @@
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Ident | 0 | 1 | 1|
+ | Configuration Ident | 0 | 1 | 1|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| length | Identification ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -498,37 +538,40 @@
Figure 6: Packed Configuration Figure
-
-
-
-Barbato Expires April 18, 2006 [Page 9]
-
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
-
-
The Ident field is set with the value that will be used by the Raw
Payload Packets to address this Configuration. The Fragment type is
set to 0 since the packet bears the full Packed configuration, the
- number of packet is set to 1.
+ number of packet is set to 1. In practice, Packed Headers usually
+ need to be fragmented to fit the path MTU.
3.2. Out of Band Transmission
- This section, as stated before, won't cover all the possible out-of-
- band delivery methods since they rely to different protocols and be
- linked to a specific application. The following packet definition
+ This section, as stated above, does not cover all the possible out-
+ of-band delivery methods since they rely on different protocols and
+ be linked to specific applications. The following packet definition
SHOULD be used in out-of-band delivery and MUST be used when
Configuration is inlined in the SDP.
+
+
+
+
+
+Barbato Expires August 28, 2006 [Page 10]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
3.2.1. Packed Headers
- As mentioned above the RECOMMENDED delivery vector for Theora
+ As mentioned above, the recommended delivery vector for Theora
configuration data is via a retrieval method that can be performed
using a reliable transport protocol. As the RTP headers are not
required for this method of delivery the structure of the
configuration data is slightly different. The packed header starts
with a 32 bit count field which details the number of packed headers
that are contained in the bundle. Next is the Packed header payload
- for each chained Theora stream.
+ for each setup id.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Number of packed headers |
@@ -543,29 +586,13 @@
Figure 7: Packed Headers Overview
Since the Configuration Ident and the Identification Header are fixed
- lenght there is only a 2 byte Lenght tag to define the lenght of the
+ length there is only a 16bit Length tag to define the length of the
packed headers.
-
-
-
-
-
-
-
-
-
-
-
-Barbato Expires April 18, 2006 [Page 10]
-
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
-
-
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Ident | ..
+ | Configuration Ident | ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
.. Length | Identification Header ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -578,85 +605,108 @@
Figure 8: Packed Headers Detail
- The key difference between the in-band format is there is no need for
- the payload header octet.
+ The key difference from the in-band format is that there is no need
+ for the payload header octet.
+
+
+
+
+
+Barbato Expires August 28, 2006 [Page 11]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
3.2.1.1. Packed Headers IANA Considerations
The following IANA considerations MUST only be applied to the packed
headers.
- MIME media type name: video
+ MIME media type name: audio
MIME subtype: theora-config
Required Parameters:
- None.
+ None
Optional Parameters:
- None.
+ None
Encoding considerations:
- This type is only defined for transfer via non RTP protocol as
- specified in RFC XXXX.
+ This media type contains binary data.
Security Considerations:
- See Section 6 of RFC 3047.
+ See Section 6 of RFC XXXX.
- Interoperability considerations: none
+ Interoperability considerations:
+ None
+
Published specification:
+ RFC XXXX [RFC Editor: please replace by the RFC number of this
+ memo, when published]
+ Applications which use this media type:
-Barbato Expires April 18, 2006 [Page 11]
-
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
+ Theora encoded video, configuration data.
+ Additional information:
- See RFC XXXX for details.
+ None
- Applications which use this media type:
+ Person & email address to contact for further information:
- Theora encoded video, configuration data.
+ Luca Barbato: <lu_zero at gentoo.org>
+ IETF Audio/Video Transport Working Group
- Additional information: none
- Person & email address to contact for further information:
- Luca Barbato: <lu_zero at gentoo.org>
+
+Barbato Expires August 28, 2006 [Page 12]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
Intended usage: COMMON
- Author/Change controller:
+ Restriction on usage:
- Author: Luca Barbato
+ This media type does not depend on the transport.
- Change controller: IETF AVT Working Group
+ Author:
+ Luca Barbato
+
+ Change controller:
+
+ IETF AVT Working Group
+
3.3. Loss of Configuration Headers
- Unlike the loss of raw Theora payload data, loss of a configuration
- header can lead to a situation where it will not be possible to
- successfully decode the stream.
+ Unlike the loss of raw Theora payload data, the loss of a
+ configuration header can lead to a situation where it will not be
+ possible to successfully decode the stream.
- Loss of Configuration Packet results in the halting of stream
+ A loss of a Configuration Packet results in the halting of stream
decoding and SHOULD be reported to the client as well as a loss
report sent via RTCP.
4. Comment Headers
- With the payload type flag set to 2, this indicates that the packet
- contain the comment metadata, such as artist name, track title and so
- on. These metadata messages are not intended to be fully descriptive
- but to offer basic track/song information. Clients MAY ignore it
- completely. The details on the format of the comments can be found
- in the Theora documentation [12].
+ When the payload type is set to 2, the packet contains the comment
+ metadata, such as artist name, track title and so on. These metadata
+ messages are not intended to be fully descriptive but to offer basic
+ title information. Clients MAY ignore them completely. The details
+ on the format of the comments can be found in the Theora
+ documentation [16].
@@ -669,9 +719,15 @@
-Barbato Expires April 18, 2006 [Page 12]
+
+
+
+
+
+
+Barbato Expires August 28, 2006 [Page 13]
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
0 1 2 3
@@ -687,7 +743,7 @@
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Ident | 0 | 2 | 1|
+ | Configuration Ident | 0 | 2 | 1|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| length | Comment ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -698,45 +754,46 @@
Figure 9: Comment Packet
- The 2 bytes length field is necessary since this packet could be
- fragmented.
+ The 2 byte length field is necessary since this Theora packet could
+ be fragmented.
5. Frame Packetizing
Each RTP packet contains either one complete Theora packet, one
Theora packet fragment, or an integer number of complete Theora
- packets (up to a max of 15 packets, since the number of packets is
- defined by a 4 bit value).
+ packets (up to a maximum of 15 packets, since the number of packets
+ is defined by a 4 bit value).
Any Theora data packet that is less than path MTU SHOULD be bundled
in the RTP packet with as many Theora packets as will fit, up to a
maximum of 15. Path MTU is detailed in [7] and [8].
- If a Theora packet is larger than 65535 octets it MUST be fragmented.
A fragmented packet has a zero in the last four bits of the payload
- header. The first fragment will set the Fragment type to 1. Each
- fragment after the first will set the Fragment type to 2 in the
- payload header. The RTP packet containing the last fragment of the
- Theora packet will have the Fragment type set to 3. To maintain the
- correct sequence for fragmented packet reception the timestamp field
- of fragmented packets MUST be the same as the first packet sent, with
- the sequence number incremented as normal for the subsequent RTP
+ header. The RTP packet containing the first fragment will set the
+ Fragment type to 1. Each RTP packet after the first will set the
+ Fragment type to 2 in the payload header. The RTP packet containing
+ the last fragment of the Theora packet will have the Fragment type
+ set to 3. If the fragmented Theora packet spans only two RTP
+ packets, the first will set the Fragment type field to 1 and the
+ second will set it to 2. To maintain the correct sequence for
+ fragmented packet reception the timestamp field of fragmented packets
-Barbato Expires April 18, 2006 [Page 13]
+Barbato Expires August 28, 2006 [Page 14]
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
- packets.
+ MUST be the same as the first packet sent, with the sequence number
+ incremented as normal for the subsequent RTP packets.
5.1. Example Fragmented Theora Packet
Here is an example fragmented Theora packet split over three RTP
packets. Each packet contains the standard RTP headers as well as
- the 4 octet Theora headers.
+ the 4 octets Theora headers.
Packet 1:
@@ -780,10 +837,9 @@
-
-Barbato Expires April 18, 2006 [Page 14]
+Barbato Expires August 28, 2006 [Page 15]
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
Packet 2:
@@ -801,7 +857,7 @@
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Configuration Ident | 2 | 0 | 0|
+ | Configuration Ident | 2 | 0 | 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload Length | ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -812,8 +868,8 @@
The Fragment type field is set to 2 and the number of packets field
is set to 0. For large Theora fragments there can be several of
- these type of payload packets. The maximum packet size SHOULD be no
- greater than the path MTU, including all RTP and payload headers.
+ these type of payload packets. The maximum RTP packet size SHOULD be
+ no greater than the path MTU, including all RTP and payload headers.
The sequence number has been incremented by one but the timestamp
field remains the same as the initial packet.
@@ -837,9 +893,9 @@
-Barbato Expires April 18, 2006 [Page 15]
+Barbato Expires August 28, 2006 [Page 16]
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
Packet 3:
@@ -857,7 +913,7 @@
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Configuration Ident | 3 | 0 | 0|
+ | Configuration Ident | 3 | 0 | 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload Length | ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -882,20 +938,20 @@
the Fragment type is set to 2 and MUST drop it. The next packet,
which is the final fragmented packet, MUST be dropped in the same
manner. Feedback reports on lost and dropped packets MUST be sent
- back via RTCP.
+ back via RTCP.[note: reordering]
If a particular multicast session has a large number of participants
care must be taken to prevent an RTCP feedback implosion, [9], in the
event of packet loss from a large number of participants.
Loss of any of the Configuration fragment will result in the loss of
- the full Configuration packet with the result detailed in the Loss of
+ the full Configuration packet as detailed in the Loss of
-Barbato Expires April 18, 2006 [Page 16]
+Barbato Expires August 28, 2006 [Page 17]
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
Configuration Headers (Section 3.3) section.
@@ -909,123 +965,219 @@
Required Parameters:
- sampling: Determines the chroma subsampling format.
+ sampling: Determines the chroma subsampling format.
- width: Determines the number of pixels per line. This is an integer
- between 1 and 1048561 and MUST be in multiples of 16.
+ width: Determines the number of pixels per line. This is an
+ integer between 1 and 1048561 and MUST be in multiples of 16.
- height: Determines the number of lines per frame. This is an integer
- between 1 and 1048561 and MUST be in multiples of 16.
+ height: Determines the number of lines per frame encoded. This is
+ an integer between 1 and 1048561 and MUST be in multiples of
+ 16.
- delivery-method: indicates the delivery methods in use, the possible
- values are:inline, in_band, out_band/specific-method
+ delivery-method: indicates the delivery methods in use, the
+ possible values are: inline, in_band, out_band/specific_name
+ Where "specific_name" is the name of the out of band delivery
+ method.
- configuration: the base16 [15] (hexadecimal) representation of the
- Packed Headers (Section 3.2.1).
+ configuration: the base16 [11] (hexadecimal) representation of the
+ Packed Headers (Section 3.2.1).
Optional Parameters:
- configuration-uri: the URI of the configuration headers in case of
- out of band transmission. In the form of
- "protocol://path/to/resource/". Depending on the specific method the
- single ident packet could be retrived by their number, or aggregated
- in a single stream.
+ configuration-uri: the URI of the configuration headers in case of
+ out of band transmission. In the form of
+ "protocol://path/to/resource/". Depending on the specific
+ method the single ident packets could be retrived by their
+ number or aggregated in a single stream, aggregates MAY be
+ compressed using gzip [12] or bzip2 [14] and an sha1 [13]
+ checksum MAY be provided in the form of
+ "protocol://path/to/resource/aggregated.bz2!sha1hash"
Encoding considerations:
- This type is only defined for transfer via RTP as specified in RFC
- XXXX.
+ This media type is framed and contains binary data.
Security Considerations:
- See Section 6 of RFC 3047.
+ See Section 6 of RFC XXXX.
- Interoperability considerations: none
- Published specification:
- See the Theora documentation [12] for details.
+Barbato Expires August 28, 2006 [Page 18]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
-Barbato Expires April 18, 2006 [Page 17]
-
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
+ Interoperability considerations:
+ None
+ Published specification:
+
+ RFC XXXX [RFC Editor: please replace by the RFC number of this
+ memo, when published]
+
+ Ogg Theora I specification: Codec setup and packet decode.
+ Available from the Xiph website, http://www.xiph.org
+
Applications which use this media type:
- Video streaming and conferencing tools
+ Audio streaming and conferencing tools
- Additional information: none
+ Additional information:
+ None
+
Person & email address to contact for further information:
- Luca Barbato: <lu_zero at gentoo.org>
+ Luca Barbato: <lu_zero at gentoo.org>
+ IETF Audio/Video Transport Working Group
- Intended usage: COMMON
+ Intended usage:
- Author/Change controller:
+ COMMON
- Author: Luca Barbato
+ Restriction on usage:
- Change controller: IETF AVT Working Group
+ This media type depends on RTP framing, and hence is only defined
+ for transfer via RTP [3]
+ Author:
+
+ Luca Barbato
+
+ Change controller:
+
+ IETF AVT Working Group
+
+
6.1. Mapping MIME Parameters into SDP
The information carried in the MIME media type specification has a
specific mapping to fields in the Session Description Protocol (SDP)
[6], which is commonly used to describe RTP sessions. When SDP is
+
+
+
+Barbato Expires August 28, 2006 [Page 19]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
used to specify sessions the mapping are as follows:
o The MIME type ("video") goes in SDP "m=" as the media name.
- o The MIME subtype ("THEORA") goes in SDP "a=rtpmap" as the encoding
+ o The MIME subtype ("theora") goes in SDP "a=rtpmap" as the encoding
name.
- o The parameter "rate" also goes in "a=rtpmap" as clock rate.
+ o The clock rate in the "a=rtpmap" line MUST be 90000
o The mandated parameters "delivery-method" and "configuration" MUST
be included in the SDP "a=fmpt" attribute.
o The optional parameter "configuration-uri", when present, MUST be
- included in the SDP "a=fmpt" attribute.
+ included in the SDP "a=fmpt" attribute and MUST follow the
+ delivery-method that applies.
- If the stream comprises chained Theora files and all of them are
- known in advance, the Configuration Packet for each file SHOULD be
- packaged together and passed to the client using the configuration
- attribute.
+ If the stream uses multiple decoder setup configurations and all of
+ them are known in advance, the Configuration Packet for each file
+ SHOULD be packaged together and passed to the client using the
+ configuration attribute.
The URI specified in the configuration-uri attribute MUST point to a
location where all of the Configuration Packets needed for the life
of the session reside.
- The answer to any offer, [5], MUST NOT change the URI specified in
+6.1.1. SDP Example
+ The following example shows a basic SDP for a single stream. The
+ first configuration packet is inlined in the sdp, other
+ configurations could be fetched at any time from the first provided
+ uri using or all the known configuration could be downloaded using
+ the second uri. The inline base16 [11] configuration string is
+ omitted because of the lenght.
+ c=IN IP4 192.0.0.1
+ m=video RTP/AVP 98
+ a=rtpmap:98 theora/90000
+ a=fmtp:98 sampling=YCbCr-4:2:2; width=1280; height=720; delivery-
+ method=inline; configuration=base16string1; delivery-
+ method=out_band/rtsp; delivery-method=out_band/rtsp;
+ configuration-uri=rtsp://path/to/resource/; delivery-
+ method=out_band/http; configuration-uri=http://another/path/to/
+ resource/aggregate.bz2!sha1hash;
+6.2. Usage with the SDP Offer/Answer Model
-Barbato Expires April 18, 2006 [Page 18]
+ The offer, as described in An Offer/Answer Model Session Description
+ Protocol [5], may contain a large number of delivery methods per
+ single fmtp attribute, the answerer MUST remove every delivery-method
+
+
+
+Barbato Expires August 28, 2006 [Page 20]
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
- the configuration-uri attribute. The Configuration inlined in the
- configuration parameter MAY change.
+ and configuration-uri not supported. All the parameters MUST not be
+ altered on answer otherwise.
- Example:
- c=IN IP4/6
- m=video RTP/AVP 98
- a=rtpmap:98 theora/90000
- a=fmtp:98 sampling=YCbCr-4:2:2; width=1280; height=720; delivery-
- method=inline; configuration=base16string1;
+7. Examples
+ The following examples are common usage patterns that MAY be applied
+ in such situations, the main scope of this section is to explain
+ better usage of the transmission vectors.
-7. Security Considerations
+7.1. Stream Video
+ This is one of the most common situation: one single server streaming
+ content in multicast, the clients may start a session at random time.
+ The content itself could be a mix of live stream, as the wj's voice
+ or studio scenes, and stored streams, as the music she plays.
+
+ In this situation we don't know in advance how many codebooks we will
+ use. The clients can join anytime and users expect to start the
+ fruition of the content in a short time.
+
+ On join the client will receive the current Configuration necessary
+ to decode the current streams inlined in the SDP so that the decoding
+ will start immediately after.
+
+ When the streamed content changes the new Configuration is sent in-
+ band before the actual stream, and the Configuration that has to be
+ sent inline in the SDP updated. Since the inline method is
+ unreliable, an out of band fallback is provided.
+
+ The client could choose to fetch the Configuration from the alternate
+ source as soon it discovers a Configuration packet got lost inline or
+ use selective retransmission [17], if the server supports the
+ feature.
+
+ A serverside optimization would be to keep an hash list of the
+ Configurations per session to avoid packing all of them and send the
+ same Configuration with different Ident tags
+
+ A clientside optimization would be to keep a tag list of the
+ Configurations per session and don't process configuration packets
+ already known.
+
+
+8. Security Considerations
+
RTP packets using this payload format are subject to the security
considerations discussed in the RTP specification [3]. This implies
+
+
+
+Barbato Expires August 28, 2006 [Page 21]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
that the confidentiality of the media stream is achieved by using
encryption. Because the data compression used with this payload
format is applied end-to-end, encryption may be performed on the
@@ -1033,19 +1185,20 @@
taken to prevent buffer overflows in the client applications.
-8. Acknowledgments
+9. Acknowledgments
This document is a continuation of draft-kerr-avt-theora-rtp-00.txt
Thanks to the AVT, Ogg Theora Communities / Xiph.org, Fluendo, Ralph
- Giles, Mike Smith, Phil Kerr, Politecnico di Torino (LS)^3/IMG Group
- in particular Federico Ridolfo, Francesco Varano, Giampaolo Mancini,
+ Giles, Mike Smith, Phil Kerr, Timothy Terriberry, Stefan Ehmann,
+ Alessandro Salvatori, Politecnico di Torino (LS)^3/IMG Group in
+ particular Federico Ridolfo, Francesco Varano, Giampaolo Mancini,
Juan Carlos De Martin.
-9. References
+10. References
-9.1. Normative References
+10.1. Normative References
[1] Pfeiffer, S., "The Ogg Encapsulation Format Version 0",
RFC 3533.
@@ -1058,14 +1211,6 @@
RFC 3550.
[4] Schulzrinne, H. and S. Casner, "RTP Profile for video and Video
-
-
-
-Barbato Expires April 18, 2006 [Page 19]
-
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
-
-
Conferences with Minimal Control.", RFC 3551.
[5] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model with
@@ -1081,33 +1226,53 @@
[9] Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey,
"Extended RTP Profile for RTCP-based Feedback (RTP/AVPF)",
+
+
+
+Barbato Expires August 28, 2006 [Page 22]
+
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
+
+
Internet Draft (draft-ietf-avt-rtcp-feedback-11: Work in
progress).
- [10] Kerr, P., "RTP Payload Format for Vorbis Encoded Audio -
+ [10] Barbato, L., "RTP Payload Format for Vorbis Encoded Audio -
draft-ietf-avt-vorbis-rtp-00", Internet Draft (Work in
progress).
-9.2. Informative References
+ [11] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings",
+ RFC 3548.
- [11] "libTheora: Available from the Xiph website,
+ [12] Deutsch, P., "GZIP file format specification version 4.3",
+ RFC 1952.
+
+ [13] National Institute of Standards and Technology, "Secure Hash
+ Standard", May 1993.
+
+ [14] Seward, J., "libbz2 and bzip2".
+
+10.2. Informative References
+
+ [15] "libTheora: Available from the Xiph website,
http://www.xiph.org".
- [12] "Ogg Theora I spec: Codec setup and packet decode.
- http://www.xiph.org/ogg/Theora/doc/Theora-spec-ref.html".
+ [16] "Theora I specification: Codec setup and packet decode.
+ http://www.xiph.org/theora/doc/Theora_I_spec.pdf".
- [13] "ITU-T Recommendation V.42, 1994, Rev. 1. Error-correcting
+ [17] Friedman, T., Caceres, R., and A. Clark, "RTP Control Protocol
+ Extended Reports (RTCP XR)", RFC 3611, November 2003.
+
+ [18] "ITU-T Recommendation V.42, 1994, Rev. 1. Error-correcting
Procedures for DCEs Using Asynchronous-to-Synchronous
Conversion. International Telecommunications Union. Available
from the ITU website, http://www.itu.int".
- [14] "ISO 3309, October 1984, 3rd Edition. Information Processing
+ [19] "ISO 3309, October 1984, 3rd Edition. Information Processing
Systems--Data Communication High-Level Data Link Control
Procedure--Frame Structure. International Organization for
Standardization.".
- [15] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings",
- RFC 3548.
@@ -1117,9 +1282,12 @@
-Barbato Expires April 18, 2006 [Page 20]
+
+
+
+Barbato Expires August 28, 2006 [Page 23]
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
Author's Address
@@ -1173,9 +1341,9 @@
-Barbato Expires April 18, 2006 [Page 21]
+Barbato Expires August 28, 2006 [Page 24]
-Internet-Draft draft-barbato-avt-rtp-theora-00 October 2005
+Internet-Draft draft-barbato-avt-rtp-theora-00 February 2006
Intellectual Property Statement
@@ -1216,7 +1384,7 @@
Copyright Statement
- Copyright (C) The Internet Society (2005). This document is subject
+ Copyright (C) The Internet Society (2006). This document is subject
to the rights, licenses and restrictions contained in BCP 78, and
except as set forth therein, the authors retain all their rights.
@@ -1229,6 +1397,6 @@
-Barbato Expires April 18, 2006 [Page 22]
+Barbato Expires August 28, 2006 [Page 25]
Modified: branches/theora-mmx/doc/draft-barbato-avt-rtp-theora-00.xml
===================================================================
--- branches/theora-mmx/doc/draft-barbato-avt-rtp-theora-00.xml 2006-02-25 22:49:40 UTC (rev 10957)
+++ branches/theora-mmx/doc/draft-barbato-avt-rtp-theora-00.xml 2006-02-25 22:56:09 UTC (rev 10958)
@@ -16,7 +16,7 @@
</address>
</author>
-<date day="15" month="October" year="2005" />
+<date day="24" month="February" year="2006" />
<area>General</area>
<workgroup>AVT Working Group</workgroup>
@@ -28,7 +28,7 @@
<abstract>
<t>
-This document describes a RTP payload format for transporting Theora encoded video. It details the RTP encapsulation mechanism for raw Theora data and configuration headers consisting of the quantization matrices and the Huffman codebooks for the DCT coefficients, and a table of limit values for the deblocking filter.
+This document describes a RTP payload format for transporting Theora encoded video. It details the RTP encapsulation mechanism for raw Theora data and configuration headers necessary to configure the decoder.
</t>
<t>
@@ -49,7 +49,7 @@
<section anchor="Introduction" title="Introduction">
<t>
-Theora is a general purpose, lossy video codec. It is based on the VP3.1 video codec produced by On2 Technologies and has been donated to the Xiph.org Foundation.
+Theora is a general purpose, lossy video codec. It is based on the VP3 video codec produced by On2 Technologies and has been donated to the Xiph.org Foundation.
</t>
<t>
@@ -57,16 +57,16 @@
</t>
<t>
-Theora provides none of its own framing, synchronization, or protection against transmission errors. Theora is a free-form variable bit rate (VBR) codec, and packets have no minimum size, maximum size, or fixed/expected size. Theora packets are thus intended to be used with a transport mechanism that provides free-form framing, synchronization, positioning, and error correction in accordance with these design assumptions, such as Ogg <xref target="rfc3533"></xref>. or RTP/AVP <xref target="rfc3550"></xref>.
+Theora provides none of its own framing, synchronization, or protection against transmission errors. Instead, the codec expects to receive a discrete sequence of data packets. Theora is a free-form variable bit rate (VBR) codec, and these packets have no minimum size, maximum size, or fixed/expected size. Theora packets are thus intended to be used with a transport mechanism that provides free-form framing, synchronization, positioning, and error correction in accordance with these design assumptions, such as Ogg <xref target="rfc3533"></xref> or RTP/AVP <xref target="rfc3550"></xref>.
</t>
<t>
-Theora I currently supports progressive video data of arbitrary dimensions at a constant frame rate in one of several YCbCr color spaces.
-Three different chroma subsampling formats are supported: 4:2:0, 4:2:2, and 4:4:4. The Theora I format does not support interlaced material, variable frame rates, bit-depths larger than 8 bits per component, nor alternate color spaces such as RGB or arbitrary multi-channel spaces. Black and white content can be efficiently encoded, however, because the uniform chroma planes compress well.
+Theora I currently supports progressive video data of arbitrary dimensions at a constant frame rate in one of several Y'CbCr color spaces.
+Three different chroma subsampling formats are supported: 4:2:0, 4:2:2, and 4:4:4. The Theora I format does not support interlaced material, variable frame rates, bit-depths larger than 8 bits per component, nor alternate color spaces such as RGB or arbitrary multi-channel spaces. Black and white content can be efficiently encoded, however, because the uniform chroma planes compress well. Arbitrary frame size will be encoded rounding to the upper multiple of 16 both dimension for performance reason. The original width and height will be encoded in the header and the decoder will use this information to clip the decoded frame to the right dimensions.
</t>
<t>
-Theora is similar to Vorbis audio <xref target="vorbisrtp"></xref> in that it requires the inclusion of the entire probability model for the DCT coefficients and all the quantization parameters in the bitstream headers to be sent ahead of the video data. It is therefore impossible to decode any frame in the stream without having previously fetched the codec info and codec setup headers, although Theora can initiate decode at an arbitrary intra-frame packet within a bitstream so long as the codec has been initialized with the setup headers.
+Theora is similar to the Vorbis audio <xref target="vorbisrtp"></xref> in that it the decoder reads the probability model for the entropy coder and all quantization parameters from special "header" packets at the start of the compressed data. It is therefore impossible to decode any video data without having previously fetched the codec info and codec setup headers, although Theora can initiate decode at an arbitrary intra-frame packet so long as the codec has been initialized with the associated headers.
</t>
<section anchor="Terminology" title="Terminology">
@@ -82,11 +82,11 @@
<section anchor="Payload Format" title="Payload Format">
<t>
-Each frame of digital video is packetized into one or more RTP packets. If the data for a complete frame exceeds the network MTU, it SHOULD be fragmented into multiple RTP packets, each smaller than the MTU. A single RTP packet MAY contain data for more than one Theora frame.
+For RTP based transportation of Theora encoded video the standard RTP header is followed by a 4 octets payload header, then the payload data. The payload headers are used to associate the Theora data with its associated decoding codebooks as well as indicating if the following packet contains fragmented Theora data and/or the number of whole Theora data frames. The payload data contains the raw Theora bitstream information.
</t>
<t>
-For RTP based transportation of Theora encoded video the standard RTP header is followed by a 4 octet payload header, then the payload data.
+For RTP based transport of Theora encoded video the standard RTP header is followed by a 4 octets payload header, then the payload data.
</t>
<section anchor="RTP Header" title="RTP Header">
@@ -153,7 +153,7 @@
<t>
Timestamp: 32 bits</t><t>
-A timestamp representing the sampling time of the first sample of the first Theora packet in the RTP packet. The clock frequency MUST be set to the sample rate of the encoded video data and is conveyed out-of-band as an SDP attribute.
+A timestamp representing the presentation time of the first sample of the first Theora packet in the RTP packet. The clock frequency MUST be set to 90kHz.
</t>
<t>
@@ -167,8 +167,7 @@
<section anchor="Payload Header" title="Payload Header">
<t>
-After the RTP Header section the following five octets are the Payload Header.
-This header is split into a number of bitfields detailing the format of the following Payload Data packets.
+The 4 octets following the RTP Header section are the Payload Header. This header is split into a number of bitfields detailing the format of the following Payload Data packets.
</t>
<figure anchor="Payload Header Figure" title="Payload Header">
@@ -192,7 +191,7 @@
<t>
Fragment type (F): 2 bit</t>
<t>
-This field is set accordingly the following list
+This field is set according to the following list
</t>
<vspace blankLines="1" />
<list style="empty">
@@ -202,11 +201,12 @@
<t> 3 = End Fragment</t>
</list>
+<t>This field must be zero if the number of packets field is non-zero.</t>
<t>
Theora Data Type (TDT): 2 bits</t>
<t>
-This field sets the packet payload type for the Theora data. There are currently two type of Vorbis payloads.
+This field sets the packet payload type for the Theora data. There are currently three Theora payload types.
</t>
<vspace blankLines="1" />
@@ -217,8 +217,12 @@
<t> 3 = Reserved</t>
</list>
+<t> The packets with a TDT of value 3 MUST be ignored </t>
+
+
+
<t>
-The last 4 bits are the number of complete packets in this payload. This provides for a maximum number of 15 Theora packets in the payload. If the packet contains fragmented data the number of packets MUST be set to 0.
+The last 4 bits represent the number of complete packets in this payload. This provides for a maximum number of 15 Theora packets in the payload. If the packet contains fragmented data the number of packets MUST be set to 0.
</t>
</section>
@@ -226,7 +230,7 @@
<section anchor="Payload Data" title="Payload Data">
<t>
-Each Theora payload section starts with a two octet length header that is used to represent the size of the following data payload, followed by the raw Theora data.
+Each Theora payload section starts with a two octets length header that is used to represent the size of the following data payload, followed by the raw Theora packet data.
</t>
<figure anchor="Payload Data Figure" title="Payload Data">
@@ -240,11 +244,11 @@
</figure>
<t>
-The Theora codec uses relatively unstructured raw packets containing binary integer fields of arbitrary width that often do not fall on an octet boundary. When this happens the bitstream is packed to an octet boundary. When a Theora encoder produces packets, unused space in the last byte of a packet is always zeroed during the encoding process. Thus, should this unused space be read, it will return binary zeros.
+The Theora codec uses relatively unstructured raw packets containing binary integer fields of arbitrary width that often do not fall on an octet boundary. When a Theora encoder produces packets, unused space in the last byte of a packet is always zeroed during the encoding process. Thus, should this unused space be read, it will return binary zeros.
</t>
<t>
-For payloads which consist of multiple Theora packets the payload data consists of the payload length field followed by the payload data for each of the Theora packets in the payload.
+For payloads which consist of multiple Theora packets the payload data consists of the payload length field followed by the first Theora packet's data, then the payload length followed by the second Theora packet, and so on for each of the Theora packets in the payload.
</t>
</section>
@@ -265,7 +269,7 @@
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 2 |0|0| 0 |0| PT | sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | timestamp (in sample rate units) |
+ | timestamp |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| synchronisation source (SSRC) identifier |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
@@ -285,7 +289,7 @@
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Configuration Ident | 0 | 0 | 2 pks |
+ | Configuration Ident | 0 | 0 | 2 pks |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload Length | ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -299,12 +303,12 @@
</figure>
<t>
-The payload portion of the packet starts with the 24 bit Configuration ident field followed by the 8 bit bitfield. The Fragment type field is set to 0, indicating that this packet contains whole Theora frame data. The Data type field is set to 0 since it is theora raw data. The number of whole Theora data packets is set to 2.
+The payload portion of the packet begins with the 24 bit Configuration ident field followed by 8 bits describing the payload. The Fragment type field is set to 0, indicating that this packet contains whole Theora frame data. The Data type field is set to 0 since it is theora raw data. The number of whole Theora data packets is set to 2.
</t>
<t>
-Each of the payload blocks starts with the two octet length field and then
-follows by the variable length Theora data.
+Each of the payload blocks starts with the two octets length field followed
+by the variable length Theora packet data.
</t>
</section>
@@ -313,11 +317,11 @@
<section anchor="Configuration Headers" title="Configuration Headers">
<t>
-To decode a Theora stream three configuration header blocks are needed. The first header, the Identification Header, indicates the frame dimensions, quality, blocks used and the version of the Theora encoder used. The second header, the Comment Header, contains stream metadata and the third header, the Setup Header, details which contains dequantization and Huffman tables.
+To decode a Theora stream three configuration header packets are needed. The first, called the Identification Header, indicates the frame dimensions, quality, blocks used and the version of the Theora encoder used. The second, called the Comment Header, contains stream metadata and the third, called the Setup Header, contains details of the dequantization and Huffman tables.
</t>
<t>
-Since this information must be transmitted reliably, and as the RTP stream may change certain configuration data mid-session there are different methods for delivering this configuration data to a client, both in-band and out-of-band which is detailed below. SDP delivery is used to set-up an initial state for the client application. The changes may be due to different dequantization and Huffman tables as well as different bitrates of the stream.
+Since this information must be transmitted reliably, and as the RTP stream may change certain configuration data mid-session, there are different methods for delivering this configuration data to a client, both in-band and out-of-band which are detailed below. SDP delivery is used to set up an initial state for the client application. The changes may be due to different dequantization and Huffman tables as well as different bitrates of the stream.
</t>
<t>
@@ -325,7 +329,7 @@
</t>
<t>
-The 24 bit Ident field is used to map which Configuration will be used to decodea packet. When the Ident field changes, it indicates that a change in the stream has taken place. The client application MUST have in advance the correct configuration and if the client detects a change in the Ident value and does not have this information it MUST NOT decode the raw data associated until it fetches the correct Configuration.
+The 24 bit Ident field is used to map which Configuration will be used to decode a packet. When the Ident field changes, it indicates that a change in the stream has taken place. The client application MUST have in advance the correct configuration and if the client detects a change in the Ident value and does not have this information it MUST NOT decode the raw data associated until it fetches the correct Configuration.
</t>
@@ -338,7 +342,7 @@
<section anchor="Packed Configuration" title="Packed Configuration">
<t>
-A Theora Packed Configuration is indicated with the payload type field set to 1. Of the three headers, defined in the <xref target="theora-spec-ref">Theora I specification</xref>, the identification and the setup will be packed together, the comment header is completely suppressed. Is up to the client provide a minimal size comment header to the decoder if required by the implementation.
+A Theora Packed Configuration is indicated with the payload type field set to 1. Of the three headers, defined in the <xref target="theora-spec-ref">Theora I specification</xref>, the identification and the setup will be packed together, the comment header is completely suppressed. It is up to the client to provide a minimal size comment header to the decoder if required by the implementation.
</t>
<figure anchor="Packed Configuration Figure" title="Packed Configuration Figure">
@@ -356,7 +360,7 @@
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Ident | 0 | 1 | 1|
+ | Configuration Ident | 0 | 1 | 1|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| length | Identification ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -374,7 +378,7 @@
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
</figure>
-<t>The Ident field is set with the value that will be used by the Raw Payload Packets to address this Configuration. The Fragment type is set to 0 since the packet bears the full Packed configuration, the number of packet is set to 1.
+<t>The Ident field is set with the value that will be used by the Raw Payload Packets to address this Configuration. The Fragment type is set to 0 since the packet bears the full Packed configuration, the number of packet is set to 1. In practice, Packed Headers usually need to be fragmented to fit the path MTU.
</t>
@@ -386,13 +390,13 @@
<section anchor="Out of Band Transmission" title="Out of Band Transmission">
<t>
-This section, as stated before, won't cover all the possible out-of-band delivery methods since they rely to different protocols and be linked to a specific application. The following packet definition SHOULD be used in out-of-band delivery and MUST be used when Configuration is inlined in the SDP.
+This section, as stated above, does not cover all the possible out-of-band delivery methods since they rely on different protocols and be linked to specific applications. The following packet definition SHOULD be used in out-of-band delivery and MUST be used when Configuration is inlined in the SDP.
</t>
<section anchor="Packed Headers" title="Packed Headers">
<t>
-As mentioned above the RECOMMENDED delivery vector for Theora configuration data is via a retrieval method that can be performed using a reliable transport protocol. As the RTP headers are not required for this method of delivery the structure of the configuration data is slightly different. The packed header starts with a 32 bit count field which details the number of packed headers that are contained in the bundle. Next is the Packed header payload for each chained Theora stream.
+As mentioned above, the recommended delivery vector for Theora configuration data is via a retrieval method that can be performed using a reliable transport protocol. As the RTP headers are not required for this method of delivery the structure of the configuration data is slightly different. The packed header starts with a 32 bit count field which details the number of packed headers that are contained in the bundle. Next is the Packed header payload for each setup id.
</t>
<figure anchor="Packed Headers Overview Figure" title="Packed Headers Overview">
@@ -410,7 +414,7 @@
</figure>
<t>
-Since the Configuration Ident and the Identification Header are fixed lenght there is only a 2 byte Lenght tag to define the lenght of the packed headers.
+Since the Configuration Ident and the Identification Header are fixed length there is only a 16bit Length tag to define the length of the packed headers.
</t>
<figure anchor="Packed Headers Detail Figure" title="Packed Headers Detail">
@@ -418,7 +422,7 @@
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Ident | ..
+ | Configuration Ident | ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
.. Length | Identification Header ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -430,7 +434,7 @@
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork></figure>
-<t>The key difference between the in-band format is there is no need for the payload header octet.
+<t>The key difference from the in-band format is that there is no need for the payload header octet.
</t>
<section anchor="Packed Headers IANA Considerations" title="Packed Headers IANA Considerations">
@@ -439,84 +443,151 @@
The following IANA considerations MUST only be applied to the packed headers.
</t>
-<t>
-MIME media type name: video
+<vspace blankLines="1" />
+
+<list style="hanging">
+<t hangText="MIME media type name:"> audio </t>
+
+<vspace blankLines="1" />
+
+<t hangText="MIME subtype:"> theora-config </t>
+
+<vspace blankLines="1" />
+
+<t hangText="Required Parameters:">
+<vspace blankLines="1" />
+None
</t>
-<t>
-MIME subtype: theora-config
-</t>
-<t>
-Required Parameters:</t><t>
-None.
+<vspace blankLines="1" />
+
+<t hangText="Optional Parameters:">
+<vspace blankLines="1" />
+None
</t>
-<t>
-Optional Parameters: </t><t>
-None.
+<vspace blankLines="1" />
+
+<t hangText="Encoding considerations:">
+<vspace blankLines="1" />
+This media type contains binary data.
</t>
-<t>
-Encoding considerations:</t><t>
-This type is only defined for transfer via non RTP protocol as specified in RFC XXXX.
+<vspace blankLines="1" />
+
+<t hangText="Security Considerations:">
+<vspace blankLines="1" />
+See Section 6 of RFC XXXX.
</t>
-<t>
-Security Considerations:</t><t>
-See Section 6 of RFC 3047.
+<vspace blankLines="1" />
+
+<t hangText="Interoperability considerations:">
+<vspace blankLines="1" />
+None
</t>
-<t>
-Interoperability considerations: none
+<vspace blankLines="1" />
+
+<t hangText="Published specification:">
+<vspace blankLines="1" />
+RFC XXXX [RFC Editor: please replace by the RFC number of this memo,
+ when published]
</t>
-<t>
-Published specification:</t>
-<t>See RFC XXXX for details.</t>
+<vspace blankLines="1" />
-<t>
-Applications which use this media type:</t><t>
+<t hangText="Applications which use this media type:">
+<vspace blankLines="1" />
Theora encoded video, configuration data.
</t>
-<t>
-Additional information: none
+<vspace blankLines="1" />
+
+<t hangText="Additional information:">
+<vspace blankLines="1" />
+None
</t>
-<t>
-Person & email address to contact for further information:</t><t>
+<vspace blankLines="1" />
+
+<t hangText="Person & email address to contact for further information:">
+<vspace blankLines="1" />
Luca Barbato: <lu_zero at gentoo.org>
+<vspace blankLines="0" />
+IETF Audio/Video Transport Working Group
</t>
+<vspace blankLines="1" />
+
+<t hangText="Intended usage:">
+COMMON
+</t>
+
+<vspace blankLines="1" />
+
+<t hangText="Restriction on usage:">
+<vspace blankLines="1" />
+This media type does not depend on the transport.
+</t>
+
+<vspace blankLines="1" />
+
+<t hangText="Author:">
+<vspace blankLines="1" />
+Luca Barbato</t>
+
+<vspace blankLines="1" />
+
+<t hangText="Change controller:">
+<vspace blankLines="1" />
+IETF AVT Working Group</t>
+</list>
+
+</section>
+</section>
+<!--
+<section anchor="Well Known Configurations" title="Well Known Configurations">
+
<t>
-Intended usage: COMMON
+Even if the Theora nature prevents the creation of everlasting profiles, some combination of codebooks, bitrate, channels and samplerate are quite common.
+A client may have a list of well known configuration and MAY avoid fetching them already.
+In order to retain compatibility the server, even if all the Configurations that will be in use are Well Known, MUST provide at least another way to provide codebooks.
+Every Configuration that is available as Well Known has the Ident highest bit set. Every Well Known List MUST contain at most 2^23 items.
</t>
-<t>Author/Change controller:</t>
-<t>Author: Luca Barbato</t>
-<t>Change controller: IETF AVT Working Group</t>
+<t>
+This off band delivery method MUST be signaled as "out_band/wkc/list_name" using the mandated parameter delivery-method. An optional configuration-uri MAY point to a location where to fetch it. The list is in the form of <xref target="Packed Headers">Packed Headers</xref>, that MAY be compressed using <xref target="BZ2">bzip2</xref> or <xref target="rfc1952">gzip</xref> algorithms As further explained in the <xref target="IANA Considerations">IANA Considerations</xref> section.
+</t>
+<t>
+Only one list MUST be used at time. During <xref target="rfc3264">SDP Offer/Answer</xref> client and server MAY agree on a specific list, that subject will be discussed further on the specific <xref target="Usage with the SDP Offer/Answer Mode">SDP Offer/Answer</xref> section.
+This method
+</t>
</section>
+-->
</section>
-</section>
<section anchor="Loss of Configuration Headers" title="Loss of Configuration Headers">
<t>
-Unlike the loss of raw Theora payload data, loss of a configuration header can lead to a situation where it will not be possible to successfully decode the stream.
+Unlike the loss of raw Theora payload data, the loss of a configuration header can lead to a situation where it will not be possible to successfully decode the stream.
</t>
<t>
-Loss of Configuration Packet results in the halting of stream decoding and SHOULD be reported to the client as well as a loss report sent via RTCP.
+A loss of a Configuration Packet results in the halting of stream decoding and SHOULD be reported to the client as well as a loss report sent via RTCP.
</t>
</section>
+
+
+
</section>
<section anchor="Comment Headers" title="Comment Headers">
<t>
-With the payload type flag set to 2, this indicates that the packet contain the comment metadata, such as artist name, track title and so on. These metadata messages are not intended to be fully descriptive but to offer basic track/song information. Clients MAY ignore it completely. The details on the format of the comments can be found in the <xref target="theora-spec-ref">Theora documentation</xref>.
+When the payload type is set to 2, the packet contains the comment metadata, such as artist name, track title and so on. These metadata messages are not intended to be fully descriptive but to offer basic title information. Clients MAY ignore them completely. The details on the format of the comments can be found in the <xref target="theora-spec-ref">Theora documentation</xref>.
</t>
<figure anchor="Comment Packet Figure" title="Comment Packet">
<artwork><![CDATA[
@@ -533,7 +604,7 @@
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Ident | 0 | 2 | 1|
+ | Configuration Ident | 0 | 2 | 1|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| length | Comment ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -544,14 +615,14 @@
]]></artwork>
</figure>
-<t>The 2 bytes length field is necessary since this packet could be fragmented.</t>
+<t>The 2 byte length field is necessary since this Theora packet could be fragmented.</t>
</section>
<section anchor="Frame Packetizing" title="Frame Packetizing">
<t>
-Each RTP packet contains either one complete Theora packet, one Theora packet fragment, or an integer number of complete Theora packets (up to a max of 15 packets, since the number of packets is defined by a 4 bit value).
+Each RTP packet contains either one complete Theora packet, one Theora packet fragment, or an integer number of complete Theora packets (up to a maximum of 15 packets, since the number of packets is defined by a 4 bit value).
</t>
<t>
@@ -559,12 +630,12 @@
</t>
<t>
-If a Theora packet is larger than 65535 octets it MUST be fragmented. A fragmented packet has a zero in the last four bits of the payload header. The first fragment will set the Fragment type to 1. Each fragment after the first will set the Fragment type to 2 in the payload header. The RTP packet containing the last fragment of the Theora packet will have the Fragment type set to 3. To maintain the correct sequence for fragmented packet reception the timestamp field of fragmented packets MUST be the same as the first packet sent, with the sequence number incremented as normal for the subsequent RTP packets.</t>
+A fragmented packet has a zero in the last four bits of the payload header. The RTP packet containing the first fragment will set the Fragment type to 1. Each RTP packet after the first will set the Fragment type to 2 in the payload header. The RTP packet containing the last fragment of the Theora packet will have the Fragment type set to 3. If the fragmented Theora packet spans only two RTP packets, the first will set the Fragment type field to 1 and the second will set it to 2. To maintain the correct sequence for fragmented packet reception the timestamp field of fragmented packets MUST be the same as the first packet sent, with the sequence number incremented as normal for the subsequent RTP packets.</t>
<section anchor="Example Fragmented Theora Packet" title="Example Fragmented Theora Packet">
<t>
-Here is an example fragmented Theora packet split over three RTP packets. Each packet contains the standard RTP headers as well as the 4 octet Theora headers.
+Here is an example fragmented Theora packet split over three RTP packets. Each packet contains the standard RTP headers as well as the 4 octets Theora headers.
</t>
<figure anchor="Example Fragmented Packet (Packet 1)" title="Example Fragmented Packet (Packet 1)">
@@ -614,7 +685,7 @@
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Configuration Ident | 2 | 0 | 0|
+ | Configuration Ident | 2 | 0 | 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload Length | ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -624,7 +695,7 @@
</figure>
<t>
-The Fragment type field is set to 2 and the number of packets field is set to 0. For large Theora fragments there can be several of these type of payload packets. The maximum packet size SHOULD be no greater than the path MTU, including all RTP and payload headers. The sequence number has been incremented by one but the timestamp field remains the same as the initial packet.
+The Fragment type field is set to 2 and the number of packets field is set to 0. For large Theora fragments there can be several of these type of payload packets. The maximum RTP packet size SHOULD be no greater than the path MTU, including all RTP and payload headers. The sequence number has been incremented by one but the timestamp field remains the same as the initial packet.
</t>
<figure anchor="Example Fragmented Packet (Packet 3)" title="Example Fragmented Packet (Packet 3)">
@@ -644,7 +715,7 @@
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Configuration Ident | 3 | 0 | 0|
+ | Configuration Ident | 3 | 0 | 0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload Length | ..
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -654,7 +725,7 @@
</figure>
<t>
-This is the last Theora fragment packet. The Fragment type filed is set to 3 and the packet count remains set to 0. As in the previous packets the timestamp remains set to the first packet in the sequence and the sequence number has been incremented.
+This is the last Theora fragment packet. The Fragment type filed is set to 3 and the packet count remains set to 0. As in the previous packets the timestamp remains set to the first packet in the sequence and the sequence number has been incremented.
</t>
</section>
@@ -662,16 +733,15 @@
<section anchor="Packet Loss" title="Packet Loss">
<t>
-As there is no error correction within the Theora stream, packet loss will result in a loss of signal. Packet loss is more of an issue for fragmented Theora packets as the client will have to cope with the handling of the Fragment type field. If we use the fragmented Theora packet example above and the first packet is lost the client MUST detect that the next packet has the packet count field set to 0 and the Fragment type is set to 2 and MUST drop it. The next packet, which is the final fragmented packet, MUST be dropped in the same manner. Feedback reports on lost and dropped packets MUST be sent back via RTCP.
+As there is no error correction within the Theora stream, packet loss will result in a loss of signal. Packet loss is more of an issue for fragmented Theora packets as the client will have to cope with the handling of the Fragment type field. If we use the fragmented Theora packet example above and the first packet is lost the client MUST detect that the next packet has the packet count field set to 0 and the Fragment type is set to 2 and MUST drop it. The next packet, which is the final fragmented packet, MUST be dropped in the same manner. Feedback reports on lost and dropped packets MUST be sent back via RTCP.[note: reordering]
</t>
<t>
-If a particular multicast session has a large number of participants care must be taken to prevent an RTCP feedback implosion,
-<xref target="rtcp-feedback"></xref>, in the event of packet loss from a large number of participants.
+If a particular multicast session has a large number of participants care must be taken to prevent an RTCP feedback implosion, <xref target="rtcp-feedback"></xref>, in the event of packet loss from a large number of participants.
</t>
<t>
-Loss of any of the Configuration fragment will result in the loss of the full Configuration packet with the result detailed in the <xref target="Loss of Configuration Headers">Loss of Configuration Headers</xref> section.
+Loss of any of the Configuration fragment will result in the loss of the full Configuration packet as detailed in the <xref target="Loss of Configuration Headers">Loss of Configuration Headers</xref> section.
</t>
</section>
@@ -679,73 +749,139 @@
<section anchor="IANA Considerations" title="IANA Considerations">
-<t>MIME media type name: video</t>
+<vspace blankLines="1" />
-<t>MIME subtype: theora</t>
+<list style="hanging">
+<t hangText="MIME media type name:"> video </t>
-<t>Required Parameters:</t>
+<vspace blankLines="1" />
-<t>
-sampling: Determines the chroma subsampling format.
+<t hangText="MIME subtype:"> theora </t>
+
+<vspace blankLines="1" />
+
+<t hangText="Required Parameters:">
+
+<vspace blankLines="1" />
+
+<list style="hanging">
+
+<t hangText="sampling:"> Determines the chroma subsampling format.
</t>
-<t>
-width: Determines the number of pixels per line. This is an integer between 1 and 1048561 and MUST be in multiples of 16.
-</t>
-<t>
-height: Determines the number of lines per frame. This is an integer between 1 and 1048561 and MUST be in multiples of 16.
-</t>
-<t>
-delivery-method: indicates the delivery methods in use, the possible values are:inline, in_band, out_band/specific-method
-</t>
-<t>
-configuration: the <xref target="rfc3548">base16</xref> (hexadecimal) representation of the <xref target="Packed Headers">Packed Headers</xref>.
-</t>
-<t>
-Optional Parameters: </t><t>
-configuration-uri: the URI of the configuration headers in case of out of band transmission. In the form of "protocol://path/to/resource/". Depending on the specific method the single ident packet could be retrived by their number, or aggregated in a single stream.
+<vspace blankLines="1" />
+
+<t hangText="width:"> Determines the number of pixels per line. This is an integer between 1 and 1048561 and MUST be in multiples of 16.
</t>
-<t>
-Encoding considerations:</t><t>
-This type is only defined for transfer via RTP as specified in RFC XXXX.
+<vspace blankLines="1" />
+
+<t hangText="height:">Determines the number of lines per frame encoded. This is an integer between 1 and 1048561 and MUST be in multiples of 16.
</t>
-<t>
-Security Considerations:</t><t>
-See Section 6 of RFC 3047.
+<vspace blankLines="1" />
+
+<t hangText="delivery-method:"> indicates the delivery methods in use, the possible values are: inline, in_band, out_band/specific_name<vspace blankLines="0" />
+Where "specific_name" is the name of the out of band delivery method.
</t>
-<t>
-Interoperability considerations: none
+<vspace blankLines="1" />
+
+<t hangText="configuration:"> the <xref target="rfc3548">base16</xref> (hexadecimal) representation of the <xref target="Packed Headers">Packed Headers</xref>.
</t>
+</list>
+</t>
-<t>
-Published specification:</t>
-<t>See the Theora documentation <xref target="theora-spec-ref"></xref> for details.</t>
+<vspace blankLines="1" />
-<t>
-Applications which use this media type:</t><t>
-Video streaming and conferencing tools
+<t hangText="Optional Parameters:">
+
+<vspace blankLines="1" />
+
+<list style="hanging">
+<t hangText="configuration-uri:"> the URI of the configuration headers in case of out of band transmission. In the form of "protocol://path/to/resource/". Depending on the specific method the single ident packets could be retrived by their number or aggregated in a single stream, aggregates MAY be compressed using <xref target="rfc1952">gzip</xref> or <xref target="BZ2">bzip2</xref> and an <xref target="FIPS180">sha1</xref> checksum MAY be provided in the form of "protocol://path/to/resource/aggregated.bz2!sha1hash"</t>
+</list>
</t>
-<t>
-Additional information: none
+<vspace blankLines="1" />
+
+<t hangText="Encoding considerations:">
+<vspace blankLines="1" />
+This media type is framed and contains binary data.
</t>
-<t>
-Person & email address to contact for further information:</t><t>
-Luca Barbato: <lu_zero at gentoo.org>
+<vspace blankLines="1" />
+
+<t hangText="Security Considerations:">
+<vspace blankLines="1" />
+See Section 6 of RFC XXXX.</t>
+
+<vspace blankLines="1" />
+
+<t hangText="Interoperability considerations:">
+<vspace blankLines="1" />
+None</t>
+
+<vspace blankLines="1" />
+
+<t hangText="Published specification:">
+
+<vspace blankLines="1" />
+
+<t> RFC XXXX [RFC Editor: please replace by the RFC number of this memo, when published]</t>
+<vspace blankLines="1" />
+<t>Ogg Theora I specification: Codec setup and packet decode. Available from the Xiph website, http://www.xiph.org</t>
+
</t>
-<t>
-Intended usage: COMMON
+<vspace blankLines="1" />
+
+<t hangText="Applications which use this media type:">
+<vspace blankLines="1"/>
+Audio streaming and conferencing tools </t>
+
+<vspace blankLines="1" />
+
+<t hangText="Additional information:">
+<vspace blankLines="1" />
+None </t>
+
+<vspace blankLines="1" />
+
+<t hangText="Person & email address to contact for further information:">
+
+<vspace blankLines="1" />
+
+<t>Luca Barbato: <lu_zero at gentoo.org></t>
+<t>IETF Audio/Video Transport Working Group</t>
+
</t>
-<t>Author/Change controller:</t>
-<t>Author: Luca Barbato</t>
-<t>Change controller: IETF AVT Working Group</t>
+<vspace blankLines="1" />
+<t hangText="Intended usage:">
+<vspace blankLines="1" />
+COMMON</t>
+
+<vspace blankLines="1" />
+
+<t hangText="Restriction on usage:">
+<vspace blankLines="1" />
+This media type depends on RTP framing, and hence is only defined for transfer via <xref target="rfc3550">RTP</xref></t>
+
+<vspace blankLines="1" />
+
+<t hangText="Author:">
+<vspace blankLines="1"/>Luca Barbato</t>
+
+<vspace blankLines="1" />
+
+<t hangText="Change controller:"><vspace blankLines="1"/> IETF AVT Working Group</t>
+
+<vspace blankLines="1" />
+
+</list>
+
<section anchor="Mapping MIME Parameters into SDP" title="Mapping MIME Parameters into SDP">
<t>
@@ -758,51 +894,92 @@
<t>The MIME type ("video") goes in SDP "m=" as the media name.</t>
<vspace blankLines="1" />
-<t>The MIME subtype ("THEORA") goes in SDP "a=rtpmap" as the encoding name.</t>
+<t>The MIME subtype ("theora") goes in SDP "a=rtpmap" as the encoding name.</t>
<vspace blankLines="1" />
-<t>The parameter "rate" also goes in "a=rtpmap" as clock rate.</t>
+<t>The clock rate in the "a=rtpmap" line MUST be 90000</t>
<vspace blankLines="1" />
<t>The mandated parameters "delivery-method" and "configuration" MUST be included in the SDP "a=fmpt" attribute.</t>
<vspace blankLines="1" />
-<t>The optional parameter "configuration-uri", when present, MUST be included in the SDP "a=fmpt" attribute.</t>
+<t>The optional parameter "configuration-uri", when present, MUST be included in the SDP "a=fmpt" attribute and MUST follow the delivery-method that applies.</t>
</list>
<t>
-If the stream comprises chained Theora files and all of them are known in advance, the Configuration Packet for each file SHOULD be packaged together and passed to the client using the configuration attribute.
+If the stream uses multiple decoder setup configurations and all of them are known in advance, the Configuration Packet for each file SHOULD be packaged together and passed to the client using the configuration attribute.
</t>
<t>
The URI specified in the configuration-uri attribute MUST point to a location where all of the Configuration Packets needed for the life of the session reside.
</t>
-<t>
-The answer to any offer, <xref target="rfc3264"></xref>, MUST NOT change the URI specified in the configuration-uri attribute. The Configuration inlined in the configuration parameter MAY change.
-</t>
-<t>Example:</t>
+<section anchor="SDP Example" title="SDP Example">
+<t>The following example shows a basic SDP for a single stream. The first configuration packet is inlined in the sdp, other configurations could be fetched at any time from the first provided uri using or all the known configuration could be downloaded using the second uri. The inline <xref target="rfc3548">base16</xref> configuration string is omitted because of the lenght.</t>
-<vspace blankLines="1" />
-
<list style="empty">
-<t>c=IN IP4/6 </t>
+<t>c=IN IP4 192.0.0.1</t>
<t>m=video RTP/AVP 98</t>
<t>a=rtpmap:98 theora/90000</t>
-<t>a=fmtp:98 sampling=YCbCr-4:2:2; width=1280; height=720; delivery-method=inline; configuration=base16string1;</t>
+<t>a=fmtp:98 sampling=YCbCr-4:2:2; width=1280; height=720; delivery-method=inline; configuration=base16string1; delivery-method=out_band/rtsp; delivery-method=out_band/rtsp; configuration-uri=rtsp://path/to/resource/; delivery-method=out_band/http; configuration-uri=http://another/path/to/resource/aggregate.bz2!sha1hash;</t>
</list>
+</section>
+</section>
-</section>
+<section anchor="Usage with the SDP Offer/Answer Mode" title="Usage with the SDP Offer/Answer Model">
+
+<t>
+The offer, as described in <xref target="rfc3264">An Offer/Answer Model Session Description Protocol</xref>, may contain a large number of delivery methods per single fmtp attribute, the answerer MUST remove every delivery-method and configuration-uri not supported. All the parameters MUST not be altered on answer otherwise.
+</t>
+
</section>
+</section>
+
+<section anchor="Examples" title="Examples">
+
+<t>
+The following examples are common usage patterns that MAY be applied in such situations, the main scope of this section is to explain better usage of the transmission vectors.
+</t>
+<!--
+
+<section anchor="Peer to Peer Internet Messaging" title="Peer to Peer Internet Messaging">
+
+<t>This scenario implies two peers linked through a best effort network, the bandwidth isn't guaranteed and may have large variance, in order to keep the latency low enough dynamic adaptation tecniques [missing reference] are required.</t>
+
+<t>Each peer will receive 2 streams (voice and video) from the other. To determine the quality of the stream and ensure the latency is bearable [put maximum latency here] a form of handshake is required. SIP or Jingle or TINS could be used in this phase.</t>
+
+<t>Since changes in the bitrates will reflect on the setup header, the simplest way to get dynamic adaptation is to consider each stream as a completely different coded, have a payload number for each of them and use the dynamic coding change tecniques.</t>
+
+<t>Due the latency requirement even if sending the Configuration in-band MAY be possible, usually it SHOULD be avoided. Other out of band methods that send Configuration on demand, since they would affect latency as the in-band method, SHOULD be avoided as well. Agree on a set of Configurations related to different bitrates during the session initiation is the best method.</t>
+
+</section>
+-->
+<section anchor="Stream Video" title="Stream Video">
+
+<t>This is one of the most common situation: one single server streaming content in multicast, the clients may start a session at random time. The content itself could be a mix of live stream, as the wj's voice or studio scenes, and stored streams, as the music she plays.</t>
+
+<t>In this situation we don't know in advance how many codebooks we will use. The clients can join anytime and users expect to start the fruition of the content in a short time.</t>
+
+<t>On join the client will receive the current Configuration necessary to decode the current streams inlined in the SDP so that the decoding will start immediately after.</t>
+
+<t>When the streamed content changes the new Configuration is sent in-band before the actual stream, and the Configuration that has to be sent inline in the SDP updated. Since the inline method is unreliable, an out of band fallback is provided.</t>
+
+<t>The client could choose to fetch the Configuration from the alternate source as soon it discovers a Configuration packet got lost inline or use <xref target="rfc3611">selective retransmission</xref>, if the server supports the feature.</t>
+
+<t>A serverside optimization would be to keep an hash list of the Configurations per session to avoid packing all of them and send the same Configuration with different Ident tags</t>
+
+<t>A clientside optimization would be to keep a tag list of the Configurations per session and don't process configuration packets already known.</t>
+
+</section>
+
+</section>
+
<section anchor="Security Considerations" title="Security Considerations">
<t>
-RTP packets using this payload format are subject to the security considerations discussed in the RTP specification
-<xref target="rfc3550"></xref>. This implies that the confidentiality of the media stream is achieved by using
-encryption. Because the data compression used with this payload format is applied end-to-end, encryption may be performed on the
-compressed data. Where the size of a data block is set care MUST be taken to prevent buffer overflows in the client applications.
+RTP packets using this payload format are subject to the security considerations discussed in the RTP specification <xref target="rfc3550"></xref>. This implies that the confidentiality of the media stream is achieved by using encryption. Because the data compression used with this payload format is applied end-to-end, encryption may be performed on the compressed data. Where the size of a data block is set care MUST be taken to prevent buffer overflows in the client applications.
</t>
</section>
@@ -812,7 +989,7 @@
<t>This document is a continuation of draft-kerr-avt-theora-rtp-00.txt</t>
<t>
-Thanks to the AVT, Ogg Theora Communities / Xiph.org, Fluendo, Ralph Giles, Mike Smith, Phil Kerr, Politecnico di Torino (LS)³/IMG Group in particular Federico Ridolfo, Francesco Varano, Giampaolo Mancini, Juan Carlos De Martin.
+Thanks to the AVT, Ogg Theora Communities / Xiph.org, Fluendo, Ralph Giles, Mike Smith, Phil Kerr, Timothy Terriberry, Stefan Ehmann, Alessandro Salvatori, Politecnico di Torino (LS)³/IMG Group in particular Federico Ridolfo, Francesco Varano, Giampaolo Mancini, Juan Carlos De Martin.
</t>
</section>
@@ -909,10 +1086,44 @@
<reference anchor="vorbisrtp">
<front>
<title>RTP Payload Format for Vorbis Encoded Audio - draft-ietf-avt-vorbis-rtp-00</title>
-<author initials="P." surname="Kerr" fullname="P. Kerr"></author>
+<author initials="L." surname="Barbato" fullname="Luca Barbato"></author>
</front>
<seriesInfo name="Internet Draft" value="(Work in progress)" />
</reference>
+
+<reference anchor="rfc3548">
+<front>
+<title>The Base16, Base32, and Base64 Data Encodings</title>
+<author initials="S." surname="Josefsson" fullname="Simon Josefsson"></author>
+</front>
+<seriesInfo name="RFC" value="3548" />
+</reference>
+
+<reference anchor="rfc1952">
+<front>
+<title>GZIP file format specification version 4.3</title>
+<author initials="P" surname="Deutsch" fullname="L. Peter Deutsch"></author>
+</front>
+<seriesInfo name="RFC" value="1952" />
+</reference>
+
+<reference anchor="FIPS180">
+<front>
+<title>Secure Hash Standard</title>
+<author>
+<organization>National Institute of Standards and Technology</organization>
+</author>
+<date month="May" year="1993"/>
+</front>
+</reference>
+
+<reference anchor="BZ2">
+<front>
+<title>libbz2 and bzip2</title>
+<author initials="J" surname="Seward" fullname="Julian Seward" />
+</front>
+</reference>
+
</references>
<references title="Informative References">
@@ -920,14 +1131,29 @@
<front>
<title>libTheora: Available from the Xiph website, http://www.xiph.org</title>
</front>
-</reference>
+</reference>
<reference anchor="theora-spec-ref">
<front>
-<title>Ogg Theora I spec: Codec setup and packet decode. http://www.xiph.org/ogg/Theora/doc/Theora-spec-ref.html</title>
+<title>Theora I specification: Codec setup and packet decode. http://www.xiph.org/theora/doc/Theora_I_spec.pdf</title>
</front>
</reference>
-
+
+<reference anchor='rfc3611'>
+
+<front>
+<title>RTP Control Protocol Extended Reports (RTCP XR)</title>
+<author initials='T.' surname='Friedman' fullname='T. Friedman'>
+<organization /></author>
+<author initials='R.' surname='Caceres' fullname='R. Caceres'>
+<organization /></author>
+<author initials='A.' surname='Clark' fullname='A. Clark'>
+<organization /></author>
+<date year='2003' month='November' /></front>
+<seriesInfo name='RFC' value='3611' />
+</reference>
+
+
<reference anchor="ITU-T V42">
<front>
<title>
@@ -942,15 +1168,6 @@
</title>
</front>
</reference>
-
-<reference anchor="rfc3548">
-<front>
-<title>The Base16, Base32, and Base64 Data Encodings</title>
-<author initials="S." surname="Josefsson" fullname="Simon Josefsson"></author>
-</front>
-<seriesInfo name="RFC" value="3548" />
-</reference>
-
</references>
</back>
</rfc>
Modified: branches/theora-mmx/doc/spec/spec.tex
===================================================================
--- branches/theora-mmx/doc/spec/spec.tex 2006-02-25 22:49:40 UTC (rev 10957)
+++ branches/theora-mmx/doc/spec/spec.tex 2006-02-25 22:56:09 UTC (rev 10958)
@@ -6053,19 +6053,26 @@
discarding any higher-order bits in their two's complement representation.
The final output of each 1D transform is truncated to 16-bits in the same
manner.
-In practice, 32 bits is sufficient for every calculation except scaling by
- $C4$.
-Here we specify truncating to 16 bits after the right shift by 16, but this is
- equivalent to truncating the result of the multiply to 32 bits before the
- right shift.
+In practice, if the high word of a $16\times 16$ bit multiplication can be
+ obtained directly, 16 bits is sufficient for every calculation except scaling
+ by $C4$.
+Here we specify truncating to 16 bits before the multiplication to simplify
+ implementations using hardware or common SIMD instruction sets.
+Note that if 16-bit register are used, overflow in the additions and
+ subtractions should be handled using \textit{unsaturated} arithmetic.
+That is, the high-order bits should be discarded and the low-order bits
+ retained, instead of clamping the result to the maximum or minimum value.
+This allows the maximum flexibility in re-ordering these instructions without
+ deviating from this specification.
+
The 1D transform can only overflow if input coefficients larger than $\pm 6201$
are present.
However, the result of applying the 2D forward transform on pixel values in the
range $-255\ldots 255$ can be as large as $\pm 8157$ due to the scale factor
of four that is applied, and quantization errors could make this even larger.
-Therefore, the coefficients cannot simply be clamped into a valid range, as
- they could still overflow just the 1D inverse transform by itself.
+Therefore, the coefficients cannot simply be clamped into a valid range before
+ the transform.
\subsubsection{The 1D Inverse DCT}
\label{sub:1d-idct}
@@ -6142,6 +6149,8 @@
Operations on a single signal path through the graph cannot be reordered, but
operations on different paths may be, or may be executed in parallel.
+Different graphs may be obtainable using the associative, commutative, and
+ distributive properties of unsaturated arithmetic.
The column of numbers on the left represents an initial permutation of the
input DCT coefficients.
The column on the right represents the unpermuted output.
@@ -6167,18 +6176,21 @@
\begin{enumerate}
\item
-Assign $\locvar{T}[0]$ the value
- $\locvar{C4}*(\bitvar{Y}[0]+\bitvar{Y}[4])>>16$.
+Assign $\locvar{T}[0]$ the value $\bitvar{Y}[0]+\bitvar{Y}[4]$.
\item
Truncate $\locvar{T}[0]$ to a 16-bit representation by dropping any
higher-order bits.
\item
-Assign $\locvar{T}[1]$ the value
- $\locvar{C4}*(\bitvar{Y}[0]-\bitvar{Y}[4])>>16$.
+Assign $\locvar{T}[0]$ the value
+ $\locvar{C4}*\locvar{T}[0]>>16$.
\item
+Assign $\locvar{T}[1]$ the value $\bitvar{Y}[0]-\bitvar{Y}[4]$.
+\item
Truncate $\locvar{T}[1]$ to a 16-bit representation by dropping any
higher-order bits.
\item
+Assign $\locvar{T}[1]$ the value $\locvar{C4}*\locvar{T}[1]>>16$.
+\item
Assign $\locvar{T}[2]$ the value $(\locvar{C6}*\bitvar{Y}[2]>>16)-
(\locvar{S6}*\bitvar{Y}[6]>>16)$.
\item
@@ -6199,22 +6211,24 @@
\item
Assign \locvar{R} the value $\locvar{T}[4]+\locvar{T}[5]$.
\item
-Assign $\locvar{T}[5]$ the value
- $\locvar{C4}*(\locvar{T}[4]-\locvar{T}[5])>>16$.
+Assign $\locvar{T}[5]$ the value $\locvar{T}[4]-\locvar{T}[5]$.
\item
Truncate $\locvar{T}[5]$ to a 16-bit representation by dropping any
higher-order bits.
\item
+Assign $\locvar{T}[5]$ the value $\locvar{C4}*(-\locvar{T}[5])>>16$.
+\item
Assign $\locvar{T}[4]$ the value $\locvar{R}$.
\item
Assign \locvar{R} the value $\locvar{T}[7]+\locvar{T}[6]$.
\item
-Assign $\locvar{T}[6]$ the value
- $\locvar{C4}*(\locvar{T}[7]-\locvar{T}[6])>>16$.
+Assign $\locvar{T}[6]$ the value $\locvar{T}[7]-\locvar{T}[6]$.
\item
Truncate $\locvar{T}[6]$ to a 16-bit representation by dropping any
higher-order bits.
\item
+Assign $\locvar{T}[6]$ the value $\locvar{C4}*\locvar{T}[6]>>16$.
+\item
Assign $\locvar{T}[7]$ the value $\locvar{R}$.
\item
Assign \locvar{R} the value $\locvar{T}[0]+\locvar{T}[3]$.
@@ -6329,15 +6343,15 @@
\locvar{\ci} & Integer & 3 & No & The column index. \\
\locvar{\ri} & Integer & 3 & No & The row index. \\
\locvar{Y} & \multicolumn{1}{p{40pt}}{Integer Array} &
- 16 & Yes & An 8-element array of 1-D iDCT input
+ 16 & Yes & An 8-element array of 1D iDCT input
values. \\
\locvar{X} & \multicolumn{1}{p{40pt}}{Integer Array} &
- 16 & Yes & An 8-element array of 1-D iDCT output
+ 16 & Yes & An 8-element array of 1D iDCT output
values. \\
\bottomrule\end{tabularx}
\medskip
-This procedure applies the 1-D inverse DCT transform 16 times to a block of
+This procedure applies the 1D inverse DCT transform 16 times to a block of
dequantized coefficients: once for each of the 8 rows, and once for each of
the 8 columns of the result.
Note that the coordinate system used for the columns is the same right-handed
@@ -6358,7 +6372,7 @@
$\bitvar{DQC}[\locvar{\ri}*8+\locvar{\ci}]$.
\end{enumerate}
\item
-Compute \locvar{X}, the 1-D inverse DCT of \locvar{Y} using the procedure
+Compute \locvar{X}, the 1D inverse DCT of \locvar{Y} using the procedure
described in Section~\ref{sub:1d-idct}.
\item
For each value of $\locvar{\ci}$ from 0 to 7:
@@ -6379,7 +6393,7 @@
$\bitvar{RES}[\locvar{\ri}][\locvar{\ci}]$.
\end{enumerate}
\item
-Compute \locvar{X}, the 1-D inverse DCT of \locvar{Y} using the procedure
+Compute \locvar{X}, the 1D inverse DCT of \locvar{Y} using the procedure
described in Section~\ref{sub:1d-idct}.
\item
For each value of \locvar{\ri} from 0 to 7:
@@ -6464,7 +6478,7 @@
This can be implemented quickly by adding an offset of $\hex{FFFF}$ if the
number is negative, and then shifting as before.
This slightly increases the computational complexity of the transform.
-Unlike the inverse DCT, 16 bit registers and a $16\times16\rightarrow32$ bit
+Unlike the inverse DCT, 16-bit registers and a $16\times16\rightarrow32$ bit
multiply are sufficient to avoid any overflow, so long as the input is in the
range $-6270\ldots 6270$, which is larger than required.
Modified: branches/theora-mmx/lib/comment.c
===================================================================
--- branches/theora-mmx/lib/comment.c 2006-02-25 22:49:40 UTC (rev 10957)
+++ branches/theora-mmx/lib/comment.c 2006-02-25 22:56:09 UTC (rev 10958)
@@ -104,6 +104,6 @@
if(tc->user_comments)_ogg_free(tc->user_comments);
if(tc->comment_lengths)_ogg_free(tc->comment_lengths);
if(tc->vendor)_ogg_free(tc->vendor);
+ memset(tc,0,sizeof(*tc));
}
- memset(tc,0,sizeof(*tc));
}
Modified: branches/theora-mmx/lib/encoder_toplevel.c
===================================================================
--- branches/theora-mmx/lib/encoder_toplevel.c 2006-02-25 22:49:40 UTC (rev 10957)
+++ branches/theora-mmx/lib/encoder_toplevel.c 2006-02-25 22:56:09 UTC (rev 10958)
@@ -720,16 +720,13 @@
&InterError, &IntraError );
/* decide whether we really should have made this frame a key frame */
-
+ /* forcing out a keyframe if the max interval is up is done at a higher level */
if( cpi->pb.info.keyframe_auto_p){
- if( ( ( 2* IntraError < 5 * InterError )
- && ( KFIndicator >= (ogg_uint32_t)
- cpi->pb.info.keyframe_auto_threshold)
- && ( cpi->LastKeyFrame > cpi->pb.info.keyframe_mindistance)
- ) ||
- (cpi->LastKeyFrame >= (ogg_uint32_t)
- cpi->pb.info.keyframe_frequency_force) ){
-
+ if( ( 2* IntraError < 5 * InterError )
+ && ( KFIndicator >= (ogg_uint32_t)
+ cpi->pb.info.keyframe_auto_threshold)
+ && ( cpi->LastKeyFrame > cpi->pb.info.keyframe_mindistance)
+ ){
CompressKeyFrame(cpi); /* Code a key frame */
return;
}
@@ -779,6 +776,8 @@
dsp_static_init ();
memset(th, 0, sizeof(*th));
+ /*Currently only the 4:2:0 format is supported.*/
+ if(c->pixelformat!=OC_PF_420)return OC_IMPL;
th->internal_encode=cpi=_ogg_calloc(1,sizeof(*cpi));
c->version_major=VERSION_MAJOR;
@@ -970,12 +969,22 @@
CompressFirstFrame(cpi);
cpi->ThisIsFirstFrame = 0;
cpi->ThisIsKeyFrame = 0;
- } else if ( cpi->ThisIsKeyFrame ) {
- CompressKeyFrame(cpi);
- cpi->ThisIsKeyFrame = 0;
- } else {
- /* Compress the frame. */
- CompressFrame( cpi );
+ } else {
+
+ /* don't allow generating invalid files that overflow the p-frame
+ shift, even if keyframe_auto_p is turned off */
+ if(cpi->LastKeyFrame >= (ogg_uint32_t)
+ cpi->pb.info.keyframe_frequency_force)
+ cpi->ThisIsKeyFrame = 1;
+
+ if ( cpi->ThisIsKeyFrame ) {
+ CompressKeyFrame(cpi);
+ cpi->ThisIsKeyFrame = 0;
+ } else {
+ /* Compress the frame. */
+ CompressFrame( cpi );
+ }
+
}
/* Update stats variables. */
Modified: branches/theora-mmx/lib/idct.c
===================================================================
--- branches/theora-mmx/lib/idct.c 2006-02-25 22:49:40 UTC (rev 10957)
+++ branches/theora-mmx/lib/idct.c 2006-02-25 22:56:09 UTC (rev 10958)
@@ -79,11 +79,11 @@
t2 >>= 16;
_D = t1 - t2;
- t1 = (xC4S4 * (_A - _C));
+ t1 = (xC4S4 * (ogg_int16_t)(_A - _C));
t1 >>= 16;
_Ad = t1;
- t1 = (xC4S4 * (_B - _D));
+ t1 = (xC4S4 * (ogg_int16_t)(_B - _D));
t1 >>= 16;
_Bd = t1;
@@ -91,11 +91,11 @@
_Cd = _A + _C;
_Dd = _B + _D;
- t1 = (xC4S4 * (ip[0] + ip[4]));
+ t1 = (xC4S4 * (ogg_int16_t)(ip[0] + ip[4]));
t1 >>= 16;
_E = t1;
- t1 = (xC4S4 * (ip[0] - ip[4]));
+ t1 = (xC4S4 * (ogg_int16_t)(ip[0] - ip[4]));
t1 >>= 16;
_F = t1;
@@ -170,11 +170,11 @@
t2 >>= 16;
_D = t1 - t2;
- t1 = (xC4S4 * (_A - _C));
+ t1 = (xC4S4 * (ogg_int16_t)(_A - _C));
t1 >>= 16;
_Ad = t1;
- t1 = (xC4S4 * (_B - _D));
+ t1 = (xC4S4 * (ogg_int16_t)(_B - _D));
t1 >>= 16;
_Bd = t1;
@@ -182,11 +182,11 @@
_Cd = _A + _C;
_Dd = _B + _D;
- t1 = (xC4S4 * (ip[0*8] + ip[4*8]));
+ t1 = (xC4S4 * (ogg_int16_t)(ip[0*8] + ip[4*8]));
t1 >>= 16;
_E = t1;
- t1 = (xC4S4 * (ip[0*8] - ip[4*8]));
+ t1 = (xC4S4 * (ogg_int16_t)(ip[0*8] - ip[4*8]));
t1 >>= 16;
_F = t1;
@@ -301,11 +301,11 @@
_D = -t2;
- t1 = (xC4S4 * (_A - _C));
+ t1 = (xC4S4 * (ogg_int16_t)(_A - _C));
t1 >>= 16;
_Ad = t1;
- t1 = (xC4S4 * (_B - _D));
+ t1 = (xC4S4 * (ogg_int16_t)(_B - _D));
t1 >>= 16;
_Bd = t1;
@@ -378,11 +378,11 @@
_D = - t2;
- t1 = (xC4S4 * (_A - _C));
+ t1 = (xC4S4 * (ogg_int16_t)(_A - _C));
t1 >>= 16;
_Ad = t1;
- t1 = (xC4S4 * (_B - _D));
+ t1 = (xC4S4 * (ogg_int16_t)(_B - _D));
t1 >>= 16;
_Bd = t1;
More information about the commits
mailing list