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

DTL
31st May 2022, 06:25
"comparison is not fair, as it filters only in 8 bit "

If source is 8bit it may be faster to use 8bit processing before MDegrain and use out16=true switch to get 16bit output. So you can use dithered conversion to 8bit if required or left higher bitdepth if encoder support. Currently I see SMDegrain do not have such functionality but it may be not hard to add. It may make processing speed visibly faster because host RAM speed to handle large 'super' clips in double size in 16bit is slow now.

tormento
31st May 2022, 16:31

Why prefilter=7 wants VStCanny?

Dogway
31st May 2022, 22:28
Why prefilter=7 wants VStCanny?

Because ex_LFR(), depends on strength and source characteristics that the filter fallsback to vsTCanny.

tormento
31st May 2022, 23:10
Because ex_LFR(), depends on strength and source characteristics that the filter fallsback to vsTCanny.


Am I remembering wrong that 7 is DgDenoise prefilter? Why is it different in processing than 5 or 6 to need that procedure?

Dogway
1st June 2022, 01:26
Because I observed that it smeared low frequency details more than the other two (BM3D and KNLMeansCL) at parity settings, but have a look to double check just in case.

KNLMeansCL wmode=1 doesn't suffer of this issue.

By the way, vsTCanny is running on mode=-1, that means no edge detection, just a simple gaussian blur.

kedautinh12
4th June 2022, 06:10
Just use SMDegrain(prefilter=6, gpuid=-1). SMDegrain will choose BM3DCPU is prefilter

guest
4th June 2022, 07:25
Just use SMDegrain(prefilter=6, gpuid=-1). SMDegrain will choose BM3DCPU is prefilter

Hi ked, you've done it again, :thanks:

Just tested, seems to work :D


@ Line 200... gpuid = Default ( gpuid, 0) change to gpuid = Default ( gpuid, -1)

I had to change @ Line 1030, also....

Dogway
9th June 2022, 21:32
Wanted to share a script I'm using for processing 600dpi scans, to remove color half-tone (aka descreening).
It works nice with not too strong half-tones, preserving most details.

I know the common way to do this is in the frequency domain but I needed an automated way to process it.
I will upload the tools I'm using for cleaning scans (straighten, trimming, descreening) when I finish them.
Currently using OpenCV for Python as that's what I had on hand.

FFImageSource()
ConvertBits(16)
ConvertToYUV444(matrix="PC.601",ChromaInPlacement="MPEG1",chromaresample="spline36")

# EDGE SMOOTHING
a=ex_smooth(2, mode="SG", limit=true, sharp=true, UV=3)

# FLAT SMOOTHING
bl=a.ex_median(mode="CAM", thres=255, recursion=false,UV=3)

# MASK
ex_edge("kroon",100,120, scale=0.25, invert=false)
ex_binarize(200)
ex_expand(radius=2, mode="disk")
mt_deflate()
mt_deflate()
mt_merge(bl,a,last,luma=true)

# RESIZE
deep_resize(0.5,edge="ZoptiH",chroma="Zopti",grain=0.3)

# SHARPENING (Optional)
ex_unsharp(0.2, Fc=width(), th=0, safe=false)

# CLEAN REMAINING DOTS with threshold
a=removegrain(1)
expr(last,a,"y x - abs 16 > y x ?","") # Undot only for biggest change

ConvertFormat(1,fmt_out="RGB",cs_in="170M",cs_out="",EOTF="",cplace_in="center",mod=2,tv_in=false)
ConvertBits(8,dither=1)

Blankmedia
10th June 2022, 05:41
Wanted to share a script I'm using for processing 600dpi scans, to remove color half-tone (aka descreening).
It works nice with not too strong half-tones, preserving most details.

I know the common way to do this is in the frequency domain but I needed an automated way to process it.
I will upload the tools I'm using for cleaning scans (straighten, trimming, descreening) when I finish them.
Currently using OpenCV for Python as that's what I had on hand.

FFImageSource()
ConvertBits(16)

# EDGE SMOOTHING
a=ex_smooth(2, mode="SG", limit=true, sharp=true, UV=3)

