[mythtv] [PATCH] Potential display aspect ratio patch for non-4:3
Steve Davies
steve at one47.co.uk
Wed Feb 11 17:45:25 EST 2004
Chris Pinkham wrote:
>>On 02/02/04 16:01:01, Chris Pinkham wrote:
>>
>>>How about these formulas (yDPMM unused but given for reference)::
>
>
>>This looks right to me.
>>
>>-Doug
>
>
> Thanks.
>
> I shortened the above to this by eliminating some of the temp variables.
>
> if (GetDisplayAspect() > (XJ_aspect * 0.97))
> {
> float pixNeeded = h_mm * XJ_aspect * ((float)dispw / w_mm);
>
> dispxoff += (dispwoff - (int)pixNeeded) / 2;
> dispwoff = (int)pixNeeded;
> }
>
> Seems to work correctly. I changed the "16:9 video on non-16:9 display"
> accordingly as well with this:
>
> if ((GetDisplayAspect() * 0.97) < XJ_aspect)
> {
> float pixNeeded = (w_mm / XJ_aspect) * ((float)disph / h_mm);
>
> dispyoff += (disphoff - (int)pixNeeded) / 2;
> disphoff = (int)pixNeeded;
> }
>
> I'm going to do some more testing and will commit this when I commit
> some other stuff I've been working on.
>
>
I could easily be wrong, but I think that the use of "dispw" and "disph" above
is incorrect for under/overscanned screens. I think it should really be
"(dispwoff-dispxoff)" and "(disphoff-dispyoff)" respectively to cater for the
modifications already made to the display area.
I also agree with Mike Wilcox's patch yesterday, which fixes 16:9 video in a
4:3 window for me.
Regards,
Steve
--
Steve Davies steve at one47.co.uk
PGP Fingerprints:
DH/DSS : 5D85 8164 91D7 E9CC 4F80 842B AB86 93D9 8938 7612
RSA : 4E2E E60F 3D76 9E7E 70F9 901B 70FA 56C8
RSA4096: 02BE 5C0E EFA2 E1E4 EA89 C9CC 1E4F F654 3BC7 B65E
More information about the mythtv-dev
mailing list