[Matroska-devel] RFC 1134 - New EBML Block design
moritz at bunkus.org
Tue Jan 20 23:10:50 CET 2004
Yay, a new block design. I strongly feel we should discuss this.
> The order of the headers are
> 1. TrackNumber
> 2. Time
> 3. Bitflags
That's good. Having the same order certainly lesses the overhead/amount
of new code.
> The Time is an EBML SINT that is used to calculate the timecode of the Block2.
> Exact method depends on the bitflags used below.
Certainly an improvement over a fixed 16bit sint, IMHO.
> Bitflags are as follows.
> 0-1 Lacing flags
> 2 Time flag
> 3-6 Unused
> 7 Gap flag
If we be radical we can also think about using simple flags for track
types. We could use the bits 3 and 4 like this:
00: I frame
01: P frame
10: B frame
The ReferenceBlocks would then be _optional_ for such a block. If
they're not present the references are implicitely given. However, if
some special application needs some special references it may still add
them. The number / types of references must then comply to the flags
This would save us a lot of space.
> Lacing flags layout is identical to the original Block layout.
> 1. By introducing a completely new Block structure with a new ID, we can be sure
> that current parsers won't b0rk on the data. It is better for the parser to
> simply skip the data than to break while trying to read data.
> 1. Two of the bit flags could be used to indicate forward or backward
> references(as originally planned). This would remove accuracy in the case of a
> damaged file, but would decrease overhead by no longer needing to use the
> ReferenceBlock element in most cases. 3 bytes for P frames and 6 bytes for B
> frames would be saved if using this.
Maybe I should just read the mail completely before I start spitting out
stuff that you've already said ;)
All in all I like this more flexible block layout very much.
If Darl McBride was in charge, he'd probably make marriage
unconstitutional too, since clearly it de-emphasizes the commercial
nature of normal human interaction, and probably is a major impediment
to the commercial growth of prostitution. - Linus Torvalds
More information about the Matroska-devel