Dogway / Avisynth-Scripts

AviSynth+ 3.7.3+ Filters
GNU General Public License v3.0
90 stars 12 forks source link

Add st param to functions using nnedi3cl #59

Closed DonCanjas closed 2 years ago

DonCanjas commented 2 years ago

Related to this: https://github.com/Asd-g/AviSynthPlus-NNEDI3CL/issues/3

In some systems, NNEDI3CL can raise cpu usage to 100% when running in multi-threaded mode. Having the option to force NNEDI3CL to run in single-threaded mode can be quite beneficial.

Dogway commented 2 years ago

Is there a way it can be reproduced? Minimal example.

DonCanjas commented 2 years ago

Apparently Asd-g was not able to reproduce it, so I'm not sure. It might just depend on your setup. I know that for me with this script, changing st to true will substancially reduce cpu usage while keeping a very similar performance

AVSMeter 3.0.9.0 (x64), (c) Groucho2004, 2012-2021
AviSynth+ 3.7.2 (r3682, 3.7, x86_64) (3.7.2.0)

Number of frames:                     2161
Length (hh:mm:ss.ms):         00:01:12.105
Frame width:                          1288
Frame height:                          720
Framerate:                          29.970 (30000/1001)
Colorspace:                           YV24
Audio channels:                          2
Audio bits/sample:                      32 (Float)
Audio sample rate:                   48000
Audio samples:                     3461057

Frames processed:                   2161 (0 - 2160)
FPS (min | max | average):          43.67 | 74.29 | 52.86
Process memory usage (max):         734 MiB
Thread count:                       64
CPU usage (average):                49.3%

Time (elapsed):                     00:00:40.882

[Script]

ColorBarsHD().Trim(0, 2160)

NNEDI3CL(1, nsize=3, nns=3, qual=1, pscrn=2, st=false)

Prefetch(6)
AVSMeter 3.0.9.0 (x64), (c) Groucho2004, 2012-2021
AviSynth+ 3.7.2 (r3682, 3.7, x86_64) (3.7.2.0)

Number of frames:                     2161
Length (hh:mm:ss.ms):         00:01:12.105
Frame width:                          1288
Frame height:                          720
Framerate:                          29.970 (30000/1001)
Colorspace:                           YV24
Audio channels:                          2
Audio bits/sample:                      32 (Float)
Audio sample rate:                   48000
Audio samples:                     3461057

Frames processed:                   2161 (0 - 2160)
FPS (min | max | average):          6.393 | 263158 | 53.49
Process memory usage (max):         735 MiB
Thread count:                       64
CPU usage (average):                8.6%

Time (elapsed):                     00:00:40.398

[Script]

ColorBarsHD().Trim(0, 2160)

NNEDI3CL(1, nsize=3, nns=3, qual=1, pscrn=2, st=true)

Prefetch(6)
marukuru commented 2 years ago

I did a pull request for this, had similar issues with NNEDI3CL (thou also crashes), and st=true seems to fix it.

Dogway commented 2 years ago

Ok, will merge if Asd-g doesn't solve issue 6 by end of week. Self-reminder to also update SMDegrain, SharpenersPack, ChromaReconstructorMod, and TransformsPack - Main.

Dogway commented 2 years ago

Check if commit fixed it

Dogway commented 2 years ago

Solved: https://github.com/Asd-g/AviSynthPlus-NNEDI3CL/issues/6#issuecomment-1255608239

Open back if you get any issues.