DirectX Video Acceleration

Last updated

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, motion compensation and deinterlacing to be offloaded to the GPU. DXVA 2.0 allows more operations, including video capturing and processing operations, to be hardware-accelerated as well.

Contents

DXVA works in conjunction with the video rendering model used by the video card. DXVA 1.0, which was introduced as a standardized API with Windows 2000 and is currently available on Windows 98 or later, can use either the overlay rendering mode or VMR 7/9. [1] DXVA 2.0, available only on Windows Vista, Windows 7, Windows 8 and later OSs, integrates with Media Foundation (MF) and uses the Enhanced Video Renderer (EVR) present in MF. [1]

Overview

The DXVA is used by software video decoders to define a codec-specific pipeline for hardware-accelerated decoding and rendering of the codec. The pipeline starts at the CPU which is used for parsing the media stream and conversion to DXVA-compatible structures. DXVA specifies a set of operations that can be hardware-accelerated and device driver interfaces (DDIs) that the graphic driver can implement to accelerate the operations. If the codec needs to do any of the defined operations, it can use these interfaces to access the hardware-accelerated implementation of these operations. If the graphic driver does not implement one or more of the interfaces, it is up to the codec to provide a software fallback for it. The decoded video is handed over to the hardware video renderer, where further video post-processing might be applied to it before being rendered to the device. The resulting pipeline is usable in a DirectShow-compatible application.

DXVA specifies the Motion Compensation DDI, which specifies the interfaces for iDCT operations, Huffman coding, motion compensation, alpha blending, inverse quantization, color space conversion and frame-rate conversion operations, among others. [2] [3] It also includes three sub-specifications: Deinterlacing DDI, COPP DDI and ProcAmp DDI. [4] The Deinterlacing DDI specifies the callbacks for deinterlacing operations. The COPP (Certified Output Protection Protocol) DDI functions allow the pipeline to be secured for DRM-protected media, by specifying encryption functions. The ProcAmp DDI is used to accelerate post-processing video. The ProcAmp driver module sits between the hardware video renderer and the display driver, and it provides functions for applying post-processing filters on the decompressed video.

The functions exposed by DXVA DDIs are not accessible directly by a DirectShow client, but are supplied as callback functions to the video renderer. As such, the renderer plays a very important role in anchoring the pipeline.

DXVA on Windows Vista and later

DXVA 2.0 enhances the implementation of the video pipeline and adds a host of other DDIs, including a Capture DDI for video capture. The DDIs it shares with DXVA 1.0 are also enhanced with the ability to use hardware acceleration of more operations. Also, the DDI functions are directly available to callers and need not be mediated by the video renderer. [5] As such, a program can also create a pipeline for simply decoding the media (without rendering) or post-processing and rendering (without decoding). These features require the Windows Display Driver Model drivers, which limits DXVA 2.0 to Windows Vista, Windows Server 2008, [1] [5] Windows 7, Windows Server 2008 R2 and Windows 8. On Windows XP and Windows 2000, programs can use DXVA 1.0. DXVA 2.0 allows Enhanced Video Renderer as the video renderer only on Vista, Windows 7, and Windows 8. [1] (With Windows XP, DXVA-Rendering is possible with VMR9 and the well-known Overlay Mixer.) DXVA integrates with Media Foundation and allows DXVA pipelines to be exposed as Media Foundation Transforms (MFTs). Even decoder pipelines or post-processing pipelines can be exposed as MFTs, which can be used by the Media Foundation topology loader to create a full media playback pipeline. DXVA 1.0 is emulated using DXVA 2.0. [1] DXVA 2.0 does not include the COPP DDI, rather it uses PVP for protected content. Windows 7 implements DXVA-HD [6] if the driver complies with WDDM 1.1.

DXVA2 implementations: native and copy-back

DXVA2 implementations come in two variants: native and copy-back.

