DGDenoise
Re: About DGDenoise
Hi gonca, great to hear from you! And thank you for your testing.
I made the defaults based on the AddGrain(100) call I was using to simulate noise. That's strong grain. I think we can tweak the defaults later based on more real-world stuff. That's why I asked for samples. For now just set the parameters as you need and let me know what you like.
I got the integrated filter working. I just have to make a 32-bit build and then I will release it. We'll say adios to the server and OpenGL. Buh-bye!
The tradeoff for CUDA runtime versus driver API is that I avoid having to ship a .cubin but have to ship a cudart*.dll. So that's a wash and the easier coding for the runtime API rules.
This infrastructure I have developed opens up a lot of possibilities for GPU filters. If you have any great ideas for GPU-accelerated filters beyond denoising, please speak up. What filters run so slow you want to pull your hair out? You get -10 points if you say QTGMC(); that's a script. Maybe some of the filters it invokes can be accelerated, however.
The whole integrated filter is only ~500 lines of code total (including the Avisynth code and KNN and NLM kernel codes). It's ridiculous how powerful CUDA is. Here's what I have to say to nVidia...
I made the defaults based on the AddGrain(100) call I was using to simulate noise. That's strong grain. I think we can tweak the defaults later based on more real-world stuff. That's why I asked for samples. For now just set the parameters as you need and let me know what you like.
I got the integrated filter working. I just have to make a 32-bit build and then I will release it. We'll say adios to the server and OpenGL. Buh-bye!
The tradeoff for CUDA runtime versus driver API is that I avoid having to ship a .cubin but have to ship a cudart*.dll. So that's a wash and the easier coding for the runtime API rules.
This infrastructure I have developed opens up a lot of possibilities for GPU filters. If you have any great ideas for GPU-accelerated filters beyond denoising, please speak up. What filters run so slow you want to pull your hair out? You get -10 points if you say QTGMC(); that's a script. Maybe some of the filters it invokes can be accelerated, however.
The whole integrated filter is only ~500 lines of code total (including the Avisynth code and KNN and NLM kernel codes). It's ridiculous how powerful CUDA is. Here's what I have to say to nVidia...
Re: About DGDenoise
In terms of filters I would say that you should look first at what filters you use.
They don't have to be "slow" to be improved, and you do have a knack for improving things by making them run on video cards, as your other software.
As far as defaults, I leave that to your judgement, with help from Selur, I am sure the final will be good, and the end user can always tweak a little, if so desired
QTMC is slow, but like you stated, it is a script and not a plugin
If you are willing to help I can set up some avisynth scripts and test the old Clint spaghetti westerns and the Godfather trilogy, all very noisy movies,
They don't have to be "slow" to be improved, and you do have a knack for improving things by making them run on video cards, as your other software.
As far as defaults, I leave that to your judgement, with help from Selur, I am sure the final will be good, and the end user can always tweak a little, if so desired
QTMC is slow, but like you stated, it is a script and not a plugin
If you are willing to help I can set up some avisynth scripts and test the old Clint spaghetti westerns and the Godfather trilogy, all very noisy movies,
Re: About DGDenoise
@gonca
Thank you for your thoughts and I will help you. Just ask!
@all
I have uploaded the integrated filter version, so re-download DGDenoise.rar and read the instructions carefully. The kernel and sobel parameters are different. Kernel is now 1 or 2 for KNN or NLM. Sobel is now in the range 0 to 1000.
Get rid of the old DenoiseServer.exe, freeglut.dll, glew*.dll, and cudart*_60.dll. You have to put cudart*_75.dll in your DLL search path. I hope you know what that means.
Thank you for your thoughts and I will help you. Just ask!
@all
I have uploaded the integrated filter version, so re-download DGDenoise.rar and read the instructions carefully. The kernel and sobel parameters are different. Kernel is now 1 or 2 for KNN or NLM. Sobel is now in the range 0 to 1000.
Get rid of the old DenoiseServer.exe, freeglut.dll, glew*.dll, and cudart*_60.dll. You have to put cudart*_75.dll in your DLL search path. I hope you know what that means.
Re: About DGDenoise
Don't be shy to play with the sobel parameter. If you reduce it below default you retain more detail, as you can verify with the map option. Try sobel=100 together with a moderate strength (0.5). It works well on a noisy Stones BD. We would like to retain detail on faces but not on backgrounds, but things like that require artificial intelligence beyond the available APIs.
Re: About DGDenoise
Please notice I had to manually download msvcr120d.dll to make it work.
Windows 10 x64 build 14905
I'd like to use DGDenoise as a pre filter to SMDegrain but I get a wrong space color error from it.
How can I convert it back to a format SMDegrain reads?
Windows 10 x64 build 14905
I'd like to use DGDenoise as a pre filter to SMDegrain but I get a wrong space color error from it.
How can I convert it back to a format SMDegrain reads?
Re: About DGDenoise
Add ConvertToYUY2() or ConvertToYV12() after DGDenoise().
Re: About DGDenoise
Multiple instance and VirtualDub re-open do not work yet. I have to implement floating cuda contexts as in DGDecodeNV. It will require me to convert from cuda runtime to cuda driver API. Waiting for another burst of energy...
Re: About DGDenoise
I completed the CUDA driver API version. Multiple instantiation and VirtualDub re-open now work fine, which means the filter will work correctly in MeGUI, etc. I'll do some regression testing and then upload it, probably tomorrow morning, as a candidate release.
Re: About DGDenoise
Do you plan to create a new DGDecodeNV with DGFilter as option in same dll?admin wrote:I completed the CUDA driver API version. Multiple instantiation and VirtualDub re-open now work fine, which means the filter will work correctly in MeGUI, etc. I'll do some regression testing and then upload it, probably tomorrow morning, as a candidate release.
Re: About DGDenoise
I'm considering it, but wonder about the point if there is already a stand-alone filter.Guest 2 wrote:Do you plan to create a new DGDecodeNV with DGFilter as option in same dll?
@all
I just uploaded the driver API version. It also adds a parameter to specify the desired GPU when you have more than one. The kernel is shipped as PTX code, so this theoretically is future proof for new nVidia architectures.
http://rationalqm.us/misc/DGDenoise.rar
This is my first release candidate. Your testing will be appreciated.
Re: About DGDenoise
Current DGDenoise.txt states:
Is this still true, thought the limitation was removed.DGDenoise currently requires RGB32 input and mod 8 dimensions. Crop after DGDenoise()
if you need to. A later version may remove these limitations.
Re: About DGDenoise
It is still true. The previous "fix" caused a regression. I am working on resolving this for a following release.
Re: About DGDenoise
Would it be better to add borders or resize using Pointresize to archive mod8?
Re: About DGDenoise
AddBorders is best. This limitation will be removed in the next version.
Re: About DGDenoise
Homer Simpson time
Can anyone tell me the error in this basic script, please
Can anyone tell me the error in this basic script, please
Error in line 2LoadPlugin("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)
- Aleron Ives
- Posts: 126
- Joined: Fri May 31, 2013 8:36 pm
Re: About DGDenoise
Do you really have a directory named "I", or did you mean "I:" to indicate a Windows drive letter?
Re: About DGDenoise
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
Just found it "logical" for my uses
Blond moment might be over
Gotcha, I forgot the ":" indicating drive letter
Re: About DGDenoise
Homer time
Cannot load module DGDenoise.dll
Help, what did I do wrong this time
Error in line 3LoadPlugin("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)
Cannot load module DGDenoise.dll
Help, what did I do wrong this time
Re: About DGDenoise
@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.
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.
Re: About DGDenoise
I have uploaded a new version that fixes the crop issue. You may now crop as desired before invoking DGDenoise.
Re: About DGDenoise
Despite the folder name it is Avisynth 2.6.0.6admin 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.
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
Re: About DGDenoise
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.
Re: About DGDenoise
I am not a programmer but I think that could mean less gpu calls and overhead.admin wrote:I'm considering it, but wonder about the point if there is already a stand-alone filter.Guest 2 wrote:Do you plan to create a new DGDecodeNV with DGFilter as option in same dll?
Plus, I know it's not a culprit, you would get more licenses.
Re: About DGDenoise
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.
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.
Re: About DGDenoise
btw. the new version seems to run fine in Vapoursynth too, used:
for a quick test.
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()