Opened 11 years ago

Closed 3 years ago

Last modified 6 months ago

#8792 closed patch (outdated)

Arbitrary scale rate scaler

Reported by: SF/ignazb Owned by: sev-
Priority: normal Component: Graphics: Scalers
Keywords: Cc:
Game:

Description

This patch adds a minimalistic implementation of a scaler that allows for arbitrary scale rates.
The actual rate of scale is set by adding a value for gfx_scale to the configuration file, e.g. gfx_scale=2.3 would scale in a rate of 2.3.

Disabling float-based scaling is enabled by defining the DISABLE_FLOAT_SCALER macro.

The way the scaler is implemented adds some ugly artifacts to moving objects. Also, scaling is done in a trivial way so there is no anti-aliasing as in other scalers. You might want to fix that some time.

I know this is far from being perfect but at least it helped me play ScummVM on my TV :)

Ticket imported from: #1883633. Ticket imported from: patches/897.

Attachments (2)

float-scaler.patch (5.5 KB) - added by SF/ignazb 11 years ago.
float-scaler-fixed.patch (12.5 KB) - added by SF/ignazb 11 years ago.

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by SF/ignazb

Attachment: float-scaler.patch added

comment:1 Changed 11 years ago by fingolfin

I am afraid that at this point, the chances for this being added to ScummVM are not that big (we have several "pending" scaler submissions on this tracker, BTW).

But maybe this will change in the not so distant future if we can move to a more modular API for scalers... I need to talk to Eugene and the rest of the team about that first, though ;-)

Changed 11 years ago by SF/ignazb

Attachment: float-scaler-fixed.patch added

comment:2 Changed 11 years ago by SF/ignazb

I totally understand. Even if you were not about to change to a different scaler API you should have probably rejected the patch. Anyways I just wanted to post it if someone has the same problems as me (scummvm + linux + tv-out = scummvm tries to change screen resolution = bad).
To actually make it compile and run properly on Linux I had to do some changes. It worked smoothly with the second patch (against r30719).
File Added: float-scaler-fixed.patch

comment:3 Changed 11 years ago by sev-

One of the reasons why such thing never was added to ScummVM is because we prefer quality features. There was OpenGL backend which scaled to an arbitrary window size, but it was removed because of lack of maintenance.

Though yes, if there would be not complicated way to add scaler plugins, and do it on run time, not on compile time, I would not be against such patch in ScummVM. Again, this implementation will have to be (a) efficient (b) not clobber code much (c) flexible and (d) optional, so smaller devices could live well.

At this moment I would not be happy if this patch would to to trunk.

comment:4 Changed 3 years ago by sev-

Owner: set to sev-
Resolution: outdated
Status: newclosed

comment:5 Changed 3 years ago by sev-

These days arbitrary scale rate scaler is present in the OpenGL backend. Cloing this as out of date

comment:6 Changed 6 months ago by digitall

Component: Graphics: Scalers
Note: See TracTickets for help on using tickets.