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

kedautinh12
24th August 2021, 02:29
New LSFmod
https://github.com/Dogway/Avisynth-Scripts/blob/master/MIX%20mods/LSFmod.v2.9x.avsi
BM3D
http://avisynth.nl/index.php/BM3DCUDA
Edit: oh DG faster in info of BM3D

guest
24th August 2021, 02:44
https://forum.doom9.org/showthread.php?t=183066&highlight=BM3D

Read the whole thread. test3 supports AVS+.

:thanks:

guest
24th August 2021, 02:51
New LSFmod
https://github.com/Dogway/Avisynth-Scripts/blob/master/MIX%20mods/LSFmod.v2.9x.avsi
BM3D
http://avisynth.nl/index.php/BM3DCUDA
Edit: oh DG faster in info of BM3D

:thanks:

Dogway
24th August 2021, 13:52
Just updated SMDegrain to v3.2.5d. Among the mentioned, about updating LSFmod argument I also added an option to disable the previous hard-coded "UHDhalf", for faster UHD processing, by default it's set to true though.
The main updates are moving ex_contrasharpening() to SharpenersPack, optimization of ex_sbr() and big overhaul of ex_MinBlur().

About ex_MinBlur() I did heavy edits for two reasons, faster processing (between 50 and 100% more) and better quality, by replacing removegrain(4) with ex_median("edgeCL") and MedianBlur(2) with ex_median("EMF2"), a custom made median filter that I'm yet to upload with ExTools, probably tomorrow.
Since these replacements protect edges quite well I added some post-blur so lines are not dirty and aiding to denoise for a practical match, therefore respecting the original intention while actually improving on it. I added an argument 'old' to go back to old method.

StainlessS
24th August 2021, 20:15
Had a bit of a look at ExTools a bit earlier, outstanding!
Respect Bro.
[wish I understood some of it].

And thanks from here too :)

EDIT: And I learnt a few things just from this

##################
## MORPHOLOGICAL #
##################
##
## Opening: To clean small blotches
## ex_inpand(n).ex_expand(n)
##
## Closing: To close gaps
## ex_expand(n).ex_inpand(n)
##
## Smooth: Opening + Closing, effectively cleaning binary images
## ex_inpand(n).ex_expand(n+n).ex_inpand(n)
##
## Outline: To reveal the outer edge of a shape
## ex_makediff(ex_expand(n), a, dif=false)
##
## Inline: To reveal the inner edge of a shape
## ex_makediff(a, ex_inpand(n), dif=false)
##
## Gradient: To reveal the boundary of elements in a binary image
## ex_makediff(ex_expand(n), ex_inpand(n), dif=false)
## or
## ex_hitormiss(mode="boundary") # thinner
##
## Top Hat: (a - opening) To reveal bright elements over dark backgrounds on a greyscale image
## ex_makediff(a, ex_inpand(n).ex_expand(n), dif=false)
##
## Black Hat: (closing - a) To reveal dark elements over bright backgrounds on a greyscale image
## ex_makediff(ex_expand(n).ex_inpand(n), a, dif=false)
##

All that masking stuff is mostly a mystery to me.

EDIT: I've never known what term to look for as reference for masktools type operations [inpand/expand etc], just found it,
Google "morphological operations"

guest
25th August 2021, 09:10
Maybe if you are doing contrasharpening with values you need my mod of LSFmod, or if you are using BM3D prefiltering you might need Utils-r41.
I noticed that in latest LSFmod I changed 'defaults' arg to 'preset', try changing that in line 337 until I update SMDegrain.

Well, I've been "fiddling" most of the day, and I'm just confused...

There are too many SMDegrain builds out there, yesterday it was 3.2.4d, today it's 3.2.5d, there's different variants of LSFMod...the ex & mx "series".

It would be great to know ALL the dependencies required for these.

And I have found that depending on the prefilter option I choose, to what SMDegrain error gets thrown up.

I was trying to get BM3D to work, and that seems to be prefilter #5, but that shows an error with Line 158 (I think) inputP, then you change the prefilter to another number, and then there's an error with Line 448 which is just 2 of these {.

