Page 5 of 17

Re: About DGDenoise

Posted: Mon Feb 13, 2017 6:45 pm
by Guest
Cannot render file in MPC-BE and AVSMeter will not process it
New avs
VID_00000 - Copy.AVS
(147 Bytes) Downloaded 736 times
DGDenoise.ptx
Untitled.png

Re: About DGDenoise

Posted: Mon Feb 13, 2017 6:49 pm
by admin
Please post the script directly. Don't attach it.

Open the script in VirtualDub. What is the error or exception?

What is the point of your graphic with the PTX file circled?

"will not process it" is not helpful. What is the error?

Re: About DGDenoise

Posted: Mon Feb 13, 2017 6:59 pm
by Guest
Error in VDub is There is no function called DGDenoise
The image shows where I located DGDenoise.ptx
There are no old DGDenoise.dll on my system
AVSMeter opens and closes without doing anything, guess it can't load the script

Re: About DGDenoise

Posted: Mon Feb 13, 2017 7:03 pm
by admin
Looks like you have a wrong DGDecodeNV.dll. Looking at your graphic it shows a date of 12/26 for DGDecodeNV.dll! You have to use the one I gave in the rar file. The code for DGDenoise() is in the new DGDecodeNV.dll.

Re: About DGDenoise

Posted: Mon Feb 13, 2017 7:09 pm
by Guest
You are good
You just fixed dumb
Guess I was too antsy to try your denoiser
Thanks, all seems to be good again

Re: About DGDenoise

Posted: Mon Feb 13, 2017 7:12 pm
by admin
Good to hear. Don't ding yourself, gonca; I can see how one might think if you invoke DGDenoise(), rather than using DGSource() parameters, you might need only the PTX. I'll clarify that in the doc. Thank you for your testing.

Re: About DGDenoise

Posted: Mon Feb 13, 2017 7:18 pm
by Guest
Nah, I just jumped the gun and shot myself in the butt
I saw DGDecodeNV.dll and just left it, knowing full well that this dll has to be different from the old one to in-cooperate the new features.
I guess I was a kid in a candy store
Once again thanks for your patience
I will do some testing tomorrow after work

Re: About DGDenoise

Posted: Mon Feb 13, 2017 7:20 pm
by admin
Your attitude and self-reflection is refreshing. :bravo:

Looking forward to your test results.

Re: About DGDenoise

Posted: Tue Feb 14, 2017 1:23 am
by Sharc
admin wrote:Can you please give me the video and your script so I can look into the detail loss you mentioned, and also compare performance? I have a 1050 Ti.
Here the script which I used for the tests and speed comparison:

Code: Select all

clip=AviSource("k:\Video Tape Captures\capture (2010-07-23 at 17-34-40).avi")
clip=converttoyv12(clip,interlaced=true)
clip=separatefields(clip)

#Filter=KNLMeansCL(clip,1,3,4,4.0) 
Filter=DGDenoise(clip,strength=0.15)

out=weave(Filter)
return out
I will upload a snippet of the .avi later today. I have to prepare it because it is a lossless 4:2:2 capture and the filesize is huge.

I will also run test with DGDenoise(deinterlace=2,strength=0.15)

Edit 1:
The latter doesn't make sense, I can't deinterlace/bob with DGDenoise, right? :facepalm:
GPU deinterlacing/bobbing works only via DGSource, correct?

Edit 2:
For visual inspection (blur, details) on PC monitor I am using:

Code: Select all

clip=AviSource("k:\Video Tape Captures\capture (2010-07-23 at 17-34-40).avi")
clip=converttoyv12(clip,interlaced=true)
clipbobbed=tdeint(clip,mode=1,order=1)

#Filter=KNLMeansCL(clipbobbed,1,3,4,4.0)  #.separatefields().selectevery(4,0,3).weave() #for re-interlaceing
Filter=DGDenoise(clipbobbed,strength=0.15) #.separatefields().selectevery(4,0,3).weave() #for re-interlacing

out1=clipbobbed
out2=Filter

return stackhorizontal(out1,out2)
Edit 3:
Here is the sample:
http://www.mediafire.com/file/71i6u0pmc ... ample1.avi

Re: About DGDenoise

