X-Video Motion Compensation
   HOME

TheInfoList



OR:

X-Video Motion Compensation (XvMC), is an extension of the X video extension (Xv) for the
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
. The XvMC
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
allows video programs to offload portions of the video decoding process to the
GPU A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, mobi ...
video-hardware. In theory this process should also reduce bus bandwidth requirements. Currently, the supported portions to be offloaded by XvMC onto the GPU are motion compensation (mo comp) and inverse discrete cosine transform (iDCT) for MPEG-2 video. XvMC also supports offloading decoding of mo comp, iDCT, and VLD ("Variable-Length Decoding", more commonly known as "slice level acceleration") for not only MPEG-2 but also MPEG-4 ASP video on VIA Unichrome (S3 Graphics Chrome Series) hardware. XvMC was the first UNIX equivalent of the Microsoft Windows DirectX Video Acceleration (DxVA) API. Popular software applications known to take advantage of XvMC include
MPlayer MPlayer is a free and open-source media player software application. It is available for Linux, OS X and Microsoft Windows. Versions for OS/2, Syllable, AmigaOS, MorphOS and AROS Research Operating System are also available. A port for DOS using ...
,
MythTV MythTV is a free and open-source home entertainment application with a simplified "10-foot user interface" design for the living room TV. It turns a computer with the necessary hardware into a network streaming digital video recorder, a digital ...
, and
xine xine is a multimedia playback engine for Unix-like operating systems released under the GNU General Public License. xine is built around a shared library (xine-lib) that supports different frontend player applications. xine uses libraries ...
.


Device drivers

Each hardware video
GPU A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, mobi ...
capable of XvMC video acceleration requires a
X11 The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
software device driver to enable these features.


Hardware manufacturers


Nvidia

There are currently three X11 Nvidia drivers available: a 2D-only open source but obfuscated driver maintained by Nvidia called nv, a proprietary binary driver by Nvidia, and an open source driver based on reverse engineering of the binary driver developed by the Linux community called
Nouveau A ''nouveau'' ( ), or ''vin (de) primeur'', is a wine which may be sold in the same year in which it was harvested. The most widely exported ''nouveau'' wine is French wine Beaujolais ''nouveau'' which is released on the third Thursday of N ...
. Nouveau is not pursuing XvMC support, the 2D nv driver does not support XvMC, and the official proprietary binary driver by Nvidia only supports MPEG-2 offloading (mo comp and iDCT) on hardware up to and including the
GeForce GeForce is a brand of graphics processing units (GPUs) designed by Nvidia. As of the GeForce 40 series, there have been eighteen iterations of the design. The first GeForce products were discrete GPUs designed for add-on graphics boards, inte ...
7000 series.


VIA

VIA provides open source device drivers for some of its VIA Unichrome (S3 Graphics Chrome Series) hardware, supporting offloading of MPEG-2 and MPEG-4 ASP video. Thanks to VLD level of decoding VIA offloads much more decoding tasks from CPU than GPUs supporting iDCT or mo comp levels only. Keep in mind that not all devices are supported and there are some other caveats.


Intel

Intel provides official open source device drivers which supports MPEG-2 offloading (mo comp and iDCT) on Intel's 8xx/9xx range of integrated graphics chips.


ATI/AMD

