[vorbis-dev] lacing values clarifications

Ralph Giles giles at xiph.org
Mon Jun 30 03:28:41 PDT 2003



On Sunday, June 29, 2003, at 03:14 am, Scott Wheeler wrote:

> *) "The raw packet is logicaly divided into [n] 255 byte segments and 
> a last
> fractional segment of < 255 bytes."  However, in the wild, I've found 
> an
> example where the first lacing value (in this case out of 13) is less 
> than
> 255 (190 in the example I'm looking at).

That would imply the first packet in the page is of length 190. The 
comment header packet is often less that 255 bytes, so this is a common 
occurrence in the second page.

> *) "Note that a lacing value of 255 implies that a second lacing values
> follows [...] A packet of 255 bytes is terminated by a lacing value of 
> 0."
> Is this value of 0 included in the "page_segments" value in the case 
> that it
> occurs?

Yes. (unless it's on the next page)

>   i.e. is it safe to assume that the number of lacing values in the
> header will be equal to the number of values in the segment_table?

As the spec says, this field is "[t]he number of segment entries to 
appear in the segment table". The zero termination is just a bit of 
redundency  for error detection, of if you prefer an esthetic 
consistency.

  -r

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list