Subject: Re: [stella] tia hue luminance From: Adam Wozniak <adam@xxxxxxxxxxxxxxxx> Date: Mon, 29 Sep 2003 09:19:15 -0700 (PDT) |
On Sat, 27 Sep 2003, Eric Ball wrote: > But if you are interested, here are the NTSC formulas. > > R8 = 255 * ( Y + 1.402 * Pr ) > G8 = 255 * ( Y - 0.344136 * Pb - 0.714136 * Pr ) > B8 = 255 * ( Y + 1.772 * Pb ) > > where > Y = ( COLU AND 15 ) / ( luminance ) > Pb = saturation * cos ( hue ) > Pr = saturation * sin ( hue ) > hue = 180 degrees - ( COLU / 16 - 1 ) * 24 degrees > saturation = 0 if ( COLU / 16 == 0 ), otherwise some value between 0 & 0.5 > luminance = some value 14 or greater > > (base formula from http://www.poynton.com/PDFs/ColorFAQ.pdf) If you pick a nonzero saturation, you can get r8 and b8 to become negative in cases where ( COLU AND 15 ) is zero. In cases where saturation is large, r8 and b8 are negative for small values of ( COLU and 15 ). I could not find values for luminance and saturation which did not yeild any negative values. Should negative values be chopped to zero, or is there some problem with these equations? -- adam@xxxxxxxxxxxxxxxx http://cuddlepuddle.org/~adam/pgp.html Will code for food. http://cuddlepuddle.org/~adam/resume.html "The dinosaurs are not around today because they did not have a space program." -- Arthur C. Clarke ---------------------------------------------------------------------------------------------- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] tia hue luminance, Adam Thornton | Thread | Re: [stella] [Stella] How weird is , KirkIsrael |
Re: [stella] Jumping back to VSync, Dennis Debro | Date | [stella] SoftVCS, C. Bond |
Month |