[theora-dev] Re: Ogg mux design

Monty xiphmont at xiph.org
Mon Feb 16 16:41:05 PST 2004

On Mon, Feb 16, 2004 at 04:25:43PM -0800, Ralph Giles wrote:

> What Jack and I came up with originally was slightly different. All 
> pages are marked by end time and there is no distinction between stream 
> types. Pages are still sorted chronologically. The difference is that 
> *all* pages are sorted by their start time, which is to say by the 
> granulepos of the previous page in that logical bitstream.

Yes, I remember this.  Unfortunately it makes some repagination
operations impossible, as you can't as easily reconstruct granule
positions going backwards.  You have a granpos for every packet in
encode; you may not be able to regenerate that later.

> I believe this handles the requirements with about equal effectiveness, 
> and I like it better conceptually, else I wouldn't bring it up.

Conceptually, working by starting time is cleaner all around.
However, it's not entirely possible when granpos marks end time of a

> Discontinuous streams are sorted exactly the same; what's treated 
> differently are the continuous streams. In the case of an a/v stream, 
> the larger video packets will come before the smaller but more numerous 
> audio packets that need to be played in the same timespan. You have to 
> buffer both during that frame anyway; which wants a longer latency is 
> really something only the playback app knows, so this doesn't make much 
> difference in terms of buffering.

the continuous streams aren't actually sorted differently if you come
to think of granpos as defining the time between two pages, not the
time of a page (or packet).  The only difference is where the granpos
is stored.

> Finally, I'm not convinced the continuous/discontinuous classification 
> is all that helpful in the end. 

It is; you get buffer regulation for free if you just lean on the
continuous streams and let it fall out.  The real difference between
continuous an discontinuous really matters only to buffer regulation.  

It's not a 'big vs. small' issue really.

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'theora-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

More information about the Theora-dev mailing list