[ogg-dev] non-decreasing granulepos

Conrad Parker conrad at metadecks.org
Tue Feb 19 02:31:28 PST 2008


Hi all,

something which came up recently in relation to the design of Kate's
granulepos was whether or not the granulepos of successive Ogg pages
is allowed to be the same, ie. whether or not granulepos must be
strictly increasing.

As this question is more generally about Ogg granulepos, how about we
answer it first and then get back to the discussion of Kate's
granulepos ...

Here is what some documents have to say:

  * Neither RFC3533 or http://www.xiph.org/ogg/doc/framing.html clarify this.

  * The seeking algorithm suggested in the (troublesome) email quoted at
http://wiki.xiph.org/index.php/GranulePosAndSeeking is "find the
earliest page with a granulepos less than but closest to 'x'" should
be able to handle equal granulepos (if the earliest of a sequence of
pages with equal granulepos is taken to be the first of those in the
stream).

  * The draft mapping for Ogg Dirac uses successive equal granulepos,
as the packets occur in coded order, not display order:

http://wiki.xiph.org/index.php/OggDirac#Granulepos

This is consistent with the definition of granulepos as the "count of
decodable frames".

I suggest we clarify that the granulepos of successive pages is
allowed to be equal, as this is non-obvious from the available
documentation.

Thoughts?

Conrad.


More information about the ogg-dev mailing list