<s>
Pixel-art	B-Algorithm
scaling	I-Algorithm
algorithms	I-Algorithm
are	O
graphical	O
filters	O
that	O
are	O
often	O
used	O
in	O
video	B-Application
game	I-Application
console	I-Application
emulators	B-Application
to	O
enhance	O
hand-drawn	O
2D	O
pixel	O
art	O
graphics	O
.	O
</s>
<s>
The	O
re-scaling	O
of	O
pixel	O
art	O
is	O
a	O
specialist	O
sub-field	O
of	O
image	B-Algorithm
rescaling	I-Algorithm
.	O
</s>
<s>
As	O
pixel-art	O
graphics	O
are	O
usually	O
in	O
very	O
low	B-Algorithm
resolutions	I-Algorithm
,	O
they	O
rely	O
on	O
careful	O
placing	O
of	O
individual	O
pixels	O
,	O
often	O
with	O
a	O
limited	O
palette	O
of	O
colors	O
.	O
</s>
<s>
This	O
results	O
in	O
graphics	O
that	O
rely	O
on	O
a	O
high	O
amount	O
of	O
stylized	O
visual	O
cues	O
to	O
define	O
complex	O
shapes	O
with	O
very	O
little	O
resolution	B-Algorithm
,	O
down	O
to	O
individual	O
pixels	O
and	O
making	O
image	B-Algorithm
scaling	I-Algorithm
of	O
pixel	O
art	O
a	O
particularly	O
difficult	O
problem	O
.	O
</s>
<s>
Since	O
a	O
typical	O
application	O
of	O
this	O
technology	O
is	O
improving	O
the	O
appearance	O
of	O
fourth-generation	B-Application
and	O
earlier	O
video	O
games	O
on	O
arcade	O
and	O
console	O
emulators	B-Application
,	O
many	O
are	O
designed	O
to	O
run	O
in	O
real	O
time	O
for	O
sufficiently	O
small	O
input	O
images	O
at	O
60-frames	O
per	O
second	O
.	O
</s>
<s>
This	O
places	O
constraints	O
on	O
the	O
type	O
of	O
programming	B-General_Concept
techniques	O
that	O
can	O
be	O
used	O
for	O
this	O
sort	O
of	O
real-time	O
processing	O
.	O
</s>
<s>
The	O
Mullard	B-General_Concept
SAA5050	I-General_Concept
Teletext	O
character	O
generator	O
chip	O
(	O
1980	O
)	O
used	O
a	O
primitive	O
pixel	O
scaling	O
algorithm	O
to	O
generate	O
higher-resolution	O
characters	O
on	O
screen	O
from	O
a	O
lower-resolution	O
representation	O
from	O
its	O
internal	O
ROM	O
.	O
</s>
<s>
The	O
SAA5050	B-General_Concept
's	O
internal	O
character	O
ROM	O
carefully	O
avoids	O
ever	O
using	O
this	O
pattern	O
.	O
</s>
<s>
Eric	O
's	O
Pixel	O
Expansion	O
(	O
EPX	O
)	O
is	O
an	O
algorithm	O
developed	O
by	O
Eric	O
Johnston	O
at	O
LucasArts	O
around	O
1992	O
,	O
when	O
porting	O
the	O
SCUMM	B-Application
engine	I-Application
games	O
from	O
the	O
IBM	O
PC	O
(	O
which	O
ran	O
at	O
320×200×256	O
colors	O
)	O
to	O
the	O
early	O
color	O
Macintosh	O
computers	O
,	O
which	O
ran	O
at	O
more	O
or	O
less	O
double	O
that	O
resolution	B-Algorithm
.	O
</s>
<s>
AdvMAME2×	O
is	O
available	O
in	O
DOSBox	B-Application
via	O
the	O
scaler	O
=	O
advmame2x	O
dosbox.conf	B-Protocol
option	O
.	O
</s>
<s>
The	O
AdvMAME4×	O
/Scale4	O
×	O
algorithm	O
is	O
just	O
EPX	O
applied	O
twice	O
to	O
get	O
4×	O
resolution	B-Algorithm
.	O
</s>
<s>
The	O
AdvMAME3×	O
/Scale3	O
×	O
algorithm	O
(	O
available	O
in	O
DOSBox	B-Application
via	O
the	O
scaler	O
=	O
advmame3x	O
dosbox.conf	B-Protocol
option	O
)	O
can	O
be	O
thought	O
of	O
as	O
a	O
generalization	O
of	O
EPX	O
to	O
the	O
3×	O
case	O
.	O
</s>
<s>
2×SaI	O
,	O
short	O
for	O
2×	O
Scale	O
and	O
Interpolation	B-Algorithm
engine	O
,	O
was	O
inspired	O
by	O
Eagle	O
.	O
</s>
<s>
It	O
was	O
designed	O
by	O
Derek	O
Liauw	O
Kie	O
Fa	O
,	O
also	O
known	O
as	O
Kreed	O
,	O
primarily	O
for	O
use	O
in	O
console	O
and	O
computer	B-Application
emulators	I-Application
,	O
and	O
it	O
has	O
remained	O
fairly	O
popular	O
in	O
this	O
niche	O
.	O
</s>
<s>
Many	O
of	O
the	O
most	O
popular	O
emulators	B-Application
,	O
including	O
ZSNES	B-Language
and	O
VisualBoyAdvance	B-Device
,	O
offer	O
this	O
scaling	O
algorithm	O
as	O
a	O
feature	O
.	O
</s>
<s>
Two	O
interpolation	B-Algorithm
functions	O
are	O
described	O
:	O
</s>
<s>
Based	O
on	O
these	O
conditions	O
,	O
the	O
algorithm	O
decides	O
whether	O
to	O
use	O
one	O
of	O
A	O
,	O
B	O
,	O
C	O
,	O
or	O
D	O
,	O
or	O
an	O
interpolation	B-Algorithm
among	O
only	O
these	O
four	O
,	O
for	O
each	O
output	O
pixel	O
.	O
</s>
<s>
The	O
2xSaI	O
arbitrary	O
scaler	O
can	O
enlarge	O
any	O
image	O
to	O
any	O
resolution	B-Algorithm
,	O
and	O
uses	O
bilinear	O
filtering	O
to	O
interpolate	O
pixels	O
.	O
</s>
<s>
Since	O
Kreed	O
released	O
the	O
source	O
code	O
under	O
the	O
GNU	B-License
General	I-License
Public	I-License
License	I-License
,	O
it	O
is	O
freely	O
available	O
to	O
anyone	O
wishing	O
to	O
utilize	O
it	O
in	O
a	O
project	O
released	O
under	O
that	O
license	O
.	O
</s>
<s>
Developers	O
wishing	O
to	O
use	O
it	O
in	O
a	O
non-GPL	O
project	O
would	O
be	O
required	O
to	O
rewrite	O
the	O
algorithm	O
without	O
using	O
any	O
of	O
Kreed	O
's	O
existing	O
code	O
.	O
</s>
<s>
It	O
is	O
available	O
in	O
DosBox	B-Application
via	O
scaler	O
=	O
2xsai	O
option	O
.	O
</s>
<s>
hqnx	O
was	O
initially	O
created	O
for	O
the	O
Super	B-Application
NES	I-Application
emulator	B-Application
ZSNES	B-Language
.	O
</s>
<s>
The	O
author	O
of	O
bsnes	B-Language
has	O
released	O
a	O
space-efficient	O
implementation	O
of	O
hq2x	O
to	O
the	O
public	O
domain	O
.	O
</s>
<s>
However	O
,	O
it	O
goes	O
further	O
than	O
HQx	O
by	O
using	O
a	O
2-stage	O
set	O
of	O
interpolation	B-Algorithm
rules	O
,	O
which	O
better	O
handle	O
more	O
complex	O
patterns	O
such	O
as	O
anti-aliased	O
lines	O
and	O
curves	O
.	O
</s>
<s>
It	O
is	O
implemented	O
from	O
scratch	O
as	O
a	O
CPU-based	O
filter	O
in	O
C++	B-Language
.	O
</s>
<s>
It	O
uses	O
the	O
same	O
basic	O
idea	O
as	O
xBR	O
's	O
pattern	O
recognition	O
and	O
interpolation	B-Algorithm
,	O
but	O
with	O
a	O
different	O
rule	O
set	O
designed	O
to	O
preserve	O
fine	O
image	O
details	O
as	O
small	O
as	O
a	O
few	O
pixels	O
.	O
</s>
<s>
xBRZ	O
is	O
optimized	O
for	O
multi-core	B-Architecture
CPUs	I-Architecture
and	O
64-bit	B-Device
architectures	I-Device
and	O
shows	O
40	O
–	O
60%	O
better	O
performance	O
than	O
HQx	O
even	O
when	O
running	O
on	O
a	O
single	O
CPU	B-Architecture
core	I-Architecture
only	O
.	O
</s>
<s>
It	O
supports	O
scaling	O
images	O
with	O
an	O
alpha	B-Algorithm
channel	I-Algorithm
,	O
and	O
scaling	O
by	O
integer	O
factors	O
from	O
2×	O
up	O
to	O
6×	O
.	O
</s>
<s>
There	O
is	O
also	O
a	O
Super	O
xBR	O
version	O
rewritten	O
in	O
C/C	O
++	O
.	O
</s>
<s>
It	O
produces	O
far	O
fewer	O
artifacts	O
than	O
nearest-neighbor	O
rotation	O
algorithms	O
,	O
and	O
like	O
EPX	O
,	O
it	O
does	O
not	O
introduce	O
new	O
colors	O
into	O
the	O
image	O
(	O
unlike	O
most	O
interpolation	B-Algorithm
systems	O
)	O
.	O
</s>
<s>
The	O
Kopf	O
–	O
Lischinski	O
algorithm	O
is	O
a	O
novel	O
way	O
to	O
extract	O
resolution-independent	O
vector	O
graphics	O
from	O
pixel	O
art	O
described	O
in	O
the	O
2011	O
paper	O
"	O
Depixelizing	O
Pixel	O
Art	O
"	O
.	O
</s>
<s>
Edge-directed	O
interpolation	B-Algorithm
(	O
EDI	O
)	O
describes	O
upscaling	O
techniques	O
that	O
use	O
statistical	O
sampling	O
to	O
ensure	O
the	O
quality	O
of	O
an	O
image	O
when	O
scaling	O
it	O
up	O
.	O
</s>
<s>
There	O
were	O
several	O
earlier	O
methods	O
that	O
involved	O
detecting	O
edges	O
to	O
generate	O
blending	O
weights	O
for	O
linear	O
interpolation	B-Algorithm
or	O
classifying	O
pixels	O
according	O
to	O
their	O
neighbour	O
conditions	O
and	O
using	O
different	O
otherwise	O
isotropic	O
interpolation	B-Algorithm
schemes	O
based	O
on	O
the	O
classification	O
.	O
</s>
<s>
Any	O
given	O
interpolation	B-Algorithm
approach	O
boils	O
down	O
to	O
weighted	O
averages	O
of	O
neighbouring	O
pixels	O
.	O
</s>
<s>
Bilinear	O
interpolation	B-Algorithm
sets	O
all	O
the	O
weights	O
to	O
be	O
equal	O
.	O
</s>
<s>
Higher	O
order	O
interpolation	B-Algorithm
methods	O
like	O
bicubic	B-Algorithm
or	O
sinc	O
interpolation	B-Algorithm
consider	O
a	O
larger	O
number	O
of	O
neighbours	O
than	O
just	O
the	O
adjacent	O
ones	O
.	O
</s>
<s>
NEDI	O
(	O
New	O
Edge-Directed	O
Interpolation	B-Algorithm
)	O
computes	O
local	O
covariances	O
in	O
the	O
original	O
image	O
,	O
and	O
uses	O
them	O
to	O
adapt	O
the	O
interpolation	B-Algorithm
at	O
high	B-Algorithm
resolution	I-Algorithm
.	O
</s>
<s>
EDIUpsizer	O
is	O
a	O
resampling	B-Algorithm
filter	O
that	O
upsizes	O
an	O
image	O
by	O
a	O
factor	O
of	O
two	O
both	O
horizontally	O
and	O
vertically	O
using	O
NEDI	O
(	O
new	O
edge-directed	O
interpolation	B-Algorithm
)	O
.	O
</s>
<s>
It	O
uses	O
a	O
constant	O
8×8	O
window	O
size	O
,	O
only	O
performs	O
NEDI	O
on	O
the	O
luma	O
plane	O
,	O
and	O
only	O
uses	O
either	O
bicubic	B-Algorithm
or	O
bilinear	O
interpolation	B-Algorithm
as	O
the	O
fall	O
back	O
interpolation	B-Algorithm
method	O
.	O
</s>
<s>
Another	O
edge-directed	O
interpolation	B-Algorithm
filter	O
.	O
</s>
<s>
It	O
is	O
intended	O
for	O
edge-directed	O
interpolation	B-Algorithm
for	O
deinterlacing	O
(	O
i.e.	O
</s>
<s>
NNEDI3	O
enhances	O
NNEDI2	O
with	O
a	O
predictor	O
neural	B-Architecture
network	I-Architecture
.	O
</s>
<s>
Both	O
the	O
size	O
of	O
the	O
network	O
and	O
the	O
neighborhood	O
it	O
examines	O
can	O
be	O
tweaked	O
for	O
a	O
speed-quality	O
tradeoff:This	O
is	O
a	O
quality	O
vs	O
speed	O
option	O
;	O
however	O
,	O
differences	O
are	O
usually	O
small	O
between	O
the	O
amount	O
of	O
neurons	O
for	O
a	O
specific	O
resize	O
factor	O
,	O
however	O
the	O
performance	O
difference	O
between	O
the	O
count	O
of	O
neurons	O
becomes	O
larger	O
as	O
you	O
quadruple	O
the	O
image	B-Algorithm
size	I-Algorithm
.	O
</s>
<s>
If	O
you	O
are	O
only	O
planning	O
on	O
doubling	O
the	O
resolution	B-Algorithm
then	O
you	O
wo	O
n't	O
see	O
massive	O
differences	O
between	O
16	O
and	O
256	O
neurons	O
.	O
</s>
