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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th February 2023, 18:40   #2041  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
Well, just updated SMDegrain mod to 4.0.0 with fully interlaced and YUY2 direct support for all clip type arguments (input, CClip, mfilter and prefilter).
I'm wrapping up my packs so unless something is really borked these will be final. SMDegrain requires now latest versions of the main packs specially LSFplus and SharpenersPack if using sharpening specially with interlaced content.

I also fixed the remaining issues in ex_retinex() hopefully for the good and a few more updates and cosmetics, most important of all the Documentation is finished, so you can have a glance on how things work now although it's pretty much what I've been posting around here.
It's labeled RC (Release Candidate), if I didn't brake anything in a week or two I edit it out.

It's been long so this is my last presentation card for the release.




I also made a heavy refactor of GrainFactory3mod called FilmGrain, I wanted to leverage the option that AddGrainC has to scale up "grain", although it didn't end too well since the grain shows up as big squares instead of round grain, so it's a proof of concept and still need to play with the bias between AddGrainC scaling and blur strength (scaling so to speak). Will upload soon.

Now, I will be installing Windows 10, having a bit of a rest and from time to time improving TransformsPack.
Also I have almost finished my research on HVS (Human Visual System) and surround environment for viewing conditions. It's a two part study with some final suggestions on my part.
It's not AviSynth related but more like HTPC, so probably will post at General Discussion.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 23rd February 2023 at 07:25.
Dogway is offline   Reply With Quote
Old 20th February 2023, 21:43   #2042  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 724
Quote:
Originally Posted by Dogway View Post
Well, just updated SMDegrain mod to 4.0.0 with fully interlaced and YUY2 direct support for all clip type arguments (input, CClip, mfilter and prefilter).
I'm wrapping up my packs so unless something is really borked these will be final.
Thanks a lot for all your hard work. It's very much appreciated!

Btw I see you re-sorted prefilters again. You'd better give a heads up when doing that or people may wonder why their scripts behave strangely different.

Code:
ex_Median(mode="IQMV",          UV=Chr)
That one looks new to me. When would you use that prefilter instead of Minblur or Flux?
LeXXuz is offline   Reply With Quote
Old 21st February 2023, 00:43   #2043  |  Link
Guest
Guest
 
Posts: n/a
Quote:
Originally Posted by LeXXuz View Post
Thanks a lot for all your hard work. It's very much appreciated!

Btw I see you re-sorted prefilters again. You'd better give a heads up when doing that or people may wonder why their scripts behave strangely different.

Code:
ex_Median(mode="IQMV",          UV=Chr)
That one looks new to me. When would you use that prefilter instead of Minblur or Flux?
There has been so many updates in the passed days, it can be frustrating.

As for SMDegrain, the pre-filter order was changed back at build 3.5.8.

Code:
3.5.8

pref    = !GlobalR ? preclip ? UHDhalf        ?  pref : prefilter                                                                                                                                : \
                                  (prefilter==-1) ?  pref                                                                                                                                            : \
                                  (prefilter== 0) ?  pref.ex_MinBlur(0,Chr)                                                                                                                          : \
                                  (prefilter== 1) ?  pref.ex_MinBlur(1,Chr)                                                                                                                          : \
                                  (prefilter== 2) ?  pref.ex_MinBlur(2,Chr)                                                                                                                          : \
                                  (prefilter== 3) ?  pref.ex_Median(mode="IQMV",UV=Chr)                                                                                                              : \
                                  (prefilter== 4) ?  pref.ex_FluxSmoothST(2,1,255,0,false,UV=Chr)                                                                                                    : \
                                  (prefilter== 5) ?  ex_merge(dfttest(pref,sstring="0.0:4.0 0.2:9.0 1.0:15.0",tbsize=1,U=chroma,V=chroma,dither=1,threads=1,sbsize=12,sosize=6,swin=2),pref,           \
                                                     pref.ex_lut(Format("range_max range_max {Lthres} ymin - / x ymin - * -"),UV=1,clamp_float=true), luma=chroma, UV=Chr)                           : \
                                  (prefilter== 6) ?  pref.ex_KNLMeansCL(a=2,s=2,d=1,h=7.0,wmode=1,chroma=chroma,gpuid=gpuid,LFR=600*(nw/1920.)).ex_boxblur(0.5, mode="weighted", UV=Chr)             : \
                                  (prefilter== 7) ?  pref.ex_DGDenoise(str=0.10,LFR=nw/2.,UV=Chr).                                              ex_boxblur(0.5, mode="weighted", UV=Chr)             : \
                                  (prefilter== 8) ?  pref.ex_BM3D(10,1,"normal",UV=Chr,gpuid=gpuid,tv_range=!fsp)                                                                                    : \
                                                     Assert(false, "SMDegrain: Prefilter must be between -1~8: "+string(prefilter))                                                                  : \
                                   pref

