[theora-dev] interleave methods [was Re: Final Ogg 1.0 submission]
giles at xiph.org
Tue Mar 4 09:27:11 PST 2003
On Tuesday, March 4, 2003, at 04:45 pm, Jack Moffitt wrote:
> 1) Sort by the start granule pos on each page. This means means that
> you have a page, you're likely to have all data you need to play that
> page already.
> 2) Sort by end granulepos on each page. This means that pages end
> together. You'll have to buffer quite a bit more I think, because the
> midi page (for exmaple) would come at the end of the stream of vorbis
> pages, none of which can be played without the midi.
> Monty had assumed we'd use #2, but we ended up deciding on #1.
Ok, that makes a lot more sense to me; I think we're remembering the
same thing. Certainly solves the small-stream problem.
The obverse is the lookahead you need for large streams is worse. It's
not hard for video frames to span several pages at higher resolutions.
We talked about read-ahead issues quite a bit on irc.
Monty wants to have hints in the metaheader stream so the encoder/muxer
can tell the decoder how much lookahead it will need to do per
substream, and liboggfile will take care of maintaining that for all
the interesting substreams. I generally don't like the idea of the
metaheader, and planed to do without it, just making sure you have
current-granulepos+n on each substream. The readahead n is likely to be
obvious in context (a frame or three for video, the output buffersize
for audio) but can also be dynamically adjusted to compromise between
observed latency and memory consumption.
This is mostly an aesthetic argument, of course, so maybe we'll have to
do competing implementations to see which works better in practice. The
hints have to be optional to deal well with malformed streams, and in
that case I don't think either method will win on complexity. Mine does
allow the mux to be dumber, however.
--- >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