2xSaI

From Wikipedia, the free encyclopedia

2xSaI, short for 2x Scale and Interpolation engine, is a digital image processing algorithm for computer graphics. It doubles the images both horizontally and vertically, resulting in a new image with four times as many pixels as the original one. The additional pixels are generated by detecting patterns such as lines and edges and interpolating additional pixels on that basis using techniques such as anti-aliasing and Wu lines. For many types of computer graphics, this results in a sharper and clearer image than standard bilinear filtering.

An image from Super Mario Bros. 3 with nearest-neighbor scaling (left) and Super 2xSaI scaling (right).
An image from Super Mario Bros. 3 with nearest-neighbor scaling (left) and Super 2xSaI scaling (right).

The 2xSaI algorithm was inspired by the "Eagle" engine in the RetroFX library. It was designed by Derek Liauw Kie Fa, also known as Kreed, primarily for use in console and computer emulators, and it has remained fairly popular in this niche. Many of the most popular emulators, including ZSNES, VisualBoyAdvance, and Nestopia, offer this scaling algorithm as a feature.

Since Kreed released the source code under the GNU General Public License, it is freely available to anyone wishing to utilize it in an open source project. Developers wishing to use it in a non-open source project would be required to rewrite the algorithm without using any of Kreed's existing code.

Several slightly different versions of the scaling algorithm are available, and these are often referred to as "Super 2xSaI", "2xSaI", and "Super Eagle".

[edit] External links