ref_vfmethod_paramProc - shekh/VirtualDub2 GitHub Wiki
VirtualDub Plugin SDK 1.2
paramProc video filter method
Initializes a filter's per-instance data.
long paramProc(VDXFilterActivation *fa, const VDXFilterFunctions *ff);
fa | Pointer to filter activation structure. |
ff | Pointer to callback function structure. |
This method is not thread-safe.
This function must not throw exceptions (see Except()).
A bitfield indicating filter behavior:
FILTERPARAM_SWAP_BUFFERS
The input and output buffers must be distinct. If this flag is absent,
they overlap (in-place mode).
FILTERPARAM_NEEDS_LAST
V1-V15 only: Enables a third buffer containing the previous input
frame to the filter. This flag is prohibited in V16+.
FILTERPARAM_HAS_LAG(count)
V7+ only: Indicates that the filter's output lags behind its input
by the specified number of frames.
FILTERPARAM_SUPPORTS_ALTFORMATS
V12+ only: The filter supports formats other than 32-bit RGB. This
flag is required starting with V16.
FILTERPARAM_NOT_SUPPORTED
V12+ only: The filter does not support the given input format. Note
that this flag should not be combined with any other values, as it sets
all bits.
FILTERPARAM_ALIGN_SCANLINES
V14+ only: All source and output scanlines are guaranteed to be
aligned to 16-byte boundaries and to be readable/writable to the next
16-byte boundary. This is useful for fast SSE optimized routines.
FILTERPARAM_PURE_TRANSFORM
V14+ only: The filter has no side effects and produces output that
is solely dependent upon the source frame data and configuration
parameters. In particular, running the filter on the same source frames
will produce the same output, even if the filter is run multiple times
to produce the same output frame, and even if the output frame numbers
are different. This allows the host to deduce when two output frames
would be the same and optimize the output appropriately.
If omitted, a return value of FILTERPARAM_SWAP_BUFFERS
is assumed.
paramProc
can be called relatively frequently when the user is
arranging filter order, so it should not take a long time to execute.
The function should also be robust to improper frame sizes, such as 1x2
bitmaps -- frame size validation should be handled in startProc
instead.
![]() |
![]() Be careful when setting fa->dst.offset . In a two-buffer filter, the destination buffer offset should be set to zero, unless the filter creates a larger image and returns a subrectangle of it. However, in an in-place filter, the destination offset must be at least as much as the source offset, and if the destination image is the same size, it must be exactly the same. Setting it to zero in an in-place filter can result in x1/y2 cropping not working correctly in VirtualDub's filter chain. |
V12+ only: Setting the depth
field of the destination bitmap to
zero activates the mpPixmapLayout
field and allows formats other than
32-bit RGB.
V12+ only: Setting the mpPixmapLayout->pitch
field to zero tells
the host to compute appropriate pitch and offset parameters. In this
case, only the width, height, and format fields are used.
Copyright (C) 2007-2012 Avery Lee.