Opened 10 years ago

Closed 7 years ago

Last modified 6 years ago

#7874 closed feature request (wontfix)

Use libdepixelize as scaler

Reported by: SF/eppler Owned by: csnover
Priority: low Component: Graphics: Scalers
Version: Keywords:
Cc: Game:

Description

I just stumbeld upon https://launchpad.net/libdepixelize while reading the tentative releasenotes for inkscape 0.91 and thought it might be worth using libdepixelize as a scaler for ScummVM. I did not look into the technical feasibility of this, but just wanted to share this finding.

Ticket imported from: feature-requests/691.

Attachments (8)

depixelized-kq1-320.png (131.2 KB ) - added by eriktorbjorn 10 years ago.
depixelized-loom1-320.png (96.6 KB ) - added by eriktorbjorn 10 years ago.
depixelized-loom2-320.png (92.7 KB ) - added by eriktorbjorn 10 years ago.
depixelized-mi2-320.png (387.3 KB ) - added by eriktorbjorn 10 years ago.
depixelized-mi2-640.png (362.8 KB ) - added by eriktorbjorn 10 years ago.
depixelized-kq1-640.png (112.2 KB ) - added by eriktorbjorn 10 years ago.
depixelized-loom2-640.png (94.9 KB ) - added by eriktorbjorn 10 years ago.
depixelized-loom1-640.png (104.7 KB ) - added by eriktorbjorn 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by eriktorbjorn, 10 years ago

The idea has come up in the past, probably fuelled by the impressive results in the original article. However, they do list a few limitations. The algorithm isn't always suited for images that have a lot of colours, and/or use a lot of dithering, and - most damning - it's not (yet?) optimized for real-time use.

But I didn't know until now that there was an implementation of the algorithm. I was able to compile the "kopftracer2011" program (which was much more of a hassle than it should have been) and tried it out. Now, bear in mind that my computer is several years old, and since I don't know anything about the algorithm I went with the default settings for everything.

Kopftracer produces SVG images. I rendered them in Inkscape and exported them as 640x400 pixel PNG images.

I used four different source images:

1) The first room of Monkey Island 2. This one uses 256 colours, and has a lot of dithering which might make it badly suited for this kind of scaler, but it's what a lot of the games we support do.

2) The first room of Loom. This one uses only 16 colours, but has a lot of checkerboard patters.

3) A closeup of Elder Atropos from Loom. I figured this one should scale pretty well. It has lots of hard edges, and just a little bit of checkerboard patterns.

4) The first room from King's Quest I (AGI version). Graphics don't get much simpler than this for the games we currently support.

For my first test run, I pre-scaled the images to 640x400 pixels using the simple 2x scaler. Scaling the images took approximately 7.5 minutes, 7.5 hours (yes, hours), 36.5 minutes and 1.5 hours respectively.

For my second test run, I used unscaled 320x200 pixel images. This time the scaling was much faster, taking approximately 1 minute, 30.5 minutes, 2.5 minutes and 6 minutes respectively.

Quality-wise, the results are incluclusive. Some parts look better when using the 320x200 image as input, others look better when using the 640x400 image as input. But either way, I think it's pretty clear that libdepixelize is useless for our purposes, unless it gets optimized a lot or you are running it on some hypothetical future computer from space.

by eriktorbjorn, 10 years ago

Attachment: depixelized-kq1-320.png added

comment:2 by eriktorbjorn, 10 years ago

Here are the images where I started with a 320x200 pixel image.

by eriktorbjorn, 10 years ago

Attachment: depixelized-loom2-640.png added

comment:3 by eriktorbjorn, 10 years ago

Here are the images where I started with a 640x400 pixel image.

comment:4 by csnover, 7 years ago

Owner: set to csnover
Resolution: wontfix
Status: newclosed

Closing per previous comment about performance and low output quality.

comment:5 by digitall, 6 years ago

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