Log in

View Full Version : Dogway's Filters Packs


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 [31] 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62

madey83
15th September 2022, 15:24
Very interesting! I would like to try that approach but with mvtools motion compensated temporalsoften since it keeps more detail than mdegrain but removes more noise. Maybe this new version is something for you to try Dogway? Zopti on top of that...:D


hey @anton_foy,

could you please share if possible your mvtools based script for noise removal?

i'm only use SMDegrain so i'm very cuirius to compare as you sugested mvtools do better job to prevent more details.

thank you in advance. :thanks:

anton_foy
15th September 2022, 18:42
hey @anton_foy,

could you please share if possible your mvtools based script for noise removal?

i'm only use SMDegrain so i'm very cuirius to compare as you sugested mvtools do better job to prevent more details.

thank you in advance. :thanks:

Hello Madey83! Sure I am just writing a new one that is almost ready to post here. Really good stuff if I may say so. Watch out for my post on the Avisynth Usage section I will call it OIC denoiser. Used alot from Dogway's tool box, brilliant stuff for sure. But also you can already use Smdegrain(mode="temporalsoften",tr=5) or whatever tr you need and just try it out. Dogway has implemented many more modes into SMdegrain aswell.

Edit: try it with ex_contrasharpen to regain lost detail.

madey83
15th September 2022, 19:11
Hello Madey83! Sure I am just writing a new one that is almost ready to post here. Really good stuff if I may say so. Watch out for my post on the Avisynth Usage section I will call it OIC denoiser. Used alot from Dogway's tool box, brilliant stuff for sure. But also you can already use Smdegrain(mode="temporalsoften",tr=5) or whatever tr you need and just try it out. Dogway has implemented many more modes into SMdegrain aswell.

Edit: try it with ex_contrasharpen to regain lost detail.

hi.

Thank you :D.

Looking forwad your post and meanwhile goint to test your tip.

:D

madey83
16th September 2022, 20:29
@anton_foy,

i did some test and i see that "temporalsoften" gives soft results even if i use LSFmod or LSFPlus by Dogway's implementation:

LSFmod(defaults="slow", strength=200, Smode=5, Smethod=3, kernel=11, secure=true, Szrp=16, Spwr=4, SdmpLo=4, SdmpHi=48, Lmode=4, overshoot=1, undershoot=1, Overshoot2=1, Undershoot2=1, soft=-2, soothe=true, keep=20, edgemode=0, edgemaskHQ=true, ss_x=1.50, ss_y=1.50, dest_x=%target_width%, dest_y=%target_height%, show=false, screenW=%target_width%, screenH=%target_height%)

or

LSFplus(strength=60, preset="LSF", Lmode=3, soft=-2, soothe=false, smode=3)

madey83
16th September 2022, 21:11
@Dogway,

base on my last test i see that your implementation of SMDegrain (v3.5.4d) retain more details in the picture like on below screenshot. But on top right corner you can see some fuzzy pixels.
Bottom picture it's a results of old SMDegrain (v3.1.2d)
https://imgur.com/a/xwtv3fc

and funny think at least for me is that the bitrate different for the test file (800 frames) is in my opition huge:

old SMD: 3196 kb/s // SMDegrain(tr=4, thSAD=400, thSCD2=100, contrasharp=false, lsb=true, refinemotion=true, truemotion=false, search=3, subpixel=3, Chroma=true, plane=4)
new SMD: 4978 kb/s // SMDegrain(tr=5, thSAD=300, thSCD2=100, LFR=false, refinemotion=true, search=3, subpixel=3)

DTL
16th September 2022, 22:31
"4978 kb/s // SMDegrain(tr=5, thSAD=300,"

To compare versions it is good to keep both tr and thSAD the equal. If not directly noted about non-compatibility of the old thSAD settings with new versions.

madey83
17th September 2022, 07:47
"4978 kb/s // SMDegrain(tr=5, thSAD=300,"

To compare versions it is good to keep both tr and thSAD the equal. If not directly noted about non-compatibility of the old thSAD settings with new versions.

Thank you DTL for pointing me out my oversight.