There's Utils r41, that doesn't help...

And I couldn't find this :- I noticed that in latest LSFmod I changed 'defaults' arg to 'preset', try changing that in line 337 until I update SMDegrain.

Anyway, most of this it WAY over my head, so maybe I just need to stick with what works, and leave it at that. :(

Dogway
25th August 2021, 10:15
@Pauly Dunne: It works for me so I think the scripts are fine. You have got suggestions from others to update to latest avisynth+ and scripts. About ex and mix mods, it's described in OP. If you want raw speed go to mix mods, ex mods usually just remove the dependency of RGTools and masktools2 at the cost of some speed.

For my scripts the dependencies almost go to the scripts in OP; ExTools, Transforms Pack and Resizers Pack, and externally Zs_Shared and Utils-r41 (will get rid of this dependency soon with TransformsPack). Then you have all the plugins which really are not many, just the typical; RGTools, masktools2, mvtools2, GRunT, and then depending on each script (ie. DFTTest, KNLMeansCL, BM3D, AddgrainC...). That's the purpose of this project, remove plugin dependencies to the max.

I can only vouch for my scripts like SMDegrain or mods like EX/MIX mods. I came back here 3 months ago after being away for a few years so it's normal you see some changes. When I finish everything in a few months you won't see changes anymore. Bug reports aside, ExTools is one version off of being finished, SMDegrain is finished today. I won't work on these anytime soon and will focus on TransformsPack only.

I just updated ExTools and SMDegrain. Try it and if you find an error report back with the error and filter call.

Dogway
25th August 2021, 10:26
@StainlessS: Thanks! The sentiment is mutual lol. Actually I learn as I go. The most intriguing for me was the hit-or-miss functions, really I spent days trying to figure out how to translate that to mach... Expr code. Was kind of a feat for me. Anyway I couldn't port Hysteresis -__- but ex_luts is shaping up nicely, it's in a working state for some modes. With some tests it shows between double or three times faster than mt_luts(). Pixel Addressing was a hidden gem, hope it gets some optimization love further down the line.

I updated the morphological guide with one extra addition, pseudomedian:

##################
## MORPHOLOGICAL #
##################
##
## Opening: To clean small blotches
## ex_inpand(n).ex_expand(n)
##
## Closing: To close gaps
## ex_expand(n).ex_inpand(n)
##
## Smooth: Opening & Closing, effectively cleaning binary images
## ex_inpand(n).ex_expand(n+n).ex_inpand(n)
##
## Outline: To reveal the outer edge of a shape
## ex_makediff(ex_expand(n), a, dif=false)
## or
## ex_hitormiss(mode="outline") # faster
##
## Inline: To reveal the inner edge of a shape
## ex_makediff(a, ex_inpand(n), dif=false)
## or
## ex_hitormiss(mode="inline") # faster
##
## Gradient Magnitude: To reveal the boundary of elements in a binary image
## ex_makediff(ex_expand(n), ex_inpand(n), dif=false)
## or
## ex_edge("min/max") # faster
## or
## ex_hitormiss(mode="boundary")
##
## Top Hat: (a - opening) To reveal bright elements over dark backgrounds on a greyscale image
## ex_makediff(a, ex_inpand(n).ex_expand(n), dif=false)
##
## Black Hat: (closing - a) To reveal dark elements over bright backgrounds on a greyscale image
## ex_makediff(ex_expand(n).ex_inpand(n), a, dif=false)
##
## Pseudomedian: (opening + closing)/2 Approximation to a simple median filter with morphological structuring elements
## Merge(ex_inpand(n).ex_expand(n), ex_expand(n).ex_inpand(n))
##

kedautinh12
25th August 2021, 10:33
@Dogway you have plane to port mt_xxpand_multi.avsi to ex_ family???

Dogway
25th August 2021, 10:44
Just do ex_xxpand(3), it's faster.

kedautinh12
25th August 2021, 10:50
But ex_xxpand don't have mode="ellipse"

Dogway
25th August 2021, 10:55
Well, ex_xxpand don't have mode="ring" ;)

'ellipse' is being worked out in ex_shapes() (forgot about it before declaring the function 'final') so you can do something like:

ex_luts(mode="max",pixels=ex_shapes(2,1,mode="disk"))

I won't add anisotropic/anamorphic shapes to ex_xxpand()

kedautinh12
25th August 2021, 10:59
If i'll change mt_lutxy, it can be same with ex_lutxy??
https://github.com/realfinder/AVS-Stuff/blob/e38249397b6cefae2f78932654e0b69ab892491e/avs%202.5%20and%20up/F3KDB_s.avsi#L236

Dogway
25th August 2021, 11:11
It isn't using an anamorphic radius, you can use ex_xxpand(), here the function:
function F3KDB_3_masking(clip c, float "mask_thr", int "mask_radius", bool "fulls") {

rgb = isRGB(c)
bi = BitsPerComponent(c)

mthr = Default(mask_thr, 2)
mrad = Default(mask_radius, 2)
fs = Default(fulls, rgb)

Assert(mrad > 0, "F3KDB_3_masking: mask_radius must be more than 0")

thr_lo = ex_bs(max(mthr * 0.75, 1) - 0.0001, 8, bi, fulls=fs)
thr_hi = ex_bs(max(mthr, 1) + 0.0001, 8, bi, fulls=fs)

c
mrad > 1 ? ex_lutxy (ex_expand(mrad,mode="circle"), ex_inpand(mrad,mode="circle"), "x y -",clamp_float=true,fulls=fs) : mt_edge (mode="min/max", thY1=0, thY2=255)
ex_lut (Format("x {thr_lo} - {thr_hi} {thr_lo} - / 0 1 clip range_max *"), fulls=fs)
removegrain (22, -1)
mrad > 1 ? removegrain (12, -1) : last
mrad > 2 ? removegrain (20, -1) : last }


EDIT: By the way, did you notice? That line is Gradient Magnitude from my morphological guide above, you can optimize that further by using ex_luts(), wait a min.

EDIT: Optimized further (58% gain) (still some issues for ex_luts() when using high radii)
function F3KDB_3_masking(clip c, float "mask_thr", int "mask_radius", bool "fulls") {

rgb = isRGB(c)
bi = BitsPerComponent(c)

mthr = Default(mask_thr, 2)
mrad = Default(mask_radius, 2)
fs = Default(fulls, rgb)

Assert(mrad > 0, "F3KDB_3_masking: mask_radius must be more than 0")

thr_lo = ex_bs(max(mthr * 0.75, 1) - 0.0001, 8, bi, fulls=fs)
thr_hi = ex_bs(max(mthr, 1) + 0.0001, 8, bi, fulls=fs)

c
mrad > 1 ? ex_luts(mode="range",pixels=ex_shape(mrad,shape="circle"),clamp_float=true,fulls=fs) : \
mt_edge (mode="min/max", thY1=0, thY2=255)
ex_lut (Format("x {thr_lo} - {thr_hi} {thr_lo} - / 0 1 clip range_max *"), fulls=fs)
removegrain (22, -1)
mrad > 1 ? removegrain (12, -1) : last
mrad > 2 ? removegrain (20, -1) : last }

guest
25th August 2021, 14:14
@Pauly Dunne: It works for me so I think the scripts are fine. You have got suggestions from others to update to latest avisynth+ and scripts. About ex and mix mods, it's described in OP. If you want raw speed go to mix mods, ex mods usually just remove the dependency of RGTools and masktools2 at the cost of some speed.

For my scripts the dependencies almost go to the scripts in OP; ExTools, Transforms Pack and Resizers Pack, and externally Zs_Shared and Utils-r41 (will get rid of this dependency soon with TransformsPack). Then you have all the plugins which really are not many, just the typical; RGTools, masktools2, mvtools2, GRunT, and then depending on each script (ie. DFTTest, KNLMeansCL, BM3D, AddgrainC...). That's the purpose of this project, remove plugin dependencies to the max.

I can only vouch for my scripts like SMDegrain or mods like EX/MIX mods. I came back here 3 months ago after being away for a few years so it's normal you see some changes. When I finish everything in a few months you won't see changes anymore. Bug reports aside, ExTools is one version off of being finished, SMDegrain is finished today. I won't work on these anytime soon and will focus on TransformsPack only.

I just updated ExTools and SMDegrain. Try it and if you find an error report back with the error and filter call.

Hi Dogway, thanks for the great explanation, but like I said this is all way over my head...

Not sure what you use all these with to test & use, and I am trying to incorporate more up to date filters to RipBot264, which is a pretty closed app, for the most part.

I have had a fair bit of success, and the first builds of Extools, and earlier builds of SMDegrain worked very well, I think SMDegrain does a lot better job than MDegrain...but the last few builds have just messed the whole thing up :(

Maybe I just need to back track, and use what use to work, and stick with that.

I will try the newer ExTools & SMDegrain, and comment back :)

kedautinh12
25th August 2021, 14:20
Try avisynth info tool to check your error
https://forum.doom9.org/showthread.php?t=176079

guest
25th August 2021, 14:32
Try avisynth info tool to check your error
https://forum.doom9.org/showthread.php?t=176079

Thanks, I will give that a shot....I've been using AVSMeter to show what line the error is, but that doesn't always makes sense.

Yeah, I can't make any sense of the info this tool provides, it only seems to check what is on the C:/ drive, and installed within the Avisynth folder...

guest
26th August 2021, 07:09
Hi Dogway, thanks for the great explanation, but like I said this is all way over my head...

Not sure what you use all these with to test & use, and I am trying to incorporate more up to date filters to RipBot264, which is a pretty closed app, for the most part.

I have had a fair bit of success, and the first builds of Extools, and earlier builds of SMDegrain worked very well, I think SMDegrain does a lot better job than MDegrain...but the last few builds have just messed the whole thing up :(

Maybe I just need to back track, and use what use to work, and stick with that.

I will try the newer ExTools & SMDegrain, and comment back :)

OK, after some interesting testing, this is what I've got:-

This is how the scripts are, in RipBot264 !!!

With this script:-

#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain324d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=6,thSAD=600,contrasharp=true,refinemotion=true)

Seems to work well, and if I change to SMDegrain 3.2.5d, I get an error @ line 449 in AVSMeter.

Adding LSFmod doesn't make any difference. (meaning no errors)

And this script:-

#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\LSFmod29ex.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=6,thSAD=600,contrasharp=30,prefilter=2,str=1.2,refinemotion=true)

If I change this back to SMDegrain 3.2.4d, I get an error @ line 446. in AVSMeter.

If I remove LSFmod, I then get an error @ line 449, in 3.2.5d.

And just for good measure:-

#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\LSFmod29ex.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
LoadPlugin("%AVISYNTHPLUGINS%\KNLMeansCL\KNLMeansCL.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=6,thSAD=600,contrasharp=30,prefilter=4,str=1.2,refinemotion=true)


Works OK too, until..(same as above)

So it would be good to know why the first script doesn't like 3.2.5d, and I haven't got a clue how to fix that :(

kedautinh12
26th August 2021, 07:48
Maybe you don't have enough memory, how much gb in your rams??
https://github.com/Dogway/Avisynth-Scripts/blob/5d60a5dedaea2f77b75322a6bf2dc2759607a311/SMDegrain%20v.3.2.5d/SMDegrain%20v3.2.5d.avsi#L446

guest
26th August 2021, 08:21
Maybe you don't have enough memory, how much gb in your rams??
https://github.com/Dogway/Avisynth-Scripts/blob/5d60a5dedaea2f77b75322a6bf2dc2759607a311/SMDegrain%20v.3.2.5d/SMDegrain%20v3.2.5d.avsi#L446

Wow, I don't understand why that could be an issue.....

I've only got 32Gb, 3600Mhz DDR4.

kedautinh12
26th August 2021, 08:33
Wow, I don't understand why that could be an issue.....

I've only got 32Gb, 3600Mhz DDR4.

Can you post your log with AVSMeter or avisynth info tool??

Dogway
26th August 2021, 08:34
This is my plugins list, and I have no problems with any of your examples.

ConvertStacked.dll
DirectShowSource.dll
ExTools.avsi
FFMS2.avsi
ffms2.dll
ffms2.lib
ffmsindex.exe
ImageSeq.dll
KNLMeansCL.dll
LSFmod.v2.9x.avsi
masktools2.dll
MtModes.r851.avsi
mvtools2.dll
RgTools.dll
SharpenersPack.avsi
Shibatch.dll
SMDegrain v3.2.5d.avsi
TimeStretch.dll
Utils-r41.avsi
Zs_RF_Shared.avsi

I think your problem is something is not updated, namely Zs_RF_Shared? Update to V1.154.

guest
26th August 2021, 10:04
Can you post your log with AVSMeter or avisynth info tool??

Not too sure how to do that...I'll have a look tomorrow.

:thanks:

guest
26th August 2021, 10:10
This is my plugins list, and I have no problems with any of your examples.

ConvertStacked.dll
DirectShowSource.dll
ExTools.avsi
FFMS2.avsi
ffms2.dll
ffms2.lib
ffmsindex.exe
ImageSeq.dll
KNLMeansCL.dll
LSFmod.v2.9x.avsi
masktools2.dll
MtModes.r851.avsi
mvtools2.dll
RgTools.dll
SharpenersPack.avsi
Shibatch.dll
SMDegrain v3.2.5d.avsi
TimeStretch.dll
Utils-r41.avsi
Zs_RF_Shared.avsi

I think your problem is something is not updated, namely Zs_RF_Shared? Update to V1.154.

Excellent...yes I think I am running v1.153.

Will keep you posted, and thankyou so much for your help :)

kedautinh12
26th August 2021, 10:12
-avsinfo in AVSMeter or you can read here for more details
https://forum.doom9.org/showthread.php?t=174797

guest
26th August 2021, 10:42
-avsinfo in AVSMeter or you can read here for more details
https://forum.doom9.org/showthread.php?t=174797

I generally run it within RipBot, so I'm not sure if there are any logs generated, or where they go.

I guess I could run it stand alone (could I ?)

StainlessS
26th August 2021, 16:00
on command line just type path and name eg d:\avsmeter.exe
and produces eg
https://i.postimg.cc/Pfpdc8gn/Untitled-00.png (https://postimg.cc/Jt8wHt7p)

EDIT: I have "C:\BIN" in my environment variables PATH, so I don't have to put the path the execuatable of avsmeter.
I store my cmd exe's in C:\BIN

https://i.postimg.cc/FRbVsKqr/Untitled-00.png (https://postimages.org/)

guest
27th August 2021, 02:02
Hi StainlessS,

But the only info I can get this to display is in the default installation folder, NOT where I have all the "custom" info for RipBot :(

Got it work, had to copy my custom stuff into the default folder....didn't show any problems, that I could see.

guest
27th August 2021, 02:06
This is my plugins list, and I have no problems with any of your examples.

ConvertStacked.dll
DirectShowSource.dll
ExTools.avsi
FFMS2.avsi
ffms2.dll
ffms2.lib
ffmsindex.exe
ImageSeq.dll
KNLMeansCL.dll
LSFmod.v2.9x.avsi
masktools2.dll
MtModes.r851.avsi
mvtools2.dll
RgTools.dll
SharpenersPack.avsi
Shibatch.dll
SMDegrain v3.2.5d.avsi
TimeStretch.dll
Utils-r41.avsi
Zs_RF_Shared.avsi

I think your problem is something is not updated, namely Zs_RF_Shared? Update to V1.154.

Hey Dogway,

Well, unfortunately, I was already using v1.154 of Zs RF, so that hasn't fixed the problem.

Now I shouldn't need to run all those plugins you've listed above, but maybe I should add them, and see what happens.


edit :- OK, I've had a win :) x 1,000....I went thru all your list, and the only one that I hadn't tried was "SharpenersPack.avsi", so I popped that in, and away it went with SMDegrain 3.2.5d.

So now I need to is clean up the mess I've made of all my files & folders, and I should be good to go, and "kedautinh12" gave me a good idea to use avsi's, instead of avs's.

And I'd like to now figure out how to incorporate BM3D....but isn't that only for nVidia GPU's ??

guest
27th August 2021, 02:21
-avsinfo in AVSMeter or you can read here for more details
https://forum.doom9.org/showthread.php?t=174797

This is the best I could do....

https://i.imgur.com/BcJ9Kt6.jpg

kedautinh12
27th August 2021, 02:47
Hi StainlessS,

But the only info I can get this to dispaly is in the default installation folder, NOT where I have all the "custom" info for RipBot :(

Transport your filters to default installation folder and check with AVSMeter again

guest
27th August 2021, 03:01
Transport your filters to default installation folder and check with AVSMeter again

Wow, OK, I'll try that, but there's so many of them...

But what is this going to prove ??

It's strange that the scripts I sent Dogway worked for him...

kedautinh12
27th August 2021, 03:06
To checked what errors in your scripts/filter. And you don't need call them anymore in ripbot (don't need LoadPlugin/Import anymore)

guest
27th August 2021, 03:10
To checked what errors in your scripts/filter. And you don't need call them anymore in ripbot (don't need LoadPlugin/Import anymore)

So you're saying I don't need these anymore ???

#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\LSFmod29ex.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=6,thSAD=600,contrasharp=30,prefilter=2,str=1.2,refinemotion=true)

I can't see that working, that's the way RipBot is built

guest
27th August 2021, 03:15
To checked what errors in your scripts/filter. And you don't need call them anymore in ripbot (don't need LoadPlugin/Import anymore)

So far all it's displaying is the filters & scripts info....no other, no errors

kedautinh12
27th August 2021, 03:28
So far all it's displaying is the filters & scripts info....no other, no errors

Don't have functions duplicate??

kedautinh12
27th August 2021, 03:34
So you're saying I don't need these anymore ???

#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\LSFmod29ex.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=6,thSAD=600,contrasharp=30,prefilter=2,str=1.2,refinemotion=true)

I can't see that working, that's the way RipBot is built

Yeah, i use megui with autoload install folder and don't need use call them with LoadPlugin/Import anymore cause they autoload by avisynth in autoload folder when i put them in it.
Btw, change .avs to .avsi, avs+ only autoload .avsi

guest
27th August 2021, 03:35
Don't have functions duplicate??

None that I noticed...

guest
27th August 2021, 03:39
Yeah, i use megui with autoload install folder and don't need use call them with LoadPlugin/Import anymore cause they autoload by avisynth in autoload folder when i put them in it.
Btw, change .avs to .avsi, avs+ only autoload .avsi

So if "everything" was in one folder, with the .avs's changed to .avsi, and I got the path correct, that would work ???

Could you give me an example of how you've addressed it ??

But what is the advantage of that ??

kedautinh12
27th August 2021, 04:42
Example: your script

LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\LSFmod29ex.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=ffms("...")
video=SMDegrain(video,tr=6,thSAD=600,contrasharp=30,prefilter=2,str=1.2,refinemotion=true)

After you put all plugins/scripts in one autoload folder, you only use this script and it will work

ffms("...")
SMDegrain(tr=6,thSAD=600,contrasharp=30,prefilter=2,str=1.2,refinemotion=true)


That is what i do with megui

guest
27th August 2021, 04:56
Example: your script

LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\LSFmod29ex.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=ffms("...")
video=SMDegrain(video,tr=6,thSAD=600,contrasharp=30,prefilter=2,str=1.2,refinemotion=true)

After you put all plugins/scripts in one autoload folder, you only use this script and it will work

ffms("...")
SMDegrain(tr=6,thSAD=600,contrasharp=30,prefilter=2,str=1.2,refinemotion=true)


That is what i do with megui

Hmmm,

Not sure that will work for RipBot...

So, I sort of understand the avs to avsi thing, but how to the dll's "auto load" ??

And what if I don't use FFMS ??

RipBot uses L-Smash as it's default decoder, if I'm understanding the ffms reference.

guest
27th August 2021, 06:58
Hello again, Dogway,

With the success I've had (see post #236, if you haven't already), I need a little bit more help with the following :-

