Topic: NVOF Memory Leak when the number of CPU threads are less than three
I found that NVOF has a memory leak when the Number of CPU threads is set to less than three.
When set to less than three CPU threads, SVP will function properly for a few minutes, and then the screen will start having green flashes until avisynth crashes.
The memory leak still happens even when 1. the total prefetch frames are higher than three and 2. the CPU threads are still less than three (i.e. ff_add=4 and threads=2).
I updated Avisynth to 3.6.1, and it still had the same memory leak.
I use SVP with a capture card, so I am always looking for a way to reduce latency. As a result, I try to keep my prefetched frames at a minimum. As a result, the lowest possible would be 3 prefetched frames because of three cpu threads.
From what I can tell the NVOF implementation requires a minimum of three cpu threads to operate. But I found a way to lower the number of prefetched frames in avisynth while still giving NVOF at least three threads.
Warning: Don't do this unless you know what you're doing. Likewise, I'm not using resize, colorspace conversion, or any other avisynth features. I'm also using a capture card that the video stream is in RAW. And I use a light, but very fast, renderer. So this is VERY limited.
I modified the generate.js and set a specific prefetch number. I also kept the CPU threads higher than three.
No memory leak, no green flashes, and I've been able to reduce may total input latency to less than 35ms.
Edit: Don't set the prefetch too low or you'll get some strange audio distortions.