[MPlayer-dev-eng] aspect ratio stuff

Arpi arpi at thot.banki.hu
Tue Oct 2 01:38:02 CEST 2001


Hi,

I've changed it a bit.

Reason: -aspect 1.0 (or -aspect 1:1) actually means scaling!
It means scaling to square, when width==height. (try it...)
So it shouldn't be ignored at prescaling!

(-aspect sets the frame aspect ratio (ratio of width/height), not the
pixel's aspect ratio (width/height of a single pixel on the monitor))

So I've changed it, now 0.0 means undefined aspect, if aspect==0
(actually if aspect<0.01 to handle negative and rounding) then
no prescaling is applied.

Also added -noaspect switch to override possible default value in cfgfile.

We should also handle monitor (pixel) aspect ratio. Now it's assumed to be
1.0, but for 16:9 TV/monitor it isn't 1.0, and neither for 1280x1024 (it is
1.0 for 1280x960 AFAIK, and it's 0.82 for 320x200 IIRW).
We should allow user to specify pixel aspect directly, or specify the aspect
ratio of the monitor dimensions (4:3 or 16:9 or other) and calculate pixel
aspect using monitor aspect ratio and X resolution.
Later (monitor aspect) is more usefull, because it is constant if user
doesn't change tv/monitor -> can be put into config file.
Pixel aspect depends on curent X resolution too.

For example:
my 15" monitor is 285mm * 215mm  (+-5mm)
in 1024x768, each pixel is (285/1024) mm * (215/768) mm == 0.278 * 0.280
so aspect is 0.278/0.280=0.994 ~= 1.0

For 1280x1024, it's 0.223 : 0.21 = 1.062
For 1280x960:  0.223 : 0.224 = 0.995 ~= 1.0
For 320x200:   0.89 : 1.075 = 0.828


A'rpi / Astral & ESP-team

--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu



More information about the MPlayer-dev-eng mailing list