View Single Post
Old 9th April 2018, 19:38   #2  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
Suggestions:

1. Do tests to see if you must process everything at HD levels. See if you can tell any difference between SD (720x480) and higher resolutions when dealing with 8mm or Super 8 material. I do the capture with my Sony FX-1, which is HD, but then do a down-conversion in the camera and output, process, and deliver as SD.

2. Fully enable multi-threading. You didn't say what version of AVISynth you are using, but since I see a SetFilterMTMode() statement, I assume you are using AVISynth+. To get the best multi-threading performance, you need to specify this setting for each call from each plugin you are using. For instance, for MVTools2, these are some of the statements that need to be added:

Code:
#########################################
# Filters from MVTools v2.6.0.5 (from http://forum.doom9.org/showthread.php?p=1386559#post1386559 ) Tested On 2016/03/06
SetFilterMTMode("MDegrain2",     MT_MULTI_INSTANCE) 
SetFilterMTMode("MSuper",              MT_MULTI_INSTANCE)
SetFilterMTMode("MAnalyse",            MT_MULTI_INSTANCE)
SetFilterMTMode("MFlowFps",            MT_MULTI_INSTANCE)
SetFilterMTMode("MRecalculate",        MT_MULTI_INSTANCE)
#########################################
Even with this code, you still won't get multi-threading until you add the following as the last line in your script (before your function definitions):

Prefetch(threads)

where "threads" is a variable you define that has the number of multi-threading cores you are going to use. If you have an 8-core computer, start out with threads=4 and work up from there. Since I don't see this line in your code, you are not getting any multi-threading. Start by adding this line and see if you don't get a 2x or more speed improvement.

3. Use a smaller block overlap. Block size and overlap make a HUGE difference in script performance. At the risk of making a generalization that isn't always true, larger block size is good when doing frame rate changes (such as changing the output speed) and smaller block sizes (even as small as 4) are good for denoising.

4. I optimized my version of VideoFred's script for speed, so you might want to consider using that. However, while I have a private version that uses GamMac, I don't have it working to my satisfaction, so I haven't uploaded it. But, you could try my old script.

I think that #2 is probably what you will be most interested in, given how you asked your question. Play around with that Prefetch command. It has to be the last line and I'd start by adding it directly after the Eval() statement. Others will let you know if that is the correct place for it.
johnmeyer is offline   Reply With Quote