[ogg-dev] non-decreasing granulepos

xiphmont at xiph.org xiphmont at xiph.org
Tue Feb 19 04:49:22 PST 2008


On Feb 19, 2008 6:37 AM, ogg.k.ogg.k at googlemail.com
<ogg.k.ogg.k at googlemail.com> wrote:

> However, while it spells out granules can stay put (and gives the reason
> for this), it also says that this is for data that "only affects codec working
> state without producing data and thus advancing granule position and time".
>
> The "thus" implies to me that it's thinking of time continuous codecs, where
> there can be only one event at the same time (vorbis, theora), so producing
> data must advance granule position and time.
>
> The wording "position and time" also says that the two are linked in a way
> that if one goes up, the other does too. Which would seem to preclude a
> low-bits counter which would increase granulepos, but not time :(

Precluding that situation had not been the original intent (indeed, I
hadn't considered that) and as far as I know deciding that granpos can
increase without increasing time is likely to be fine.  My original
desire was that any given granulepos will map to a deterministic time
(which it will in your description).  Time must be mappable back to a
granulepos, but not necessarily uniquely (like in the shift case used
by theora, where several different granposes could map to the same
time).  In this case, our 'shim' system needs a time to map back to
the lowest-valued possible granpos for that given time.

Monty


More information about the ogg-dev mailing list