Skip to content

vdxa_3dbasics

shekh edited this page Apr 15, 2018 · 1 revision

VirtualDub Plugin SDK 1.2

3D Basics

Modern 3D graphics accelerators support a very large and powerful feature set. Not all of these features are useful for accelerating video rendering, so the VDXA API wraps the useful ones.

General flow

All image data processed by VDXA-based routines comes through textures, which are rectangular 2D images. These are processed through a fragment program, which describes a program to process the textures into an output image. Numeric constants allow the CPU-based routine to tweak processing in the fragment program. The result from the fragment program is written into render target, which is then either copied down to the CPU for final processing or recycled as a texture input to another pass.

In standard operation, a video filter is responsible for processing every pixel from source pixmap to destination. With the VDXA, the filter never touches any of the image data — all processing is done by directing the graphics accelerator to process images through fragment programs. Not only can this be significantly faster than CPU-based processing, but the graphics accelerator can also run in parallel to other CPU-based routines.

Relationship to platform API

In order to simplify the API, VDXA only exposes a subset of the operations normally supported by a 3D graphics accelerator. Although VDXA exposes fragment programs (pixel shaders), textures, and render targets, it does not expose vertex programs (vertex shaders), triangular geometry, alpha blending, alpha testing, depth/stencil testing, or lighting. While this means VDXA cannot be used for rendering 3D objects, it also means that VDXA is better tailored for video processing.

The VDXA implementation also takes care of some annoyances at the platform level. Power of two size restrictions are related at the VDXA level, and the implementation also automatically handles detection, handling, and recovery from lost devices when Direct3D 9 is used as the underlying API.

VirtualDub specific: The VDXA API is mapped to the Direct3D 9 API in 1.9.X and 1.10.0. Starting with 1.10.1, Direct3D 9Ex is used if available.


Copyright (C) 2007-2012 Avery Lee.

Clone this wiki locally