3.5.7

 pref    = !GlobalR ? preclip ? UHDhalf        ?  pref : prefilter                                                                                                                               : \
                                  (prefilter==-1) ?  pref                                                                                                                                           : \
                                  (prefilter== 0) ?  pref.ex_MinBlur(0,Chr)                                                                                                                         : \
                                  (prefilter== 1) ?  pref.ex_MinBlur(1,Chr)                                                                                                                         : \
                                  (prefilter== 2) ?  pref.ex_MinBlur(2,Chr)                                                                                                                         : \
                                  (prefilter== 3) ?  pref.ex_FluxSmoothST(2,2,255,0,false,UV=Chr)                                                                                                   : \
                                  (prefilter== 4) ?  ex_merge(dfttest(pref,sstring="0.0:4.0 0.2:9.0 1.0:15.0",tbsize=1,U=chroma,V=chroma,dither=1,threads=1,sbsize=12,sosize=6,swin=2),pref,          \
                                                     pref.ex_lut(Format("range_max range_max {Lthres} ymin - / x ymin - * -"),UV=1,clamp_float=true), luma=chroma, UV=Chr)                          : \
                                  (prefilter== 5) ?  pref.ex_KNLMeansCL(a=2,s=2,d=1,h=7.0,wmode=1,chroma=chroma,gpuid=gpuid,LFR=600*(nw/1920.)).ex_boxblur(0.5, mode="weighted", UV=Chr)            : \
                                  (prefilter== 6) ?  pref.ex_DGDenoise(str=0.10,LFR=nw/2.,UV=Chr).                                              ex_boxblur(0.5, mode="weighted", UV=Chr)            : \
                                  (prefilter== 7) ?  pref.ex_BM3D(10,1,"normal",UV=Chr,gpuid=gpuid,tv_range=!fsp)                                                                                   : \
                                                     Assert(false, "SMDegrain: Prefilter must be between -1~7: "+string(prefilter))                                                                 : \
                                   pref
I need to apologize for this post being out of sync with the discussion, I had to wait for it to be approved..
And in that time, it has changed a couple of times.

Last edited by FTLOY; 24th February 2023 at 05:44.
  Reply With Quote
Old 21st February 2023, 04:55   #2044  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
Quote:
Originally Posted by LeXXuz View Post
Btw I see you re-sorted prefilters again. You'd better give a heads up when doing that or people may wonder why their scripts behave strangely different.

Code:
ex_Median(mode="IQMV",          UV=Chr)
That one looks new to me. When would you use that prefilter instead of Minblur or Flux?
Yes, it's explained in the docs now, it was changed a month ago in v3.5.8. I was thinking to also create a string type for 'prefilter' so you can define the prefilter preset with absolute terms like "DFTTest", instead of trying to remember the number. Will update with that.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 21st February 2023 at 05:00.
Dogway is offline   Reply With Quote
Old 21st February 2023, 05:16   #2045  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,169
Quote:
Originally Posted by Dogway View Post
Yes, it's explained in the docs now, it was changed a month ago in v3.5.8. I was thinking to also create a string type for 'prefilter' so you can define the prefilter preset with absolute terms like "DFTTest", instead of trying to remember the number. Will update with that.
Are you test with RIFE-denoise and avs_mlrt??

Last edited by kedautinh12; 21st February 2023 at 05:19.
kedautinh12 is offline   Reply With Quote
Old 21st February 2023, 07:41   #2046  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,290
RIFE-denoise is still sort of RIFE-MC only. It still require complex enough blending engine and simplest Average() may create significant blurring and very bad blends where RIFE fail to do ideal motion compensation. For better denoise activity it is require to set new task to developers of its neural-network to create as best possible motion compensated frames with 'current' frame as target. Currently it only hack-like usage of inbetween frame interpolator as motion-conpensation to 'current' timestamp using +N and -N frames only (a pair of frames only). For best results it need to analyse large sets of frames around current frame including current frame (and it will be even much more slower and may take much more memory).

So it is required to go to RIFE core developers, present current state of RIFE-denoise system and its current issues and ask for may be new RIFE core mode for denoise action specifically.

Quote:
Originally Posted by Dogway View Post
Now, I will be installing Windows 10,
Finally you can try DX12-ME with post-2.7.45 mvtools builds and your GTX1070 card.

Last edited by DTL; 21st February 2023 at 07:51.
DTL is offline   Reply With Quote
Old 21st February 2023, 09:06   #2047  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 724
Quote:
Originally Posted by DTL View Post
Finally you can try DX12-ME with post-2.7.45 mvtools builds and your GTX1070 card.
I'd love to have that in an upcoming build of SMDegrain someday.
LeXXuz is offline   Reply With Quote
Old 21st February 2023, 12:58   #2048  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
@LeXXuz: Updated with absolute string preset names. Now you can do prefilter="DFTTest". IQMV is very similar to ex_MinBlur(3) but faster, and FluxSmoothST is a spatio-temporal version of MinBlur (only spatial).