# FLAT SMOOTHING
bl=a.ex_median(mode="CAM", thres=255, recursion=false,UV=3)

# MASK
ex_edge("kroon",100,120, scale=0.25, invert=false)
ex_binarize(200)
ex_expand(radius=2, mode="disk")
mt_deflate(radius=1)
mt_deflate(radius=1)
mt_merge(bl,a,last,luma=true)

# RESIZE
deep_resize(0.5,edge="ZoptiH",chroma="Zopti",grain=0.3)

# SHARPENING (Optional)
ex_unsharp(0.2, Fc=width(), th=0, safe=false)

# CLEAN REMAINING DOTS with threshold
a=removegrain(1)
expr(last,a,"y x - abs 16 > y x ?","") # Undot only for biggest change

ConvertBits(8,dither=1)

That's pretty for you to share

VoodooFX
10th June 2022, 09:05
Wanted to share a script I'm using for processing 600dpi scans, to remove color half-tone (aka descreening).
It works nice with not too strong half-tones, preserving most details.

ScanTailor not good?

tormento
10th June 2022, 12:07
ScanTailor not good?
Is there any recent release?

Dogway
10th June 2022, 13:48
ScanTailor not good?

Woow never heard of it. Looks good despite I'm a Photoshop hardcore user.

I downloaded ScanTailor Advanced, a fork with Windows build of 2019. Will play a bit, I think it also has a command line option so can do in bulk. I don't think it has descreening though.

Still I'm very interested on piping avisynth as I can do HBD conversion to RGB and HQ downscaling (using 'ZoptiH' in my case). I have a draft in BATCH which I'm using but want to make a GUI in AutoHotkey or something. Already using ExifTool to copy metadata and cjxl to compress in JXL. Saves quite a bit of space.


