[Theora-dev] FPGA implementation

Ralph Giles giles at xiph.org
Tue Jan 18 00:36:30 PST 2005


On Tue, Jan 18, 2005 at 01:14:36AM -0700, Andrey Filippov wrote:

> The raw packet is logically divided into [n] 255 byte segments and a last
> fractional segment of < 255 bytes. A packet size may well consist only of
> the trailing fractional segment, and a fractional segment may be zero
> length. These values, called "lacing values" are then saved and placed
> into the header segment table."
> 
> The second page in that file starts at byte 0x46, byte number 0x60 is
> numer of segments (0xc). Next goes byte number 0x61 with the value 0x32 <
> 0xFF !
> The total length of 12 segments is 0xa7f=
> 32+ff+ff+ff+ff+ff+ff+ff+ff+ff+ff+57 (bytes 0x61..0x6c)

The last segment lacing value for a *packet* is less than 255, but there 
can be multiple packets in a page, and packets can span page boundaries. 
So an initial lacing value of 0x32 indicates that the first 50 bytes of 
the page data being the belong to one packet, and the remaining 2637 
bytes to another.

Since there is no previous page (and the continued-packet flag isn't 
set) the value just means there are two complete packets on that page. 
If the flag had been set, and the lacing table of the previous page 
ended with 255, then the initial 50 bytes would be the end of a packet 
that started before the current page.

HTH,
 -r


More information about the Theora-dev mailing list