-
Notifications
You must be signed in to change notification settings - Fork 12
ref_iface_IVDXVideoDecoder_SetTargetFormat
VirtualDub Plugin SDK 1.2
IVDXVideoDecoder interface
Sets the desired image format for decoded frames.
bool SetTargetFormat(int format, bool useDIBAlignment);
format | Desired format for decoded frame. This must be one of the values from the VDXPixmapFormat enumeration. If it is zero (unknown), the default format is selected. |
useDIBAlignment | Set if the frame buffer should conform to Windows DIB layout. This is used to avoid extra memory copies when a DIB is required. For RGB formats, the bitmap should be stored bottom-up with scanlines aligned to doubleword boundaries, i.e. pitch = -4*ceil(width * bitdepth / 32) . For YCbCr formats, the bitmap should be stored top-down with scanlines having byte alignment, i.e. pitch = ceil(width * bitdepth / 8) . |
This method is not thread-safe.
Errors may not be returned from this function (see SetError()).
True if the format was successfully changed, or false if the format is not supported.
After SetTargetFormat() succeeds, the decoder state is reset as if Reset() were called.
SetTargetFormat(0)
allows the decoder to select the most appropriate
format for decoding, usually the one that is closest to the native
decoded format of the compressed stream. A SetTargetFormat(0)
call
should never fail, because that would mean no formats are supported for
decoding (which would be useless).
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