Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#201 | Link |
Registered User
Join Date: Jan 2018
Posts: 2,169
|
New LSFmod
https://github.com/Dogway/Avisynth-S...mod.v2.9x.avsi BM3D http://avisynth.nl/index.php/BM3DCUDA Edit: oh DG faster in info of BM3D |
![]() |
![]() |
![]() |
#203 | Link | |
Guest
Posts: n/a
|
Quote:
![]() |
|
![]() |
![]() |
#204 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,372
|
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.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
![]() |
![]() |
![]() |
#205 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,093
|
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 Code:
################## ## 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) ## 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"
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 24th August 2021 at 21:38. |
![]() |
![]() |
![]() |
#206 | Link | ||
Guest
Posts: n/a
|
Quote:
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 :- Quote:
![]() |
||
![]() |
![]() |
#207 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,372
|
@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.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
![]() |
![]() |
![]() |
#208 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,372
|
@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: Code:
################## ## 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)) ##
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
![]() |
![]() |
![]() |
#210 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,372
|
Just do ex_xxpand(3), it's faster.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
![]() |
![]() |
![]() |
#212 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,372
|
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()
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 25th August 2021 at 11:02. |
![]() |
![]() |
![]() |
#213 | Link |
Registered User
Join Date: Jan 2018
Posts: 2,169
|
If i'll change mt_lutxy, it can be same with ex_lutxy??
https://github.com/realfinder/AVS-St...DB_s.avsi#L236 Last edited by kedautinh12; 25th August 2021 at 11:14. |
![]() |
![]() |
![]() |
#214 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,372
|
It isn't using an anamorphic radius, you can use ex_xxpand(), here the function:
Code:
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) Code:
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 }
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 25th August 2021 at 11:26. |
![]() |
![]() |
![]() |
#215 | Link | |
Guest
Posts: n/a
|
Quote:
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 ![]() |
|
![]() |
![]() |
#216 | Link |
Registered User
Join Date: Jan 2018
Posts: 2,169
|
Try avisynth info tool to check your error
https://forum.doom9.org/showthread.php?t=176079 |
![]() |
![]() |
![]() |
#217 | Link | |
Guest
Posts: n/a
|
Quote:
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... Last edited by Pauly Dunne; 25th August 2021 at 14:49. |
|
![]() |
![]() |
#218 | Link | ||||
Guest
Posts: n/a
|
Quote:
This is how the scripts are, in RipBot264 !!! With this script:- Quote:
Adding LSFmod doesn't make any difference. (meaning no errors) And this script:- Quote:
If I remove LSFmod, I then get an error @ line 449, in 3.2.5d. And just for good measure:- Quote:
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 ![]() |
||||
![]() |
![]() |
#219 | Link |
Registered User
Join Date: Jan 2018
Posts: 2,169
|
Maybe you don't have enough memory, how much gb in your rams??
https://github.com/Dogway/Avisynth-S...2.5d.avsi#L446 |
![]() |
![]() |
![]() |
#220 | Link | |
Guest
Posts: n/a
|
Quote:
I've only got 32Gb, 3600Mhz DDR4. |
|
![]() |
![]() |
Tags |
avisynth, dogway, filters, hbd, packs |
Thread Tools | Search this Thread |
Display Modes | |
|
|