i made another tests with the same value for TR and thSAD and what i can clearly say that old SMDegrain clear noise more of the background of the picture. For new SMDegrain implementation i can stil see "fuzzy" pixels in the top righ corner of the picture.

please take a look on this comparison.
https://imgur.com/cmxO3uV

when i increase theSAD to 500 it removed "fuzzy" pixels on top right corrnet but noise on the t-shirt was greater also, compare to old version.


Sorry for being snippy on this matter but i would like to swichover from old verion to new one, but i sitll do not know how to set it up to get thinks right.

kedautinh12
17th September 2022, 08:02
Old clean more but new keep more details inside collar

madey83
17th September 2022, 08:44
i was able to "fix" this when i use for sharpening filter with this param: LSFplus(preblur="FFT3Dfilter(sigma=4,plane=0)",.......)
noise on the t-shirt was nicely blured.

LeXXuz
17th September 2022, 09:02
You can't compare old SMDegrain with new one because too many things have been changed or added.

Even with same thSAD and tr values you will get quite different results and bigger filesizes because the new version preserves much more detail than the old one.

Dogway
17th September 2022, 09:50
New SMDegrain does a better job at retaining details, the problem is that in this case it's detecting "fizz-grain" as details. You can do two things raise values, use prefilters, or a mix of both. For example KNLmeansCL (prefilter=5) or try other ones.

You can also use 'mblur' arg to temporally blur areas where motion matching was wrong such as in that grain.

DTL
17th September 2022, 11:43
Zopti on top of that...:D

Yes - it is close to the need of automated optimizers: The new version of 'prefiltering with pre-MDegrain' uses different thSAD and final MDegrain uses much lower thSAD (like 200 for 'pre-filter' and 80 for final MDegrain at some current tests).

So there are several params that require long manual encodings and frames review to pick best values. If some automation is available it may be time to look into it.

Unfortunately the very first tests of using forward and backward search MVs and attempt to use simple MV length to detect 'quality of MV search' still about useless - at both smooth and low-contrast detailed areas both fw/bw MVs looks like very different so simple algorithm based on decreasing 'degraining' (weight of ref blocks) on areas with 'bad MVs quality' leaves too much grain on large non-detailed areas (like out-of focus background and so on) too. It is required some more ideas how to use the 2-directional search results to make things better.

anton_foy
17th September 2022, 13:46
Yes - it is close to the need of automated optimizers: The new version of 'prefiltering with pre-MDegrain' uses different thSAD and final MDegrain uses much lower thSAD (like 200 for 'pre-filter' and 80 for final MDegrain at some current tests).

So there are several params that require long manual encodings and frames review to pick best values. If some automation is available it may be time to look into it.

Unfortunately the very first tests of using forward and backward search MVs and attempt to use simple MV length to detect 'quality of MV search' still about useless - at both smooth and low-contrast detailed areas both fw/bw MVs looks like very different so simple algorithm based on decreasing 'degraining' (weight of ref blocks) on areas with 'bad MVs quality' leaves too much grain on large non-detailed areas (like out-of focus background and so on) too. It is required some more ideas how to use the 2-directional search results to make things better.

Very strange but I had only one script of mcdegrain that actually shows any difference between thsad, all others does not show any difference between thsad = 180 to thsad = 1600.

Edit:
Yes but I think simplicity in steps are the best for denoising. A motioncompensated temporalsoften has been my leading star for every project latey. The prefiltering is crucial though. Otherwise it blurs too much. I will post soon the before and after comparisons and the .avsi of course. Right now my avs-script works but as a function it ignores some steps and I try to figure out why. Faster than temporaldegrain2 and retains more detail while it also automatically detects noise amount and tweaks the strength. Startup time is a bit slow though still.

Edit2: I modded temporalsoftenmc to be able to change blocksize/overlap of mrecalculate and even to do a normal manalyse with blocksize=32 and mrecalculates blocksize=8 (or even 4) is very accurate and fast.

DTL
17th September 2022, 20:03
"do a normal manalyse with blocksize=32 and mrecalculates blocksize=8 (or even 4) is very accurate"

