> I'm reading the logical bitstream framing doc, and I have a question
about
> lacing values, which encode the length of a packet (I think). For example,
> the values
>
> 255, 255, 243
>
> encode a length of 753.
correct.
> I'm wondering whether a format more like this was considered
>
> length bytes encoding
> 0-254 1 value in one byte
> 255-65534 3 one 255 + value in two bytes
> 65535-16777215 5 two 255 + value in three bytes
> etc
>
> It does cost an extra byte for lengths 255-509, but is smaller for lengths
> over 764. To me, it seems simpler.
...if you end up with nearly all of your packets in the 255-509 range (as will
be common in vorbis), you lose overall. The system, as I constructed it, has a
lower fixed worst-case encoding overhead (roughly 1% for packets over 100
bytes), regardless of packet size, and, of course, lowest possible byte
overhead for packets < 255 bytes. I use even byte values so that the header
interposes an even number of bytes without padding (wasted bits) or repacking
the packets.
Monty
The idea was to minimize >
> --Mike
>
> --
> [O]ne of the features of the Internet [...] is that small groups of people
can
> greatly disturb large organizations. --Charles C. Mann
>
> --- >8 ----
> List archives: http://www.xiph.org/archives/
> Ogg project homepage: http://www.xiph.org/ogg/
>
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/