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 ...
. The XvMC API allows video programs to offload portions of the
video decoding A video decoder is an electronic circuit, often contained within a single integrated circuit chip, that converts base-band analog video signals to digital video. Video decoders commonly allow programmable control over video characteristics such a ...
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, mob ...
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 MPEG-2 (a.k.a. H.222/H.262 as was defined by the ITU) is a standard for "the generic coding of moving pictures and associated audio information". It describes a combination of lossy video compression and lossy audio data compression methods, w ...
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 MPEG-2 (a.k.a. H.222/H.262 as was defined by the ITU) is a standard for "the generic coding of moving pictures and associated audio information". It describes a combination of lossy video compression and lossy audio data compression methods, w ...
but also
MPEG-4 ASP MPEG-4 Part 2, MPEG-4 Visual (formally ISO/ IEC 14496-2) is a video compression format developed by the Moving Picture Experts Group (MPEG). It belongs to the MPEG-4 ISO/IEC standards. It uses block-wise motion compensation and a discrete cosine ...
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 ...
,
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 dig ...
, 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, mob ...
capable of XvMC video acceleration requires a X11 software
device driver In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabling operating systems and o ...
to enable these features.


Hardware manufacturers


Nvidia

There are currently three X11 Nvidia drivers available: a 2D-only
open source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
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. 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 A brand is a name, term, design, symbol or any other feature that distinguishes one seller's good or service from those of other sellers. Brands are used in business, marketing, and advertising for recognition and, ...
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 MPEG-2 (a.k.a. H.222/H.262 as was defined by the ITU) is a standard for "the generic coding of moving pictures and associated audio information". It describes a combination of lossy video compression and lossy audio data compression methods, w ...
and
MPEG-4 ASP MPEG-4 Part 2, MPEG-4 Visual (formally ISO/ IEC 14496-2) is a video compression format developed by the Moving Picture Experts Group (MPEG). It belongs to the MPEG-4 ISO/IEC standards. It uses block-wise motion compensation and a discrete cosine ...
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 Radeon () is a brand of computer products, including graphics processing units, random-access memory, RAM disk software, and solid-state drives, produced by Radeon Technologies Group, a division of AMD. The brand was launched in 2000 by ATI Tec ...
-4000 cards (which have UVD) 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 MPEG-2 (a.k.a. H.222/H.262 as was defined by the ITU) is a standard for "the generic coding of moving pictures and associated audio information". It describes a combination of lossy video compression and lossy audio data compression methods, w ...
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 In computing, a windowing system (or window system) is software that manages separately different parts of display screens. It is a type of graphical user interface (GUI) which implements the WIMP (windows, icons, menus, pointer) paradigm for a ...
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 ...
*
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 dig ...
(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, mob ...
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. T ...
,
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 porti ...
, and VAAPI: *
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 ...
3:2 and 2:2 pull-down correction * Inverse
modified discrete cosine transform The modified discrete cosine transform (MDCT) is a transform based on the type-IV discrete cosine transform (DCT-IV), with the additional property of being lapped: it is designed to be performed on consecutive blocks of a larger dataset, where ...
(iMDCT) * In-loop
deblocking filter A deblocking filter is a video filter applied to decoded compressed video to improve visual quality and prediction performance by smoothing the sharp edges which can form between macroblocks when block coding techniques are used. The filter aim ...
* 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 form. Interlaced video signals are commonly found in analog television, digital television (HDTV) when in the 1080i format, some DVD titles, and a ...
and automatic interlace/
progressive Progressive may refer to: Politics * Progressivism, a political philosophy in support of social reform ** Progressivism in the United States, the political philosophy in the American context * Progressive realism, an American foreign policy pa ...
source detection * Bitstream processing ( CAVLC/ CABAC)


Current limitations

Besides not matching all of the features and function of DxVA (which is the
Microsoft Microsoft Corporation is an American multinational corporation, multinational technology company, technology corporation producing Software, computer software, consumer electronics, personal computers, and related services headquartered at th ...
equivalent API 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 ...
), and lacking support for other video formats than
MPEG-2 MPEG-2 (a.k.a. H.222/H.262 as was defined by the ITU) is a standard for "the generic coding of moving pictures and associated audio information". It describes a combination of lossy video compression and lossy audio data compression methods, w ...
in Linux device drivers from
Intel Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the devel ...
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 form. Interlaced video signals are commonly found in analog television, digital television (HDTV) when in the 1080i format, some DVD titles, and a ...
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 The X video extension, often abbreviated as XVideo or Xv, is a video output mechanism for the X Window System. The protocol was designed by David Carver; the specification for version 2 of the protocol was written in July 1991. It is mainly us ...
(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 ...
(commonly referred to as just "X11" or "X") *
MIT-SHM The MIT Shared Memory Extension or MIT-SHM or XShm is an X Window System extension for exchange of image data between client and server using shared memory (usually ). The mechanism only works when both pieces are on the same computer. The basic ...
- 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 computat ...
* 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 The OMAP (Open Multimedia Applications Platform) family, developed by Texas Instruments, was a series of image/ video processors. They are proprietary system on chips (SoCs) for portable and mobile multimedia applications. OMAP devices generall ...
based embedded systems *
Video Decode Acceleration Framework Video is an electronic medium for the recording, copying, playback, broadcasting, and display of moving visual media. Video was first developed for mechanical television systems, which were quickly replaced by cathode-ray tube (CRT) systems ...
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 lapt ...
* 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 An apple is an edible fruit produced by an apple tree (''Malus domestica''). Apple trees are cultivated worldwide and are the most widely grown species in the genus '' Malus''. The tree originated in Central Asia, where its wild ancestor, ...
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 lapt ...
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. 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