Log in

View Full Version : Need help understanding Avisynth MT mode


Ykara
29th September 2023, 04:31
Hi all,

Bit of a newb when it comes to Avisynth and still learning. Doing some deinterlacing, levels adjustment, upscaling using Avisynth+ and don't understand MT. I have 6 physical cores, 12 threads on my CPU.

From what I am read online just putting prefetch(X) should enable MT mode, but other places I have read I need to use SetFilterMTMode.

I read the wiki page http://avisynth.nl/index.php/SetFilterMTMode

And it mentions

The following script contains MT modes for various plugins, save it as mtmodes.avsi and place in your auto-load folder. The script is a work-in-progess, there's still lots of plugins that need to be tested and validated. When the script is finalized, the only thing the user will have to write in his script is the Prefetch call, all SetFilterMtMode calls will be hidden in a single .avsi script.

But the script does not contain references to QTGMC, or the upscaler etc. So I am.really confused on what the proper way is.

Do I need SetFilterMTMode?

DTL
29th September 2023, 11:45
It depends on both plugins you use and plugins settings.

1. If your plugin auto-register itself with correct MT mode you not need to set MT mode in script.
2. If your plugin not auto-register itself with correct MT mode (and it cause issues) - you can try to set and/or force MT mode for this plugin with that command.

Some plugins may require different MT mode depend on processing mode to work correctly. Example: temporal convolution processing only can work in MT_SERIALIZED (with reading correct frame numbers in time axis for current dispatch thread). But it is sort of slowest MT mode for frame-based MT in AVS+ core, so for better performance you can use faster MT mode if it still provide correct processing.