[MPlayer-dev-eng] Repeating items in Nut
Ville Saari
114263 at foo.bar.org
Sun Apr 25 02:09:23 CEST 2004
The number of the repeating items in nut is in some cases specified by
storing the count before the items (vb values, index arrays) and in
other cases by storing a terminator value after the items (info items,
codec specific data in stream header). This conflicts with the simplicity
goal.
I suggest selecting one of the methods to be used everywhere. The
termination can only be used when a possible sentinel value exists, but
the count method always works. This makes the count method the obvious
choice.
One might argue that the count may add overhead because the terminator
is always a single byte vlc, but the count might need more. On the other
hand the terminator reserves one possible value from the ids of the items,
which might bump the ids to two bytes a bit earlier.
The count method requires the writer to buffer all the items if it doesn't
know the count in advance, but the index is the only place where really
big counts are expected and it uses the count method already. The forward
pointer also requires the data to be buffered in those cases anyway.
--
Ville
More information about the MPlayer-dev-eng
mailing list