DGDenoise

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
User avatar
Selur
Posts: 137
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: About DGDenoise

Post by Selur »

Current DGDenoise.txt states:
DGDenoise currently requires RGB32 input and mod 8 dimensions. Crop after DGDenoise()
if you need to. A later version may remove these limitations.
Is this still true, thought the limitation was removed. :)
User avatar
admin
Posts: 4554
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

It is still true. The previous "fix" caused a regression. I am working on resolving this for a following release.
User avatar
Selur
Posts: 137
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: About DGDenoise

Post by Selur »

Would it be better to add borders or resize using Pointresize to archive mod8?
User avatar
admin
Posts: 4554
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

AddBorders is best. This limitation will be removed in the next version.
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

Homer Simpson time

Can anyone tell me the error in this basic script, please
LoadPlugin("C:\Program Files (x86)\dgdecnv\DGDecodeNV.dll")
DGSource("I\input.dgi")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGDenoise\x32\DGDenoise.dll")
ConvertToRGB32()
DGDenoise().AssumeFPS(24000,1001)
Error in line 2
DAE avatar
Aleron Ives
Posts: 126
Joined: Fri May 31, 2013 8:36 pm

Re: About DGDenoise

Post by Aleron Ives »

Do you really have a directory named "I", or did you mean "I:" to indicate a Windows drive letter?
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

I is the drive letter, short for input, output drive would be W, short for working
Just found it "logical" for my uses

Blond moment might be over
Gotcha, I forgot the ":" indicating drive letter
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

Homer time
LoadPlugin("C:\Program Files (x86)\dgdecnv\DGDecodeNV.dll")
DGSource("I:\input.dgi")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGDenoise\x32\DGDenoise.dll")
ConvertToRGB32()
DGDenoise().AssumeFPS(24000,1001)
Error in line 3
Cannot load module DGDenoise.dll

Help, what did I do wrong this time
User avatar
admin
Posts: 4554
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

@gonca

First, you have to use Avisynth 2.6 or Avs+. Next, check that you have DGDenoise.dll and DGDenoise.ptx together and that your path to them in the script is correct. Also you have it in the plugins directory AND you try to load it manually. Do one or the other.

If after fixing these things you still have an issue please post a screenshot of the error.
User avatar
admin
Posts: 4554
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

I have uploaded a new version that fixes the crop issue. You may now crop as desired before invoking DGDenoise.
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

admin wrote:@gonca

First, you have to use Avisynth 2.6 or Avs+. Next, check that you have DGDenoise.dll and DGDenoise.ptx together and that your path to them in the script is correct. Also you have it in the plugins directory AND you try to load it manually. Do one or the other.

If after fixing these things you still have an issue please post a screenshot of the error.
Despite the folder name it is Avisynth 2.6.0.6
The new version with DGDenoise.ptx works properly
Thanks for the patience and help from both of you.
Normally I can do simple scripts (nothing fancy) but this time I seem to have a major blonde period
Now I can start testing your new plugin
Again, thanks for the patience and help
User avatar
admin
Posts: 4554
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

Good to hear that you have it working, gonca my friend. I have several brain farts per day, so don't get down on yourself. ;)
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: About DGDenoise

Post by Guest 2 »

admin wrote:
Guest 2 wrote:Do you plan to create a new DGDecodeNV with DGFilter as option in same dll?
I'm considering it, but wonder about the point if there is already a stand-alone filter.
I am not a programmer but I think that could mean less gpu calls and overhead.

Plus, I know it's not a culprit, you would get more licenses.
User avatar
admin
Posts: 4554
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

Sure, Guest 2, there could be a small performance gain from combining them, but really I think it would be too small to be worth it. If the standalone filter was continued as well I would then have two codebases to maintain. Developers hate that! Nevertheless, I have not excluded the possibility. Higher on my list now is to add a bilateral filter kernel and support for YUV spaces to the standalone filter.

If I wanted to leverage it for more licenses, I could simply add the protection to the standalone filter. My licensing is enough to get me some pocket change for new computers, software, etc. I'm not hoping to get rich off of it, nor would that even be possible given the small niche that I occupy. Hacking around with these technologies is a fine way to avoid terminal boredom. ;)
User avatar
Selur
Posts: 137
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: About DGDenoise

