Playing around with the filter atm. and the first real downer is that it requires to turn off the MT support.
Code: Select all
SetMemoryMax(768)
SetMTMode(5,8) # change MT mode
LoadPlugin("G:\Hybrid\avisynthPlugins\LSMASHSource.dll")
LoadPlugin("G:\Hybrid\avisynthPlugins\DGDenoise.dll")
LWLibavVideoSource("F:\TestClips&Co\Transformers - 1080p Sample.mkv",cache=false)
SetMTMode(6) # change MT mode
ConvertToRGB32(interlaced=false)
DGDenoise()
return last
simply is stuck and
Code: Select all
LoadPlugin("G:\Hybrid\avisynthPlugins\LSMASHSource.dll")
LoadPlugin("G:\Hybrid\avisynthPlugins\DGDenoise.dll")
LWLibavVideoSource("F:\TestClips&Co\Transformers - 1080p Sample.mkv",cache=false)
ConvertToRGB32(interlaced=false)
DGDenoise()
return last
works fine.
On the other hand:
Code: Select all
SetMTMode(5,8) # change MT mode
LoadPlugin("G:\Hybrid\avisynthPlugins\LSMASHSource.dll")
LoadPlugin("G:\Hybrid\avisynthPlugins\KNLMeansCL.dll")
LWLibavVideoSource("F:\TestClips&Co\Transformers - 1080p Sample.mkv",cache=false)
SetMTMode(5) # change MT mode
KNLMeansCL(device_type = "GPU", device_id = 1)
return last
works fine, sure as long as one only uses DGDenoise or KNLMeansCL it doesn't really matter since instead of using MT with mode 5 it's faster to disable MT, but when using a script with multiple filters, MT compatibility would be nice.
----
using:
Code: Select all
LoadPlugin("G:\Hybrid\avisynthPlugins\LSMASHSource.dll")
LoadPlugin("G:\Hybrid\avisynthPlugins\KNLMeansCL.dll")
LoadPlugin("G:\Hybrid\avisynthPlugins\DGDenoise.dll")
src = LWLibavVideoSource("F:\TestClips&Co\Transformers - 1080p Sample.mkv",cache=false)
src = src.Crop(0,140,0,-140)
knl = src.KNLMeansCL(device_type="GPU")
knl = knl.ConvertToRGB32(interlaced=false)
src = src.ConvertToRGB32(interlaced=false)
dg = src.DGDenoise()
StackVertical(StackHorizontal(knl, dg), StackHorizontal(src, src))
return last
to compare the effect at the default values of DGDenoise and KNLMeansCL one clearly sees that using the default values DGDenoise is WAY more aggressive.
Settings strength=0.2 seems to produce more similar effects.
Running a small benchmark using AVSMeter:
Code: Select all
LoadPlugin("G:\Hybrid\avisynthPlugins\LSMASHSource.dll")
LoadPlugin("G:\Hybrid\avisynthPlugins\DGDenoise.dll")
LWLibavVideoSource("F:\TestClips&Co\Transformers - 1080p Sample.mkv",cache=false)
ConvertToRGB32(interlaced=true)
DGDenoise(strength=0.2)
return last
gives:
Code: Select all
AviSynth 2.60, build:Feb 20 2015 [03:16:45] (2.6.0.5)
Number of frames: 1081
Length (hh:mm:ss.ms): 00:00:45.087
Frame width: 1920
Frame height: 1080
Framerate: 23.976 (24000/1001)
Colorspace: RGB32
Active MT Mode: 0
Frames processed: 1081 (0 - 1080)
FPS (min | max | average): 46.97 | 66.71 | 65.38
Memory usage (phys | virt): 333 | 327 MiB
Thread count: 18
CPU usage (average): 22%
GPU core clock / memory clock: 1025 / 1652
GPU usage (average): 24%
VPU usage (average): 0%
GPU memory usage: 1536 MiB
Time (elapsed): 00:00:16.535
with kernel=2 (same strength) I get:
Code: Select all
AviSynth 2.60, build:Feb 20 2015 [03:16:45] (2.6.0.5)
Number of frames: 1081
Length (hh:mm:ss.ms): 00:00:45.087
Frame width: 1920
Frame height: 1080
Framerate: 23.976 (24000/1001)
Colorspace: RGB32
Active MT Mode: 0
Frames processed: 1081 (0 - 1080)
FPS (min | max | average): 8.363 | 16.19 | 15.87
Memory usage (phys | virt): 333 | 328 MiB
Thread count: 15
CPU usage (average): 5%
GPU core clock / memory clock: 1215 / 1753
GPU usage (average): 82%
VPU usage (average): 0%
GPU memory usage: 1536 MiB
Time (elapsed): 00:01:08.105
and with kernel = 1 (same strength) I get:
Code: Select all
AviSynth 2.60, build:Feb 20 2015 [03:16:45] (2.6.0.5)
Number of frames: 1081
Length (hh:mm:ss.ms): 00:00:45.087
Frame width: 1920
Frame height: 1080
Framerate: 23.976 (24000/1001)
Colorspace: RGB32
Active MT Mode: 0
Frames processed: 1081 (0 - 1080)
FPS (min | max | average): 49.52 | 73.35 | 70.73
Memory usage (phys | virt): 333 | 327 MiB
Thread count: 18
CPU usage (average): 23%
GPU core clock / memory clock: 1025 / 1652
GPU usage (average): 19%
VPU usage (average): 0%
GPU memory usage: 1536 MiB
Time (elapsed): 00:00:15.284
For KNLMeansCL on the other hand:
Code: Select all
LoadPlugin("G:\Hybrid\avisynthPlugins\LSMASHSource.dll")
LoadPlugin("G:\Hybrid\avisynthPlugins\KNLMeansCL.dll")
LWLibavVideoSource("F:\TestClips&Co\Transformers - 1080p Sample.mkv",cache=false)
KNLMeansCL(device_type = "GPU", device_id = 1)
return last
produces:
Code: Select all
AviSynth 2.60, build:Feb 20 2015 [03:16:45] (2.6.0.5)
Number of frames: 1081
Length (hh:mm:ss.ms): 00:00:45.087
Frame width: 1920
Frame height: 1080
Framerate: 23.976 (24000/1001)
Colorspace: i420
Active MT Mode: 0
Frames processed: 1081 (0 - 1080)
FPS (min | max | average): 13.57 | 38.80 | 37.10
Memory usage (phys | virt): 366 | 392 MiB
Thread count: 25
CPU usage (average): 19%
GPU core clock / memory clock: 1215 / 1652
GPU usage (average): 88%
VPU usage (average): 0%
GPU memory usage: 1558 MiB
Time (elapsed): 00:00:29.135
so unless kernel=2 is used DGDenoise seems to be faster. From a few samples I looked at so far there wasn't much of a difference between kernel=3 and kernel=1.
(btw. using an i7-4770k with an Intel® HD Graphics 4600 and a GeForce GTX 980 Ti on a HP Z27q 5k display under Windows 10 64bit)
Looking for some nice noisy source to do some more testing.
Cu Selur