[xiph-cvs] cvs commit: theora/doc color.html
Timothy Terriberry
tterribe at xiph.org
Fri Sep 26 08:03:48 PDT 2003
tterribe 03/09/26 11:03:48
Modified: examples encoder_example.c player_example.c splayer.c
include/theora theora.h
Added: doc color.html
Log:
Updated color space definitions.
Instead of haphazardly quoting some standards documents which are completely
inadequate at defining a transformation from Y'CbCr space to a device-independent
space, a new document, doc/color.html, has been included which explicitly spells
out all the necessary parameters for each space.
For now, the number of spaces has been kept at 2: One for NTSC systems and
one for PAL/SECAM systems.
This breaks API compatibility, because the old color space constants were
replaced.
As far as name space pollution goes, they were really horrible constants anyway.
Revision Changes Path
1.26 +2 -2 theora/examples/encoder_example.c
Index: encoder_example.c
===================================================================
RCS file: /usr/local/cvsroot/theora/examples/encoder_example.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- encoder_example.c 7 Jul 2003 21:28:00 -0000 1.25
+++ encoder_example.c 26 Sep 2003 15:03:48 -0000 1.26
@@ -12,7 +12,7 @@
function: example encoder application; makes an Ogg Theora/Vorbis
file from YUV4MPEG2 and WAV input
- last mod: $Id: encoder_example.c,v 1.25 2003/07/07 21:28:00 mauricio Exp $
+ last mod: $Id: encoder_example.c,v 1.26 2003/09/26 15:03:48 tterribe Exp $
********************************************************************/
@@ -625,7 +625,7 @@
ti.fps_denominator=video_hzd;
ti.aspect_numerator=video_an;
ti.aspect_denominator=video_ad;
- ti.colorspace=not_specified;
+ ti.colorspace=OC_CS_UNSPECIFIED;
ti.target_bitrate=video_r;
ti.quality=video_q;
<p><p>1.26 +2 -2 theora/examples/player_example.c
Index: player_example.c
===================================================================
RCS file: /usr/local/cvsroot/theora/examples/player_example.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- player_example.c 15 Jul 2003 13:21:21 -0000 1.25
+++ player_example.c 26 Sep 2003 15:03:48 -0000 1.26
@@ -12,7 +12,7 @@
function: example SDL player application; plays Ogg Theora files (with
optional Vorbis audio second stream)
- last mod: $Id: player_example.c,v 1.25 2003/07/15 13:21:21 giles Exp $
+ last mod: $Id: player_example.c,v 1.26 2003/09/26 15:03:48 tterribe Exp $
********************************************************************/
@@ -582,7 +582,7 @@
and video start roughly together, and don't begin playback until
we have a start frame for both. This is not necessarily a valid
assumption in Ogg A/V streams! It will always be true of the
- enxample_encoder (and most streams) though. */
+ example_encoder (and most streams) though. */
stateflag=0; /* playback has not begun */
while(!got_sigint){
<p><p>1.6 +5 -5 theora/examples/splayer.c
Index: splayer.c
===================================================================
RCS file: /usr/local/cvsroot/theora/examples/splayer.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- splayer.c 7 Jul 2003 15:27:55 -0000 1.5
+++ splayer.c 26 Sep 2003 15:03:48 -0000 1.6
@@ -757,14 +757,14 @@
static void report_colorspace(theora_info *ti)
{
switch(ti->colorspace){
- case not_specified:
+ case OC_CS_UNSPECIFIED:
/* nothing to report */
break;;
- case ITU_Rec_601:
- fprintf(stderr," encoder specified ITU Rec 601 color.\n");
+ case OC_CS_ITU_REC_470M:
+ fprintf(stderr," encoder specified ITU Rec 470M color.\n");
break;;
- case CIE_Rec_709:
- fprintf(stderr," encoder specified CIE Rec 709 color.\n");
+ case OC_CS_ITU_REC_470BG:
+ fprintf(stderr," encoder specified ITU Rec 470BG color.\n");
break;;
default:
fprintf(stderr,"warning: encoder specified unknown colorspace (%d).\n",
<p><p>1.14 +4 -4 theora/include/theora/theora.h
Index: theora.h
===================================================================
RCS file: /usr/local/cvsroot/theora/include/theora/theora.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- theora.h 10 Jun 2003 11:50:28 -0000 1.13
+++ theora.h 26 Sep 2003 15:03:48 -0000 1.14
@@ -11,7 +11,7 @@
********************************************************************
function:
- last mod: $Id: theora.h,v 1.13 2003/06/10 11:50:28 giles Exp $
+ last mod: $Id: theora.h,v 1.14 2003/09/26 15:03:48 tterribe Exp $
********************************************************************/
@@ -35,9 +35,9 @@
} yuv_buffer;
typedef enum {
- not_specified = 0,
- ITU_Rec_601 = 1,
- CIE_Rec_709 = 2
+ OC_CS_UNSPECIFIED,
+ OC_CS_ITU_REC_470M,
+ OC_CS_ITU_REC_470BG,
} theora_colorspace;
typedef struct {
<p><p>1.1 theora/doc/color.html
Index: color.html
===================================================================
<HTML>
<HEAD><TITLE>xiph.org: Ogg Theora documentation</TITLE></HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#202020" LINK="#006666" VLINK="#000000">
<H1><FONT COLOR="#000070">
Ogg Theora I specification: color space conventions
</FONT></H1>
<H1>Overview</H1>
There are a large number of different color standards used in digital video.
Since Theora is a lossy codec, it restricts itself to only a few of them to
simplify playback.
Unlike the alternate method of describing all the parameters of the color
model, this allows a few dedicated routines for color conversion to be written
and heavily optimized in a decoder.
More flexible conversion functions should instead be specified in an encoder,
where additional computational complexity is more easily tolerated.
The color spaces were selected to give a fair representation of color standards
in use around the world today.
Most of the standards that do not exactly match one of these can be converted
to one fairly easily.
</P>
The Theora codec identification header contains an 8-bit value that describes
the color space.
This merely selects one of the color spaces available from an enumerated list.
Currently, only two color spaces are defined, with a third possibility that
indicates the color space is "unknown".
All of them are Y'C<SUB>b</SUB>C<SUB>r</SUB> color spaces with one luma channel
and two chroma channels.
Each channel contains 8-bit discrete values in the range 0-255, which represent
non-linear gamma pre-corrected signals.
</P>
<H2>color space parameters</H2>
The parameters which describe each color space are listed below.
These are the parameters needed to map colors from the encoded
Y'C<SUB>b</SUB>C<SUB>r</SUB> representation to the device-independent color
space CIE XYZ (1931).
</P>
<DL>
<DT>Y'C<SUB>b</SUB>C<SUB>r</SUB> to Y'P<SUB>b</SUB>P<SUB>r</SUB></DT>
<DD>
This conversion takes 8-bit discrete values in the range 0-255 and maps them to
real values in the range [0,1] for Y and [-1/2,1/2] for P<SUB>b</SUB>
and P<SUB>r</SUB>.
Because some values may fall outside the offset and excursion defined for each
channel in the Y'C<SUB>b</SUB>C<SUB>r</SUB> space, the results may fall
outside these ranges in Y'P<SUB>b</SUB>P<SUB>r</SUB> space.
No clamping should be done at this stage.
</P>
Parameters: Offset<SUB>Y,C<SUB>b</SUB>,C<SUB>r</SUB></SUB></EM>,
Excursion<SUB>Y,C<SUB>b</SUB>,C<SUB>r</SUB>,</SUB></EM>
</P>
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">Y'<SUB>out</SUB></TD>
<TD>=</TD>
<TD ALIGN="LEFT">
(Y'<SUB>in</SUB>-Offset<SUB>Y</SUB></EM>)/
Excursion<SUB>Y</SUB></EM>
</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">P<SUB>b</SUB></TD>
<TD>=</TD>
<TD ALIGN="LEFT">
(C<SUB>b</SUB>-Offset<SUB>C<SUB>b</SUB></SUB></EM>)/
Excursion<SUB>C<SUB>b</SUB></SUB></EM>
</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">P<SUB>r</SUB></TD>
<TD>=</TD>
<TD ALIGN="LEFT">
(C<SUB>r</SUB>-Offset<SUB>C<SUB>r</SUB></SUB></EM>)/
Excursion<SUB>C<SUB>r</SUB></SUB></EM>
</TD>
</TR>
</TABLE>
</DD>
<DT>Y'P<SUB>b</SUB>P<SUB>r</SUB> to R'G'B'</DT>
<DD>
This conversion takes the one luma and two chroma channel representation and
maps it to the non-linear R'G'B' space used to drive actual output devices.
Values should be clamped into the range [0,1] after this stage.
Parameters: K<SUB>b</SUB></EM>, <EM>K<SUB>r</SUB></EM>
</P>
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">R'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">Y' + 2(1-K<SUB>r</SUB></EM>)P<SUB>r</SUB></TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">G'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">
Y' +
2((K<SUB>b</SUB></EM>-1)<EM>K<SUB>b</SUB></EM>/
(1-K<SUB>b</SUB></EM>-<EM>K<SUB>r</SUB></EM>))P<SUB>b</SUB> +
2((K<SUB>r</SUB></EM>-1)<EM>K<SUB>r</SUB></EM>/
(1-K<SUB>b</SUB></EM>-<EM>K<SUB>r</SUB></EM>))P<SUB>r</SUB>
</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">B'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">Y' + 2(1-K<SUB>b</SUB></EM>)P<SUB>b</SUB></TD>
</TR>
</TABLE>
</DD>
<DT>R'G'B' to RGB (Output device gamma correction)</DT>
<DD>
This conversion takes the non-linear R'G'B' voltage levels and maps it to the
linear light levels produced by the actual output device.
Note that this conversion is only that of the output device, and its inverse is
not</EM> that used by the input device.
Because a dim viewing environment is assumed in most television standards, the
overall gamma between the input and output devices is usually around 1.1 to
1.2, and not a strict 1.0.
</P>
For calibration with actual output devices, the model
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">L</TD>
<TD>=</TD>
<TD ALIGN="LEFT">(E'+Δ)<SUP>γ</EM></SUP></TD>
</TR>
</TABLE>
should be used, with Δ the free parameter and γ</EM> held
fixed to the value specified in this document.
The conversion function presented here is an idealized version with Δ=0.
</P>
Parameters: γ</EM>
</P>
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">R</TD>
<TD>=</TD>
<TD ALIGN="LEFT">R'<SUP>γ</EM></SUP></TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">G</TD>
<TD>=</TD>
<TD ALIGN="LEFT">G'<SUP>γ</EM></SUP></TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">B</TD>
<TD>=</TD>
<TD ALIGN="LEFT">B'<SUP>γ</EM></SUP></TD>
</TR>
</TABLE>
</DD>
<DT>RGB to R'G'B' (Input device gamma correction)</DT>
<DD>
This conversion takes linear light levels and maps them to the non-linear
voltage levels used to drive the actual output device.
This information is merely informative.
It is not required for building a decoder or for converting between the various
formats and the actual output capabilities of a particular device.
</P>
A linear segment is introduced on the low end to reduce noise in dark areas of
the image.
The rest of the scale is adjusted so that the power segment of the curve
intersects the linear segment with the proper slope, and so that it still maps
0 to 0 and 1 to 1.
</P>
Parameters: β</EM>, <EM>α</EM>, <EM>δ</EM>,
ε</EM>
</P>
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">R'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">
(1+ε</EM>)R<SUP>β</SUP>-<EM>ε</EM>
</TD>
<TD>for δ</EM> ≤ R ≤ 1</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">R'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">α</EM>R</TD>
<TD>for 0 ≤ R < δ</EM></TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">G'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">
(1+ε</EM>)G<SUP>β</SUP>-<EM>ε</EM>
</TD>
<TD>for δ</EM> ≤ G ≤ 1</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">G'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">α</EM>G</TD>
<TD>for 0 ≤ G < δ</EM></TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">B'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">
(1+ε</EM>)B<SUP>β</SUP>-<EM>ε</EM>
</TD>
<TD>for δ</EM> ≤ B ≤ 1</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">B'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">α</EM>B</TD>
<TD>for 0 ≤ B < δ</EM></TD>
</TR>
</TABLE>
</DD>
<DT>RGB to CIE XYZ (1931)</DT>
<DD>
This conversion maps a device-dependent linear RGB space to the
device-independent linear CIE XYZ space.
The parameters are the CIE chromaticity coordinates of the three primaries,
red, green, and blue, as well as the chromaticity coordinates of the white
point of the device.
This is how hardware manufacturers and standards typically describe a
particular RGB space.
The math required to convert these parameters into a useful transformation
matrix is reproduced below.
</P>
Parameters: x<SUB>r,g,b,w</SUB></EM>, <EM>y<SUB>r,g,b,w</SUB></EM>
</P>
<TABLE>
<TR>
<TD ALIGN="RIGHT">F</TD>
<TD>=</TD>
<TD ALIGN="LEFT"><TABLE><TR>
<TD><FONT SIZE="300%">(</FONT></TD>
<TD><TABLE>
<TR>
<TD ALIGN="CENTER">x<SUB>r</SUB></EM>/<EM>y<SUB>r</SUB></EM></TD>
<TD ALIGN="CENTER">x<SUB>g</SUB></EM>/<EM>y<SUB>g</SUB></EM></TD>
<TD ALIGN="CENTER">x<SUB>b</SUB></EM>/<EM>y<SUB>b</SUB></EM></TD>
</TR>
<TR>
<TD ALIGN="CENTER">1</TD>
<TD ALIGN="CENTER">1</TD>
<TD ALIGN="CENTER">1</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
(1-x<SUB>r</SUB></EM>-<EM>y<SUB>r</SUB></EM>)/<EM>y<SUB>r</SUB></EM>
</TD>
<TD ALIGN="CENTER">
(1-x<SUB>g</SUB></EM>-<EM>y<SUB>g</SUB></EM>)/<EM>y<SUB>g</SUB></EM>
</TD>
<TD ALIGN="CENTER">
(1-x<SUB>b</SUB></EM>-<EM>y<SUB>b</SUB></EM>)/<EM>y<SUB>b</SUB></EM>
</TD>
</TR>
</TABLE></TD>
<TD<FONT SIZE="300%">)</FONT></TD>
</TR></TABLE></TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><TABLE><TR>
<TD><FONT SIZE="300%">(</FONT></TD>
<TD><TABLE>
<TR><TD ALIGN="CENTER">s<SUB>r</SUB></TD></TR>
<TR><TD ALIGN="CENTER">s<SUB>g</SUB></TD></TR>
<TR><TD ALIGN="CENTER">s<SUB>b</SUB></TD></TR>
</TABLE></TD>
<TD><FONT SIZE="300%">)</FONT></TD>
</TR></TABLE></TD>
<TD>=</TD>
<TD ALIGN="LEFT"><TABLE><TR>
<TD>F<SUP>-1</SUP><FONT SIZE="300%">(</FONT></TD>
<TD><TABLE>
<TR><TD ALIGN="CENTER">x<SUB>w</SUB></EM>/<EM>y<SUB>w</SUB></EM></TD></TR>
<TR><TD ALIGN="CENTER">1</TD></TR>
<TR><TD ALIGN="CENTER">
(1-x<SUB>w</SUB></EM>-<EM>y<SUB>w</SUB></EM>)/<EM>y<SUB>w</SUB></EM>
</TD></TR>
</TABLE></TD>
<TD><FONT SIZE="300%">)</FONT></TD>
</TR></TABLE></TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><TABLE><TR>
<TD><FONT SIZE="300%">(</FONT></TD>
<TD><TABLE>
<TR><TD ALIGN="CENTER">X</TD></TR>
<TR><TD ALIGN="CENTER">Y</TD></TR>
<TR><TD ALIGN="CENTER">Z</TD></TR>
</TABLE></TD>
<TD><FONT SIZE="300%">)</FONT></TD>
</TR></TABLE></TD>
<TD>=</TD>
<TD ALIGN="LEFT"><TABLE><TR>
<TD>F<FONT SIZE="300%">(</FONT></TD>
<TD><TABLE>
<TR><TD ALIGN="CENTER">s<SUB>r</SUB>R</TD></TR>
<TR><TD ALIGN="CENTER">s<SUB>g</SUB>G</TD></TR>
<TR><TD ALIGN="CENTER">s<SUB>b</SUB>B</TD></TR>
</TABLE></TD>
<TD><FONT SIZE="300%">)</FONT></TD>
</TR></TABLE></TD>
</TR>
</TABLE>
</DD>
</DL>
<H2>available color spaces</H2>
These are the color spaces currently defined for use by Ogg Theora video.
Each one has a short name, with which it is referred to in this document, and
a more detailed specification of the standards from which its parameters are
derived.
Some standards do not specify all the parameters necessary.
For these unspecified parameters, this document serves as the definition of
what should be used when encoding or decoding Ogg Theora video.
<H3>Rec 470M (Rec. ITU-R BT.470-6 System M/NTSC with Rec. ITU-R BT.601-5)</H3>
This color space is used by broadcast television and DVDs in much of the
Americas, Japan, Korea, and the Union of Myanmar
[Rec470].
This color space may also be used for System M/PAL (Brazil), with an
appropriate conversion supplied by the encoder to compensate for the
different gamma value.
See the Rec 470BG section for an appropriate gamma value to assume for M/PAL
input.
</P>
In the US, studio monitors are adjusted to a D65 white point
(x<SUB>w</SUB></EM>,<EM>y<SUB>w</SUB></EM>=0.313,0.329).
In Japan, studio monitors are adjusted to a D white of 9300K
(x<SUB>w</SUB></EM>,<EM>y<SUB>w</SUB></EM>=0.285,0.293).
</P>
Rec 470 does not specify a digital encoding of the color signals.
For Ogg Theora, Rec. ITU-R BT.601-5 is used, starting from the R'G'B' signals
specified by Rec 470 [Rec601].
</P>
Rec 470 does not specify an input gamma function.
For Ogg Theora, the Rec 709 input function is used.
This is the same as that specified by SMPTE 170M, which claims to reflect
modern practice in the creation of NTSC signals (c. 1994)
[SMPTE170M].
</P>
<H4>parameters</H4>
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">Offset<SUB>Y,C<SUB>b</SUB>,C<SUB>r</SUB></SUB></EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">(16,128,128)</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">
Excursion<SUB>Y,C<SUB>b</SUB>,C<SUB>r</SUB></SUB>
</TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">(219,224,224)</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">K<SUB>b</SUB></EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">0.114</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">K<SUB>r</SUB></EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">0.299</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">γ</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">2.2</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">β</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">0.45</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">α</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">4.5</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">δ</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">0.018</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">ε</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">0.099</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">x<SUB>r</SUB></EM>,<EM>y<SUB>r</SUB></EM></TD>
<TD>=</TD>
<TD>0.67,</TD>
<TD>0.33</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">x<SUB>g</SUB></EM>,<EM>y<SUB>g</SUB></EM></TD>
<TD>=</TD>
<TD>0.21,</TD>
<TD>0.71</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">x<SUB>b</SUB></EM>,<EM>y<SUB>b</SUB></EM></TD>
<TD>=</TD>
<TD>0.14,</TD>
<TD>0.08</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">
(Illuminant C) x<SUB>w</SUB></EM>,<EM>y<SUB>w</SUB></EM>
</TD>
<TD>=</TD>
<TD>0.310,</TD>
<TD>0.316</TD>
</TR>
</TABLE>
<H3>
Rec 470BG (Rec. ITU-R BT.470-6 Systems B and G with Rec. ITU-R BT.601-5)
</H3>
This color space is used by the PAL and SECAM systems in much of the rest of
the world [Rec470].
This can be used directly by systems (B, B1, D, D1, G, H, I, K, N)/PAL and (B,
D, G, H, K, K1, L)/SECAM.
</P>
Note that the Rec 470BG chromaticity values are different from those specified
in Rec 470M.
When PAL and SECAM systems were first designed, they were based upon the same
primaries as NTSC.
However, as methods of making color picture tubes have changed, the primaries
used have changed as well.
The US recommends using correction circuitry to approximate the existing,
standard NTSC primaries.
Current PAL and SECAM systems have standardized on primaries in accord with
more recent technology.
</P>
Rec 470 provisionally permits the use of the NTSC chromaticity values (given
above) with legacy PAL and SECAM equipment.
In Ogg Theora, material must be decoded assuming the new PAL and SECAM
primaries.
Material intended for display on old legacy devices should be converted by the
decoder.
</P>
The official Rec 470BG specifies a gamma value of γ</EM>=2.8.
However, in practice this value is unrealistically high
[Poy97].
Rec 470BG states that the overall system gamma should be approximately
γ</EM>/<EM>β</EM>=1.2.
However, most cameras pre-correct with a gamma value of β</EM>=0.45,
which suggests an output device gamma of approximately γ</EM>=2.67.
This is the value recommended for use with PAL systems in Ogg Theora.
</P>
Rec 470 does not specify a digital encoding of the color signals.
For Ogg Theora, Rec. ITU-R BT.601-5 is used, starting from the R'G'B' signals
specified by Rec 470 [Rec601].
</P>
Rec 470 does not specify an input gamma function.
For Ogg Theora, the Rec 709 input function is used.
</P>
<H4>parameters</H4>
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">Offset<SUB>Y,C<SUB>b</SUB>,C<SUB>r</SUB></SUB></EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">(16,128,128)</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">
Excursion<SUB>Y,C<SUB>b</SUB>,C<SUB>r</SUB></SUB>
</TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">(219,224,224)</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">K<SUB>b</SUB></EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">0.114</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">K<SUB>r</SUB></EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">0.299</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">γ</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">2.67</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">β</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">0.45</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">α</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">4.5</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">δ</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">0.018</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">ε</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">0.099</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">x<SUB>r</SUB></EM>,<EM>y<SUB>r</SUB></EM></TD>
<TD>=</TD>
<TD>0.64,</TD>
<TD>0.33</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">x<SUB>g</SUB></EM>,<EM>y<SUB>g</SUB></EM></TD>
<TD>=</TD>
<TD>0.29,</TD>
<TD>0.60</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">x<SUB>b</SUB></EM>,<EM>y<SUB>b</SUB></EM></TD>
<TD>=</TD>
<TD>0.15,</TD>
<TD>0.06</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">
(D65) x<SUB>w</SUB></EM>,<EM>y<SUB>w</SUB></EM>
</TD>
<TD>=</TD>
<TD>0.313,</TD>
<TD>0.329</TD>
</TR>
</TABLE>
<H2>references</H2>
<DL>
<DT>[<A NAME="Poy97">Poy97</A>]</DT>
<DD>
Poynton, Charles, <I>Frequently-Asked Questions about Gamma</I>.
<A HREF="http://www.poynton.com/GammaFAQ.html"><a href="http://www.poynton.com/GammaFAQ/html</A">http://www.poynton.com/GammaFAQ/html</A</a>>,
Feb. 1997.
</DD>
<DT>[<A NAME="Rec470">Rec470</A>]</DT>
<DD>
Recommendation ITU-R BT.470-6, <I>Conventional Television Systems</I>
(1970, revised 1998). International Telecommunications Union, 1211 Geneva 20,
Switzerland.
</DD>
<DT>[<A NAME="Rec601">Rec601</A>]</DT>
<DD>
Recommendation ITU-R BT.601-5, <I>Studio Encoding Parameters of
Digital Television for Standard 4:3 and Wide-Screen 16:9 Aspect Ratios</I>
(1982, revised 1995). International Telecommunications Union, 1211 Geneva 20,
Switzerland.
</DD>
<DT>[<A NAME="Rec709">Rec709</A>]</DT>
<DD>
Recommendation ITU-R BT.709-5, <I>Parameter values for the
HDTV standards for production and international programme exchange</I>
(1990, revised 2002). International Telecommunications Union, 1211 Geneva 20,
Switzerland.
</DD>
<DT>[<A NAME="SMPTE170M">SMPTE170M</A>]</DT>
<DD>
Society of Motion Picture and Television Engineers, <I>Television —
Composite Analog Video Signal — NTSC for Studio Applications</I>.
SMPTE-170M, 1994
</DD>
<DT>[<A NAME="SMPTE240M">SMPTE240M</A>]</DT>
<DD>
Society of Motion Picture and Television Engineers, <I>Television —
Signal Parameters — 1125-Line High-Definition Production</I>.
SMPTE-240M, 1999.
</DD>
</DL>
</BODY>
</HTML>
<p><p>--- >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 'cvs-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 commits
mailing list