-
Notifications
You must be signed in to change notification settings - Fork 12
vdxa_3dbasics
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.
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.
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.
Setting up your development environment
Conventions
Plugin initialization
Dynamic loading
Reference counting
Using CPU extensions
Introduction
What's new
Breaking changes
Gotchas
Deprecated features
Migrating from the old Filter SDK
Programming model
Handling bitmaps
Creating a video filter
Setting filter parameters
Processing video frames
Managing filter data
Creating time-varying filters
Handling aspect ratio
Prefetching multiple source frames
Handling multiple sources
Making a filter configurable
Scripting support
CPU dependent optimization
VDXA index omitted
Getting started
Writing the module entry point
Creating a video filter
Adding configurability
Adding script support
Introduction
What's new
Autodetect
Direct mode
Video frames vs. samples
Video decodint model
Video decoder