[MPlayer-dev-eng] gamma correction

Billy Biggs vektor at dumbterm.net
Mon Feb 3 04:46:32 CET 2003


Alexander Stege (mplayer at legale-software.com):

> Hi!
> 
> I've just written a little gamma correction -vop filter because as you've surely
> noticed the gamma characteristics of a computer screen are quite different from
> those of a tv set. With a gamma correction it is easier to see something in a
> movie when the light in the room is on.
> It's nothing big, just a 95 lines c-file, but i'd be happy if you would consider
> including it. You can find it at:
> http://www.legale-software.com/vf_gamma.c
> 
> I'd be happy about a short reply too. Thanks!

  I'm not sure what you're talking about.  I do not believe that the
gamma characteristics of a computer screen are not different from a TV
set.  My computer monitor is calibrated for an effective display gamma
of 2.2, and this is standard for computing (see the sRGB standard
www.srgb.com as well).  Furthermore, all video standards (see ITU-R
BT.601 or ITU-R BT.709) are also calibrated for a display gamma of 2.2,
and this is all over in the literature.  The curves are slightly
different, but the difference is very slight.

  Don't get me wrong, having a gamma filter like this is useful for
correction if your computer is not at the ideal of 2.2, or just for
cheaply increasing brightness without sacrificing your white and black
points, but for example, all LCD panels on the market in general try and
get as close as possible to achieving this ideal, so only minimal
correction should be required.

  Oh, and you have a slight problem, your code assumes 0-255 which is
not correct for Y'CbCr which in general uses extents of 16-235 for luma,
16-240 for chroma.  I have a gamma correction filter in my app which
does this properly, and can supply you with code if you like.

-- 
Billy Biggs
vektor at dumbterm.net


More information about the MPlayer-dev-eng mailing list