yeah, I had thought about that too.  I guess we need to decide what's a
good way to advertise gamma.  I just did it that way since I had 8
presets, but like you said there could be more down the road.  The
hardware is capable of independently adjusting 18 points (6 on r100 hw)
along the gamma curve.  I just worked out some common gamma values
since  I don't know of a good way to expose the curve.  We can't use
float values for attributes (perhaps we could add float support to the
device independant Xv code), but we can use ints like 85 for 0.85 or
110 for 1.1.  the question is, what should the limit be? 300?  400? 
should we multiply by 1000 instead of 100?  having a basic XV_GAMMA
attribute is probably easier for users than having XV_GAMMA_RED, etc.
especially since not all hardware does gamma the same way.

Thoughts?

Alex

--- Thomas Winischhofer <[EMAIL PROTECTED]> wrote:
> Andrew C Aitchison wrote:
> > On Fri, 19 Dec 2003, Alex Deucher wrote:
> > 
> > 
> >>This patch adds two new XV attributes: XV_COLORSPACE and XV_GAMMA.
> > 
> >  
> > 
> >>XV_GAMMA lets you adjust the gamma of the overlay to 8 presets:
> >>0 - gamma 1.0, default
> >>1 - 0.85
> > 
> >     ...             ...
> > 
> >>7 - 2.5
> >>
> >>Please let me know if you have any suggestions or find any bugs
> with
> >>this code.  The patch is against DRI cvs, but should apply pretty
> >>easily to xfree86 or gatos as well.
> > 
> > 
> > Can I suggest that the API exposes the options in some device
> neutral
> > manner - ideally a float - which the driver converts to the nearest
> > available preset. Either nVidia or the next generation Radeon is
> bound
> > to use 16 presets, or calculate the table for an given gamma ?
> > Unless the  preset list of gamma values follows some standard
> (sorry if 
> > it does) applications should be able to ask for the value they
> want,
> > and have something sensible happen ?
> 
> I think floats isn't possible via XV properties. But I have another 
> suggestion (based on the assumption that you can handle separate
> gamma 
> values for r, g, b): Make three properties (such as for example 
> XV_GAMMA_RED etc) and allow a range from 1000 to 10000, which is the 
> desired value * 1000.
> 
> Thomas
> 
> -- 
> Thomas Winischhofer
> Vienna/Austria
> thomas AT winischhofer DOT net          http://www.winischhofer.net/
> twini AT xfree86 DOT org
> 


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to