[Matroska-devel] EBML improvements
steve.lhomme at free.fr
Mon Aug 30 11:02:54 CEST 2004
I've been thinking for a while about how to add native support for
elements that require a few bits. Especially on how to save space for
the 1 bit flags we use in Matroska.
I've been thinking about an EbmlBitfield, but then that would mean that
each bit in the field need to have a separate definition and I didn't
really like it.
Another solution that I find better is the use of an EbmlFlag. The type
would be interpreted like this :
- if the element is set with a size of 0, the value is the opposite of
the default value
- if the element is set with a value, the value is either 0 (false) or
- if the element is not set, the value is assumed to be the default if
the element is mandatory (and all flags should be mandatory)
So, it means that files previously written will always be compatible.
But that you can avoid setting the value to save space. It won't be a
big difference for Matroska, but it does for EBML in general.
I think the changes in the existing parsers are very minimal.
Any comment ?
robUx4 on blog <http://robux4.blogspot.com/>
More information about the Matroska-devel