[PATCH] xrandr: display gamma and brightness

Yang Zhao yang at yangman.ca
Tue Jan 12 17:33:55 PST 2010


Hi,

2010/1/12 Éric Piel <E.A.B.Piel at tudelft.nl>:
> Here is complete version. I've refined the math behind, and tried my
> best to have the code understandable.[...]

Have you tried running this with calibration applied, where each
channel has slightly different curves?  Specifically, the cases where
a specific channel hits the ceiling much earlier than the others.  I
haven't examined the code in detail, but my intuition says this is
going to significantly skew the results.


> +	    for (i = size - 1; i > 0; i--) {
> +	        if ((gamma->red[i] + gamma->green[i] + gamma->blue[i]) < (255 * 256 * 3))
> +		    break;
> +	    }

Why (255 * 256 * 3)?  Seems like your intention is to pick the point
where right-most point where no values are clamped, but this is going
to give you the right-most point where any curve has not been clamped,
with a margin of error.

It's been a while since I've looked at the gamma stuff, so feel free
to set me right if I'm off-base.

-- 
Yang Zhao
http://yangman.ca


More information about the xorg-devel mailing list