Changing video card LUT by software
  • Butterfly
    Butterfly
    Posts: 66 from 2003/10/5
    From: Rapallo (GE) I...
    Hello,
    I would be grateful if some MOS developer would explain me how to
    change the gfx card channels lookup tables (LUT) by software.

    I know it's possible because since old times the cgx monitor editor did
    allow changing the RGB curves, this feature has then been removed for
    mos 1.4.x, then introduced back in mos 2.x.

    I need to finely calibrate my LCD for graphics works. It's not a too professional
    monitor, and its gamma and RGB controls are inadeguate to obtain a custom
    gamma and a sufficiently neutral gray axis. And I need being able to load the
    curves by program. Every other OS out there allows that, so please don't
    answer me it's a "private" CGX function...
  • »29.09.09 - 16:32
    Profile Visit Website
  • rms
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    rms
    Posts: 599 from 2004/11/27
    Hi,

    this is a good question from Elena, I also would need to calibrate my monitor for graphics works. A software solution, including a global CMS system in MorphOS would be great and a big step forward into professionnal graphic art working.
  • »30.09.09 - 06:13
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3071 from 2003/3/5
    From: Canada
    MorphOS 2.0 has public gamma adjustment APIs. Everything is accessible using intuition's monitorclass. The updated includes contain minimum docs on its usage.
  • »30.09.09 - 09:15
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 66 from 2003/10/5
    From: Rapallo (GE) I...
    Thanks for the reply. I could not figure out the monitorclass stuff
    etc. I see the method MM_GetDefaultGammaTables. Now I have to
    experiment with it.

    For RMS: yes, an os-level CMS would be nice but I suspect that's
    one of those least priority things.
    There's LCMS library port, at least, for CMS at application level

    bye
    &
  • »30.09.09 - 12:25
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3071 from 2003/3/5
    From: Canada
    If you want, I can prepare an example for you. Just let me know.
  • »02.10.09 - 10:31
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 66 from 2003/10/5
    From: Rapallo (GE) I...
    @ Jacadcaps: don't worry, but thanks the same for your offering :)
    What you told me was enough. I had a look at intuition/monitorclass.h
    but I read two not so nice things:

    The first one is that changing the gamma tables for Ambient screen
    is not supported (I still have to test what would happen btw, I
    should boot from mos 2.3 CD because I still have 1.4.5 sorry)

    The second one is that just eight-bits values are supported.
    Calibrating an LCD with 8 bit values is not enough for any serious
    workflow. I know my gfx card (radeon 9250, I don't know for other
    models) supports 10 bit curves (ie 10 bit output values for each
    of 256 R,G,B levels). Since I'm one of those old-school nasty hackers,
    I promptly set up a little program to load 10 bit curves (at hardware
    register 0xB8 is located the 32 bit, little endian, sequential
    30 bit LUT writing register). The program loads .cal files generated
    with Argyll and EyeOnePro with a PC. But it's a HACK, period. I use
    it for my own purposes only and at my own risk.

    As end of the story, my suggestion would be 1) to make the cgx/intuition
    api supporting for example 16 bits gamma curves (that in any case,
    they will be internally truncated to the effective precision supported
    by the video hardware and 2) to make the screen mode editor capable
    of loading external tables (from the format you prefer, which may be
    a binary or ascii one) and using them as defaults, not just editing
    the curves graphically.
  • »02.10.09 - 13:19
    Profile Visit Website