Post by Selur »

btw. the new version seems to run fine in Vapoursynth too, used:

Code: Select all

# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.avs.LoadPlugin(path="G:/Hybrid/Vapoursynth/vapoursynth64/plugins/DenoiseFilter/DGDenoise/DGDenoise.dll")
core.std.LoadPlugin(path="G:/Hybrid/Vapoursynth/vapoursynth64/plugins/SourceFilter/LSmashSource/vslsmashsource.dll")
# Loading F:\TestClips&Co\Test-AC3-5.1.avi using LWLibavSource
clip = core.lsmas.LWLibavSource(source="F:/TestClips&Co/Test-AC3-5.1.avi", cache=0)
# adjusting color space from YUV420P8 to COMPATBGR32
clip = core.resize.Bicubic(clip=clip, format=vs.COMPATBGR32, matrix_in_s="470bg")
# denoising using DGDenoise
clip = core.avs.DGDenoise(clip)
# Output
clip.set_output()
for a quick test. :D
User avatar
admin
Posts: 4554
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

Great, thanks for the report, Selur.

I have a native YV12 version working and will combine the two into one filter that accepts both spaces. That could be imported into DGDecodeNV as Guest 2 suggested, if I don't mind maintaining two codebases.

I should probably dilate the edge map. I want to make a bilateral kernel also.

I'm really grokking this CUDA stuff now. :ugeek:
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

Some preliminary testing done
Haven't had a chance to check quality of output but compressibility vs fps is really impressive
Don't think my cpu is even being taxed
Quick thought, if you don't mind
separate codes --- easier to maintain --- option for user to have or not and possible easier integration (use) with other software
But you are the boss of the software
Re license along the way
Good scotch ain't cheap
User avatar
admin
Posts: 4554
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

gonca wrote:Good scotch ain't cheap
Sad but true. Same for good bourbon.
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

Some early testing done on DGDenoise
Find that strength=0.5 is quite good,all other settings on default
DGDenoise is really fast
Have AVSMeter results if you wish to see them
Also have bmp of frame 185 for comparison, if you wish to see it, along with some other data
User avatar
admin
Posts: 4554
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

Thanks for your test results, gonca.

I've been looking into the actual filtering quality, comparing it carefully to KNLMeansCL. It became clear to me that the "quick NLM" algorithm from nVidia is surely much faster but it creates what are to my mind nasty, unacceptable artifacts. The normal NLM is no faster than KNLMeansCL and produces almost identical results. Again we see that there is no free lunch. Therefore, I have decided not to proceed with the current filter design. However, I do plan to modify it and integrate it into DGDecodeNV. The integrated functionality will be the KNN kernel. This will give decent and fast noise reduction.
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

You know best
I did notice loss of detail, noticeable, even at strength+0.5
Results were okay but ...
When you integrate into DGDecNV you might want to consider some kind of license for extra functionality or maybe o donation system.
Don't expect much and you can"t be disappointed
We finally have one thing in common --- good scotch and bourbon ain't cheap
User avatar
admin
Posts: 4554
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

It's the artifacts that are the concern; there is no loss of detail versus KNLMeansCL for equivalent strengths.

OK, back to quantum physics for a while.

Bottoms up. :lol:
DAE avatar
Guest

Re: About DGDenoise

Post by Guest »

Loss of the detail was not meant as a comparison to another filter, but to original.
Quantum physics or binary mathematics, glass full -- glass empty (1--0)
DAE avatar
Guest 2
Posts: 903
Joined: Mon Sep 20, 2010 2:18 pm

Re: About DGDenoise

Post by Guest 2 »

admin wrote:The integrated functionality will be the KNN kernel. This will give decent and fast noise reduction.
Please keep the three filters, or at least full NLM. KNN is a simplified version of NLM and almost useless in any situation so that we will be back using KNLMeansCL.
User avatar
admin
Posts: 4554
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin »

OK, why not. KNN or full NLM, but no quick NLM.
Post Reply