Log in

View Full Version : Are the Avisynth resizers heavily threaded on an intra-frame level?


Mini-Me
2nd July 2012, 16:05
I'm writing a filter that invokes a resizing function in the constructor a relatively high number of times to obtain a bunch of resized clips (typically > 10, but dependent upon input parameters). I later call GetFrame(n, env) in a loop to obtain an array of resized frames. Should I be parallelizing that loop to help speed the process up, or do the resizers internally take advantage of any available cores anyway?

Gavino
2nd July 2012, 17:51
As far as I am aware, none of the internal Avisynth filters are multi-threaded in any way.

Mini-Me
2nd July 2012, 20:05
As far as I am aware, none of the internal Avisynth filters are multi-threaded in any way.

Yikes. That's good to know though...grabbing frames in parallel will be inferior from a load-balancing point of view, but at least it's something.

Thanks :)

Gavino
2nd July 2012, 21:23
Note that simply grabbing frames in parallel is not guaranteed to work as this requires all filters in the chain (including source filters) to be thread-safe.

What you can do is have a locking scheme to ensure only one frame is being fetched at a time, and then process the retrieved data in parallel.