Adjusting saturation value on i965?
keithp at keithp.com
Sun Feb 24 20:49:54 PST 2008
On Sun, 2008-02-24 at 22:27 +0200, Tero Saarni wrote:
> Textured video implementation on i965 has only brightness and contrast
> settings. Is it possible to adjust saturation value by some other
The textured video adapters don't actually implement brightness and
contrast, they're just stubbed out in the driver to make some media
To make these controls work, you'd need to go fix the YUV->RGB
transformation inside the fragment shader sitting down in the driver.
Check out the code in packed_yuv_wm.g4a -- it's got a little section
that does the conversion using this function:
R = Clamp ( 1.164(Y-16/255) + 1.596(Cr-128/255), 0, 1)
G = Clamp ( 1.164(Y-16/255) - 0.813(Cr-128/255) - 0.392(Cb-128/255), 0, 1)
B = Clamp ( 1.164(Y-16/255) + 2.017(Cb-128/255), 0, 1)
Adjusting the constants in this function, or adding additional
instructions to de-linearize the transformation should be all that is
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the xorg