And does it matter what order they are called ??

#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3DCUDA_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3D_VAggregate_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Sharpeners Pack v0.5.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Utils-r41.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=4,thSAD=400,contrasharp=true,refinemotion=true,prefilter=5)

This BM3D script works (it's slow), but if I change it to BM3DCPU_AVS.dll, it has a error at Line 159 of SMDegrain. (inputP)

I have an AVX2 CPU...5950X

And now the only pre-filter I'm having a problem with is #3 (prefilter=3)

0, 1, 2, 4 (with KNL in there), & 5 (@ CUDA).

What is missing for #3 ??

pref = !GlobalR ? preclip ? prefilter : \
(prefilter==-1) ? inputP : \
(prefilter== 0) ? inputP.ex_MinBlur(0,Chr,fulls=fs) : \
(prefilter== 1) ? inputP.ex_MinBlur(1,Chr,fulls=fs) : \
(prefilter== 2) ? inputP.ex_MinBlur(2,Chr,fulls=fs) : \
(prefilter== 3) ? ex_merge(dfttest(inputP,sstring="0.0:4.0 0.2:9.0 1.0:15.0",tbsize=1,U=chroma,V=chroma,dither=1,threads=1),inputP, \
inputP.ex_lut(Format("x ymin < range_max x {Lthres} > 0 range_max x ymin - range_max {Lthres} ymin - / * - ? ?"),UV=1,fulls=fs), luma=chroma, UV=chr, fulls=fs) : \
(prefilter== 4) ? inputP.ex_KNLMeansCL(device_type="GPU", device_id=device_id, chroma=chroma, a=1,d=1,h=7.0) : \
(prefilter== 5) ? inputP.ex_BM3D(sigma=5,radius=1,UV=Chr) : \
Assert(false, "prefilter must be between -1~5: "+string(prefilter)) : \
inputP

kedautinh12
27th August 2021, 07:16
SMDegrain only use BM3D_CUDA
https://github.com/Dogway/Avisynth-Scripts/blob/5d60a5dedaea2f77b75322a6bf2dc2759607a311/SMDegrain%20v.3.2.5d/SMDegrain%20v3.2.5d.avsi#L619

If you want use BM3D_CPU just change line above from BM3D_CUDA(sigma=[s,ch?s/2:0,ch?s/2:0], radius=r, chroma=ch, fast=true, extractor_exp=6) to BM3D_CPU(sigma=[s,ch?s/2:0,ch?s/2:0], radius=r, chroma=ch)

If you want more speed of BM3D try use prefetch(). More details:
https://forum.doom9.org/showthread.php?p=1948420#post1948420
http://avisynth.nl/index.php/SetFilterMTMode

Example:

#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3DCUDA_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3D_VAggregate_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Sharpeners Pack v0.5.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Utils-r41.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=4,thSAD=400,contrasharp=true,refinemotion=true,prefilter=5)
Prefetch(16) #or try any number can make a good speed fps


Edit: for prefilter=3 you forgot LoadPlugin(".../DFTTest.dll")

guest
27th August 2021, 07:37
SMDegrain only use BM3D_CUDA
https://github.com/Dogway/Avisynth-Scripts/blob/5d60a5dedaea2f77b75322a6bf2dc2759607a311/SMDegrain%20v.3.2.5d/SMDegrain%20v3.2.5d.avsi#L619

If you want use BM3D_CPU just change line above from BM3D_CUDA(sigma=[s,ch?s/2:0,ch?s/2:0], radius=r, chroma=ch, fast=true, extractor_exp=6) to BM3D_CPU(sigma=[s,ch?s/2:0,ch?s/2:0], radius=r, chroma=ch)

If you want more speed of BM3D try use prefetch(). More details:
https://forum.doom9.org/showthread.php?p=1948420#post1948420
http://avisynth.nl/index.php/SetFilterMTMode

Example:

#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3DCUDA_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3D_VAggregate_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Sharpeners Pack v0.5.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Utils-r41.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=4,thSAD=400,contrasharp=true,refinemotion=true,prefilter=5)
Prefetch(16) #or try any number can make a good speed fps


Edit: for prefilter=3 you forgot LoadPlugin(".../DFTTest.dll")

You're a very informative person :)

Yes, I have that version of Dogway's SMDegrain.

I will add DFTTest, thanks.

dfttest didn't work for pre filter 3, still line 159 error :(, but it needs these installed http://avisynth.nl/index.php/Dfttest..... http://www.fftw.org/install/windows.html

And I think the MT function is handled differently in RipBot scripts.

Have you ever tried RipBot ???

I had a look at MeGUI, seems very basic, and not that up to date (inside)

kedautinh12
27th August 2021, 07:45
Are you try that scripts and check the speed??

#Custom
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3DCUDA_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3D\x64\BM3D_VAggregate_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\scripts\extras\ExTools52.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Sharpeners Pack v0.5.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\SMDegrain325d.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Utils-r41.avs")
Import("%AVISYNTHPLUGINS%\scripts\extras\Zs_RF_Shared.avs")
video=SMDegrain(video,tr=4,thSAD=400,contrasharp=true,refinemotion=true,prefilter=5)
Prefetch(16) #or try any number can make a good speed fps

Dogway
27th August 2021, 07:46
@Pauly Dunne: Can you try this version (https://github.com/Dogway/Avisynth-Scripts/blob/master/SMDegrain%20v.3.2.6d/SMDegrain%20v3.2.6d.avsi). I fixed some UHDhalf and interlacing logic. Maybe your clip was different than what I tested on.

kedautinh12
27th August 2021, 07:57
Download here for new ver fftw 3.3.8
https://forum.doom9.org/showthread.php?t=174470

Benchmark between of fftw3 compilers
https://forum.doom9.org/showthread.php?p=1911115#post1911115

For ICL & GCC you need Intel C++ too
https://software.intel.com/content/www/us/en/develop/articles/intel-compilers-redistributable-libraries-by-version.html

Edit: after downloaded, you can put fftw3.dll or libfftw3f-3.dll in Windows/system32 (for x64 ver) and Windows/sysWOW64 (for x86 ver)

guest
27th August 2021, 08:15
Download here for new ver fftw 3.3.8
https://forum.doom9.org/showthread.php?t=174470

Benchmark between of fftw3 compilers
https://forum.doom9.org/showthread.php?p=1911115#post1911115

For ICL & GCC you need Intel C++ too
https://software.intel.com/content/www/us/en/develop/articles/intel-compilers-redistributable-libraries-by-version.html

Edit: after downloaded, you can put fftw3.dll or libfftw3f-3.dll in Windows/system32 (for x64 ver) and Windows/sysWOW64 (for x86 ver)

Yes, I do have them, and I got it to work, so I will check version numbers, thanks

guest
27th August 2021, 08:17
@Pauly Dunne: Can you try this version (https://github.com/Dogway/Avisynth-Scripts/blob/master/SMDegrain%20v.3.2.6d/SMDegrain%20v3.2.6d.avsi). I fixed some UHDhalf and interlacing logic. Maybe your clip was different than what I tested on.

I'm now getting a Line 160 error, when I change BM3D, CUDA to CPU, when using prefilter=5.

But 3.2.6d works on the other scripts / filters. :)

kedautinh12
27th August 2021, 08:20
Megui tools up to date if you change sever to development
https://forum.doom9.org/showthread.php?p=1946568#post1946568