With native implementation, the decoded video stays in GPU memory until it has been displayed. The video decoder must be connected to the video renderer with no intermediary processing filter. The video renderer must also support DXVA, which gives less freedom in the choice of renderers.

With copy-back implementation, the decoded video is copied from GPU memory back to the CPU's memory. This implementation doesn't have the limitations mentioned above and acts similarly to a normal software decoder; however, video stuttering will occur if the GPU is not fast enough to copy its memory back to the CPU's memory.

Native mode is advantageous unless there is a need for customized processing, as the additional copy-back operations will increase GPU memory load. [7]

Software

See also

Related Research Articles

Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware acceleration if it is available on the graphics card, allowing for hardware acceleration of the entire 3D rendering pipeline or even only partial acceleration. Direct3D exposes the advanced graphics capabilities of 3D graphics hardware, including Z-buffering, W-buffering, stencil buffering, spatial anti-aliasing, alpha blending, color blending, mipmapping, texture blending, clipping, culling, atmospheric effects, perspective-correct texture mapping, programmable HLSL shaders and effects. Integration with other DirectX technologies enables Direct3D to deliver such features as video mapping, hardware 3D rendering in 2D overlay planes, and even sprites, providing the use of 2D and 3D graphics in interactive media ties.

<span class="mw-page-title-main">Graphics processing unit</span> Specialized electronic circuit; graphics accelerator

A graphics processing unit (GPU) is a specialized electronic circuit initially designed to accelerate computer graphics and image processing. After their initial design, GPUs were found to be useful for non-graphic calculations involving embarrassingly parallel problems due to their parallel structure. Other non-graphical uses include the training of neural networks and cryptocurrency mining.

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 used today to resize video content in the video controller hardware in order to enlarge a given video or to watch it in full screen mode. Without XVideo, X would have to do this scaling on the main CPU. That requires a considerable amount of processing power, which could slow down or degrade the video stream; video controllers are specifically designed for this kind of computation, so can do it much more cheaply. Similarly, the X video extension can have the video controller perform color space conversions, and change the contrast, brightness, and hue of a displayed video stream.

SMPTE 421, informally known as VC-1, is a video coding format. Most of it was initially developed as Microsoft's proprietary video format Windows Media Video 9 in 2003. With some enhancements including the development of a new Advanced Profile, it was officially approved as a SMPTE standard on April 3, 2006. It was primarily marketed as a lower-complexity competitor to the H.264/MPEG-4 AVC standard. After its development, several companies other than Microsoft asserted that they held patents that applied to the technology, including Panasonic, LG Electronics and Samsung Electronics.

The Intel Graphics Media Accelerator (GMA) is a series of integrated graphics processors introduced in 2004 by Intel, replacing the earlier Intel Extreme Graphics series and being succeeded by the Intel HD and Iris Graphics series.

Desktop Window Manager is the compositing window manager in Microsoft Windows since Windows Vista that enables the use of hardware acceleration to render the graphical user interface of Windows.

X-Video Motion Compensation (XvMC), is an extension of the X video extension (Xv) for the X Window System. The XvMC API allows video programs to offload portions of the video decoding process to the GPU 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 and inverse discrete cosine transform (iDCT) for MPEG-2 video. XvMC also supports offloading decoding of mo comp, iDCT, and VLD for not only MPEG-2 but also MPEG-4 ASP video on VIA Unichrome hardware.

ATI Avivo is a set of hardware and low level software features present on the ATI Radeon R520 family of GPUs and all later ATI Radeon products. ATI Avivo was designed to offload video decoding, encoding, and post-processing from a computer's CPU to a compatible GPU. ATI Avivo compatible GPUs have lower CPU usage when a player and decoder software that support ATI Avivo is used. ATI Avivo has been long superseded by Unified Video Decoder (UVD) and Video Coding Engine (VCE).

CoreAVC was a proprietary codec for decoding the H.264/MPEG-4 AVC video format.

Windows Display Driver Model (WDDM) is the graphic driver architecture for video card drivers running Microsoft Windows versions beginning with Windows Vista.