May be initially big blocksize of 32 with full levels search work more stable for low contrast areas (less distorted by noise and low contrast) and MRecalculate as documentation says only refine of finest level (it may be level of 'full-pel' I think so pel 2 and 4 still refined in more passes if set). So can not make as big search error as full levels MAnalyse with small block size. It is not directly supported by hardware accelerators (as I see NVIDIA currently only support 8x8 and 16x16 blocks) but may be emulated with search with block size 16 over half sized frame and make interpolate to full size frame with MScaleVect. It is also a subject to test.

"all others does not show any difference between thsad = 180 to thsad = 1600."

May be too low tr is used (like 1..2), may be the thSCD1 is set too low so work as 'secondary protector' from too bad blending (though it also stops denoising activity too). Also the actual SAD and the corresponding thSAD of MDegrain very significantly depends on 'prefiltering' (if used). Typically denoising prefilter cause more or less SAD decreasing so to keep thSAD just above 'noise level SAD' it need to be lowered too. So may be after strong prefiltering the thSAD 180 already above residual noise-SAD and increasing to 2..3x do not change output noise result (though can quickly start to blur low contrast textures if present). Also setting thSAD > thSCD1 typically change nothing because thSCD1 become limiting.

"A motioncompensated temporalsoften"

Is it a MCTemporalDenoise http://avisynth.nl/index.php/MCTemporalDenoise ?

kedautinh12
18th September 2022, 00:52
"do a normal manalyse with blocksize=32 and mrecalculates blocksize=8 (or even 4) is very accurate"

May be initially big blocksize of 32 with full levels search work more stable for low contrast areas (less distorted by noise and low contrast) and MRecalculate as documentation says only refine of finest level (it may be level of 'full-pel' I think so pel 2 and 4 still refined in more passes if set). So can not make as big search error as full levels MAnalyse with small block size. It is not directly supported by hardware accelerators (as I see NVIDIA currently only support 8x8 and 16x16 blocks) but may be emulated with search with block size 16 over half sized frame and make interpolate to full size frame with MScaleVect. It is also a subject to test.

"all others does not show any difference between thsad = 180 to thsad = 1600."

May be too low tr is used (like 1..2), may be the thSCD1 is set too low so work as 'secondary protector' from too bad blending (though it also stops denoising activity too). Also the actual SAD and the corresponding thSAD of MDegrain very significantly depends on 'prefiltering' (if used). Typically denoising prefilter cause more or less SAD decreasing so to keep thSAD just above 'noise level SAD' it need to be lowered too. So may be after strong prefiltering the thSAD 180 already above residual noise-SAD and increasing to 2..3x do not change output noise result (though can quickly start to blur low contrast textures if present). Also setting thSAD > thSCD1 typically change nothing because thSCD1 become limiting.

"A motioncompensated temporalsoften"

Is it a MCTemporalDenoise http://avisynth.nl/index.php/MCTemporalDenoise ?
Latest ver
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/MCTemporalDenoise.avsi

anton_foy
18th September 2022, 12:14
"do a normal manalyse with blocksize=32 and mrecalculates blocksize=8 (or even 4) is very accurate"

May be initially big blocksize of 32 with full levels search work more stable for low contrast areas (less distorted by noise and low contrast) and MRecalculate as documentation says only refine of finest level (it may be level of 'full-pel' I think so pel 2 and 4 still refined in more passes if set). So can not make as big search error as full levels MAnalyse with small block size. It is not directly supported by hardware accelerators (as I see NVIDIA currently only support 8x8 and 16x16 blocks) but may be emulated with search with block size 16 over half sized frame and make interpolate to full size frame with MScaleVect. It is also a subject to test.

"all others does not show any difference between thsad = 180 to thsad = 1600."

May be too low tr is used (like 1..2), may be the thSCD1 is set too low so work as 'secondary protector' from too bad blending (though it also stops denoising activity too). Also the actual SAD and the corresponding thSAD of MDegrain very significantly depends on 'prefiltering' (if used). Typically denoising prefilter cause more or less SAD decreasing so to keep thSAD just above 'noise level SAD' it need to be lowered too. So may be after strong prefiltering the thSAD 180 already above residual noise-SAD and increasing to 2..3x do not change output noise result (though can quickly start to blur low contrast textures if present). Also setting thSAD > thSCD1 typically change nothing because thSCD1 become limiting.

