[mythtv-users] Color adjustment per card?

Bruce Markey bjm at lvcm.com
Fri Sep 19 17:00:33 EDT 2003


bobnvic at everestkc.net wrote:
> I have a PVR-250 and a bttv card in my mythtv system.  With a monitor 
> hooked up the PVR250 looked perfect, with tv-out it has too much red in 
> the picture (faces tend to be reddish and actual reds tend to be neon - I 
> take it that's oversaturation?).  In live-tv mode I can adjust the picture with 
> F1-F8 to get a pretty good result.  I take it that the F1-F8 keys are 
> adjusting v4l values?  The bttv card on the other hand appears to have far 
> too much contrast (large white spots mainly), which I've seen mentioned 
> on the mailing list.  

Yes, it is adjusting v4l values then storing them on a per
channel basis in the channel table.

mysql> update channel set contrast=24500,brightness=34000,colour=32768;
mysql> select channum,contrast,brightness,colour from channel limit 5;
+---------+----------+------------+--------+
| channum | contrast | brightness | colour |
+---------+----------+------------+--------+
| 2       |    24500 |      34000 |  32768 |
| 3       |    24500 |      34000 |  32768 |
| 5       |    24500 |      34000 |  32768 |
| 6       |    24500 |      34000 |  32768 |
| 7       |    24500 |      34000 |  32768 |
+---------+----------+------------+--------+
5 rows in set (0.01 sec)

For bttv cards (several models) these values work well for me.
24500 seems to be about the cutoff point for blooming and the
brightness needs to be bumped up a bit for for the blacker than
black cutoff to be close after the contrast is lowered.

I also use automatic gain control (AGC) which can be set for
the v4l2 bttv driver:

: bjm at moktoo ; v4lctl -c /dev/video0 setattr 'chroma agc' on
: bjm at moktoo ; v4lctl -c /dev/video0 list
attribute  | type   | current | default | comment
-----------+--------+---------+---------+-------------------------------------
norm       | choice | NTSC    | PAL     | PAL NTSC SECAM PAL-Nc PAL-M PAL-N NTSC-JP PAL-60
input      | choice | Televis | Televis | Television Composite1 S-Video Composite3
audio mode | choice | mono    | mono    | mono stereo lang1 lang2
bright     | int    |   34000 |   32768 | range is 0 => 65535
contrast   | int    |   24500 |   32768 | range is 0 => 65535
color      | int    |   32768 |   32768 | range is 0 => 65535
hue        | int    |   32768 |   32768 | range is 0 => 65535
mute       | bool   | off     | off     |
chroma agc | bool   | on      | off     |
combfilter | bool   | off     | off     |
automute   | bool   | on      | off     |
luma decim | bool   | off     | off     |
agc crush  | bool   | on      | off     |

AGC really fixes a lot of color distortion especially for WinTV
cards.

With these settings I get color reproduction that is nearly as
good as commercial DVRs.

> Is there any way to get the colors right for both?   Will mythtv save the 
> contrast settings on a per card basis?  Is there another way to get this to 
> work?

Those are good questions but the answers are all no. As of
yesterday there is now support for recording profiles for
mixed types of cards but there is no solution for picture
controls for different card types. I hacked my source a bit
so that it won't change the picture settings for PVR cards
then I set these in a script when the backend starts.

--  bjm




More information about the mythtv-users mailing list