View Full Version : More clever aspect-scaling mode

09-24-06, 09:31 AM

i've got a LCD with the native resolution of 1680x1050. I don't think, that it's very clever to scale modes like 1280x1024. The aspect-maintaining scaling will result in 26 more pixels in Y direction and 33 more on X direction. Or in other word: the quality you loose is much higher than the benefit you have.

Another funny mode that my graphics card supports, is 1600x900. And when you scale this mode, you gain 80 pixels in X direction and 45 in Y direction.

So my suggestion is:
if the increase of pixels in one direction is less than 10%, then use the "center" mode instead of the "aspect-scaled" mode.

Of course, some users may desire to use scaling all the time, so the 10% setting should be customizable, perhaps.

Or more mathematic:
X, Y is the desired resolution
Xn, Yn is the native resolution
Xs, Ys is the resultion after scaling

f := min(Xn/X, Yn/Y)
Xs := X*f
Ys := X*f

If (f-1)<e, then use centered mode
Else use aspect-scaling mode

e=10%, customizable

The formulas for f, Xs and Ys is, how aspect-scaling works, basically.


P.S.: this applys to the linux drivers too, of course.