Re: [stella] tia hue luminance

Subject: Re: [stella] tia hue luminance
From: "Eric Ball" <ericball@xxxxxxxxxxxx>
Date: Fri, 12 Dec 2003 21:33:47 -0500
> On Fri, 12 Dec 2003, Thomas Jentzsch wrote:
> > Could you do the same for PAL too?

> > Adam wrote:
> Yes, if you have equations for me.

I've had a look at the PAL format and it looks like the RGB <-> YUV
equations are the same, so the only changes would be in the COLU -> YUV
equations.  Y is still going to be a simple multiplication (although
probably a different multiplier) and again the saturation will be some
constant value around 0.2143 (which is the size of the colorburst).  The
hue, though, is kinda different.

$c4 = int($colu /16);
if (($c4 < 0x02) || ($c4 > 0x0D))
{
    $sat = 0.0;
    $yp = $ypmult2 * ($colu & 0x0F);
		}
else
{
    $sat = $defaultsat;
    $yp = $ypmult * ($colu & 0x0F);
}
if (($c4 & 0x01) == 0x00)
{
    $hue = 180.0 - ($c4 - 2.0) * $phasescale + $phaseshift;
}
else
{
    $hue = 180.0 + ($c4 - 1.0) * $phasescale + $phaseshift;
}
$hue = $hue * $PI / 180.0;

With the default value of $phasescale being 15.0.

> > Adam wrote:
> If you're bothering with PAL equations, can you dig up SECAM equations
too?

SECAM appears to be a simple binary RGB based on the LM output pins.
Nothing tricky there except to figure out a decent magnitude.

----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/


Current Thread