Average, 21 October 2005
Usage is
Average(clip, weight, clip, weight, clip, weight, ... ) #YV12 clips
For example, a simple average of clips alpha and beta is given by
Average(alpha, 0.5, beta, 0.5)
And for three clips
Average(alpha, 1.0/3, beta, 1.0/3, gamma, 1.0/3)
In action:
It uses (unoptimised) iSSE if present and otherwise falls back to C. On 720x576 source, the iSSE implementation runs at 500 FPS (2 clips), 270 FPS (4 clips) and 190 FPS (6 clips) on my Pentium 4/2400. (Measured, of course, by
AVSTimer.)
It is probably best to make sure the weights sum to one; the plug-in will work fine if they don't but the average may not make sense. Audio is always taken from the first clip.
This can be used as a temporal average by using arguments like:
Alpha.trim(1, 0) #next
Alpha
Alpha.trim(0, -1) + Alpha #previous
With a little script work, this can be combined with the scene detection built into Cel Background to avoid averaging over scene boundaries; I'll explain how if one of the scripters out there is interested.
This release was brought to you by the Association for the Prevention of Cruelty to TemporalSoften.
Edit: iSSE added -- read next posts.