EDIT: Found updated builds here (https://github.com/vigri/scantailor-advanced/releases), which includes auto-dewarp. Unfortunately the latest version 1.0.18 implements Qt6 whichs is known to not support Win7 (many programs are following this trend these days)



EDIT2: I'm experimenting a bit with descreening. There's also ex_luts() but details are a bit too smoothed.
# Disk kernel trimmed mean
sh=ex_shape(2,mode="disk") # or sh=ex_shape(2,mode="ring")
str=sel_med(37)
ex_luts(mode="average", pixels=sh, exprf=" X^ "+str)

tormento
11th June 2022, 09:19
@Dogway

I need a fast and effective GPU only (well, for the heavy part at least) to remove grain and noise from anime.

I tried with BM3D+neof3 but I think you can pull a better rabbit from the hat.

My current script is:
ConvertBits(32)
BM3D_CUDA(sigma=3, radius=2)
BM3D_VAggregate(radius=2)
fmtc_bitdepth (bits=10,dmode=8)
neo_f3kdb(range=15, Y=65, Cb=40, Cr=40, grainY=0, grainC=0, sample_mode=2, blur_first=true, dynamic_grain=false, mt=false, keep_tv_range=true)
I'd like also to give a try to the DGDenoise filter, how can I invoke your "mod" that we talked about from outside SMDegrain?

I'd like to reduce the CPU part at minimum, as I am encoding with x265. Even something with KNLMeansCL would be great.

Which filter is the most effective one as standalone or with very little CPU usage addon filter?

Dogway
11th June 2022, 13:51
non-local means is in my experience the best algo for flat areas (aka anime), I would try ex_KNLMeansCL(), by default it recovers low-frequency (wmode=0) so disable it if you want, LFR=0.

ex_KNLMeansCL(h=5,a=1,d=0,LFR=0) # play with h,a,d

You can pass it through FlatMask if you want to protect lineart.

tormento
11th June 2022, 18:00
non-local means is in my experience the best algo for flat areas
DGDenoise is non-local too.

Is there a way to call it externally, as I asked you, with the corrections you put in script?
You can pass it through FlatMask if you want to protect lineart.
Is it a simple FlatMask() call? Has it to be used before or after denoise?

ChaosKing
11th June 2022, 21:24
https://github.com/Dogway/Avisynth-Scripts/blob/66d33628a115e9f493e9ae9785a40258cb25c4c1/MasksPack.avsi#L113
### Example:
### filt = YourFilter()
### flatmask(1,filt=filt) # to merge with filtered clip

Blankmedia
12th June 2022, 03:28
DGDenoise is non-local too.

Is there a way to call it externally, as I asked you, with the corrections you put in script?

Is it a simple FlatMask() call? Has it to be used before or after denoise?

Little bit of cleanup/bluring before masking (in this case qith Flatmask) can do wonder.

https://forum.doom9.org/showthread.php?p=1959701#post1959701

Dogway helped me with this months ago.

Edit: I wasn't fully clear but I do something like this in some cartoon encode based on what Dogway shown me:

masklisse = ex_median("IQM").Flatmask(lo=2,MSR=45,scale=10).Removegrain(4).maa2()
# return ex_adddiff(masklisse.converttoyuv420(), dif=False)

denoised = last.denoisefilter()

MT_Merge(denoised , last ,masklisse.ex_Expand(1, "disk"),Luma=True)

you can pass the filtered clip directly in flatmask, but i like to do in sepratly in case i want to expand, inpand, infltate, deflate

tormento
14th June 2022, 09:40
@Dogway

I did many tests with anime filtering and the best results so far are with BM3D.

I have found, reading documentation, that it is actually an extension of non-local denoising, that's why it performs even better.

kedautinh12
14th June 2022, 10:54
@Dogway

I did many tests with anime filtering and the best results so far are with BM3D.

I have found, reading documentation, that it is actually an extension of non-local denoising, that's why it performs even better.

And how about with real world???

tormento
15th June 2022, 19:20
And how about with real world???
I always use it as prefilter in SMDegrain.

I have found it has the most consistent and detail preserving results.

guest
17th June 2022, 07:39
Hi, I updated to the latest Extools, and now I'm getting an error in SMDegrain @ Line 252

Lthres = ex_bs(75, 8, bi, tv_in=true, tv_out=!fsp)

Dogway
17th June 2022, 18:31
Hi, I updated to the latest Extools, and now I'm getting an error in SMDegrain @ Line 252

Lthres = ex_bs(75, 8, bi, tv_in=true, tv_out=!fsp)

Works fine here. ex_bs() now uses clamp() helper included in latest ExTools.

guest
18th June 2022, 01:48
Works fine here. ex_bs() now uses clamp() helper included in latest ExTools.

Of course it does, you modified it...

I don't know how to fix this, where does "clamp()" go ??

Whats a "helper" ?

Is it added to my scripts call ??

Dogway
18th June 2022, 01:57
Version is ExTools v8.6, clamp() function is declared here (https://github.com/Dogway/Avisynth-Scripts/blob/f3ce6e8e7cb59a3efe89836c882dbe2269562b5e/ExTools.avsi#L6929).

Without your call and the error log, I cannot do anything.

guest
18th June 2022, 02:47
Version is ExTools v8.6, clamp() function is declared here (https://github.com/Dogway/Avisynth-Scripts/blob/f3ce6e8e7cb59a3efe89836c882dbe2269562b5e/ExTools.avsi#L6929).

Without your call and the error log, I cannot do anything.

A thousand apologies, I just double checked the v8.6 script, and somehow I'd copied it incorrectly.
I had the QTGMC script in there, instead :(
It's now copied correctly, and IS working.

guest
20th June 2022, 04:10
Can anyone tell me how to get "lsb" (or it's equivalent) to work in SMDegrain, I have had no luck at all.

TIA

kedautinh12
20th June 2022, 04:41
Need errors log

guest
20th June 2022, 05:52
Need errors log

Hi ked, there really isn't any error logs.

I have a funny feeling that lsb=true (or similar), is not supported by Dogway's builds.

If I add lsb=true (or false), AVSMeter doesn't start it's query.

I'm not sure what dependencies it may or may not need.

madey83
21st June 2022, 09:22
hi All,

i've got very noisy source and i would like to clean it up as much as possible and keep as much as possible picture details to avoid waxy faces.

Could you please advice what SMDgrain settings should i use to achieve that?

Dogway
21st June 2022, 10:02
@madey83, depends on source noise. The more you remove the more waxy it ends. Basically just use refinemotion=true, a good prefilter and some type of contrasharpening. Adding back some grain also helps.

@TDS, Why do you want 'lsb'? It's deprecated. I don't know if real.finder version still supports it but I don't recommend you using lsb over internal HBD.

ChaosKing
21st June 2022, 10:09
Using smdegrain with very high settings and feeding it as a prefilter to smdegrain again can also help alot.

Dogway
21st June 2022, 10:16
Using smdegrain with very high settings and feeding it as a prefilter to smdegrain again can also help alot.

Yes, I have used that before for extreme cases and works really nice, the problem is mvtools performs rather bad when called more than once. Any pyramidal denoising approach (here pyramidal vector refinement) is good, it's actually employed also in audio denoising.

guest
21st June 2022, 10:45
@TDS, Why do you want 'lsb'? It's deprecated. I don't know if real.finder version still supports it but I don't recommend you using lsb over internal HBD.

Thanks for the explanation, as I haven't used real.finder's build for a long time, I cannot comment on that.

It was just something I tried, and it wouldn't work, so now I know.

Cheers

LeXXuz
21st June 2022, 12:12
Dogway what setting would you use, expecially what prefilter to use, to run SMDegrain as a general purpose filter which just removes/reduces very high frequency noise for a little bit better compressibility?

Also I'd like to know what you use to add grain after cleaning up the source. I also would like to try an approach to have a medium strong noise filter and add back some noise for a more natural look in the end.

After doing lots of testing with the last settings we spoke about I came to the conclusion to give up on my goal to clean all my sources as much as possible. I always found scenes and/or textures that looked just awful.

Don't get me wrong, SMDegrain is a damn fine denoiser compared to things I used years ago. Some movies look simply terrific with it. But I'm losing motivation to spend nearly hours on every damn movie to find the somewhat 'best' settings.

Boulder
21st June 2022, 14:06
For some minor compressibility improvement, I'd simply use SPresso or STPresso. The encoder will happily mangle the rest anyway :D

Dogway
21st June 2022, 14:28
Yes, STPresso is fine for very fine grain or compressibility.
For mid to high frequency only, pass it through ex_LFR(). I don't know if it's exactly the look you are after though. It depends a lot on source grain, more/coarser grain buries deeper into low frequencies, otherwise you can use SMDegrain(refinemotion=true, LFR=width()/2, DCTFlicker=true) or something along those lines (play with LFR values). Using SMDegrain gives more temporal coherence to the image, which helps further on compressibility.

SMDegrain is plain simple in concept, it doesn't try to do any voodoo but you can bend it any way you want with prefilters, mfilters, LFR, etc. With the trick ChaosKing mentioned, since SMDegrain prefiltering is too strong you can use LFR to recover everything but higher frequencies, so it doesn't distort much, and acts as a very high quality prefilter to feed again to SMDegrain. I don't know if at this stage it's better than ex_BM3D() or not.

I said before, I barely use SMDegrain myself. One good use is to give it a medium clean pass to add grain on top, not grain recovery but new high quality grain, this adds some hallucination that is lost with degrainers.

For the time being I use GrainFactory3mod, it's "good enough", but for over a year now I have wanted to find a good grain model for PP. In compositing, grain plates are commonly blended straight into the clip, there are some filters too but not too good, so I'm very interested on the papers shared by cretindesalpes in chickendream, I haven't had time to read in depth, I also have other papers on the topic, there actually aren't that many.

ChaosKing
21st June 2022, 15:21
I also use smdegrain as a prefilter (ref parameter) for BM3D sometimes to produce the mentioned "temporal coherence". Not sure if it can be achieved with bm3d only, still learning how to use this filter properly :D
Will definitely check out the lfr smdegrain combo.

madey83
21st June 2022, 16:46
Yes, STPresso is fine for very fine grain or compressibility.
For mid to high frequency only, pass it through ex_LFR(). I don't know if it's exactly the look you are after though. It depends a lot on source grain, more/coarser grain buries deeper into low frequencies, otherwise you can use SMDegrain(refinemotion=true, LFR=width()/2, DCTFlicker=true) or something along those lines (play with LFR values). Using SMDegrain gives more temporal coherence to the image, which helps further on compressibility.

SMDegrain is plain simple in concept, it doesn't try to do any voodoo but you can bend it any way you want with prefilters, mfilters, LFR, etc. With the trick ChaosKing mentioned, since SMDegrain prefiltering is too strong you can use LFR to recover everything but higher frequencies, so it doesn't distort much, and acts as a very high quality prefilter to feed again to SMDegrain. I don't know if at this stage it's better than ex_BM3D() or not.

I said before, I barely use SMDegrain myself. One good use is to give it a medium clean pass to add grain on top, not grain recovery but new high quality grain, this adds some hallucination that is lost with degrainers.

For the time being I use GrainFactory3mod, it's "good enough", but for over a year now I have wanted to find a good grain model for PP. In compositing, grain plates are commonly blended straight into the clip, there are some filters too but not too good, so I'm very interested on the papers shared by cretindesalpes in chickendream, I haven't had time to read in depth, I also have other papers on the topic, there actually aren't that many.
@Dogway,

could you please provide exact commands for SMDegrain with all prefilters as LeXXuz said for below general purpose:

1) minor background grain:

2) average grain for foreground and background

3) hard grain, like for example: band of brothers, pacific TV Shows


my general SMDegrain settings looks like:

import("E:\4k encode\Avisynth-Scripts-master\ExTools.avsi")
ConvertBits(16)
SMDegrain(tr=1, thSAD=300, thSCD2=100, contrasharp=false, refinemotion=true, pel=2, subpixel=3, search=3)
ConvertBits(bits=10, dither=1)

but when it comes to clean up hard grain like from Pacific tv show it wont work well.

kedautinh12
21st June 2022, 17:05
Yes, STPresso is fine for very fine grain or compressibility.
For mid to high frequency only, pass it through ex_LFR(). I don't know if it's exactly the look you are after though. It depends a lot on source grain, more/coarser grain buries deeper into low frequencies, otherwise you can use SMDegrain(refinemotion=true, LFR=width()/2, DCTFlicker=true) or something along those lines (play with LFR values). Using SMDegrain gives more temporal coherence to the image, which helps further on compressibility.

SMDegrain is plain simple in concept, it doesn't try to do any voodoo but you can bend it any way you want with prefilters, mfilters, LFR, etc. With the trick ChaosKing mentioned, since SMDegrain prefiltering is too strong you can use LFR to recover everything but higher frequencies, so it doesn't distort much, and acts as a very high quality prefilter to feed again to SMDegrain. I don't know if at this stage it's better than ex_BM3D() or not.

I said before, I barely use SMDegrain myself. One good use is to give it a medium clean pass to add grain on top, not grain recovery but new high quality grain, this adds some hallucination that is lost with degrainers.

For the time being I use GrainFactory3mod, it's "good enough", but for over a year now I have wanted to find a good grain model for PP. In compositing, grain plates are commonly blended straight into the clip, there are some filters too but not too good, so I'm very interested on the papers shared by cretindesalpes in chickendream, I haven't had time to read in depth, I also have other papers on the topic, there actually aren't that many.

You can try f3kgrain for add grain
https://github.com/kedaitinh12/AVSPlus-Scripts/blob/master/f3kgrain_v0.4MOD.avsi

kedautinh12
21st June 2022, 17:10
Dogway, can you share scripts when remove grain only work in smooth area and bypass details area??

madey83
22nd June 2022, 10:00
Could someone explain to me where i did something wrong:

import("E:\4k encode\Avisynth-Scripts-master\ResizersPack.avsi")
import("E:\4k encode\Avisynth-Scripts-master\ExTools.avsi")
import("E:\4k encode\Avisynth-Scripts-master\TransformsPack - Main.avsi")
import("E:\4k encode\Avisynth-Scripts-master\TransformsPack - Models.avsi")
import("E:\4k encode\Avisynth-Scripts-master\TransformsPack - Transfers.avsi")
import("E:\4k encode\Avisynth-Scripts-master\EX mods\GrainFactory3mod.avsi")
import("E:\4k encode\Avisynth-Scripts-master\MIX mods\LSFplus.avsi")
ConvertBits(16)
SMDegrain(tr=2, thSAD=600, thSCD2=80, contrasharp=false, prefilter=6, refinemotion=true, LFR=150, DCTflicker=true, pel=2, subpixel=2, chroma=true, plane=4)
ConvertBits(bits=10, dither=1)


Script Error

Script error: There is no function named 'BM3D_CUDA'.
(E:\StaxRip-v2.13.0-x64\Apps\Plugins\AVS\SMDegrain\SMDegrain.avsi, line 1060)
(E:\StaxRip-v2.13.0-x64\Apps\Plugins\AVS\SMDegrain\SMDegrain.avsi, line 266)

kedautinh12
22nd June 2022, 10:19
You lack bm3d filter
https://github.com/WolframRhodium/VapourSynth-BM3DCUDA/issues/7#issuecomment-886173346

kedautinh12
22nd June 2022, 10:20
You need read dependencies in dogway's script .avsi

madey83
22nd June 2022, 10:38
@kedautinh12

i have found it on github but this is VapourSynth not AviSynth plugin.

i tried load into StaxRip this dll: VapourSynth-BM3DCUDA-R2.8\bm3dcuda.dll

but it failed.

if you have direct download link to avi+ BM3DCUDA please share it.

madey83
22nd June 2022, 10:42
You need read dependencies in dogway's script .avsi
it could be useful if dogway's script .avsi would have some remarks where to find additional plugins required by his functions.

this is not complain but only suggestion for noobies like me.

StainlessS
22nd June 2022, 12:46
Avisynth Wiki:- http://avisynth.nl/index.php/Main_Page
With external filters link to,
External filters:- http://avisynth.nl/index.php/External_filters
64 bit filters linked from External Filters,
http://avisynth.nl/index.php/AviSynth%2B_x64_plugins

Google search:-

"avisynth" "BM3DCUDA"

https://www.google.co.uk/search?q=%22avisynth%22+%22BM3DCUDA%22+&ei=TgKzYsL1PNSA8gLusa8g&ved=0ahUKEwjC1Oev_8D4AhVUgFwKHe7YCwQQ4dUDCA0&uact=5&oq=%22avisynth%22+%22BM3DCUDA%22+&gs_lcp=Cgdnd3Mtd2l6EANKBAhBGAFKBAhGGABQlOwIWJTsCGCC8AhoAnAAeACAAYABiAGAAZIBAzAuMZgBAKABAcABAQ&sclient=gws-wiz


or google search with links ONLY from doom9 forum

"avisynth" "BM3DCUDA" site:forum.doom9.org

https://www.google.co.uk/search?q=%22avisynth%22+%22BM3DCUDA%22+site%3Aforum.doom9.org&ei=BQWzYsKCEJaX8gLD6b-QAQ&ved=0ahUKEwiCme76gcH4AhWWi1wKHcP0DxIQ4dUDCA0&uact=5&oq=%22avisynth%22+%22BM3DCUDA%22+site%3Aforum.doom9.org&gs_lcp=Cgdnd3Mtd2l6EANKBAhBGAFKBAhGGABQjwhYnRBg7S5oAXAAeACAAZ4FiAH4CJIBBzQuMS41LTGYAQCgAQHAAQE&sclient=gws-wiz

or Doom9 Search (at top of D9 page, use Advanced) for posts [not threads] "BM3DCUDA" (or try D9 search threads, Titles Only for main thread of plugin [if there is one]).

kedautinh12
22nd June 2022, 13:19
@kedautinh12

i have found it on github but this is VapourSynth not AviSynth plugin.

i tried load into StaxRip this dll: VapourSynth-BM3DCUDA-R2.8\bm3dcuda.dll

but it failed.

if you have direct download link to avi+ BM3DCUDA please share it.

Please read slowly my link share and what tittle of that issuses?? And you don't click to my link share

kedautinh12
22nd June 2022, 13:22
it could be useful if dogway's script .avsi would have some remarks where to find additional plugins required by his functions.

this is not complain but only suggestion for noobies like me.

That why you don't read my comment slowly. Just open .avsi with text edit application and read Dependencies
https://github.com/Dogway/Avisynth-Scripts/blob/f3ce6e8e7cb59a3efe89836c882dbe2269562b5e/SMDegrain%20v3.5.1d/SMDegrain%20v3.5.1d.avsi#L30

madey83
22nd June 2022, 14:26
@kedautinh12

thank you for your links but i have already checked them and all pointing me out to the same source: https://github.com/WolframRhodium/VapourSynth-BM3DCUDA:
Script Error

'C:/VapourSynth-BM3DCUDA_RTC-R2.8/bm3dcuda_rtc.dll' cannot be used as a plugin for AviSynth.

i heave read dependencies from the SMDegrain script and i can't find any information about external plugins which needs to be added.

this is also mentioned in the script:

Wrapper for BM3D CUDA by WolframRhodium for AviSynth+
# Requires TransformsPack for OPP=true, RGB clips or processing chroma
#
# Disclaimer: ffvideosource() causes issues with BM3D for UV=1 or r>3
# BM3D() causes issues when gpuid >= 0 (CUDA) and you crop with DGSource()
# BM3D() causes issues when gpuid >= 0 (CUDA) and a high combination of radius + sigma unless you fine tune 'block_step' argument
#
# # Some of the following arguments aren't available on the BM3D AVS+ port but included here for reference (namely group_size, block_size, bm_step and ps_step)

so i added few additional avsi+ scripts into my StaxRip. Maybe it is to much but....

Import("E:\4k encode\Avisynth-Scripts-master\ResizersPack.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\MIX mods\LSFplus.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\MIX mods\SharpenersPack.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\GradePack.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\ScenesPack.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\MasksPack.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\MIX mods\Spresso.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\SMDegrain v3.5.1d\SMDegrain v3.5.1d.avsi")
import("E:\4k encode\Avisynth-Scripts-master\ExTools.avsi")
import("E:\4k encode\Avisynth-Scripts-master\EX mods\GrainFactory3mod.avsi")
import("E:\4k encode\Avisynth-Scripts-master\EX mods\DeblockPack.avsi")
import("E:\4k encode\Avisynth-Scripts-master\TransformsPack - Main.avsi")
import("E:\4k encode\Avisynth-Scripts-master\TransformsPack - Models.avsi")
import("E:\4k encode\Avisynth-Scripts-master\TransformsPack - Transfers.avsi")
loadplugin("C:\Users\lukas\Downloads\VapourSynth-BM3DCUDA_RTC-R2.8\bm3dcuda_rtc.dll")

SetMemoryMax()
ConvertBits(16)
SMDegrain(tr=2, thSAD=600, thSCD2=80, contrasharp=false, prefilter=6, truemotion=true, refinemotion=true, LFR=150, DCTflicker=true, pel=2, subpixel=2, chroma=true, plane=4)
ConvertBits(bits=10, dither=1)


in my humble opinion if i use "prefilter=6" which is defined in the SMDgrain script (script line 1018) i should not be forced to load something - i can be wrong of course.

Fjord
22nd June 2022, 15:24
I've not actually tried it myself, but I think the BM3DCUDA release version at https://github.com/WolframRhodium/VapourSynth-BM3DCUDA: is for VapourSynth, not Avisynth. On that repository you need to go to Issues, "AVS+ Support" and download the "test8" version, which is the latest experimental port for Avisynth+ --- https://github.com/WolframRhodium/VapourSynth-BM3DCUDA/files/8068864/BM3DCUDA_AVS-test8.zip