[ogg-dev] OggPCM2 : chunked vs interleaved data

Erik de Castro Lopo mle+xiph at mega-nerd.com
Tue Nov 15 14:40:54 PST 2005

John Koleszar wrote:

> Could you elaborate on this? I'm not familiar enough with the ogg API, 
> but as far as I can tell, the way you'd do this would be to get the 
> whole interleaved packet out with ogg_stream_packetout and then walk 
> through it to de-interleave it into another buffer (or in place, I suppose).

I have yet to see anyone write a de-interleaver that works in place.
Even if one could it would be a logical nightmare. A de-interleaver
that works from separate source to destination is 3 lines of code.

> > Out of curiosity, do more people object because there isn't a 
> clean way to specify that the data is non-interleaved, or is it just 
> that the data's harder to use because you could potentially have to 
> interleave it?

My main objection is the added complexity of doing both interleaved
and chunked at the file level. My opinion of what we should support 
goes like this:

   1) Only support interleaved.
   2) Only support chunked.
   3) Support both.

> To clarify, I'm okay with sticking to interleaved, this just seemed like 
> low hanging fruit that could be useful to somebody, the gstreamer and 
> JACK folks in particular.

If its really that big an issue, it could be just as easily handled 
at the OggPCM API layer. This would leave all file data interleaved
(or chunked).

  Erik de Castro Lopo
"This is like creating laws against blasphemy and then complaining that
unbelievers can't come up with any logical argument against the existence
of God"  -- www.infoanarchy.org on the Digital Millenium Copyright Act

More information about the ogg-dev mailing list