Posted: Tue Feb 14, 2017 8:08 am
by admin
First, if you want to compare the quality and performance you have to use comparable parameters. But even with the ones you
chose (that favor KNLMeansCL) I see no detail loss or any significant differences with this script:

loadplugin("dgdecodenv.dll")
loadplugin("knlmeanscl.dll")
src=avisource("noisysample1.avi").separatefields().converttoyv12()
d=src.DGDenoise(strength=0.15).weave.subtitle("DG")
k=src.knlmeanscl(h=4.0).weave.subtitle("K")
stackhorizontal(k,d)

If you disagree, please show it with screenshots.

Coming to performance, now we have to use comparable parameters, i.e., we don't want to unfairly disadvantage KNLMeansCL by using settings that slow it down. For example, DGDenoise implements only d=0. Here is the script I use:

loadplugin("dgdecodenv.dll")
loadplugin("dgdenoise.dll")
loadplugin("knlmeanscl.dll")
dgsource("rat.dgi").assumefps(10000)
DGDenoise(strength=0.5)
#knlmeanscl(h=4.0)

Note that I use 64-bit everything. Ignore the 10000 frame rate. I do that for playing in VirtualDub. I use a 1050 Ti with i7-4770. Following are the respective results.

-------------------------------------------------------------------------------------
KNLmeansCL

Number of frames: 839
Length (hh:mm:ss.ms): 00:00:00.084
Frame width: 1920
Frame height: 1080
Framerate: 10000.000 (10000/1)
Colorspace: YV12

Frames processed: 839 (0 - 838)
FPS (min | max | average): 6.272 | 15.78 | 15.46
Memory usage (phys | virt): 190 | 303 MiB
Thread count: 21
CPU usage (average): 12%

Time (elapsed): 00:00:54.275

-------------------------------------------------------------------------------------
DGDenoise

Number of frames: 839
Length (hh:mm:ss.ms): 00:00:00.084
Frame width: 1920
Frame height: 1080
Framerate: 10000.000 (10000/1)
Colorspace: YV12

Frames processed: 839 (0 - 838)
FPS (min | max | average): 19.35 | 24.10 | 23.74
Memory usage (phys | virt): 225 | 314 MiB
Thread count: 17
CPU usage (average): 12%

Time (elapsed): 00:00:35.339

And here my results for noisysample1 (without the KNLM comparison). BTW, it's better to use longer clips for performance testing.

-------------------------------------------------------------------------------------
DGDenoise

Number of frames: 93
Length (hh:mm:ss.ms): 00:00:03.720
Frame width: 720
Frame height: 576
Framerate: 25.000 (25/1)
Colorspace: YV12

Frames processed: 93 (0 - 92)
FPS (min | max | average): 39.11 | 42.78 | 41.53
Memory usage (phys | virt): 133 | 126 MiB
Thread count: 14
CPU usage (average): 12%

Time (elapsed): 00:00:02.240

Bottom line: I cannot reproduce your reported results, either for quality or for speed. So if speed was more important than possible gains from using slower KNLMeansCL parameters, then DGDenoise is to be preferred. If you must have the slower settings, then KNLMeansCL is to be preferred. I would be very interested to see cases where those settings really help very much.

Re: About DGDenoise

Posted: Tue Feb 14, 2017 9:43 am
by Sharc
admin wrote:First, if you want to compare the quality and performance you have to use comparable parameters. But even with the ones you
chose (that favor KNLMeansCL) I see no detail loss or any significant differences with this script:

loadplugin("dgdenoise.dll")
loadplugin("knlmeanscl.dll")
src=avisource("noisysample1.avi").separatefields().converttoyv12()
d=src.DGDenoise(strength=0.15).weave.subtitle("DG")
k=src.knlmeanscl(h=4.0).weave.subtitle("K")
stackhorizontal(k,d)

If you disagree, please show it with screenshots.
I don't disagree at all. That's exactly why I choose strength=0.15 (and h=4.0 for KNLMeanCL) in my test, to obtain similar denoising results for both filters.
What I was saying is that when I set strength > 0.2 it begins to blur/loose details for my clip. I wrote this just because in your example (portrait) and documentation you set strength=0.5 (default?) which would be too high for my test clip, I felt. Don't you agree?

