Iteration Suites¶
Effects often iterate over all pixels in an image, filtering each one. By taking advantage of After Effects' iteration suites, you make it possible for After Effects to sub-allocate your task to as many processors are present, taking advantage of hardware-specific acceleration.
After Effects will also manage progress reporting and user cancellation automatically.
Use these suites! Make sure the pixel processing functions you pass to these iterator callbacks are re-entrant.
Note
The October 2021 SDK update increases the number of concurrent iterate threads up to the available system CPU cores instead of the previous hard-coded limit of 32.
PF_Iterate8Suite1, PF_Iterate16Suite1, PF_IterateFloatSuite1¶
Function |
Purpose |
---|---|
|
Iterates across pixels from a source image, alters them, and populates a destination image. You may specify a rectangular region of pixels across which to iterate; if you don't, After Effects will iterate over every overlapping pixel. You give a refcon, and the function is invoked with that refcon, plus the x and y coordinates of the current pixel, plus pointers to that pixel in the source and destination images. If you pass a NULL source, it will iterate over the dst. This function is quality independent. Don't depend upon the pixels being traversed in any particular order. The image may be subset to different CPUs, so consider all the parameters (except dst) to be read-only while After Effects is processing. This callback automatically includes progress and abort checking, so don't do so in your pixel function.
|
|
Lets you specify an offset from the input into the output. For example, if your output buffer is smaller than your input buffer, pass
|
|
If no LUT is passed, an identity LUT is used.
|
|
Allows for iteration across pixels outside the intersection of the source and destination layers. For these pixels, you will be passed a
|
|
Only call abort and progress functions from thread index 0. Note You can iterate over more than pixels. Internally, we use it for row-based image processing, and for once-per-entity updates of complex sequence data.
|