I also added "RIFE" as 'mode' denoiser, but I didn't see much value in it, it doesn't denoise much, and warps content a little bit.

EDIT: I'm not convinced enough, so if nobody opposes I remove it in the next revision.

Quote:
Originally Posted by DTL View Post
Finally you can try DX12-ME with post-2.7.45 mvtools builds and your GTX1070 card.
Maybe if I have time, I also want to run some AI scaling and delogo on personal projects. My card is not that much but nvidia releases have been a train-wreck lately so...
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 21st February 2023 at 19:11.
Dogway is offline   Reply With Quote
Old 22nd February 2023, 15:32   #2049  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 724
Quote:
Originally Posted by Dogway View Post
@LeXXuz: Updated with absolute string preset names. Now you can do prefilter="DFTTest". IQMV is very similar to ex_MinBlur(3) but faster, and FluxSmoothST is a spatio-temporal version of MinBlur (only spatial).
Thanks for that update and the updated docs. The new parts about prefiltering were very interesting.

Because of that I'm fiddling around with a custom prefilter an I was wondering what I have to set for tv_range (true or false) when calling ex.BM3D()?
In SMDegrain it's set to tv_range=!fsp but I couldn't make out the syntax how the fsp variable is set. My Avisynth knowledge is too elementary.
LeXXuz is offline   Reply With Quote
Old 22nd February 2023, 15:44   #2050  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,169
You set SMDegrain=true or false, ex_bm3d will set like that
kedautinh12 is offline   Reply With Quote
Old 22nd February 2023, 15:50   #2051  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
I was playing a moment ago with 21 grams and found another good prefiltering with a single SMDegrain pass, haven't updated the docs as I'm keeping it for next (final?) revision and overall feedback.
Code:
pre=ex_bm3d(60,3,preset="noisy")
SMDegrain(tr=2,mode="TemporalSoften",blksize=32,prefilter=pre,thSAD=600,refinemotion=true)
ex_unsharp(0.2,Fc=width()/2) # Remove the dreamy/softness look
It has its strengths and flaws, overall is on the soft side, but keeps shading and detail, but better of all is it doesn't warp the content as with the 16mm example you talked to me about.

Also added a new 'mode' called TemporalGauss, it's like TemporalSoften but with binomial weighting, so it keeps more details, the main difference with TemporalSoften is that you can use recursion on it with rTemporalGauss so further cleanup is possible. It all depends on the content.

At first I wasn't getting any denoising and realized I broke it when fitting thSCD1, so for these two I added a new fit and also tweaked DCTR and scaleUV, the problem is only when RefineMotion=true. So now I can get back the results I was having with 21 grams sample, Carrie, etc.

You don't need to set tv_range as my example above as it will be read from frameprops, but if you are unsure simply set tv_range=true if your source is in tv_range. fsp is a handler for 'Fulls', so if frameprops is not 'Fulls' (!fsp) it means it's tv_range=true.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 22nd February 2023, 16:32   #2052  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 724
Quote:
Originally Posted by Dogway View Post
I was playing a moment ago with 21 grams and found another good prefiltering with a single SMDegrain pass, haven't updated the docs as I'm keeping it for next (final?) revision and overall feedback.
[CODE]pre=ex_bm3d(60,3,preset="noisy")
SMDegrain(tr=2,mode="TemporalSoften",blksize=32,prefilter=pre,thSAD=600,refinemotion=true)
ex_unsharp(0.2,Fc=width()/2) # Remove the dreamy/softness look
Sigma of 60? Is there anything left in the prefilter clip? I'm probably too cautious. But as you said it highly depends on the source. "Lock, Stock and Two Smoking Barrels" is also such a nightmare with very coarse grain.

Quote:
Originally Posted by Dogway View Post
Also added a new 'mode' called TemporalGauss, it's like TemporalSoften but with binomial weighting, so it keeps more details, the main difference with TemporalSoften is that you can use recursion on it with rTemporalGauss so further cleanup is possible. It all depends on the content.
I sure will try that out. Luckily I have a few days off to play around with those new options.


Quote:
Originally Posted by Dogway View Post
You don't need to set tv_range as my example above as it will be read from frameprops, but if you are unsure simply set tv_range=true if your source is in tv_range. fsp is a handler for 'Fulls', so if frameprops is not 'Fulls' (!fsp) it means it's tv_range=true.
Ah thanks. I didn't know it will be read from frameprops. So I can safely remove that from the call.
LeXXuz is offline   Reply With Quote
Old 22nd February 2023, 17:25   #2053  |  Link
anton_foy
Registered User
 
