[vdr] [PATCH] TT6400 dvbhddevice ScaleVideo aspect ratio correction

Andreas Regel andreas.regel at gmx.de
Tue Apr 9 20:56:00 CEST 2013


Am 08.04.2013 19:42, schrieb Lucian Muresan:
> On 08.04.2013 10:36, Klaus Schmidinger wrote:
>> Am I getting this right? cDvbHdFfDevice::ScaleVideo() apparently sets the
>> video window in units of 1/1000 of the OSD width and height, respectively.
>> Since this resolution is less than the possible acual OSD width or height,
>> the rectangle actually used in this function might be different from the
>> one given in the Rect parameter. While this is, of course, allowed,
>> shouldn't
>> the same calculations also be done in cDvbHdFfDevice::CanScaleVideo(),
>> to return
>> the correct rectangle to the skin?
> 
> I think if the actual cDvbHdFfDevice::CanScaleVideo implementation would
> have really calculated something, it should have only converted
> internally to whatever needed (1/1000 in this case), and back to Osd
> pixel dimensions before returning the value. Since it doesn't (as it
> just returns the input rectangle, possibly because the device "is" able
> to handle any size within the limits, maybe nothing should be changed.
> Or maybe checking against the limits could be done, changed the size to
> a reasonable default (like Null for full size) and log an error if the
> input size wasn't within the Osd limits.
> Udo's variant looks well, but for all this maybe Andreas Regel should
> also be consulted. Btw, I sent him a PM on vdr-portal.de, he did not
> react so far.

Hi,

I tested the scaling myself using the nopacity skin. I integrated Udo's patch as is a bit clearer and directly points to the main requirement for correct aspect ratio: The width and height values must be equal as they represent percentages.

Best regards,
Andreas



More information about the vdr mailing list