[Matroska-devel] SImple Block Header

Moritz Bunkus moritz at bunkus.org
Thu Jun 16 15:13:40 CEST 2011


Hey,

a simple block element, like every other EBML element, begins with its
ID and its total size.

> Size = 1 + (1-8) + 4 + (4 + (4)) octets. So from 6 to 21 octets.

Here: The ID of the simple block element is one byte long (0xA3), hence
the "1".

The total size of the element can be anywhere from 6 to several million
bytes. The size is encoded the same everywhere: as a variable length
integer. Hence the "(1-8)", meaning it is coded with at least 1 but at
most 8 bytes.

The next element is the track number etc. This is usually one byte long,
but can be longer; again it's a variable length integer.

Then there's the relative timecode stored as a two-byte signed integer.

Well... I don't understand the 4 + (4 + (4)) part either ;) Follow
http://www.matroska.org/technical/specs/index.html#simpleblock_structure
How to calculate lacing is shown right above that section.

Regards,
mosu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20110616/e62abf6c/attachment.pgp>


More information about the Matroska-devel mailing list