[ogg-dev] OggYUV

Arc arc at Xiph.org
Tue Nov 8 16:59:33 PST 2005

On Tue, Nov 08, 2005 at 03:33:57PM -0500, John Koleszar wrote:
> In terms of colorspaces, it seems to me that the only way to completely 
> describe the colorspace is to provide the transform matricies to or from 
> some reference colorspace. Is this a valid statement?

Except there are not enough colorspaces in use to need to do this, as far as 
I've read at least.. a set of common ones should do, I think.

> Use fourcc or some other enumeration as a key to a table that contains default 
> values for all these parameters.

I know by now I must sound like I'm beating this issue to death, but people are 
still using fourcc to refer to identifying any video parameter, as if by using 
fourcc we would be saved from this work.  

FourCC is a codec identifier, nothing more.  It's four letters which can be 
referenced against a table to see what codec it is, it's a standard used by RIFF 
(aka, wav and avi) and older Macintosh formats, and in my opinion, its obsolete.

It does not tell us anything about the colorspace, other than which codec it 
came from (and thus, we could say that "AXYZ" usually uses 4:4:4), just as 
knowing that something is of the "WAVE" fourcc, also known as a .wav file, 
doesn't tell us what samplerate, bits per sample, or number of channels is used.

In Ogg, we tell compatability by page0/packet0.  The entire first packet, 
including all it's configuration variables, versions, etc is used to detirmine 
compatability.  The fields we're talking about will go into packet0, so that a 
list of which plugins can accept it can be easily generated.

> Agreed.. Though it's worth pointing out that it's possible to have 
> images wthere the xstride/ystride between components is not constant 
> (endian issues, UVYY packings, etc). How to handle interlacing is 
> another problem, if you're trying to make a super generic format. A line 
> has to be drawn somewhere, and it's hard to say where that is.

Interlace certainly needs to be supported since converting to/from it is not a 
lossless operation.  The interchange format should be lossless, and that means 
supporting interlace and the chroma sampling it's likely to be needed for.

This is also interesting work in that, once we're done, we'll have a standard to 
use for a compressed lossless format.. a FLAC for video, for editing or archival 
purposes, similar to HuffYUV.  

I'm drafting OggYUV and OggRGB on the wiki right now, so everyone can be on the 
same page for what the result of this will look like.  The questions we need to 
answer are which colorspaces are needed and which encoding methods are needed.


The recognition of individual possibility,
 to allow each to be what she and he can be,
  rests inherently upon the availability of knowledge;
 The perpetuation of ignorance is the beginning of slavery.

from "Die Gedanken Sind Frei": Free Software and the Struggle for Free Thought
 by Eben Moglen, General council of the Free Software Foundation

More information about the ogg-dev mailing list