[mythtv] Re: bttv luma filter

Bruce Markey bjm at lvcm.com
Fri Jan 30 04:14:48 EST 2004


Andrew Mahone wrote:
> On Thu, 29 Jan 2004 23:27:35 -0800, "Bruce Markey" <bjm at lvcm.com> said:
> 
>>Apparently there is a well known bug in the chip design. There is a
>>filter in tvtime (tvtime.sf.net) that remaps the luma values and the
>>result clearly fixes image problems with colors and shades at or near
>>white (see tvtime-0.9.12/src/videocorrection.c).
> 
> 
> I'm looking now.  Is the gamma correction that's being done there
> necessary, or do I just need to scale the values to the correct range?  I
> ask because I think that I can write a very fast vectorized filter for
> simple range scaling in MMX, but the gamma stuff needs a lookup table,
> and can't be vectorized at all AFAIK.  Anyways, I have to take care of
> some other work right now, but I'll get back to this shortly.

The gamma is secondary and may be useful in the long term
but the range scaling is the most obvious problem. Without
this, white and shades near white are all fully white giving
the look of over-exposed film. The workaround is to reduce
the v4l contrast to try to stay within the range. However,
this also cuts the chroma. Even if it's not 'over-exposed',
dark red can be fully saturated but bright red is shifted to
pink. A face in bright light can have normal flesh tones
around the neck and jaw but reflections off the cheek bones
and forehead are too white and so on.

The gamma can 'brighten' an image giving better contrast
from the black cutoff to average brightness without over-
exposing but only a small amount, if any, can be used before
the image no longer looks normal.

Either a filter for the BT problem only or a filter with a
gamma parameter and a bool for the BT fix would be good.

--  bjm



More information about the mythtv-dev mailing list