From d2cbe459453cc50a0d680ace4dcc11d209f14789 Mon Sep 17 00:00:00 2001 From: lu_zero Date: Thu, 22 Nov 2007 11:03:09 +0000 Subject: [PATCH] Clarify svn path=/trunk/vorbis/; revision=14214 --- doc/draft-ietf-avt-rtp-vorbis-08.xml | 37 ++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/doc/draft-ietf-avt-rtp-vorbis-08.xml b/doc/draft-ietf-avt-rtp-vorbis-08.xml index e5ad977..0822d89 100644 --- a/doc/draft-ietf-avt-rtp-vorbis-08.xml +++ b/doc/draft-ietf-avt-rtp-vorbis-08.xml @@ -435,11 +435,33 @@ The RTP timestamp value MUST reflect the transmission time of the next data pack A Vorbis Packed Configuration is indicated with the Vorbis Data Type field set to 1. Of the three headers defined in the Vorbis I specification, the -Identification and the Setup MUST be packed as they are, while the comment header MAY be replaced with a dummy one. The packed configuration follows a generic way to store Xiph codec configurations: The first field stores the number of the following packets minus one (count field), the next ones represent the size of the headers (length fields), the headers immediately follow the list of length fields. The size of the last header is implicit. -The count and the length fields are encoded using the following logic: the data is in network byte order, every byte has the most significant bit used as flag and the following 7 used to store the value. The first N bit are to be taken, where N is number of bits needed to represent the value, taken modulo 7, and stored in -the first byte. -If there are more bits, the flag bit is set to 1 and the subsequent 7bit are stored in the following byte, if there are remaining bits set the flag to 1 and the same procedure is repeated. The ending byte has the flag bit set to 0. In order to decode it is enough to iterate over the bytes until the flag bit set to 0, for every byte the data is added to the accumulated value multiplied by 128. -The headers are packed in the same order they are present in ogg: Identification, Comment, Setup. +Identification and the Setup MUST be packed as they are, while the comment +header MAY be replaced with a dummy one. + +The packed configuration follows a generic way to store Xiph codec +configurations: The first field stores the number of the following packets +minus one (count field), the next ones represent the size of the headers +(length fields), the headers immediately follow the list of length fields. +The size of the last header is implicit. + +The count and the length fields are encoded using the following logic: the data +is in network byte order, every byte has the most significant bit used as flag +and the following 7 used to store the value. +The first N bit are to be taken, where N is number of bits needed to represent +the value, taken modulo 7, and stored in the first byte. +If there are more bits, the flag bit is set to 1 and the subsequent 7bit are +stored in the following byte, if there are remaining bits set the flag to 1 and +the same procedure is repeated. +The ending byte has the flag bit set to 0. In order to decode it is enough to +iterate over the bytes until the flag bit set to 0, for every byte the data is +added to the accumulated value multiplied by 128. + +The headers are packed in the same order they are present in ogg: +Identification, Comment, Setup. + + +The 2 byte length tag defines the length of the packed headers as the sum of +the Configuration, Comment and Setup lengths.
- -Since the Configuration Ident and the Identification Header are fixed length -there is only a 2 byte length tag to define the length of the packed headers. - -