Join Date: Dec 2005
Location: Sweden
Posts: 721
Quote:
Originally Posted by Dogway View Post
I was playing a moment ago with 21 grams and found another good prefiltering with a single SMDegrain pass, haven't updated the docs as I'm keeping it for next (final?) revision and overall feedback.
Code:
pre=ex_bm3d(60,3,preset="noisy")
SMDegrain(tr=2,mode="TemporalSoften",blksize=32,prefilter=pre,thSAD=600,refinemotion=true)
ex_unsharp(0.2,Fc=width()/2) # Remove the dreamy/softness look
It has its strengths and flaws, overall is on the soft side, but keeps shading and detail, but better of all is it doesn't warp the content as with the 16mm example you talked to me about.

Also added a new 'mode' called TemporalGauss, it's like TemporalSoften but with binomial weighting, so it keeps more details, the main difference with TemporalSoften is that you can use recursion on it with rTemporalGauss so further cleanup is possible. It all depends on the content.

At first I wasn't getting any denoising and realized I broke it when fitting thSCD1, so for these two I added a new fit and also tweaked DCTR and scaleUV, the problem is only when RefineMotion=true. So now I can get back the results I was having with 21 grams sample, Carrie, etc.

You don't need to set tv_range as my example above as it will be read from frameprops, but if you are unsure simply set tv_range=true if your source is in tv_range. fsp is a handler for 'Fulls', so if frameprops is not 'Fulls' (!fsp) it means it's tv_range=true.
Major! Gotta try this out especially the TemporalGauss.
I have tried to repair the ghosting/smearing problem with mocomped temporalsoften using repair(mode=13) with good results. Do you have any ideas regarding this method?
anton_foy is offline   Reply With Quote
Old 22nd February 2023, 18:49   #2054  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
Quote:
Originally Posted by LeXXuz View Post
Sigma of 60? Is there anything left in the prefilter clip?
I was checking visually and it didn't stop filtering grain until 60, but I was using a 21 grams sample which is the grainiest example I have ever seen. It had a sort of a Kuwahara median look, but it worked fine as prefiltering.

Quote:
Major! Gotta try this out especially the TemporalGauss.
I have tried to repair the ghosting/smearing problem with mocomped temporalsoften using repair(mode=13) with good results. Do you have any ideas regarding this method?
Yes, TemporalGauss (Weighted Mean) is designed for the cases with excessive ghosting/smearing from TemporalSoften (Average Mean). It's more conservative so it may degrain less, but you can compensate that by using recursion (a double call) and approximate more the denoising levels of TemporalSoften while producing less artifacts, it will also be slower though.

Try with:
Code:
SMDegrain(3,mode="rTemporalGauss",thSAD=700 or more, refinemotion=true)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 23rd February 2023, 06:38   #2055  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 724
I get a script error with 4.0.0d RC3.
It states ConverttoYUV444 does not have a named argument 'param1' in line 1171

I think I've updated every package with switching to 4.0.0d from 3.6.0d. Any idea what I may have missed?
LeXXuz is offline   Reply With Quote
Old 23rd February 2023, 07:31   #2056  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
Try to download latest pinterf AVS+ version, test6.

I just uploaded RC4 of SMDegrain, mainly cosmetics but you can check the docs as I added the above ex_bm3d() example. I think this might be a good candidate for final.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 23rd February 2023, 12:48   #2057  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,290
Quote:
Originally Posted by LeXXuz View Post
I get a script error with 4.0.0d RC3.
It states ConverttoYUV444 does not have a named argument 'param1' in line 1171

I think I've updated every package with switching to 4.0.0d from 3.6.0d. Any idea what I may have missed?
It is for that build of AVS+ or later - https://forum.doom9.org/showthread.p...50#post1983250
DTL is offline   Reply With Quote
Old 23rd February 2023, 15:31   #2058  |  Link
LeXXuz
21 years and counting...
 
LeXXuz's Avatar
 
Join Date: Oct 2002
Location: Germany
Posts: 724
Didn't know an update of Avisynth was required. Working again. Thank you guys!
LeXXuz is offline   Reply With Quote
Old 25th February 2023, 09:14   #2059  |  Link
Tempter57
Registered User
 
Join Date: Jan 2011
Location: Donetsk
Posts: 58
Dogway

Has installed SMDegrain.avsi v4.0.0d RC7, there was an error
"I don't know what 'rgb' means. (C:\Program Files (x86)\AviSynth+\plugins64\SMDegrain.avsi,line 102)"
Tempter57 is offline   Reply With Quote
Old 25th February 2023, 09:34   #2060  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,372
Thanks, yes an oversight, updating in a few moments.

By the way I'm experiencing some memory leaks using QTGMC+, I'm debugging but not sure if it was a commit on my side or simply a recent AVS+ issue.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Reply

Tags
avisynth, dogway, filters, hbd, packs

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:14.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.