1 (edited by max_pla3 25-05-2015 22:21:08)

Topic: Performance issue with an AviSynth script

I have performance issues with the following AviSynth script:

SetMemoryMax(1024)

LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\svpflow1.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\svpflow2.dll")

threads=2
SetMTMode(3,threads)
FFmpegSource2(FULL_PATH_TO_FILE)
SetMTMode(2)

orig_fps=FrameRate()

super_params="{gpu:1}"
super = SVSuper(super_params)

analyse_params="{}"
vectors = SVAnalyse(super, analyse_params)

smoothfps_params="{rate:{num:2,den:1}}"
SVSmoothFps(super, vectors, smoothfps_params, url="www.svp-team.com", mt=threads)

AssumeFPS(orig_fps)

It should slow down the video by a factor of two. The problem is that even a 720p video is not rendered with 60fps, if I comment out the last line.
BUT: Using the SVP Manager and MPC-HC, I can view the very same video with approx. 100 fps, if I increase the playback speed in the player.

What could be the issue?

In MPC-HC the EVR is already selected.

Re: Performance issue with an AviSynth script

too low threads count

Re: Performance issue with an AviSynth script

Thanks for the reply. The thing is that I see no difference between 2, 8 or even 16 threads. My CPU is an i7 860 with 4 Cores + HT. The GPU is a 7970.
In the task manager I see that the CPU is loaded to about 12% which corresponds to 1/8 of the total possible load. So this means that actually only on thread is shared across all cores. This is the case regardless of whether the gpu is enabled or not (gpu:0/1) and independent of the defined thread number in the script.

Now if I let the SVP Manager do the work, the load can increase up to 40%, denepnding on the clip, and the playback is smooth.

So the problem seems to be that my AviSynth script is not multithreaded despite SetMTMode(3,8). Any hint?

Thank you!

Re: Performance issue with an AviSynth script

you may need to add "distributor()" at the end

Re: Performance issue with an AviSynth script

Chainik wrote:

you may need to add "distributor()" at the end

Works perfectly! Many thanks! Just made a donation for this great software and support.