[Matroska-devel] EBML specification component for review - Element ID

Erik Piil piil.erik at gmail.com
Thu Apr 30 21:00:39 CEST 2015

This discussion relates to the “Element ID” portion of the earlier EBML RFC
Draft for revision/incorporation into the final EBML specification.

>From the RFC Draft:

Element ID

The EBML element ID is encoded as a variable size integer with, by default,
widths up to 4. Another maximum width value can be set by setting another
value to EBMLMaxIDWidth in the EBML header. See section 5.1. IDs are always
encoded in their shortest form, e.g. 1 is always encoded as 0x81 and never
as 0x4001. This limits the number of IDs in every class with the number of
IDs in the previous classes. Furthermore, values with all data bits set to
1 and all data bits set to 0 are reserved, hence the effective number of
IDs are as follows for different widths. Note that the shortest encoding
form for 127 is 0x407f since 0x7f is reserved.

Class    Width     Number of IDs

A              1         2^7-2 = 126

B              2         2^14-2^7 = 16 256

C              3         2^21-2^14 = 2 080 768

D              4         2^28-2^21 = 266 338 304

Any thoughts are most appreciated.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20150430/1bb2f279/attachment.html>

More information about the Matroska-devel mailing list