Media Foundation (MF) is a COM-based multimedia framework pipeline and infrastructure platform for digital media in Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, and Windows 11. It is the intended replacement for Microsoft DirectShow, Windows Media SDK, DirectX Media Objects (DMOs) and all other so-called "legacy" multimedia APIs such as Audio Compression Manager (ACM) and Video for Windows (VfW). The existing DirectShow technology is intended to be replaced by Media Foundation step-by-step, starting with a few features. For some time there will be a co-existence of Media Foundation and DirectShow. Media Foundation will not be available for previous Windows versions, including Windows XP.

Unified 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.

PureVideo is Nvidia's hardware SIP core that performs video decoding. PureVideo is integrated into some of the Nvidia GPUs, and it supports hardware decoding of multiple video codec standards: MPEG-2, VC-1, H.264, HEVC, and AV1. PureVideo occupies a considerable amount of a GPU's die area and should not be confused with Nvidia NVENC. In addition to video decoding on chip, PureVideo offers features such as edge enhancement, noise reduction, deinterlacing, dynamic contrast enhancement and color enhancement.

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 (GPU). It is implemented by the free and open-source library libva, combined with a hardware-specific driver, usually provided together with the GPU driver.

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 portions of the video decoding process to the GPU video-hardware. Currently, the portions designed to be offloaded by XvBA onto the GPU are currently motion compensation (MC) and inverse discrete cosine transform (IDCT), and variable-length decoding (VLD) for MPEG-2, MPEG-4 ASP, MPEG-4 AVC (H.264), WMV3, and VC-1 encoded video.

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.

Direct2D is a 2D vector graphics application programming interface (API) designed by Microsoft and implemented in Windows 10, Windows 8, Windows 7 and Windows Server 2008 R2, and also Windows Vista and Windows Server 2008.

Microsoft RemoteFX is a Microsoft brand name that covers a set of technologies that enhance visual experience of the Microsoft-developed remote display protocol Remote Desktop Protocol (RDP). RemoteFX was first introduced in Windows Server 2008 R2 SP1 and is based on intellectual property that Microsoft acquired and continued to develop since acquiring Calista Technologies. It is a part of the overall Remote Desktop Services workload.

Intel Quick Sync Video is Intel's brand for its dedicated video encoding and decoding hardware core. Quick Sync was introduced with the Sandy Bridge CPU microarchitecture on 9 January 2011 and has been found on the die of Intel CPUs ever since.

<span class="mw-page-title-main">Distributed Codec Engine</span>

Distributed Codec Engine (DCE) is an API and its implementation as software library ("libdce") by Texas Instruments. The library was released under the Revised BSD License and some additional terms.

References

  1. 1 2 3 4 5 "DirectX Video Acceleration 2.0" . Retrieved 2007-10-24.
  2. "Introduction to DirectX VA". Archived from the original on 2008-04-23. Retrieved 2007-10-24.
  3. "Microsoft DirectX Video Acceleration (DirectX VA) support" . Retrieved 2007-10-24.
  4. "DirectX Video Acceleration". Archived from the original on 2008-04-08. Retrieved 2007-10-24.
  5. 1 2 "What's New in DirectShow" . Retrieved 2007-10-24.
  6. "DXVA-HD (Windows)". msdn.microsoft.com. Retrieved 21 April 2018.
  7. S, Ganesh T. "ASRock's High-End Vision 3D 252B HTPC Review". anandtech.com. Retrieved 21 April 2018.
  8. "CoreAVC Changelog | CoreCodec". Archived from the original on 2011-07-04. Retrieved 2011-04-09.
  9. "Daum tv팟". tvpot.daum.net. Archived from the original on 22 May 2017. Retrieved 21 April 2018.
  10. "VLC GPU Decoding - VideoLAN Wiki". wiki.videolan.org. Retrieved 21 April 2018.
  11. "How to turn off the hardware acceleration on Windows Media Player".