Re: [Xpert]gamma correction problems
On Thu, 4 Oct 2001, Davor Buvinic Gonella wrote: > Hi, > > I have a question with regards to gamma correction support in XFree86 that > maybe someone in this mailing list can answer me. > > My problem comes when I change the gamma ramps using > XF86VidModeSetGammaRamp(). If after that I query about the gamma correction > value using XF86VidModeGetGamma() I get the last value set with > XF86VidModeSetGamma(). The new ramp can have totally diferent gamma value if, > for example, I change the ramp to adjust not only this value but brightness > and contrast too. Or the gamma correction value can makes no sense for a > special ramp loaded in the LUT. > > What is the right way to handle this situation? Don't know. The Gamma value just doesn't make sense for such things. Maybe just ignore it or not report it (leave it greyed out or something) when it doesn't match the ramp? Mark. ___ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
Re: [Xpert]gamma correction problems
On Thursday 04 October 2001 11:10 pm, Mark Vojkovich wrote: > On Thu, 4 Oct 2001, Davor Buvinic Gonella wrote: > > Hi, > > > > I have a question with regards to gamma correction support in XFree86 > > that maybe someone in this mailing list can answer me. > > > > My problem comes when I change the gamma ramps using > > XF86VidModeSetGammaRamp(). If after that I query about the gamma > > correction value using XF86VidModeGetGamma() I get the last value set > > with > > XF86VidModeSetGamma(). The new ramp can have totally diferent gamma value > > if, for example, I change the ramp to adjust not only this value but > > brightness and contrast too. Or the gamma correction value can makes no > > sense for a special ramp loaded in the LUT. > > > > What is the right way to handle this situation? > >Don't know. The Gamma value just doesn't make sense for > such things. Maybe just ignore it or not report it (leave it > greyed out or something) when it doesn't match the ramp? > > I was thinking something like that as a solution for the control panel, but maybe it can be do better: Why not extend the XF86VidModeGetGamma() function? I would be nice if when I set the ramps with XF86VidModeSetGammaRamp() a subsequent call to XF86VidModeGetGamma() reports that the last change to the LUTs was made with the former. Then I can be sure if the LUTs have a 'typical' gamma curve or maybe another 'thing'. Also, as with XF86VidMode{Get|Set}Gamma(), it's would be nice to have something like XF86VidMode{Get|Set}Brightness and Contrast too. My question is: worth the effort make such changes? Would you see some application for this? I can code the changes to the functions if someone from the developer team of XFree86 give me ideas about how the function prototypes must lookalike, so I don't break other libraries that relies in the VidMode extension. I know that SDL use the XF86VidMode{Set|Get}GammaRamp, maybe Mesa too. Davor -- Davor Buvinic [EMAIL PROTECTED] ___ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
Re: [Xpert]gamma correction problems
On Fri, 5 Oct 2001, Davor Buvinic Gonella wrote: > On Thursday 04 October 2001 11:10 pm, Mark Vojkovich wrote: > > On Thu, 4 Oct 2001, Davor Buvinic Gonella wrote: > > > Hi, > > > > > > I have a question with regards to gamma correction support in XFree86 > > > that maybe someone in this mailing list can answer me. > > > > > > My problem comes when I change the gamma ramps using > > > XF86VidModeSetGammaRamp(). If after that I query about the gamma > > > correction value using XF86VidModeGetGamma() I get the last value set > > > with > > > XF86VidModeSetGamma(). The new ramp can have totally diferent gamma value > > > if, for example, I change the ramp to adjust not only this value but > > > brightness and contrast too. Or the gamma correction value can makes no > > > sense for a special ramp loaded in the LUT. > > > > > > What is the right way to handle this situation? > > > >Don't know. The Gamma value just doesn't make sense for > > such things. Maybe just ignore it or not report it (leave it > > greyed out or something) when it doesn't match the ramp? > > > > > > I was thinking something like that as a solution for the control panel, but > maybe it can be do better: > > Why not extend the XF86VidModeGetGamma() function? I would be nice if when I > set the ramps with XF86VidModeSetGammaRamp() a subsequent call to > XF86VidModeGetGamma() reports that the last change to the LUTs was made with > the former. Then I can be sure if the LUTs have a 'typical' gamma curve or > maybe another 'thing'. > > Also, as with XF86VidMode{Get|Set}Gamma(), it's would be nice to have > something like XF86VidMode{Get|Set}Brightness and Contrast too. > > My question is: worth the effort make such changes? Would you see some > application for this? I can code the changes to the functions if someone > from the developer team of XFree86 give me ideas about how the function > prototypes must lookalike, so I don't break other libraries that relies in > the VidMode extension. I know that SDL use the XF86VidMode{Set|Get}GammaRamp, > maybe Mesa too. > You can't touch XF86VidModeGetGamma(). It's written in stone already. All you can do is add new functions. But I'm not sure if it's worth that. You can tell if it's a standard gamma ramp by looking at the ramp. Also, doesn't XF86VidModeSetBrightness and Contrast just make the problem worse? ie. one more thing to mess up what XF86VidModeGetGamma reports and another thing to get trashed by setting the ramp. I'd suggest doing everything with the ramps. And I think it's a reasonable limitation to say that Querying gamma after setting the ramp to something custom has undefined results. Mark. ___ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
Re: [Xpert]gamma correction problems
On Thu, 4 Oct 2001, Mark Vojkovich wrote: >You can't touch XF86VidModeGetGamma(). It's written in > stone already. xgamma -gamma 0 Gamma values must be between 0.100 and 10.000 Is there enough room on the stone to use a value like 0.0 or -1.0 to indicate that there is no current value, or would that break existing clients ? -- Dr. Andrew C. Aitchison Computer Officer, DPMMS, Cambridge [EMAIL PROTECTED] http://www.dpmms.cam.ac.uk/~werdna ___ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
Re: [Xpert]gamma correction problems
On Friday 05 October 2001 12:53 am, Mark Vojkovich wrote: > You can't touch XF86VidModeGetGamma(). It's written in > stone already. All you can do is add new functions. But I'm not > sure if it's worth that. You can tell if it's a standard gamma > ramp by looking at the ramp. Also, doesn't XF86VidModeSetBrightness > and Contrast just make the problem worse? ie. one more thing to > mess up what XF86VidModeGetGamma reports and another thing to get > trashed by setting the ramp. I don't think so. If you have XF86VidModeSetBrightness and Contrast you can reduce the rejects cases from 'non standard' curves, i.e. you can have a 'valid' gamma curve that also have a translation and rotation (brightness and contrast). Anyway, thanks for your response. Davor -- Davor Buvinic [EMAIL PROTECTED] ___ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
Re: [Xpert]gamma correction problems
On Fri, 5 Oct 2001, Dr Andrew C Aitchison wrote: > On Thu, 4 Oct 2001, Mark Vojkovich wrote: > > >You can't touch XF86VidModeGetGamma(). It's written in > > stone already. > > xgamma -gamma 0 > Gamma values must be between 0.100 and 10.000 > > Is there enough room on the stone to use a value like 0.0 or -1.0 > to indicate that there is no current value, or would that break > existing clients ? I don't know. It would probably just be safer to return 1.0 whenever you weren't sure what the gamma was. The only client I know of is xgamma. It don't think 0.0 or -1.0 would break xgamma (haven't looked at the source). Mark. ___ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert