[MPlayer-dev-eng] [PATCH] Avoid scaling for tiny aspect ratio differences

Kurt Garloff kurt at garloff.de
Fri Mar 28 13:51:07 CET 2008


Hi,

I recoded (Full-)HD material with mencoder into high-Q FMP4 with 
the native resolution for my LCD screen, which has 1366x768 pixels.
(The nice side effect is that this now consumes much less CPU to 
decode and runs without dropped frames on a not so fast machine.)

The graphics driver supports 1360x768 only (needs /8 x resolution),
so I decided to encode 1360x765. YUV420 requires an even number, so
mencode made 1360x766 from it. So far so good.

Playing it with mplayer, it does however rescale the material to
1362x766 (1362 ~ 16/9*766) -- which is absolutely not what I want.
No matter how good the scaler, the result will be worse than the
format I have encoded with. (The difference shows especially on 
a digital screen, where you can get really sharp images.)

In general I think we should avoid scaling if the difference in
aspect ratio is tiny.

Attached patch does this for AVI files.

I guess this patch could be complemented by a similar patch that avoids
other tiny adjustments (e.g. if the video was encoded with 1366x768 and
our screen would only display 1360x768, one would rather discard 3
columns on left and right than having the sharpness reduced by
rescaling). I have not looked into that, though.

I would rather send this out and see whether people think it's
worthwhile ...

Best,
-- 
Kurt Garloff                   <kurt at garloff.de>             [Koeln, DE]
Physics:Plasma modeling <garloff at plasimo.phys.tue.nl> [TU Eindhoven, NL]
Linux: VP PM OPS               <garloff at suse.de>            [Novell Inc]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-avi-aspect-fix.diff
Type: text/x-patch
Size: 1395 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080328/e185ab68/attachment.bin>


More information about the MPlayer-dev-eng mailing list