Edit:
Now I am confused by the first line of your script loadplugin("dgdenoise.dll"). Do I still need a dgdenoise.dll, or should this be dgdecodeNV.dll ? :?

Re: About DGDenoise

Posted: Tue Feb 14, 2017 10:24 am
by admin
Ah, I see now. Strength 0.5 is too much for typical clips. That's a good point. The default is actually 0.0, so that denoising is off by default. I was using 0.5 for the portrait_noise clip, which needs very strong denoising. I will change the example in the doc to 0.15. Thank you.

Of course, high values of h will do the same for KNLMeansCL. BTW, strength and h are not defined the same way and do not scale the same way. You just have to choose your strength and h empirically.

Do you have any ideas about our discrepant performance results?

Re: About DGDenoise

Posted: Tue Feb 14, 2017 10:27 am
by admin
Sharc wrote:Now I am confused by the first line of your script loadplugin("dgdenoise.dll"). Do I still need a dgdenoise.dll, or should this be dgdecodeNV.dll?
That was my mistake. DGDenoise() is available in DGDecodeNV.dll. I will edit it. Well spotted and thanks for pointing it out.

(I had it as a stand-alone filter before I put it into DGDecodeNV.dll.)

Re: About DGDenoise

Posted: Tue Feb 14, 2017 10:29 am
by Sharc
admin wrote: Do you have any ideas about our discrepant performance results?
No, not yet. I will repeat the test after the current job has finished. I'll report back.

Re: About DGDenoise

Posted: Tue Feb 14, 2017 10:32 am
by admin
Sweet, thank you.

Re: About DGDenoise

Posted: Tue Feb 14, 2017 1:41 pm
by Sharc
Re-tested my interlaced .avi

---------- DGDenoise(strength=0.15)--------------------------

Number of frames: 1019
Length (hh:mm:ss.ms): 00:00:40.760
Frame width: 720
Frame height: 576
Framerate: 25.000 (25/1)
Colorspace: YV12
Active MT Mode: 0
Audio channels: 1
Audio bits/sample: 16
Audio sample rate: 48000
Audio samples: 1958880

Frame (current | last): 324 | 1018
FPS (cur | min | max | avg): 13.91 | 9.926 | 17.29 | 13.66
Memory usage (phys | virt): 130 | 122 MiB
Thread count: 9
CPU usage (current | average): 25% | 25%

GPU core clock | memory clock: 901 | 900
GPU usage (current | average): 75% | 74%
VPU usage (current | average): 0% | 0%
GPU memory usage: 199 MiB

Time (elapsed | estimated): 00:00:23.784 | 00:01:14.571

---------------- KNLMeansCL(0,3,4,4.0) -----------------------

Number of frames: 1019
Length (hh:mm:ss.ms): 00:00:40.760
Frame width: 720
Frame height: 576
Framerate: 25.000 (25/1)
Colorspace: YV12
Active MT Mode: 0
Audio channels: 1
Audio bits/sample: 16
Audio sample rate: 48000
Audio samples: 1958880

Frame (current | last): 431 | 1018
FPS (cur | min | max | avg): 15.90 | 10.98 | 18.86 | 15.48
Memory usage (phys | virt): 92 | 115 MiB
Thread count: 12
CPU usage (current | average): 25% | 24%

GPU core clock | memory clock: 901 | 900
GPU usage (current | average): 67% | 68%
VPU usage (current | average): 0% | 0%
GPU memory usage: 191 MiB

Time (elapsed | estimated): 00:00:27.904 | 00:01:05.819

KNLMeansCL still has the edge.
(Note: Speed gets double when I skip the weave() at the end of the script)

Re: About DGDenoise

Posted: Tue Feb 14, 2017 2:32 pm
by admin
Remind me what card, CPU, and OS you have. This just can't be right.

Are you running all 64-bit?

Maybe I need an Avisynth cache before DGDenoise(). I'll see what that does, although it seems irrelevant for linear access.

Re: About DGDenoise

Posted: Tue Feb 14, 2017 3:54 pm
by Sharc
Here we go:

Operating System: Microsoft Windows 10 Professional (x64) Build 14393.693 (RS1)

