[MPlayer-dev-eng] Re: [PATC] Pivoting

Paweł Sakowski pawel at sakowski.pl
Thu Aug 25 15:06:52 CEST 2005


On Wed, 2005-08-24 at 22:16 +0000, Rich Felker wrote:
> > Display{Width,Height}MM seem always to return sane values. If
> there's no
> > authoritative source of the display's size, they simply calculate it
> > from the pixel count and some pressumed dpi.
> 
> Can we include rounding to make sure the aspect is sane? I.e. if it's
> within some epsilon of the ratio of pixels, replace it by the ratio of
> pixels?

Yes, it makes sense -- attaching the patch (to be applied after my
previous mplayer-aspect.patch).

As of the epsilon choice: I verified that on one system X reports
342x271 mm for a display of 1280x1024 (which gives 1.0096*the exact
aspect ration), on another I have 271x201 at 1024x768 (which is
1.0112*correct). Both configurations are of square pixels. So, it seems
that an epsilon of 2% will catch the rounding errors, and it's still low
enough to distinguish all the most common aspect ratios: 1.25, 1.33,
1.5, 1.78.

-- 
+----------------------------------------------------------------------+
| Paweł Sakowski <pawel at sakowski.pl>                Never trust a man  |
|                            who can count up to 1023 on his fingers.  |
+----------------------------------------------------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-aspect2.patch
Type: text/x-patch
Size: 902 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050825/222ceda0/attachment.bin>


More information about the MPlayer-dev-eng mailing list