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. |
9th May 2024, 18:51 | #2941 | Link | ||
Registered User
Join Date: Feb 2014
Posts: 409
|
Quote:
EDIT: Adding Info() after the SMDegrain line works on my second computer and shows that it's processing in 16bits. Thanks for the new trick. Quote:
Lucky38: Sorry for the confusion. Last edited by LouieChuckyMerry; 12th May 2024 at 16:07. Reason: Information, Information |
||
9th May 2024, 22:47 | #2942 | Link |
Registered User
Join Date: Jul 2018
Posts: 1,208
|
Some idea about different prefilters usage (including no-prefiter): At testing QTGMC it was found single prefilter mode can not make all areas better in details. With prefilter-ON some areas get better and others not. With prefilter-OFF it is changed. So I make some function to gather most possible details from several filter runs. With deinterlace processing of QTGMC it also collect most of noise from different filter runs also. But it may be tested with SMDegrain too with different prefilters at single processing. The function GetSharpest() included into M_QTGMC listed at https://forum.doom9.org/showthread.p...88#post2001388 and it uses new plugin MostDiffVal.dll to run. Though I think maybe it can be implemented with all internals of AVS like Layer() instead of Average and Expr() instead of MostDiffVal().
So to run SMDegrain with a set of prefilters (any set may be combined in a chain of GetSharpest(clip1, clip2): Code:
pref1=SMDegrain(prefilter=0) pref2=SMDegrain(prefilter=1) GetSharpest(pref1, pref2) Code:
Function GetSharpest(clip c1, clip c2) { avg=Average(c1.GaussResize(c1.width, c1.height, src_left=0.001, src_top=0.001, p=2), 0.5, c2.GaussResize(c2.width, c2.height, src_left=0.001, src_top=0.001, p=2), 0.5) return MostDiffVal(avg, c1, c2) } |
9th May 2024, 23:51 | #2943 | Link | |
Registered User
Join Date: Oct 2018
Location: Germany
Posts: 1,056
|
Quote:
Code:
c1=Sharpen(0.80).subtitle("c1") c2=Sharpen(0.10).subtitle("c2") GetSharpest(c1, c2) Edit2: Oh, a combination of both clips will probably be returned. When I use 'a' and 'f' as a subtitle I see that 'a' and 'f' are overlaid.
__________________
Live and let live Last edited by gispos; 10th May 2024 at 00:38. |
|
10th May 2024, 11:33 | #2944 | Link |
Registered User
Join Date: Jul 2018
Posts: 1,208
|
It works on sample-level granularity from both input clips. So Subtitle text will be mixed (and typically not very well processed as extreme 0 and max values). Better results on natural narrow/limited range.
For test you need to mask-sharpen c1 clip at one area and mask-sharpen c2 clip at different area and process to see if returned both sharpened areas from c1 and c2. More sad thing about MAnalyse/MDegrain/MCompensate is with different areas grouped MVs errors it also cause different areas global shift (not only fine sharpness lost) so the GetSharpest() will also somehow mix these areas. And with different pre-filters these grouped MVs areas errors also different. I typically check it as Code:
c1=Process(params1).Subtitle("params1") c2=Process(params2).Subtitle("params2", align=..some2, not default and not 4) sh=GetSharpest(c1, c2).Subtitle("gs", align=4) Interleave(c1, sh, c2) Last edited by DTL; 10th May 2024 at 11:57. |
11th May 2024, 10:26 | #2945 | Link |
Registered User
Join Date: Jul 2018
Posts: 1,208
|
Finally made replacement of all functions with AVS internal Expr() and ex_Tools for GetSharpest():
Code:
Function GetSharpest(clip c1, clip c2) { avg=Layer(c1.ex_GaussianBlur(1.8, UV=3), c2.ex_GaussianBlur(1.8, UV=3), "fast") return Expr(avg, c1, c2, "x y - abs x z - abs >= y z ?") #or some faster #return MostDiffVal(avg, c1, c2) } ex_GaussianBlur() runs about 1.5 times faster in comparison with GaussResize() for blurring. Also Layer("fast") is somehow faster in comparison with Average(0.5,0.5). About twice faster with not yet tested quality change is single blur of averaged input clips: Code:
Function GetSharpest(clip c1, clip c2) { avg=ex_GaussianBlur(Layer(c1, c2, "fast"),1.8, UV=3) return Expr(avg, c1, c2, "x y - abs x z - abs >= y z ?") #or some faster #return MostDiffVal(avg, c1, c2) } Code:
Function GetSharpest(clip c1, clip c2) { avg=GaussResize(Layer(c1, c2, "fast"), c1.width, c1.height, src_left=0.001, src_top=0.001, p=2) return Expr(avg, c1, c2, "x y - abs x z - abs >= y z ?") #or some faster #return MostDiffVal(avg, c1, c2) } Last edited by DTL; 11th May 2024 at 11:08. |
18th May 2024, 20:32 | #2946 | Link | ||
Registered User
Join Date: Feb 2014
Posts: 409
|
I very recently transitioned from real.finder's last version of NotSMDegrain (3.1.2.116s) to Dogway's most recent version of SMDegrain (4.6.0d), running on Windows 7 with 64-bit AviSynth+ 3.73. It seems to work fine, but I'm trying to understand why the speed is basically the same (within ~5%) but the resulting video bitrate is radically different (roughly a full CRF). To wit, the scripts
Code:
SetFilterMTMode("Default_MT_Mode",2) SMDegrain(TR=4,ThSAD=700,RefineMotion=True,Plane=0,Chroma=False,n16=True,n16_Out=True) FastLineDarkenMod4() F3KDB(Y=100,Cb=100,Cr=100,GrainY=0,GrainC=0) SelectRangeEvery(1000,66) PreFetch(5) Code:
SetFilterMTMode("Default_MT_Mode",2) SMDegrain(Prefilter=SpotLess(),TR=3,ThSAD=500,RefineMotion=True,Plane=0,Chroma=False,n16=True,n16_Out=True) FastLineDarkenMod4() F3KDB(Y=100,Cb=100,Cr=100,GrainY=0,GrainC=0) SelectRangeEvery(1000,66) PreFetch(5) Quote:
Code:
SetFilterMTMode("Default_MT_Mode",2) ConvertBits(Bits=16) SMDegrain(TR=4,ThSAD=700,RefineMotion=True,Plane=0,Chroma=False) FastLineDarkenPlus() Neo_F3KDB(Y=100,Cb=100,Cr=100,GrainY=0,GrainC=0) SelectRangeEvery(1000,66) PreFetch(5) Code:
SetFilterMTMode("Default_MT_Mode",2) ConvertBits(Bits=16) SMDegrain(Prefilter=SpotLess(),TR=3,ThSAD=500,RefineMotion=True,Plane=0,Chroma=False) FastLineDarkenPlus() Neo_F3KDB(Y=100,Cb=100,Cr=100,GrainY=0,GrainC=0) SelectRangeEvery(1000,66) PreFetch(5) Quote:
|
||
18th May 2024, 21:21 | #2947 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,738
|
Less entropy, less changing high frequency details, and encoder can save bits.
It may not be visible at first, only pixel-peeping and framestepping will tell what those plugins were able to smoothe. To go through all plugin's parameter's dependencies would make up a matrix which one should like to solve on his side. From my side of experience I can tell that Dogway's algos give nice details which got to be honoured by bits... and of course... many thanks, at least from my side.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
21st May 2024, 15:43 | #2949 | Link | |
Registered User
Join Date: Feb 2014
Posts: 409
|
Quote:
Thank you for a very philosophical answer . And I also appreciate Dogway's work very much. Please, I don't understand what you mean. |
|
22nd May 2024, 05:49 | #2950 | Link |
Registered User
Join Date: Jan 2018
Posts: 2,168
|
Lol, please search google about High bit depths video and try add converttobit(16) or converttobit(32) and compare both of them again. SMDegrain build by Dogway for speed with High bit depths video not for 8 bit video only
|
24th May 2024, 05:18 | #2951 | Link | |
Guest
Posts: n/a
|
Quote:
http://avisynth.nl/index.php/ConvertBits |
|
24th May 2024, 11:11 | #2952 | Link | |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,738
|
BTW, LouieChuckyMerry,
Quote:
Prefilter=SpotLess() is not implemented this way within SMDegrain 4.6.0d
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
|
24th May 2024, 16:07 | #2953 | Link |
Registered User
Join Date: Jul 2018
Posts: 1,208
|
You may need to add SpotLess() function body to the script before call it or Import() .avsi file with this script function body.
Function SpotLess() is from https://forum.doom9.org/showthread.php?t=181777 . |
25th May 2024, 18:21 | #2954 | Link | ||
Registered User
Join Date: Feb 2014
Posts: 409
|
Quote:
I'm working in 16-bit (see Post #2946), but will give 32-bit a try. Thanks. Quote:
Code:
ConvertBits(Bits=16) It seems to work fine for me... |
||
29th May 2024, 08:16 | #2955 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,738
|
I see now. This argument takes a clip too, (this is possible, I found it in an old script being (last), and I was expecting an integer argument).
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 4th June 2024 at 10:45. |
2nd June 2024, 17:44 | #2956 | Link |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,821
|
I have always used PureVideo deinterlacer for IVTC from 29.97 to 23.974 by using
DGTelecide(mode=1, pthresh=3.5) DGDecimate() but I'd like to try something better. What do you suggest me from your scripts without incurring in miserable performances? I have a very old i7-2600k and a nVidia 1660 SUPER gpu and remember that I have to encode it too. (I was looking at RIFE but I fear it's too heavy, mostly because of double RGB32 and back conversion and, above all, I have no idea if it's suitable for IVTC too)
__________________
@turment on Telegram Last edited by tormento; 2nd June 2024 at 17:46. |
4th June 2024, 20:06 | #2958 | Link |
Registered User
Join Date: Jul 2018
Posts: 1,208
|
Latest version is https://github.com/DTL2020/MostDiffVal/releases/tag/0.2 .
But it can be replaced with Expr() call Code:
Expr(avg, c1, c2, "x y - abs x z - abs >= y z ?") |
5th June 2024, 09:42 | #2960 | Link |
Registered User
Join Date: Jul 2018
Posts: 1,208
|
Try to load your image with alpha channel and use Overlay() - http://avisynth.nl/index.php/Overlay . If fixed opacity is enough - you can load RGB image without alpha channel and control with
float opacity = 1.0 Set overlay transparency. The value is from 0.0 to 1.0, where 0.0 is transparent and 1.0 is fully opaque. This value is multiplied by mask luminance to form the final opacity. Or you can load grey mask as separate image too. |
Tags |
avisynth, dogway, filters, hbd, packs |
Thread Tools | Search this Thread |
Display Modes | |
|
|