[matroska-general] Re: How to choose EBML IDs ?

Steve Lhomme steve.lhomme at free.fr
Wed Jul 2 11:57:03 CEST 2003


> Hi everybody,

Hi Brice,

> I'm currently designing a binary format based on EBML, and was wondering
if
> there are some rules about how to choose class IDs. I know that less
> frequently used IDs should be longer, but are there any other rule ? How
> did you choose the IDs used in Matroska ?

Well the few rules worth :
- less used IDs : bigger size
- IDs used to resynchronise : 4 bytes (you may not need that)
- IDs not much used but in a sensitive place (where size is really
important) : smaller size

That's all the rules I've used.
Oh, and of course you have to meet the bit format for each stream :

1xxx xxxx                                  - Class A IDs (2^7 -2 possible
values) (base 0x8X)
01xx xxxx  xxxx xxxx                       - Class B IDs (2^14-2 possible
values) (base 0x4X 0xXX)
001x xxxx  xxxx xxxx  xxxx xxxx            - Class C IDs (2^21-2 possible
values) (base 0x2X 0xXX 0xXX)
0001 xxxx  xxxx xxxx  xxxx xxxx  xxxx xxxx - Class D IDs (2^28-2 possible
values) (base 0x1X 0xXX 0xXX 0xXX)


http://www.matroska.org




More information about the Matroska-general mailing list