color calibration and xvideo (xv)
Alex Deucher
alexdeucher at gmail.com
Wed Aug 22 08:06:55 PDT 2007
On 8/22/07, Graeme Gill <graeme2 at argyllcms.com> wrote:
> Alex Deucher wrote:
> > On most hardware the LUT only handles the graphics plane. The overlay
> > plane usually has it's own controls. The are most often exposed as Xv
> > attributes. Use an app like xvattr to adjust them.
>
> The sort of controls provided as xv attributes aren't comparable
> to a calibration though, as far as I can tell. Typical controls
> are
>
> XV_BRIGHTNESS (range -512 to 511)
> XV_CONTRAST (range 0 to 8191)
> XV_SATURATION (range 0 to 8191)
> XV_HUE (range 0 to 360)
>
> and on some:
>
> XV_RED_INTENSITY (range -1000 to 1000)
> XV_GREEN_INTENSITY (range -1000 to 1000)
> XV_BLUE_INTENSITY (range -1000 to 1000)
> XV_GAMMA (range 100 to 1000)
> XV_COLORSPACE (range 0 to 1)
>
> (there may be more I guess, these are what I found with a little Googling)
>
> whereas calibration consists of R, G & B lookup curves that
> compensate for response nonlinearity, as well as possibly
> setting the white point and brightness.
>
> It's not clear whether the above XV attributes actually have any
> direct correspondence to device output response, or are purely
> arbitrary, intended only for user subjective adjustment.
They actually affect the overlay, although I suspect how exact they
are depends on the HW.
>
> Even gamma is unclear, since technically this has to be a real
> valued power, not an integer, so it doesn't seem possible to
> even convert the calibration curves to the closest corresponding
> XV attributes (or can someone point me to a definition of what
> video transfer curves result from a given combination
> of the above XV attributes ?)
There are several problems. The first is that IIRC, Xv attributes can
only be integers and secondly, there were no standardized attributes.
As such the implementations tend to vary by driver. Most modern
overlays have extensive configurability. radeon has a fully
adjustable linear transform engine for color space conversion and a
multi-point gamma curve. the problem is there's not really a good
common way expose the full capabilities as attributes. Take a look at
RADEONSetTransform() in radeon_video.c if you want to get an idea of
how the hardware works.
http://gitweb.freedesktop.org/?p=xorg/driver/xf86-video-ati.git;a=blob;h=a38931c8fde7b2f5f1a3aa4f2ab8043f62289652;hb=randr-1.2;f=src/radeon_video.c
>
> Is the above a reflection of the hardware capability, or is
> it a user control synthesis done in the driver software ?
Each driver attempts to reflect the HW's capabilities in some manner.
None of the drivers, as far as I know, does any SW adjustment of the
source data.
Alex
More information about the xorg
mailing list