[Theora-dev] Problems with Theora DirectShow filters
Timothy B. Terriberry
tterribe at vt.edu
Wed Sep 15 11:27:58 PDT 2004
illiminable wrote:
> Doesn't only one of the input colourspaces to theora work ? I dunno
> where i got that impression from... but i thought only the 4:2:0 YUV
> input worked at present ?
I think you are confusing color space with pixel format. When I say
"color space", I am talking about the particular primaries, white
points, gamma curves, and for Y'CbCr, the mixing coefficients, offsets,
extents, etc. Theora defines two different such color spaces, one for
PAL content and one for NTSC content. It is expected that the encoder
convert content into one of these two spaces, thus minimizing the number
of conversion routines needed by a decoder. My understanding was that
Windows APIs have no standard way of communicating these parameters to,
for example, hardware conversion engines. Most graphics cards these days
have some form of YUV->RGB conversion for final display of the output,
but what they mean by "YUV" or "RGB" is anybody's guess.
4:2:0 is just a pixel format. It describes a certain decimation of the
chroma components, however those components happen to be defined. It is
by itself still an insufficient description, as there are multiple
different conventions for where the subsampled chroma values are located
spatially. JPEG places them at the average of 4 (for 4:2:0, or 2 for
4:2:2) luma locations, as did MPEG1. MPEG2 only averages in the vertical
direction, co-siting them with even luma samples along the horizontal
axis. The situation gets even more complicated with interlacing (which
Theora does not currently support).
JPEG(MPEG1)-style 4:2:0 is currently the only format supported by the
reference encoder/decoder, as this was the only format supported by VP3.
The experimental encoder/decoder have supported 4:2:2 and 4:4:4 for some
time. Recently commmitted code to the experimental encoder_example will
even do re-siting of the various chroma sub-sampling conventions to
match Theora's. It is currently limited to the formats used in the
YUV4MPEG file format (since that is what it takes as input), which are
not complete, but cover the most useful cases.
More information about the Theora-dev
mailing list