<s>
Smacker	B-Algorithm
video	I-Algorithm
is	O
a	O
video	B-General_Concept
file	I-General_Concept
format	I-General_Concept
(	O
with	O
the	O
.SMK	B-Algorithm
file	O
extension	O
)	O
developed	O
by	O
RAD	B-Algorithm
Game	I-Algorithm
Tools	I-Algorithm
,	O
and	O
primarily	O
used	O
for	O
full-motion	B-Application
video	I-Application
in	O
video	O
games	O
.	O
</s>
<s>
Smacker	B-Algorithm
uses	O
an	O
adaptive	O
8-bit	O
RGB	O
palette	B-Data_Structure
.	O
</s>
<s>
RAD	O
's	O
format	O
for	O
video	O
at	O
higher	O
color	O
depths	O
is	O
Bink	B-Algorithm
Video	I-Algorithm
.	O
</s>
<s>
The	O
Smacker	B-Algorithm
format	O
specifies	O
a	O
container	O
format	O
,	O
a	O
video	O
compression	O
format	O
,	O
and	O
an	O
audio	O
compression	O
format	O
.	O
</s>
<s>
Since	O
its	O
release	O
in	O
1994	O
,	O
Smacker	B-Algorithm
has	O
been	O
used	O
in	O
over	O
2300	O
games	O
.	O
</s>
<s>
Blizzard	O
used	O
this	O
format	O
for	O
the	O
cinematic	O
videos	O
seen	O
in	O
its	O
games	O
Warcraft	B-Application
II	I-Application
,	O
StarCraft	B-Application
and	O
Diablo	B-Application
I	I-Application
.	O
</s>
<s>
The	O
format	O
has	O
been	O
reverse	O
engineered	O
and	O
implemented	O
in	O
libavcodec	B-Language
.	O
</s>
<s>
A	O
non-commercial	O
SourceForge	B-Application
project	O
libsmacker	O
released	O
an	O
open	O
source	O
decoder	O
in	O
2013	O
.	O
</s>
<s>
Smacker	B-Algorithm
defines	O
its	O
own	O
container	O
format	O
.	O
</s>
<s>
A	O
Smacker	B-Algorithm
file	O
can	O
contain	O
a	O
Smacker	B-Algorithm
video	I-Algorithm
track	O
and	O
up	O
to	O
seven	O
audio	O
tracks	O
.	O
</s>
<s>
The	O
audio	O
can	O
either	O
be	O
uncompressed	O
PCM	B-Algorithm
,	O
compressed	O
in	O
the	O
Smacker	B-Algorithm
Audio	O
format	O
,	O
or	O
,	O
in	O
newer	O
versions	O
of	O
Smacker	B-Algorithm
,	O
compressed	O
in	O
the	O
Bink	O
Audio	O
format	O
.	O
</s>
<s>
Smacker	B-Algorithm
video	I-Algorithm
supports	O
256	O
colors	O
,	O
and	O
includes	O
transparency	O
support	O
.	O
</s>
<s>
While	O
being	O
a	O
palette-based	O
format	O
,	O
which	O
is	O
inherently	O
limited	O
to	O
having	O
not	O
more	O
than	O
256	O
colors	O
in	O
each	O
frame	O
,	O
Smacker	B-Algorithm
videos	I-Algorithm
may	O
still	O
contain	O
more	O
colors	O
in	O
total	O
due	O
to	O
"	O
palette	B-Data_Structure
rotation	O
"	O
,	O
whereby	O
the	O
palette	B-Data_Structure
is	O
updated	O
on	O
a	O
per-frame	O
basis	O
.	O
</s>
<s>
The	O
compression	O
rate	O
of	O
Smacker	B-Algorithm
can	O
reach	O
1:12	O
,	O
but	O
at	O
the	O
loss	O
of	O
quality	O
(	O
pixelation	B-Algorithm
)	O
.	O
</s>
<s>
In	O
Smacker	B-Algorithm
video	I-Algorithm
,	O
a	O
frame	O
is	O
split	O
into	O
4×4	O
blocks	O
in	O
raster-scan	O
order	O
.	O
</s>
<s>
Each	O
mode	O
can	O
be	O
signaled	O
for	O
multiple	O
blocks	O
in	O
a	O
run-length	B-Algorithm
encoding	I-Algorithm
scheme	O
.	O
</s>
<s>
In	O
mono	O
mode	O
,	O
the	O
palette	B-Data_Structure
is	O
locally	O
reduced	O
from	O
256	O
colors	O
to	O
two	O
colors	O
.	O
</s>
<s>
The	O
mono	O
mode	O
can	O
be	O
interpreted	O
as	O
vector	B-Algorithm
quantization	I-Algorithm
,	O
where	O
a	O
three-dimensional	O
vector	O
with	O
the	O
components	O
red	O
,	O
green	O
,	O
and	O
blue	O
is	O
quantized	B-Algorithm
using	O
an	O
adaptive	O
codebook	O
with	O
two	O
entries	O
.	O
</s>
<s>
There	O
are	O
three	O
full	O
modes	O
,	O
one	O
was	O
specified	O
in	O
version	O
2	O
of	O
the	O
Smacker	B-Algorithm
format	O
,	O
while	O
the	O
other	O
two	O
were	O
added	O
in	O
version	O
4	O
.	O
</s>
<s>
In	O
the	O
original	O
full	O
mode	O
,	O
16	O
colors	O
are	O
transmitted	O
,	O
one	O
for	O
each	O
pixel	O
,	O
equivalent	O
to	O
raw	O
uncompressed	O
PCM	B-Algorithm
.	O
</s>
<s>
Further	O
compression	O
is	O
achieved	O
by	O
entropy	B-Algorithm
coding	I-Algorithm
using	O
Huffman	B-General_Concept
coding	I-General_Concept
of	O
the	O
various	O
bitstream	O
elements	O
that	O
result	O
from	O
the	O
process	O
above	O
.	O
</s>
<s>
There	O
are	O
four	O
separate	O
Huffman	O
tables	O
,	O
each	O
with	O
16-bit	O
entries	O
:	O
one	O
for	O
mode	O
decision	O
,	O
run-length	B-Algorithm
,	O
and	O
fill	O
color	O
in	O
fill	O
color	O
mode	O
,	O
one	O
for	O
the	O
color	O
indices	O
in	O
mono	O
mode	O
,	O
one	O
for	O
the	O
bitmap	O
in	O
mono	O
mode	O
,	O
and	O
one	O
for	O
all	O
data	O
in	O
the	O
full	O
mode	O
.	O
</s>
<s>
Smacker	B-Algorithm
audio	O
is	O
one	O
of	O
the	O
audio	O
formats	O
that	O
can	O
be	O
used	O
in	O
the	O
Smacker	B-Algorithm
container	O
.	O
</s>
<s>
For	O
compression	O
,	O
Differential	B-General_Concept
pulse	I-General_Concept
code	I-General_Concept
modulation	I-General_Concept
(	O
DPCM	B-General_Concept
)	O
is	O
used	O
.	O
</s>
<s>
The	O
difference	O
between	O
two	O
successive	O
samples	O
is	O
compressed	O
using	O
Huffman	B-General_Concept
coding	I-General_Concept
.	O
</s>