CPU Brand Name: Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz
CPU Vendor: GenuineIntel
CPU Stepping: M1
CPU Code Name: Yorkfield

Video Card: NVIDIA GeForce GT 730 (GK208) [AsusTek]
Video Bus: PCIe v1.1 x8 (2.5 GT/s) @ x8 (2.5 GT/s)
Video RAMDAC: Integrated RAMDAC

Avisynth 2.6 32 bit;
DGDecNV 32 bit

Re: About DGDenoise

Posted: Tue Feb 14, 2017 4:58 pm
by admin
Gosh, KNLMeansCL won't run on my Win10 system! It apparently requires OpenCL 1.2+ and my GTX 620 only does 1.1. Another plus for DGDenoise!

I'll take your feedback as a data point. Let's see if anyone else has some results for us.

Re: About DGDenoise

Posted: Tue Feb 14, 2017 6:21 pm
by Guest
admin wrote:Gosh, KNLMeansCL won't run on my Win10 system! It apparently requires OpenCL 1.2+ and my GTX 620 only does 1.1. Another plus for DGDenoise!

I'll take your feedback as a data point. Let's see if anyone else has some results for us.
Glad I'm not the only one,can't make it run on my Win10 system either
Other news, I tested against two other degrainer/denoiser plugins
My not so knowledgeable opinion is that even at strength=0.15 it gives significant compressibility to very grainy sources while quality and detail retention is excellent at strength=0.15
I will try higher strengths if you wish
AVSMeter readings are

dgdenoise(strength=0.1) 15.11 / 33.05 / 32.24 encode 31.3 fps 400 MB
dgdenoise(strength=0.05) 15.71 / 32.93 / 32.18 encode 31.4 fps 554 MB
dgdenoise(strength=0.15) 15.57 / 32.96 / 32.17 encode 31.6 fps 332 MB
Original clip is 660MB
The clip is from a BD that is known for its grainy texture

Re: About DGDenoise

Posted: Tue Feb 14, 2017 6:46 pm
by admin
Thank you, gonca.

Can you please remind me what nVidia card you use? That FPS looks very good for bluray. Just so you know, the strength won't affect the performance significantly.

Re: About DGDenoise

Posted: Tue Feb 14, 2017 7:00 pm
by Guest
Basic system specs
Win10 pro x64
cpu i7-6900k
gpu gtx 1070

PS
Currently running tests on higher strengths
performance seems to fairly consistent across different strengths, as you said, and its starting to look like I found myself a favorite denoiser for my simple needs

Re: About DGDenoise

Posted: Tue Feb 14, 2017 7:07 pm
by admin
It's surprising that KNLM won't run on that 1070. If you run gpucapsviewer, does it show that OpenCL is 1.1 or 1.2? (Look at the OpenCL tab.) My 1050Ti shows OpenCL 1.2 on Win8.1, and KNLM works but is slower.

Re: About DGDenoise

Posted: Tue Feb 14, 2017 7:30 pm
by Guest
This is real good
According to the info I should have version 1.2, but gpucapsviewer says that I don't have an opencl driver installed.
However it seems that presently it only supports up to 1050-1050Ti

On a better note
I tested higher strengths and while there is a slight detail loss, as can be expected with a denoiser, I could only notice it in full screen with some significant zoom add in
For my normal viewing habits this works beautifully
To be honest I doubt if I will ever need strengths above 0.15 since this did a great job on this heavily grained / textured movie

If you require me to do some more testing of any type let me know and I will try to do it
You should consider a separate license for DGDenoise

Re: About DGDenoise

Posted: Tue Feb 14, 2017 7:48 pm
by admin
Thanks for your testing, gonca. Good to hear you like my NLM implementation (based on nVidia sample of course).

Since you have a later iGPU, could you test DGBobIM for me? If so, please use the colored_fields.avs script with double-rate deinterlacing and let me know if random access returns the correct fields. I was worried that things might have changed for later iGPUs. If you get a chance, please report in the DGBobIM thread.

Also, any suggestions for additional GPU features would be welcome. I am looking at making a deblocker next, unless y'all have a better idea.

Licensing will fall under DGDecNV. If you have a DG tools license, you are golden. If not, 15 bucks, baby.