<s>
X-Video	B-Protocol
Motion	I-Protocol
Compensation	I-Protocol
(	O
XvMC	B-Protocol
)	O
,	O
is	O
an	O
extension	O
of	O
the	O
X	B-Protocol
video	I-Protocol
extension	I-Protocol
(	O
Xv	O
)	O
for	O
the	O
X	B-Operating_System
Window	I-Operating_System
System	I-Operating_System
.	O
</s>
<s>
The	O
XvMC	B-Protocol
API	B-General_Concept
allows	O
video	O
programs	O
to	O
offload	O
portions	O
of	O
the	O
video	B-Application
decoding	I-Application
process	O
to	O
the	O
GPU	B-Architecture
video-hardware	O
.	O
</s>
<s>
Currently	O
,	O
the	O
supported	O
portions	O
to	O
be	O
offloaded	O
by	O
XvMC	B-Protocol
onto	O
the	O
GPU	B-Architecture
are	O
motion	B-Algorithm
compensation	I-Algorithm
(	O
mo	B-Algorithm
comp	I-Algorithm
)	O
and	O
inverse	B-General_Concept
discrete	I-General_Concept
cosine	I-General_Concept
transform	I-General_Concept
(	O
iDCT	B-General_Concept
)	O
for	O
MPEG-2	B-Algorithm
video	O
.	O
</s>
<s>
XvMC	B-Protocol
also	O
supports	O
offloading	O
decoding	O
of	O
mo	B-Algorithm
comp	I-Algorithm
,	O
iDCT	B-General_Concept
,	O
and	O
VLD	B-Algorithm
(	O
"	O
Variable-Length	B-General_Concept
Decoding	I-General_Concept
"	O
,	O
more	O
commonly	O
known	O
as	O
"	O
slice	O
level	O
acceleration	O
"	O
)	O
for	O
not	O
only	O
MPEG-2	B-Algorithm
but	O
also	O
MPEG-4	B-Application
ASP	I-Application
video	O
on	O
VIA	O
Unichrome	B-Application
(	O
S3	O
Graphics	O
Chrome	O
Series	O
)	O
hardware	O
.	O
</s>
<s>
XvMC	B-Protocol
was	O
the	O
first	O
UNIX	O
equivalent	O
of	O
the	O
Microsoft	B-Application
Windows	I-Application
DirectX	B-General_Concept
Video	I-General_Concept
Acceleration	I-General_Concept
(	O
DxVA	B-General_Concept
)	O
API	B-General_Concept
.	O
</s>
<s>
Popular	O
software	O
applications	O
known	O
to	O
take	O
advantage	O
of	O
XvMC	B-Protocol
include	O
MPlayer	B-Application
,	O
MythTV	B-Application
,	O
and	O
xine	B-Application
.	O
</s>
<s>
Each	O
hardware	O
video	O
GPU	B-Architecture
capable	O
of	O
XvMC	B-Protocol
video	O
acceleration	O
requires	O
a	O
X11	B-Operating_System
software	O
device	B-Application
driver	I-Application
to	O
enable	O
these	O
features	O
.	O
</s>
<s>
There	O
are	O
currently	O
three	O
X11	B-Operating_System
Nvidia	O
drivers	O
available	O
:	O
a	O
2D-only	O
open	B-License
source	I-License
but	O
obfuscated	O
driver	O
maintained	O
by	O
Nvidia	O
called	O
nv	O
,	O
a	O
proprietary	B-Application
binary	O
driver	O
by	O
Nvidia	O
,	O
and	O
an	O
open	B-License
source	I-License
driver	O
based	O
on	O
reverse	O
engineering	O
of	O
the	O
binary	O
driver	O
developed	O
by	O
the	O
Linux	O
community	O
called	O
Nouveau	B-Application
.	O
</s>
<s>
Nouveau	B-Application
is	O
not	O
pursuing	O
XvMC	B-Protocol
support	O
,	O
the	O
2D	O
nv	O
driver	O
does	O
not	O
support	O
XvMC	B-Protocol
,	O
and	O
the	O
official	O
proprietary	B-Application
binary	O
driver	O
by	O
Nvidia	O
only	O
supports	O
MPEG-2	B-Algorithm
offloading	O
(	O
mo	B-Algorithm
comp	I-Algorithm
and	O
iDCT	B-General_Concept
)	O
on	O
hardware	O
up	O
to	O
and	O
including	O
the	O
GeForce	B-Application
7000	O
series	O
.	O
</s>
<s>
VIA	O
provides	O
open	B-License
source	I-License
device	B-Application
drivers	I-Application
for	O
some	O
of	O
its	O
VIA	O
Unichrome	B-Application
(	O
S3	O
Graphics	O
Chrome	O
Series	O
)	O
hardware	O
,	O
supporting	O
offloading	O
of	O
MPEG-2	B-Algorithm
and	O
MPEG-4	B-Application
ASP	I-Application
video	O
.	O
</s>
<s>
Thanks	O
to	O
VLD	B-Algorithm
level	O
of	O
decoding	O
VIA	O
offloads	O
much	O
more	O
decoding	O
tasks	O
from	O
CPU	O
than	O
GPUs	B-Architecture
supporting	O
iDCT	B-General_Concept
or	O
mo	B-Algorithm
comp	I-Algorithm
levels	O
only	O
.	O
</s>
<s>
Intel	O
provides	O
official	O
open	B-License
source	I-License
device	B-Application
drivers	I-Application
which	O
supports	O
MPEG-2	B-Algorithm
offloading	O
(	O
mo	B-Algorithm
comp	I-Algorithm
and	O
iDCT	B-General_Concept
)	O
on	O
Intel	O
's	O
8xx/9xx	O
range	O
of	O
integrated	O
graphics	O
chips	O
.	O
</s>
<s>
Although	O
ATI	O
was	O
the	O
first	O
manufacturer	O
to	O
provide	O
MPEG-2	B-Algorithm
acceleration	O
in	O
their	O
graphic	O
boards	O
with	O
the	O
Rage	O
128	O
GPU	B-Architecture
,	O
it	O
has	O
never	O
provided	O
documentation	O
on	O
how	O
to	O
use	O
it	O
.	O
</s>
<s>
So	O
no	O
XvMC	B-Protocol
is	O
available	O
,	O
and	O
will	O
probably	O
never	O
be	O
.	O
</s>
<s>
XvMC	B-Protocol
is	O
supported	O
on	O
Radeon-4000	O
cards	O
(	O
which	O
have	O
UVD	O
)	O
by	O
Catalyst	B-Application
driver	I-Application
from	O
8.10	O
and	O
higher	O
at	O
an	O
experimental	O
level	O
(	O
meaning	O
that	O
it	O
does	O
n't	O
work	O
"	O
out	B-General_Concept
of	I-General_Concept
the	I-General_Concept
box	I-General_Concept
"	O
.	O
)	O
</s>
<s>
(	O
See	O
also	O
X-Video	B-Application
Bitstream	I-Application
Acceleration	I-Application
)	O
.	O
</s>
<s>
Motion	B-Algorithm
compensation	I-Algorithm
support	O
in	O
other	O
ATI/AMD	O
hardware	O
is	O
planned	O
for	O
the	O
future	O
.	O
</s>
<s>
(	O
Now	O
all	O
hardware	O
has	O
support	O
for	O
MPEG-2	B-Algorithm
acceleration	O
on	O
iDCT	B-General_Concept
and	O
mo	B-Algorithm
comp	I-Algorithm
levels	O
)	O
.	O
</s>
<s>
There	O
are	O
no	O
device	B-Application
drivers	I-Application
which	O
support	O
XvMC	B-Protocol
on	O
Matrox	O
hardware	O
,	O
(	O
although	O
Matrox	B-Device
Parhelia	I-Device
hardware	O
has	O
support	O
for	O
MPEG-2	B-Algorithm
acceleration	O
on	O
mo	B-Algorithm
comp	I-Algorithm
level	O
)	O
.	O
</s>
<s>
Binary	O
device	B-Application
driver	I-Application
by	O
S3	O
only	O
supports	O
MPEG-2	B-Algorithm
offloading	O
in	O
initial	O
2.0.16	O
driver	O
on	O
Chrome	O
20	O
GPUs	B-Architecture
.	O
</s>
<s>
XvMC	B-Protocol
extends	O
the	O
X	B-Protocol
video	I-Protocol
extension	I-Protocol
(	O
Xv	O
)	O
and	O
makes	O
use	O
of	O
the	O
familiar	O
concept	O
of	O
the	O
XvPort	O
.	O
</s>
<s>
In	O
XvMC	B-Protocol
ports	O
can	O
also	O
have	O
hardware	O
motion	B-Algorithm
compensation	I-Algorithm
contexts	O
created	O
for	O
use	O
with	O
them	O
.	O
</s>
<s>
they	O
have	O
an	O
"	O
XV_IMAGE	O
"	O
port	O
encoding	O
as	O
described	O
in	O
the	O
Xv	O
version	O
2.2	O
API	B-General_Concept
addendum	O
)	O
can	O
be	O
queried	O
for	O
the	O
list	O
of	O
XvMCSurface	O
types	O
they	O
support	O
.	O
</s>
<s>
XvMCContext	O
describes	O
the	O
state	O
of	O
the	O
motion	B-Algorithm
compensation	I-Algorithm
pipeline	O
.	O
</s>
<s>
An	O
individual	O
XvMCContext	O
can	O
be	O
created	O
for	O
use	O
with	O
a	O
single	O
port	O
,	O
surface	O
type	O
,	O
motion	B-Algorithm
compensation	I-Algorithm
type	O
,	O
width	O
and	O
height	O
combination	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
context	O
might	O
be	O
created	O
for	O
a	O
particular	O
port	O
that	O
does	O
MPEG-2	B-Algorithm
motion	B-Algorithm
compensation	I-Algorithm
on	O
720	O
x	B-Operating_System
480	O
4:2:0	O
surfaces	O
.	O
</s>
<s>
Once	O
the	O
context	O
is	O
created	O
,	O
referencing	O
it	O
implies	O
the	O
port	O
,	O
surface	O
type	O
,	O
size	O
and	O
the	O
motion	B-Algorithm
compensation	I-Algorithm
type	O
.	O
</s>
<s>
For	O
indirect	O
contexts	O
the	O
X	B-Operating_System
display	O
server	O
renders	O
all	O
video	O
using	O
the	O
data	O
passed	O
to	O
it	O
by	O
the	O
client	O
.	O
</s>
<s>
For	O
direct	O
contexts	O
the	O
client	O
libraries	O
render	O
the	O
video	O
with	O
little	O
or	O
no	O
interaction	O
with	O
the	O
X	B-Operating_System
display	O
server	O
.	O
</s>
<s>
XvMCSurfaces	O
are	O
buffers	O
into	O
which	O
the	O
motion	B-Algorithm
compensation	I-Algorithm
hardware	O
can	O
render	O
.	O
</s>
<s>
XvMC	B-Protocol
provides	O
video	O
acceleration	O
starting	O
at	O
one	O
of	O
two	O
places	O
in	O
the	O
video	O
pipeline	O
.	O
</s>
<s>
Acceleration	O
starting	O
at	O
the	O
first	O
point	O
,	O
which	O
we	O
shall	O
call	O
the	O
"	O
Motion	B-Algorithm
Compensation	I-Algorithm
"	O
level	O
,	O
begins	O
after	O
the	O
inverse	O
quantization	B-Algorithm
and	O
IDCT	B-General_Concept
at	O
the	O
place	O
where	O
motion	B-Algorithm
compensation	I-Algorithm
is	O
to	O
be	O
applied	O
.	O
</s>
<s>
The	O
second	O
point	O
,	O
which	O
we	O
shall	O
call	O
the	O
"	O
IDCT	B-General_Concept
"	O
level	O
,	O
begins	O
before	O
the	O
IDCT	B-General_Concept
just	O
after	O
the	O
inverse	O
quantization	B-Algorithm
.	O
</s>
<s>
Rendering	O
is	O
done	O
by	O
presenting	O
the	O
library	O
with	O
a	O
target	O
XvMCSurface	O
and	O
up	O
to	O
two	O
reference	O
XvMCSurfaces	O
for	O
the	O
motion	B-Algorithm
compensation	I-Algorithm
,	O
a	O
buffer	O
of	O
8x8	O
blocks	O
and	O
a	O
command	O
buffer	O
which	O
describes	O
how	O
to	O
use	O
the	O
8x8	O
blocks	O
along	O
with	O
motion	B-Algorithm
compensation	I-Algorithm
vectors	O
to	O
construct	O
the	O
data	O
in	O
the	O
target	O
XvMCSurface	O
.	O
</s>
<s>
When	O
the	O
pipeline	O
starts	O
at	O
the	O
iDCT	B-General_Concept
level	O
,	O
Xv	O
will	O
perform	O
the	O
IDCT	B-General_Concept
on	O
the	O
blocks	O
before	O
performing	O
the	O
motion	B-Algorithm
compensation	I-Algorithm
.	O
</s>
<s>
XvMC	B-Protocol
acceleration	O
is	O
supported	O
in	O
:	O
</s>
<s>
XvMC	B-Protocol
have	O
been	O
removed	O
in	O
Mesa	B-Application
22.3	O
.	O
</s>
<s>
Even	O
though	O
XvMC	B-Protocol
currently	O
only	O
supports	O
hardware	O
acceleration	O
of	O
motion	B-Algorithm
compensation	I-Algorithm
(	O
mo	B-Algorithm
comp	I-Algorithm
)	O
and	O
inverse	B-General_Concept
discrete	I-General_Concept
cosine	I-General_Concept
transform	I-General_Concept
(	O
iDCT	B-General_Concept
)	O
,	O
(	O
and	O
Variable-Length	B-General_Concept
Decoding	I-General_Concept
for	O
VIA	O
Unichrome	B-Application
GPU	B-Architecture
)	O
,	O
additional	O
video	B-Application
decoding	I-Application
processes	O
could	O
be	O
passed	O
on	O
to	O
modern	O
GPUs	B-Architecture
which	O
could	O
be	O
accelerated	O
via	O
GPU	B-Architecture
fragment	O
programs	O
.	O
</s>
<s>
XvMC	B-Protocol
could	O
be	O
extended	O
in	O
the	O
future	O
to	O
support	O
the	O
same	O
processes	O
as	O
the	O
newer	O
competing	O
hardware	O
video	B-Application
acceleration	I-Application
APIs	I-Application
like	O
VDPAU	B-Application
,	O
XvBA	B-Application
,	O
and	O
VAAPI	B-Application
:	O
</s>
<s>
Besides	O
not	O
matching	O
all	O
of	O
the	O
features	O
and	O
function	O
of	O
DxVA	B-General_Concept
(	O
which	O
is	O
the	O
Microsoft	O
equivalent	O
API	B-General_Concept
for	O
Windows	B-Application
)	O
,	O
and	O
lacking	O
support	O
for	O
other	O
video	O
formats	O
than	O
MPEG-2	B-Algorithm
in	O
Linux	B-Application
device	I-Application
drivers	I-Application
from	O
Intel	O
and	O
Nvidia	O
,	O
the	O
XvMC	B-Protocol
API	B-General_Concept
specification	O
version	O
1.0	O
currently	O
also	O
has	O
these	O
other	O
limitations	O
:	O
</s>
<s>
BOB	O
and	O
onefield	O
are	O
the	O
only	O
deinterlacing	O
methods	O
that	O
work	O
with	O
XvMC	B-Protocol
.	O
</s>
<s>
Picture	O
in	O
Picture	O
(	O
PiP	O
)	O
does	O
not	O
work	O
with	O
XvMC	B-Protocol
.	O
</s>
<s>
Stepping	O
through	O
the	O
video	O
frame	O
by	O
frame	O
can	O
cause	O
artifacts	O
with	O
XvMC	B-Protocol
.	O
</s>
<s>
Editing	O
a	O
video	O
is	O
difficult	O
to	O
impossible	O
with	O
XvMC	B-Protocol
activated	O
.	O
</s>
<s>
VA	B-Application
API	I-Application
is	O
a	O
more	O
modern	O
video	B-Application
acceleration	I-Application
API	I-Application
which	O
support	O
the	O
video	O
acceleration	O
features	O
of	O
modern	O
GPUs	B-Architecture
.	O
</s>