Although ATI was the first manufacturer to provide MPEG-2 acceleration in their graphic boards with the Rage 128 GPU, it has never provided documentation on how to use it. So no XvMC is available, and will probably never be. XvMC is supported on Radeon-4000 cards (which have
UVD Unified Video Decoder (UVD, previously called Universal Video Decoder) is the name given to AMD's dedicated video decoding ASIC. There are multiple versions implementing a multitude of video codecs, such as H.264 and VC-1. UVD was introduced wit ...
) by
Catalyst Catalysis () is the process of increasing the rate of a chemical reaction by adding a substance known as a catalyst (). Catalysts are not consumed in the reaction and remain unchanged after it. If the reaction is rapid and the catalyst recyc ...
driver from 8.10 and higher at an experimental level (meaning that it doesn't work " out of the box".) (See also X-Video Bitstream Acceleration). Motion compensation support in other ATI/AMD hardware is planned for the future. (Now all hardware has support for MPEG-2 acceleration on iDCT and mo comp levels).


Matrox

There are no device drivers which support XvMC on Matrox hardware, (although
Matrox Parhelia Matrox Parhelia-512 is a graphics processing unit (GPU) with full support for DirectX 8.1 and incorporating several DirectX 9.0 features. Released in 2002, it was best known for its ability to drive three monitors ("Surround Gaming") and its ''Co ...
hardware has support for MPEG-2 acceleration on mo comp level).


S3

Binary device driver by S3 only supports MPEG-2 offloading in initial 2.0.16 driver on Chrome 20 GPUs.


XvMC API technical overview

This is from ''X-Vxvideoideo Motion Compensation - API specification v. 1.0''


XvPort

XvMC extends the X video extension (Xv) and makes use of the familiar concept of the XvPort. Ports have attributes that can be set and queried through Xv. In XvMC ports can also have hardware
motion compensation Motion compensation in computing, is an algorithmic technique used to predict a frame in a video, given the previous and/or future frames by accounting for motion of the camera and/or objects in the video. It is employed in the encoding of video d ...
contexts created for use with them. Ports which support XvImages (i.e. they have an "XV_IMAGE" port encoding as described in the Xv version 2.2 API addendum) can be queried for the list of XvMCSurface types they support. If they support any XvMCSurface types an XvMCContext can be created for that port.


XvMCContext

XvMCContext describes the state of the
motion compensation Motion compensation in computing, is an algorithmic technique used to predict a frame in a video, given the previous and/or future frames by accounting for motion of the camera and/or objects in the video. It is employed in the encoding of video d ...
pipeline. An individual XvMCContext can be created for use with a single port, surface type, motion compensation type, width and height combination. For example, a context might be created for a particular port that does MPEG-2 motion compensation on 720 x 480 4:2:0 surfaces. Once the context is created, referencing it implies the port, surface type, size and the motion compensation type. Contexts may be "direct" or "indirect". For indirect contexts the X display server renders all video using the data passed to it by the client. For direct contexts the client libraries render the video with little or no interaction with the X display server.


XvMCSurfaces

XvMCSurfaces are buffers into which the
motion compensation Motion compensation in computing, is an algorithmic technique used to predict a frame in a video, given the previous and/or future frames by accounting for motion of the camera and/or objects in the video. It is employed in the encoding of video d ...
hardware can render. The data in the buffers themselves are not client accessible and may be stored in a hardware-specific format. Any number of buffers can be created for use with a particular context (resources permitting).


Video Pipeline

XvMC provides video acceleration starting at one of two places in the video pipeline. Acceleration starting at the first point, which we shall call the "Motion Compensation" level, begins after the inverse quantization and IDCT at the place where
motion compensation Motion compensation in computing, is an algorithmic technique used to predict a frame in a video, given the previous and/or future frames by accounting for motion of the camera and/or objects in the video. It is employed in the encoding of video d ...
is to be applied. The second point, which we shall call the "IDCT" level, begins before the IDCT just after the inverse quantization.


Rendering

Rendering is done by presenting the library with a target XvMCSurface and up to two reference XvMCSurfaces for the motion compensation, a buffer of 8x8 blocks and a command buffer which describes how to use the 8x8 blocks along with motion compensation vectors to construct the data in the target XvMCSurface. When the pipeline starts at the iDCT level, Xv will perform the IDCT on the blocks before performing the motion compensation. A function is provided to copy/overlay a portion of the XvMCSurface to a drawable with arbitrary scaling.


XvMCSubpictures

XvMCSubpictures are separate surfaces that may be blended with the target surface. Any number of XvMCSubpictures may be created for use with a context (resources permitting). Both "backend" and "frontend" subpicture behavior are supported.


Software support

XvMC acceleration is supported in: *
MPlayer MPlayer is a free and open-source media player software application. It is available for Linux, OS X and Microsoft Windows. Versions for OS/2, Syllable, AmigaOS, MorphOS and AROS Research Operating System are also available. A port for DOS using ...
*
MythTV MythTV is a free and open-source home entertainment application with a simplified "10-foot user interface" design for the living room TV. It turns a computer with the necessary hardware into a network streaming digital video recorder, a digital ...
(XvMC support dropped in 0.25) *
Xine xine is a multimedia playback engine for Unix-like operating systems released under the GNU General Public License. xine is built around a shared library (xine-lib) that supports different frontend player applications. xine uses libraries ...
XvMC have been removed in
Mesa A mesa is an isolated, flat-topped elevation, ridge or hill, which is bounded from all sides by steep escarpments and stands distinctly above a surrounding plain. Mesas characteristically consist of flat-lying soft sedimentary rocks capped by a ...
22.3.


Processes that could be accelerated

Even though XvMC currently only supports hardware acceleration of
motion compensation Motion compensation in computing, is an algorithmic technique used to predict a frame in a video, given the previous and/or future frames by accounting for motion of the camera and/or objects in the video. It is employed in the encoding of video d ...
(mo comp) and inverse discrete cosine transform (iDCT), (and Variable-Length Decoding for VIA Unichrome GPU), additional video decoding processes could be passed on to modern
GPU A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, mobi ...
s which could be accelerated via GPU fragment programs. XvMC could be extended in the future to support the same processes as the newer competing hardware video acceleration APIs like
VDPAU Video Decode and Presentation API for Unix (VDPAU) is a royalty-free application programming interface (API) as well as its implementation as free and open-source library () distributed under the MIT License. VDPAU is also supported by Nvidia. Th ...
,
XvBA X-Video Bitstream Acceleration (XvBA), designed by AMD Graphics for its Radeon GPU and APU, is an arbitrary extension of the X video extension (Xv) for the X Window System on Linux operating-systems. XvBA API allows video programs to offload por ...
, and
VAAPI Video Acceleration API (VA-API) is an open source application programming interface that allows applications such as VLC media player or GStreamer to use hardware video acceleration capabilities, usually provided by the graphics processing unit ...
: *
Motion compensation Motion compensation in computing, is an algorithmic technique used to predict a frame in a video, given the previous and/or future frames by accounting for motion of the camera and/or objects in the video. It is employed in the encoding of video d ...
(mo comp) * Inverse discrete cosine transform (iDCT) **
Inverse telecine Telecine ( or ) is the process of transferring film into video and is performed in a color suite. The term is also used to refer to the equipment used in the post-production process. Telecine enables a motion picture, captured originally on fi ...
3:2 and 2:2 pull-down correction * Inverse modified discrete cosine transform (iMDCT) * In-loop deblocking filter * Intra-frame prediction * Inverse quantization (IQ) * Variable-length decoding (VLD), more commonly known as slice-level acceleration * Spatial-temporal
deinterlacing Deinterlacing is the process of converting interlaced video into a non-interlaced or Progressive scan, progressive form. Interlaced video signals are commonly found in analog television, digital television (HDTV) when in the 1080i format, some D ...
and automatic interlace/ progressive source detection * Bitstream processing (
CAVLC Context-adaptive variable-length coding (CAVLC) is a form of entropy coding used in H.264/MPEG-4 AVC video encoding. It is an inherently lossless compression technique, like almost all entropy-coders. In H.264/MPEG-4 AVC, it is used to encode r ...
/ CABAC)


Current limitations

Besides not matching all of the features and function of
DxVA DirectX Video Acceleration (DXVA) is a Microsoft API specification for the Microsoft Windows and Xbox 360 platforms that allows video decoding to be hardware-accelerated. The pipeline allows certain CPU-intensive operations such as iDCT, motio ...
(which is the
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washin ...
equivalent
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
for
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ser ...
), and lacking support for other video formats than MPEG-2 in Linux device drivers from
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 seri ...
and
Nvidia Nvidia CorporationOfficially written as NVIDIA and stylized in its logo as VIDIA with the lowercase "n" the same height as the uppercase "VIDIA"; formerly stylized as VIDIA with a large italicized lowercase "n" on products from the mid 1990s to ...
, the ''XvMC API specification version 1.0'' currently also has these other limitations: * BOB and onefield are the only
deinterlacing Deinterlacing is the process of converting interlaced video into a non-interlaced or Progressive scan, progressive form. Interlaced video signals are commonly found in analog television, digital television (HDTV) when in the 1080i format, some D ...
methods that work with XvMC. * Picture in Picture (PiP) does not work with XvMC. * Stepping through the video frame by frame can cause artifacts with XvMC. * Editing a video is difficult to impossible with XvMC activated. * Lacking network transparency in the XvMC API * Lacking the ability for the client application to be completely independent of which client side library needs to be used (i.e. a unified wrapper library). VA API is a more modern video acceleration API which support the video acceleration features of modern GPUs.


See also

* X video extension (commonly referred to as just "XVideo" or "Xv") *
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
(commonly referred to as just "X11" or "X") * MIT-SHM - The MIT Shared Memory Extension for X11 * DirectX Video Acceleration (DxVA) API - Microsoft Windows equivalent to XvMC * Video Acceleration API (VA API) * OpenMAX IL (Open Media Acceleration Integration Layer) - a royalty-free cross-platform media abstraction API from the
Khronos Group The Khronos Group, Inc. is an open, non-profit, member-driven consortium of 170 organizations developing, publishing and maintaining royalty-free interoperability standards for 3D graphics, virtual reality, augmented reality, parallel computation ...
* X-Video Bitstream Acceleration (XvBA) * VDPAU (Video Decode and Presentation API for Unix) * Distributed Codec Engine (libcde) is a
Texas Instruments Texas Instruments Incorporated (TI) is an American technology company headquartered in Dallas, Texas, that designs and manufactures semiconductors and various integrated circuits, which it sells to electronics designers and manufacturers globa ...
API for the video codec engine in OMAP based embedded systems * Video Decode Acceleration Framework is
Apple Inc. Apple Inc. is an American multinational technology company headquartered in Cupertino, California, United States. Apple is the largest technology company by revenue (totaling in 2021) and, as of June 2022, is the world's biggest company ...
s API for hardware-accelerated decoding of H.264 on
Mac OS X macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
* VideoToolbox is an API from
Apple Inc. Apple Inc. is an American multinational technology company headquartered in Cupertino, California, United States. Apple is the largest technology company by revenue (totaling in 2021) and, as of June 2022, is the world's biggest company ...
for hardware-accelerated decoding on Apple TV and
Mac OS X macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
10.05 or later. It was originally undocumented, but Apple has since released documentation on it. * OpenVideo Decode (OVD) – a new open cross-platform video acceleration API from
AMD Advanced Micro Devices, Inc. (AMD) is an American multinational semiconductor company based in Santa Clara, California, that develops computer processors and related technologies for business and consumer markets. While it initially manufactur ...
. OpenVideo Decode (OVD) API


References


External links


X.Org FoundationThe XFree86 Project, Inc.freedesktop.orgThe Unichrome ProjectXvMC at MythTV's wiki
{{XWinSys Application layer protocols Application programming interfaces Freedesktop.org Video acceleration Video acceleration APIs available on Linux X Window extensions