[mythtv] [PATCH] Potential display aspect ratio patch for non-4:3

Chris Pinkham cpinkham at bc2va.org
Mon Feb 2 20:12:39 EST 2004


> 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.
-- 

Chris



More information about the mythtv-dev mailing list