DGDenoise
Re: DGDenoise
I seem to recall something about a custom avscompat.dll for vapoursynth ... is one needed ?
I really do like it here.
Re: DGDenoise
Hello dear Donald.
Thank you for your wonderful plugins and filters, they are really useful and are used by me and many users around the world.
I ask you to refine the filter "DGDenoise", having made separate adjustment of parameters for Luma and Chroma in it, this will allow it to be used much better. In particular, I have the original video files, which for high-quality noise reduction without loss of detail, the current version of the same parameter values for Luma and Chroma in the "DGDenoise" filter is not enough.
The current option for the "DGDenoise" filter looks like this:
DGDenoise (clip c, float strength, float blend, bool chroma, int searchw, int device)
I suggest you create new additional parameters:
L_strength # Luma strength
L_blend # Luma blend
L_searchw # Luma searchw
C_strength # Chroma strength
C_blend # Chroma blend
C_searchw # Chroma searchw
At the same time, it would be nice to make compatibility with the old parameter format so that if the values of the new parameters are not specified (separately for Luma and Chroma), then the old parameters would act if their values are indicated (strength, blend, chroma, searchw).
Now I have to resort to such a trick for separately adjusting the noise reduction parameters for Luma and Chroma:
lumadenoise = DGDenoise(strength=0.10, blend=0.5, chroma=false, searchw=9, device=255)
chromadenoise = DGDenoise(strength=0.12, blend=0, chroma=true, searchw=9, device=255)
lumadenoise.MergeChroma(chromadenoise)
But I would like to achieve the same result by setting the parameters in the "DGDenoise" filter in one line, for 1 time, this would be more correct, convenient and possibly faster.
Thank you for your wonderful plugins and filters, they are really useful and are used by me and many users around the world.
I ask you to refine the filter "DGDenoise", having made separate adjustment of parameters for Luma and Chroma in it, this will allow it to be used much better. In particular, I have the original video files, which for high-quality noise reduction without loss of detail, the current version of the same parameter values for Luma and Chroma in the "DGDenoise" filter is not enough.
The current option for the "DGDenoise" filter looks like this:
DGDenoise (clip c, float strength, float blend, bool chroma, int searchw, int device)
I suggest you create new additional parameters:
L_strength # Luma strength
L_blend # Luma blend
L_searchw # Luma searchw
C_strength # Chroma strength
C_blend # Chroma blend
C_searchw # Chroma searchw
At the same time, it would be nice to make compatibility with the old parameter format so that if the values of the new parameters are not specified (separately for Luma and Chroma), then the old parameters would act if their values are indicated (strength, blend, chroma, searchw).
Now I have to resort to such a trick for separately adjusting the noise reduction parameters for Luma and Chroma:
lumadenoise = DGDenoise(strength=0.10, blend=0.5, chroma=false, searchw=9, device=255)
chromadenoise = DGDenoise(strength=0.12, blend=0, chroma=true, searchw=9, device=255)
lumadenoise.MergeChroma(chromadenoise)
But I would like to achieve the same result by setting the parameters in the "DGDenoise" filter in one line, for 1 time, this would be more correct, convenient and possibly faster.
Re: DGDenoise
Yes I can do that. There are some other pending enhancement requests. I hope to get to it soon after getting DGDemux with MVC etc. out the door. Thank you for your suggestion and welcome to the forum, zybex!
Re: DGDenoise
I really do like it here.
Re: DGDenoise
Gonna implement this today, zybex.
Re: DGDenoise
I slipped it into 2053 build 218, so re-download 2053 from the binaries area to get it.
You now have cstrength and cblend for chroma. For technical reasons, searchw applies to both luma and chroma.
You now have cstrength and cblend for chroma. For technical reasons, searchw applies to both luma and chroma.
Re: DGDenoise
Nice new feature
Just nitpicking: strength=0 or cstrength=0 throw an error. In case one wants to denoise luma or chroma only, zero should perhaps be allowed to disable the unwanted function.
Any plans to add temporal denoising? Now I have to do this in an extra step using a 'legacy' filter. No major problem though.
Just nitpicking: strength=0 or cstrength=0 throw an error. In case one wants to denoise luma or chroma only, zero should perhaps be allowed to disable the unwanted function.
Any plans to add temporal denoising? Now I have to do this in an extra step using a 'legacy' filter. No major problem though.
Re: DGDenoise
Good point about the zero value. Will do. I'll do it for both luma and chroma strength and then we can ditch the chroma option.
What temporal filter are you using?
What temporal filter are you using?
Re: DGDenoise
Thank you.
temporalsoften(),fluxsmoothST(),CnR2(), mainly for VHS sources, filtering the even/odd grouped fields.What temporal filter are you using?
Re: DGDenoise
DGDenoise introduces a slight color shift towards lower values in the histogram, for color=true.
Also, some color artefacts appear at the very bottom and right side of the filtered picture, like a bar of few pixels.
Is this to be expected, or is it on my system only?
Script for testing, for example
Also, some color artefacts appear at the very bottom and right side of the filtered picture, like a bar of few pixels.
Is this to be expected, or is it on my system only?
Script for testing, for example
Code: Select all
source=BlankClip(color=color_magenta, width=720, height=576, pixel_type="YV12") #or any other color
a=source
b=source.DGDenoise(strength=0.001,cstrength=0.9,searchw=5,chroma=true)
interleave(a.Histogram("levels"),b.Histogram("levels"))
Re: DGDenoise
Thank you, Sharc. That behavior is not good. I'm calling on Sherman to look into this. Multitasking -- it's a good thing!
Re: DGDenoise
Thank you for the new version of DGDenoise.
The slight color shift and border effect seem still to be there, at least on my system ....
The slight color shift and border effect seem still to be there, at least on my system ....
Re: DGDenoise
I'll look into that today.
Re: DGDenoise
Yes, I duplicated it. It's not horribly bad as the value is changed only by 1 or 2 but it should be fixed.
Re: DGDenoise
Hehe. I got lucky and found the color shift problem 10 seconds after opening DGDenoise.cu for inspection. Gotta regression test and make sure it's theoretically correct (seems to be but wanna be thorough about it). Thanks for pointing it out. It may point to similar issues in my other CUDA filters, too, so I am really grateful for this report, Sharc.
The edge effect is another matter. It is insignificant for reasonable strength values. e.g., it is absent at cstrength 0.5 and really prominent at cstrength 5.0. Strength 0.9 is quite strong. Still, I'll look at that tomorrow.
The edge effect is another matter. It is insignificant for reasonable strength values. e.g., it is absent at cstrength 0.5 and really prominent at cstrength 5.0. Strength 0.9 is quite strong. Still, I'll look at that tomorrow.
Re: DGDenoise
Can you please test this? Both problems should be fixed. Thank you, Sharc. You are my knight in shining armor!
http://rationalqm.us/misc/DGDecodeNV_Sharc.dll
Rename it properly of course. This is the 64-bit DLL. Let me know if you need 32-bit. When you bless things, I'll make a slipstream.
BTW, DGBob() is the only other affected filter. That will be fixed too when I slipstream.
http://rationalqm.us/misc/DGDecodeNV_Sharc.dll
Rename it properly of course. This is the 64-bit DLL. Let me know if you need 32-bit. When you bless things, I'll make a slipstream.
BTW, DGBob() is the only other affected filter. That will be fixed too when I slipstream.
Re: DGDenoise
It's perfect now, thank you
And yes it would be great if you would include the 32 bit .dll in the official slipstream. I am still using much of 32 bit avisynth, so far.
And yes it would be great if you would include the 32 bit .dll in the official slipstream. I am still using much of 32 bit avisynth, so far.
Re: DGDenoise
Jolly good, I will make a slipstream later this evening after swimming. Thank you!
Re: DGDenoise
Darn, I went to test things in 32-bit and found that the Release mode crashes but the Debug mode succeeds. That's gonna make debugging hard.
Can you please test the released DGDecodeNV.dll DGDenoise in 32-bit. Is it OK for you (other than the chroma shift)? I tried it but it crashed so I'm thinking I may have a 32-bit Avisynth+ issue, because if it was that broken someone would have told me. If it works for you please tell me your Avisynth+ version.
Thank you.
Can you please test the released DGDecodeNV.dll DGDenoise in 32-bit. Is it OK for you (other than the chroma shift)? I tried it but it crashed so I'm thinking I may have a 32-bit Avisynth+ issue, because if it was that broken someone would have told me. If it works for you please tell me your Avisynth+ version.
Thank you.
Re: DGDenoise
Looks like a problem in BlankClip (or maybe 32-bit VirtualDub), because BlankClip() crashes but DGSource() does not.
#source=BlankClip(color=color_magenta, width=720, height=576, pixel_type="YV12") # crashes in 32-bit release mode
source=DGSource("Alba.dgi") # OK in 32-bit release mode
b=source.DGDenoise(strength=1.0,cstrength=1.0,searchw=5)
interleave(source.Histogram("levels"),b.Histogram("levels"))
Please advise your test results.
#source=BlankClip(color=color_magenta, width=720, height=576, pixel_type="YV12") # crashes in 32-bit release mode
source=DGSource("Alba.dgi") # OK in 32-bit release mode
b=source.DGDenoise(strength=1.0,cstrength=1.0,searchw=5)
interleave(source.Histogram("levels"),b.Histogram("levels"))
Please advise your test results.
Re: DGDenoise
Getting interesting now! This fails:
loadplugin("D:\Don\Programming\C++\DGDecNV\DGDecodeNV\x32\Release\dgdecodenv.dll")
source=BlankClip(color=color_magenta, width=720, height=576, pixel_type="YV12") #or any other color
b=source.DGDenoise(strength=1.0,cstrength=1.0,searchw=5)
interleave(source.Histogram("levels"),b.Histogram("levels"))
But this succeeds:
loadplugin("D:\Don\Programming\C++\DGDecNV\DGDecodeNV\x32\Release\dgdecodenv.dll")
tmp=DGSource("Alba.dgi") # not used
source=BlankClip(color=color_magenta, width=720, height=576, pixel_type="YV12") #or any other color
b=source.DGDenoise(strength=1.0,cstrength=1.0,searchw=5)
interleave(source.Histogram("levels"),b.Histogram("levels"))
So it looks like DGSource() initialization is doing something that DGDenoise requires. Investigating...
loadplugin("D:\Don\Programming\C++\DGDecNV\DGDecodeNV\x32\Release\dgdecodenv.dll")
source=BlankClip(color=color_magenta, width=720, height=576, pixel_type="YV12") #or any other color
b=source.DGDenoise(strength=1.0,cstrength=1.0,searchw=5)
interleave(source.Histogram("levels"),b.Histogram("levels"))
But this succeeds:
loadplugin("D:\Don\Programming\C++\DGDecNV\DGDecodeNV\x32\Release\dgdecodenv.dll")
tmp=DGSource("Alba.dgi") # not used
source=BlankClip(color=color_magenta, width=720, height=576, pixel_type="YV12") #or any other color
b=source.DGDenoise(strength=1.0,cstrength=1.0,searchw=5)
interleave(source.Histogram("levels"),b.Histogram("levels"))
So it looks like DGSource() initialization is doing something that DGDenoise requires. Investigating...
Re: DGDenoise
I noticed another oddity:
It crashes when I load the script an run it the first time -> Access violation.
Then I have to change any of the DGDenoise parameters and from then onwards it works.
I had this before, but got so much used to this oddity that I just used it that way ... assuming it's on my system only :belly-laugh:
It crashes when I load the script an run it the first time -> Access violation.
Then I have to change any of the DGDenoise parameters and from then onwards it works.
I had this before, but got so much used to this oddity that I just used it that way ... assuming it's on my system only :belly-laugh:
Re: DGDenoise
You're a funny guy, Sharc! Love ya. You have the system from hell. Not!
Please immediately report access violations experienced with DG tools. Hey, I know it's a once-in-a-blue-moon thing, but do what ya gotta do.
Sherman says we should just drop 32-bit. Oh, the impetuousness of youth.
Please immediately report access violations experienced with DG tools. Hey, I know it's a once-in-a-blue-moon thing, but do what ya gotta do.
Sherman says we should just drop 32-bit. Oh, the impetuousness of youth.