"A motioncompensated temporalsoften"

Is it a MCTemporalDenoise http://avisynth.nl/index.php/MCTemporalDenoise ?

Regarding Thsad I actually have a tr 5-7. Maybe thSCD1 is limiting then.
No I never tried MCTemporaldenoise.
Here is the original TemporalSoftenMC: here (http://forum.doom9.net/showthread.php?p=1950632#post1950632)

guest
19th September 2022, 06:57
Latest ver
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/MCTemporalDenoise.avsi

I thought I'd try and get this to work with RipBot264, here's my script :-

LoadPlugin("%AVISYNTHPLUGINS%\masktools\masktools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\AddGrainC\AddGrainC.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\DCTFilter\DCTFilter.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\Deblock\Deblock-x64.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\EEDI2\EEDI2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\FFT3dFilter\fft3dfilter.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\GradFun2db\GradFun2db.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\SangNom\SangNom2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\TTempSmooth\TTempSmooth.dll")
Import("%AVISYNTHPLUGINS%\PD_TOOLS\GradFun2DBmod\GradFun2DBmod.avs")
Import("%AVISYNTHPLUGINS%\PD_TOOLS\Deblock_QED\Deblock_QED_MT2Mod.avs")
Import("%AVISYNTHPLUGINS%\PD_TOOLS\LSFmod\LSFmod.avs")
Import("%AVISYNTHPLUGINS%\PD_TOOLS\MCTemporalDenoise\MCTemporalDenoise.avs")
video=MCTemporalDenoise(video, settings="medium")

But AVSMeter show error with this :-

https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/MCTemporalDenoise.avsi#L477

I'm pretty sure I've got something very wrong, here :(

kedautinh12
19th September 2022, 07:00
You lack call plugin sysinfo.dll

guest
19th September 2022, 07:29
You lack call plugin sysinfo.dll

Thanks, but it didn't make any difference :(

Zetti
19th September 2022, 08:29
You need this file:

https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/Zs_RF_Shared.avsi

kedautinh12
19th September 2022, 08:58
You need this file:

https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/Zs_RF_Shared.avsi

Yeah, that script and sysinfo plugin. I was forgot it when comment to TDS

kedautinh12
19th September 2022, 09:53
Your pc lack vc++ or directX 9 SDK to load plugins fft3dGPU.dll. Try install them
https://www.microsoft.com/en-us/download/details.aspx?id=6812
https://github.com/abbodi1406/vcredist/releases

And please make sure to place the correct file HLSL in the same directory with fft3dGPU.dll

tormento
19th September 2022, 10:17
Move it to System32 inside Windows directory.

kedautinh12
19th September 2022, 10:22
You need download d3dx9_43.dll x64 ver and copy to Windows/System32. I think you lack that file. If not here the list of file you need for FFT3DGPU to work
d3dx9_43.dll: D3DXGetVertexShaderProfile
d3dx9_43.dll: D3DXFloat32To16Array
d3dx9_43.dll: D3DXFloat16To32Array
d3dx9_43.dll: D3DXGetPixelShaderProfile
d3dx9_43.dll: D3DXCompileShaderFromFileA
d3d9.dll: Direct3DCreate9
DINPUT8.dll: DirectInput8Create
VERSION.dll: VerQueryValueA
VERSION.dll: GetFileVersionInfoSizeA
VERSION.dll: GetFileVersionInfoA
ole32.dll: CoUninitialize
ole32.dll: CoCreateInstance
ole32.dll: CoInitialize
OLEAUT32.dll: @8
OLEAUT32.dll: @7
OLEAUT32.dll: @9

LeXXuz
19th September 2022, 10:30
Has anyone a subtle to medium grain setting for GrainFactory3mod? The default setting is way too strong for my taste and I haven't worked with this before.

It's for SD material, one of these awful DVDs where the content suffers from almost every kind of noise there is, including way too low bitrate used upon creation. So the cleaned output looks too sterile and almost as bad as the untouched source.

I need some kind of good compressable grain-coating back on that material to make it look more natural again.

kedautinh12
19th September 2022, 10:33
Or not, you can download that app and drag FFT3DGPU.dll to app. It's will show what lack requirements of FFT3DGPU

kedautinh12
19th September 2022, 10:41
Has anyone a subtle to medium grain setting for GrainFactory3mod? The default setting is way too strong for my taste and I haven't worked with this before.

It's for SD material, one of these awful DVDs where the content suffers from almost every kind of noise there is, including way too low bitrate used upon creation. So the cleaned output looks too sterile and almost as bad as the untouched source.

I need some kind of good compressable grain-coating back on that material to make it look more natural again.

You can base here to findout best value for you
https://github.com/Dogway/Avisynth-Scripts/blob/767e90f7cbf02976d112fe85716fa0d39174f462/ResizersPack.avsi#L271

kedautinh12
19th September 2022, 10:44
Is this for me ??

What app ??

Sr, forgot link :D
https://github.com/lucasg/Dependencies/releases

anton_foy
19th September 2022, 17:21
@Dogway, some ideas and speculations. Since I cannot get waifu2x to work I have no idea how good its denoising is. I read it can be used for 1x in cunet mode with noise=3? Is it a good denoising (spatial/temporal, slow, fast)? Could waifu2x maybe be used to reconstruct chroma as an alternative to chromareconstructor-script? Vulkan makes me think its faster...

Dogway
19th September 2022, 17:41
Quality wise I don't know, I presume something like a bilateral filter? It's spatial only.
I gave it a run to test performance and got a system semi-freeze, scary. Tested without prefetch and ran at around 2.3fps.

DGSource("source"")
ConvertBits(32)
ConverttoPlanarRGB()
w2xncnnvk(noise=3,scale=1,model=2)

------------------

By the way I was having a look at the non-linearity of vision (psychovisual) and found the INRF algorithm here (https://www.nature.com/articles/s41598-020-73113-0).
I gave it a stab, although had to reverse the last expression to get the values on positive, and then normalize.
From here you can extract the INRF-IQ similarity metric.

# Variables are both Gaussians stds, 3.88 lamda, and the two exponens 0.63 and 0.78
m=vsTCanny(0.81,mode=-1)
w=vsTCanny(2.77,mode=-1)

# Neighbor contribution to x (weighted by Gaussian)
Delta= Expr(last,w,\
"x[1,1] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[1,1] *
x[1,0] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[1,0] *
x[1,-1] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[1,-1] *
x[-1,1] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[-1,1] *
x[-1,0] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[-1,0] *
x[-1,-1] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[-1,-1] *
x[0,1] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[0,1] *
x[0,-1] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[0,-1] * + + + + + + + ")
# OR
#~ ex_luts(mode="avg", pixels=ex_shape(1,mode="square",center=true),expr="Y X - S@ 0 >= S 0.63 ^ S abs 0.78 ^ neg ? Y *", exprF="9 *")


# Not sure if x[0,0] should be added to the computations
Delta= Expr(last,Delta,w,\
"x[1,1] y[1,1] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[1,1] *
x[1,0] y[1,0] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[1,0] *
x[1,-1] y[1,-1] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[1,-1] *
x[-1,1] y[-1,1] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[-1,1] *
x[-1,0] y[-1,0] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[-1,0] *
x[-1,-1] y[-1,-1] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[-1,-1] *
x[0,1] y[0,1] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[0,1] *
x[0,-1] y[0,-1] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[0,-1] *
x y - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z * + + + + + + + + 3.88 *")

RF=Expr(last,m,\
"x[1,1] y[1,1] *
x[1,0] y[1,0] *
x[1,-1] y[1,-1] *
x[-1,1] y[-1,1] *
x[-1,0] y[-1,0] *
x[-1,-1] y[-1,-1] *
x[0,1] y[0,1] *
x[0,-1] y[0,-1] * x y * + + + + + + + + ")


Expr(RF, Delta, "y x - 25.5 /")

anton_foy
19th September 2022, 20:14
Quality wise I don't know, I presume something like a bilateral filter? It's spatial only.
I gave it a run to test performance and got a system semi-freeze, scary. Tested without prefetch and ran at around 2.3fps.

DGSource("source"")
ConvertBits(32)
ConverttoPlanarRGB()
w2xncnnvk(noise=3,scale=1,model=2)

------------------

By the way I was having a look at the non-linearity of vision (psychovisual) and found the INRF algorithm here (https://www.nature.com/articles/s41598-020-73113-0).
I gave it a stab, although had to reverse the last expression to get the values on positive, and then normalize.
From here you can extract the INRF-IQ similarity metric.

# Variables are both Gaussians stds, 3.88 lamda, and the two exponens 0.63 and 0.78
m=vsTCanny(0.81,mode=-1)
w=vsTCanny(2.77,mode=-1)

# Neighbor contribution to x (weighted by Gaussian)
Delta= Expr(last,w,\
"x[1,1] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[1,1] *
x[1,0] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[1,0] *
x[1,-1] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[1,-1] *
x[-1,1] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[-1,1] *
x[-1,0] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[-1,0] *
x[-1,-1] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[-1,-1] *
x[0,1] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[0,1] *
x[0,-1] x - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? y[0,-1] * + + + + + + + ")
# OR
#~ ex_luts(mode="avg", pixels=ex_shape(1,mode="square",center=true),expr="Y X - S@ 0 >= S 0.63 ^ S abs 0.78 ^ neg ? Y *", exprF="9 *")


# Not sure if x[0,0] should be added to the computations
Delta= Expr(last,Delta,w,\
"x[1,1] y[1,1] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[1,1] *
x[1,0] y[1,0] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[1,0] *
x[1,-1] y[1,-1] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[1,-1] *
x[-1,1] y[-1,1] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[-1,1] *
x[-1,0] y[-1,0] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[-1,0] *
x[-1,-1] y[-1,-1] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[-1,-1] *
x[0,1] y[0,1] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[0,1] *
x[0,-1] y[0,-1] - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z[0,-1] *
x y - X@ 0 >= X 0.63 ^ X abs 0.78 ^ neg ? z * + + + + + + + + 3.88 *")

RF=Expr(last,m,\
"x[1,1] y[1,1] *
x[1,0] y[1,0] *
x[1,-1] y[1,-1] *
x[-1,1] y[-1,1] *
x[-1,0] y[-1,0] *
x[-1,-1] y[-1,-1] *
x[0,1] y[0,1] *
x[0,-1] y[0,-1] * x y * + + + + + + + + ")


Expr(RF, Delta, "y x - 25.5 /")

Thanks for checking it out. I don't get any freeze with prefetch but only black frames and errors in the terminal.

Was curious about your INRF-script but all I get is a green image.
EDIT: oh its for metrics only...my bad.

madey83
19th September 2022, 20:42
Hi,

Sorry for stupid question (please forgive) how i can remove more noise on background and do not touch forground?

anton_foy
19th September 2022, 21:55
Hi,

Sorry for stupid question (please forgive) how i can remove more noise on background and do not touch forground?

What is background/foreground? Out of focus background (blurry)?

Reel.Deel
20th September 2022, 02:53
TDS,

It's probably best to open your own thread since your posts in the last page and a half have nothing to do with Dogway's filters.

guest
20th September 2022, 03:00
TDS,

It's probably best to open your own thread since your posts in the last page and a half have nothing to do with Dogway's filters.

Heard...

But someone (and then others) mentioned MCTemporalDenoise, so I just followed it.

I got some help, but not fixed :(

kedautinh12
20th September 2022, 03:24
Hi ked,

So, a new day, same problem.

There were no issues with that dependencies app, I have looked high & low for a solution, but I'm still getting a problem with this :-

https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/MCTemporalDenoise.avsi#L711

There is still clearly something missing :(

You need download latest Gradfrun2dbmod
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/GradFun2DBmod.avsi
And you need dither tools too
http://avisynth.nl/index.php/Dither_tools#SmoothGrad

kedautinh12
20th September 2022, 04:13
I really appreciate all your help, but this is going nowhere.

I'm still getting that line 711 error msg.

Can you share again your call plugins, scripts??

kedautinh12
20th September 2022, 05:14
Sure...Reel.Deel not going to like all this...

LoadPlugin("%AVISYNTHPLUGINS%\masktools\masktools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\AddGrainC\AddGrainC.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\DCTFilter\DCTFilter.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\Deblock\Deblock-x64.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\dither\dither.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\EEDI2\EEDI2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\FFT3dFilter\fft3dfilter.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\FFT3dGPU\FFT3dGPU.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\GradFun2db\GradFun2db.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\SangNom\SangNom2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\SysInfo\SysInfo64.dll")
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\TTempSmooth\TTempSmooth.dll")
Import("%AVISYNTHPLUGINS%\PD_TOOLS\GradFun2DBmod\GradFun2DBmod.avs")
Import("%AVISYNTHPLUGINS%\PD_TOOLS\Deblock_QED\Deblock_QED_MT2Mod.avs")
Import("%AVISYNTHPLUGINS%\PD_TOOLS\LSFmod\LSFmod.avs")
Import("%AVISYNTHPLUGINS%\PD_TOOLS\Zs_RF_Shared\Zs_RF_Shared.avs")
Import("%AVISYNTHPLUGINS%\PD_TOOLS\MCTemporalDenoise\MCTemporalDenoise.avs")
video=MCTemporalDenoise(video, settings="medium")

You forgot call Dither_Tools.avsi
http://avisynth.nl/index.php/Dither_tools

madey83
20th September 2022, 06:45
What is background/foreground? Out of focus background (blurry)?

@anton_foy,

something like this:
https://imgur.com/9VoMBEv

King's face and clothes are clean and fairly sharp (forground), but background behing him is blurred ( i know this is related to camera and recording technics) and it is very clean, without noise.

when i call SMDegrain like this:
SMDegrain(mode="MDegrain", tr=4, thSAD=400, thSCD2=100, LFR=false, refinemotion=true, search=3, subpixel=3).

it cleans to much noise on first plan (king's details) but background noise removes quite good.

Is there anything that could separate forground and background and specify different denoise values?

kedautinh12
20th September 2022, 07:07
Sorry 'bout that..

Now added, still same error :(

I think you need use other app can autoload all plugins and scripts to save time for fix your errors. And other app can tell what errors exactly

guest
20th September 2022, 07:34
I think you need use other app can autoload all plugins and scripts to save time for fix your errors. And other app can tell what errors exactly

You're probably right, but this is the app I want to use.

I may not even like what this filter does, anyway.

Thanks again for your help, I think I might now go back and delete all the posts, to keep reel.deel happy.

kedautinh12
20th September 2022, 07:45
You're probably right, but this is the app I want to use.

I may not even like what this filter does, anyway.

Thanks again for your help, I think I might now go back and delete all the posts, to keep reel.deel happy.

Yeah, reel.deel always angry, you need delete your post before he alarm to moderator like me when i thanks all threads with my honor :D

guest
20th September 2022, 07:49
Yeah, reel.deel always angry, you need delete your post before he alarm to moderator like me when i thanks all threads with my honor :D

OK, well if you want to go back and delete your replies, I'm OK with that :D

FYI, I just had a look at Staxrip script for this filter, and it's MASSIVE...but I think they included everything, just to cover all variables.

anton_foy
20th September 2022, 14:59
@anton_foy,

something like this:
https://imgur.com/9VoMBEv

King's face and clothes are clean and fairly sharp (forground), but background behing him is blurred ( i know this is related to camera and recording technics) and it is very clean, without noise.

when i call SMDegrain like this:
SMDegrain(mode="MDegrain", tr=4, thSAD=400, thSCD2=100, LFR=false, refinemotion=true, search=3, subpixel=3).

it cleans to much noise on first plan (king's details) but background noise removes quite good.

Is there anything that could separate forground and background and specify different denoise values?

Maybe lower tr and thsad (and try LFR=true ? ) until the face is good and then try this (https://forum.doom9.org/showthread.php?p=1973275#post1973275) after smdegrain.

madey83
20th September 2022, 16:11
Maybe lower tr and thsad (and try LFR=true ? ) until the face is good and then try this (https://forum.doom9.org/showthread.php?p=1973275#post1973275) after smdegrain.

thanks.

i will try.:thanks:

LeXXuz
20th September 2022, 18:39
Are other blocksizes allowed than 2^n? SMDegrain seems to accept them (f.e. blksize=24) but I don't know if this may cause problems.

DTL
20th September 2022, 22:23
If script accepts both blocksize (asumed as H) and blocksizeV - you can probably set any supported by mvtools (see documentation) and also blocksize must be compatible with colour mode used (4:2:2 and 4:2:0 require special ratio of luma and chroma). Possibly may work:
List of available block sizes (blksize x blksizeV)
64x64, 64x48, 64x32, 64x16
48x64, 48x48, 48x24, 48x12
32x64, 32x32, 32x24, 32x16, 32x8
24x48, 24x24, 24x32, 24x12, 24x6
16x64, 16x32, 16x16, 16x12, 16x8, 16x4, 16x2
12x48, 12x24, 12x16, 12x12, 12x6, 12x3
8x32, 8x16, 8x8, 8x4, 8x2, 8x1
6x24, 6x12, 6x6, 6x3
4x8, 4x4, 4x2
3x6, 3x3
2x4, 2x2
Note: some smaller block sizes can only be available in 4:4:4 formats, due to block size division (chroma subsampling) with mvtools about 2.7.45.

LeXXuz
21st September 2022, 06:32
Oh good. On some sources with very coarse grain/noise a higher blocksize does a way better job and gives a more homogeneous look than thSAD and tr could achieve. Thanks DTL :thanks:

madey83
21st September 2022, 08:39
If script accepts both blocksize (asumed as H) and blocksizeV - you can probably set any supported by mvtools (see documentation) and also blocksize must be compatible with colour mode used (4:2:2 and 4:2:0 require special ratio of luma and chroma). Possibly may work:
List of available block sizes (blksize x blksizeV)
64x64, 64x48, 64x32, 64x16
48x64, 48x48, 48x24, 48x12
32x64, 32x32, 32x24, 32x16, 32x8
24x48, 24x24, 24x32, 24x12, 24x6
16x64, 16x32, 16x16, 16x12, 16x8, 16x4, 16x2
12x48, 12x24, 12x16, 12x12, 12x6, 12x3
8x32, 8x16, 8x8, 8x4, 8x2, 8x1
6x24, 6x12, 6x6, 6x3
4x8, 4x4, 4x2
3x6, 3x3
2x4, 2x2
Note: some smaller block sizes can only be available in 4:4:4 formats, due to block size division (chroma subsampling) with mvtools about 2.7.45.

hi,

how can this be used in StaxRip with SMDegrain?

Could you please provide some example for test purpose?

madey83
21st September 2022, 09:57
Maybe lower tr and thsad (and try LFR=true ? ) until the face is good and then try this (https://forum.doom9.org/showthread.php?p=1973275#post1973275) after smdegrain.

Hi anton_foy,

could you advice where i made mistake ?

in StaxRip i put this:
Import("E:\4k_Encode\UnBand.avsi")
Import("E:\4k_Encode\Avisynth-Scripts-master\ExTools.avsi")
Loadplugin("E:\4k_Encode\mvtools-2.7.45-with-depans20210608\x64\mvtools2.dll")
Loadplugin("E:\4k_Encode\ApplyEvery031_32_64\ApplyEvery64.dll")
LoadPlugin("E:\4k_Encode\apps\StaxRip-v2.12.0-x64\Apps\Plugins\Dual\f3kdb Neo\neo-f3kdb.dll")
loadplugin("E:\4k_Encode\apps\StaxRip-v2.12.0-x64\Apps\Plugins\AVS\FFT3DFilter\fft3dfilter.dll")
Uband(loC=3, grainY=23, mt=false)

but i got this error:
Script error: There is no function named 'si_physicalcores'

and is this change something even if i use f3kdb Neo?