[Openchrome-users] Xv/XvMC picture adjustments w/OpenChrome

Daniel Kristjansson danielk
Wed Aug 23 05:19:43 PDT 2006


On Wed, 2006-08-23 at 09:53 +0100, Ivor Hewitt wrote:
> Daniel Kristjansson wrote:
> 
> > In MythTV we apply a 50% hue adjustment when we display video using
> > the "XV_SWOV" adaptor (i.e. XVideo, right?). This just means we place
> > the default hue adjustment in the middle, between the high and low of
> > the range. I would just remove this adjustment, except that I believe
> > I added the adjustment for Ivor Hewitt and I have to place considerable
> > faith in Ivor's opinion since he knows more about MythTV VIA output
> > than I do..
> > 
> Hi Daniel,
> I thought we'd covered this on the myth list before? The problem was the 
> myth code wasn't taking into account the boundaries that it was given 
> for the colour adjustment and was just hacked to add 50% in an "#ifdef 
> via". I'm in the middle of moving house at the moment.... but I'll 
> compare my version of the fix with the current myth version (when I 
> unpack some boxes!) and see if there's anything obvious.

Heh, I'm moving October, I expect MythTV development will suffer...

I thought we'd covered this before too, but there are fresh complaints.

Internally MythTV maps the hue to a fixed 0..99 range, where 0 is
"normal". Since you usually want to be able to adjust the hue around
the normal point the UI for the hue adjustment wraps around so that
when you press the left arrow at '0' you get '99', while the right
arrow gives you '1'. But we do take into account the boundaries of
the control and 0 gets mapped to attribute[x].min_value while 100
gets mapped to attribute[x].max_value. This means we actually skip
max_value since our max is 99, but this is ok, the hue is the same
at min_value and max_value so we want to skip this value on one end
of the color wheel.

Now some cards have a hue range 0..65535, and others -1000..1000, and
some cards display "normal" at 0, others at 32767, etc. Since they
aren't
all displaying normal at the min_value and '0' is our normal we add an
adjustment to the MythTV value so that '0' in MythTV is always normal.
This is not an "#ifdef" but is conditioned on the adaptor name. So when
we see "ATI Radeon Video Overlay" we use (50 + user_value)%99, when the
user has the hue set at '0', the default, this means we set the hue to
32767 on that card since the range is 0..65535. When we see the
"XV_SWOV"
adaptor for the VIA XVideo we do the same thing, we add 50, then we map
this to the middle of VIA's range, whatever that is.

I think you objected to the '0' being the default rather than '50', but
the plan is to move to a different control with a range 0..360 where
a 0 base will make more sense. In any case it doesn't matter, this value
just gets mapped to the range on the card.

-- Daniel





More information about the Openchrome-users mailing list