[Matroska-devel] EBML specification component for review - Element Data Size
slhomme at matroska.org
Sat May 2 17:45:12 CEST 2015
On Thu, Apr 30, 2015 at 9:03 PM, Erik Piil <piil.erik at gmail.com> wrote:
> This discussion relates to the “Element Data Size” portion of the earlier
> EBML RFC Draft for revision/incorporation into the final EBML
> From the RFC Draft:
> Element Data Size
> The EBML element data size is encoded as a variable size integer with, by
> default, widths up to 8. Another maximum width value can be set by setting
> another value to EBMLMaxSizeWidth in the EBML header. See section 5.1.
> There is a range overlap between all different widths, so that 1 encoded
> with width 1 is semantically equal to 1 encoded with width 8. This allows
> for the element data to shrink without having to shrink the width of the
> size descriptor.
> Values with all data bits set to 1 means size unknown, which allows for
> dynamically generated EBML streams where the final size isn't known
> beforehand. The element with unknown size MUST be an element with an
> element list as data payload. The end of the element list is determined by
> the ID of the element. When an element that isn't a sub-element of the
> element with unknown size arrives, the element list is ended.
No, an unknown/infinite element ends when an element of the same level or a
higher level in the semantic is found. Or if the stream ends, of course.
Unknown elements are not considered as higher level and should not end an
infinite element. In general unknown elements will be addition fields, not
high level structures that were never seen before.
In both cases the element will be skipped/discarded anyway, so the level
doesn't really matter. If the element was high level, the next one will be
high level too and will end the infinite element. If it was a lower level
element, the next one will be treated as nothing happened and the level of
the next element will determine if the infinite element ends or not. So
unknown elements should not change the semantic level and affect the
boundaries of unknown/infinite elements.
> Since the highest value is used for unknown size the effective maximum
> data size is 2^56-2, using variable size integer width 8.
> Any thoughts are most appreciated.
> Matroska-devel mailing list
> Matroska-devel at lists.matroska.org
> Read Matroska-Devel on GMane:
Matroska association Chairman
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Matroska-devel