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 21st October 2021, 16:46   #581  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
At first I get confused or turned-off when I see too many dependencies like Dogway where you need the whole bundle just to use a function.

Then I'm thinking. What you're developing is a framework kind of like jQuery or TypeScript; that allow us to write modern full-featured JavaScript on the same-old JavaScript. That gets useful when it's well-documented and standardized. It gets a pain when you need the whole framework for a few functions, and another framework for other features, and the libraries conflict with each other.

It would particularly be useful if it would provide more unified syntax/features between Avisynth and VapourSynth. Like I see you use CombinePlanes (ShufflePlanes) extensively in Avisynth.
MysteryX is offline   Reply With Quote
Old 21st October 2021, 19:17   #582  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,338
The dependency amount is something relative as I try to reduce dependencies to the max, for example yesterday I was debating whether to use nmod() in SMDegrain or not, and decided not to, because it requires ResizersPack and SMDegrain is a widely used filter, even when I think ResizersPack should be in everyone's toolbox.

For example, nmod() tries to standardize the mod functions everyone includes in their scripts, m4(), m8(), m4_sh(), modx(). The at-least-16 (x<16?16:...) that many include is wrong because the mod(n) can output a value below 16. PadBorders() tries to replace Padding(), Addborders(), PadMirror(), sh_Padding(), _Padding(), BorderMirror(), _MirrorBorders(), etc.

I'm constantly trying to reduce dependencies so I included ex_vinverse() in QTGMC, ex_retinex, ex_minblur, ex_luma_rebuild in SMDegrain, and so on, following the concept of Packs. ex_median() replaces a handful of plugins as well. I try to shift the dependencies from plugins or individual scripts to Packs, and then to 'mode' arguments. Some people have been doing this already like manyPlus, plugins_JPSDR, Utils-r4x, jdl_xxx, Zs_RF_Shared, RT_Stats, avsresize, fmtconv.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 22nd October 2021, 10:50   #583  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,673
Avisynth's test21 build probably broke some similarity metrics. I just ran ex_makediff and I can see the difference with aug=true, but the metric values for PlaneSSIM, PlaneGMSD and FrameMDSI are 1.0, 0.0 and 0.0 respectively. I'm not entirely sure but I think I did check those also with test20 earlier and didn't notice anything.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 22nd October 2021, 13:34   #584  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,275
Quote:
Originally Posted by Boulder View Post
Avisynth's test21 build probably broke some similarity metrics. I just ran ex_makediff and I can see the difference with aug=true, but the metric values for PlaneSSIM, PlaneGMSD and FrameMDSI are 1.0, 0.0 and 0.0 respectively. I'm not entirely sure but I think I did check those also with test20 earlier and didn't notice anything.
Try please with test22, there was a glitch with some property handling script functions.
pinterf is offline   Reply With Quote
Old 22nd October 2021, 15:09   #585  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,338
@Boulder: I'm updating SimilarityMetrics and ex_makediff() today, big refactor for the later. Give me some minutes.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 22nd October 2021, 19:15   #586  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,338
Updated ExTools and SimilarityMetrics.
Added mode arg to ex_blur, it accepts "binomial", "gaussian" and now "butterworth", this one is a mix between mean and gaussian controlled by a bias arg included as 'n', still need to default it to 6dB/oct slope.
ex_median() now allows 'thres' for all modes.
Now ex_makediff(aug=true) shows more metrics, check below (Requires Butteraugli plugin, and TransformsPack), and added a 'show' argument to decide to what clip add the metric frameprops. I didn't include VMAF because it doesn't write frameprops, I want to add other modes like 4-SSIM, MS-SSIM, DEitp, VQM, MOVIE, BRISQUE, etc.



I've been parametrizing the blur in SMDegrain to allow frequency inputs for the LFR argument. I think it's correct now but want to do a few more checks.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 22nd October 2021 at 19:32.
Dogway is offline   Reply With Quote
Old 22nd October 2021, 19:40   #587  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,439
Quote:
Originally Posted by Dogway View Post
I've been parametrizing the blur in SMDegrain to allow frequency inputs for the LFR argument. I think it's correct now but want to do a few more checks.
I find lfr really great. How does it work now?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 23rd October 2021, 02:56   #588  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,338
I haven't updated it yet but since the frequency sample rate depends on the resolution, instead of an absolute frequency cutoff it's now relative to the resolution.

For example by setting LFR=300, you are setting the cutoff to 300Hz from the frequency sample rate, for a 1080p clip setting the value to 1920 means no lowpass/blur. Defaults account for input sample rate. It's designed so at the cutoff the attenuation is 3dB. There's another filter I designed today the "butterworth" which typically shows a better lowpass shape, default being a bandpass + lowpass with a 6dB/oct decay/slope. I still have to find how to design this decay and see if it works as good for images as it does for audio.
There's also the "brickwall" filter, it's called the "ideal filter" but it doesn't seem to work fine over images, it should correspond to a "mean" blur kernel. Haven't had the time to test each.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 23rd October 2021, 09:24   #589  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,673
I've now updated a number of packs, and SPresso gives me a new error message. "Expr: Not enough elements on stack to perform operation", points to extools.avsi, line 3801.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 23rd October 2021, 13:20   #590  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,439
EDIT: ignore following... Windows 11 latest insider decided to f*ck up the Nvidia Driver. Reinstalled the latest DCH and now it is working.

Quote:
Originally Posted by Dogway View Post
I haven't updated it
Latest everything.

Script Error

KNLMeansCL: fatal error!
(clCreateContext: OCL_UTILS_UNKNOWN_ERROR)
(D:/Programmi/Media/AviSynth+/plugins64/SMDegrain-3.3.4d~Dogway.avsi, line 892)
(D:/Programmi/Media/AviSynth+/plugins64/SMDegrain-3.3.4d~Dogway.avsi, line 915)
(D:/Programmi/Media/AviSynth+/plugins64/SMDegrain-3.3.4d~Dogway.avsi, line 197)
__________________
@turment on Telegram

Last edited by tormento; 23rd October 2021 at 13:40.
tormento is offline   Reply With Quote
Old 23rd October 2021, 13:44   #591  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,439
Another one arose:

SetMemoryMax()
SetFilterMTMode("DEFAULT_MT_MODE", 2)
LoadPlugin("D:\Eseguibili\Media\DGDecNV\DGDecodeNV.dll")
DGSource("F:\In\2_24 007 21 - Casino Royale\21casino.dgi",ct=144,cb=144,cl=0,cr=0)
CompTest24(1)
ConvertBits(16)
SMDegrain (tr=4, thSAD=400, refinemotion=true, contrasharp=false, PreFilter=4, plane=4, chroma=true, lfr=1)
fmtc_bitdepth (bits=8,dmode=8)

Script Error

Script error: There is no function named 'nmod'.
(D:/Programmi/Media/AviSynth+/plugins64/ExTools-6.2_22~Dogway.avsi, line 1330)
(D:/Programmi/Media/AviSynth+/plugins64/SMDegrain-3.3.4d~Dogway.avsi, line 378)
(D:/Programmi/Media/AviSynth+/plugins64/SMDegrain-3.3.4d~Dogway.avsi, line 380)
(D:/Programmi/Media/AviSynth+/plugins64/SMDegrain-3.3.4d~Dogway.avsi, line 380)
(D:/Programmi/Media/AviSynth+/plugins64/SMDegrain-3.3.4d~Dogway.avsi, line 385)
(D:/Programmi/Media/AviSynth+/plugins64/SMDegrain-3.3.4d~Dogway.avsi, line 560)


It works on Ex_tools 6.1.
__________________
@turment on Telegram

Last edited by tormento; 23rd October 2021 at 13:46.
tormento is offline   Reply With Quote
Old 23rd October 2021, 18:20   #592  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,338
Yes, nmod() is in ResizersPack, it replaces sh_m4() from Zs_RF_Shared. You can copy/paste it anywhere else.

Quote:
Originally Posted by Boulder View Post
I've now updated a number of packs, and SPresso gives me a new error message. "Expr: Not enough elements on stack to perform operation", points to extools.avsi, line 3801.
Shit sorry, a stupid typo. Updated.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 23rd October 2021 at 18:23.
Dogway is offline   Reply With Quote
Old 23rd October 2021, 18:52   #593  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,673
Quote:
Originally Posted by Dogway View Post
Shit sorry, a stupid typo. Updated.
Thanks, it works now

One more I found out, CASm with a 1080p source cropped by 210 pixels off left and 272 pixels off right, I get an error "CombinePlanes: source and target plane dimensions are different".
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 23rd October 2021, 19:13   #594  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,338
Fixed now in ExTools, keep'em coming!! : D
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 23rd October 2021, 19:48   #595  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,439
Quote:
Originally Posted by Dogway View Post
it replaces sh_m4() from Zs_RF_Shared
So I can get rid of ZS?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 23rd October 2021, 20:03   #596  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,338
It's still required for sh_GetUserGlobalIMTint() but I will try to remove that dependency in SMDegrain for the next version.

EDIT: Does anybody have a build of KPassFilterCL? I need it to double check some frequency related functions. I have GCC but I can't build avs plugins with this compiler.

Visual examples for lowpass filters:

Mean (brickwall)


Butterworth (with n: 50, 10 and 2)




Gaussian




Butterworth 'n' setting animated from 300 to 0:
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 29th October 2021 at 10:50.
Dogway is offline   Reply With Quote
Old 23rd October 2021, 21:21   #597  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,285
Quote:
Originally Posted by Dogway View Post

EDIT: Does anybody have a build of KPassFilterCL? I need it to double check some frequency related functions. I have GCC but I can't build avs plugins with this compiler.
There is a link mirror on the top right corner of this page to v0.1.0
http://avisynth.nl/index.php/KPassFilterCL
poisondeathray is offline   Reply With Quote
Old 24th October 2021, 11:01   #598  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,439
Quote:
Originally Posted by Dogway View Post
I have GCC but I can't build avs plugins with this compiler.
You can easily get MSVC or Intel really easily.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 24th October 2021, 12:09   #599  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,338
I don't have space in C: and 4Gb (at the very least) for building once every half a year...

I tested the plugin but didn't work for me... It would really be great to have vcmohan F1QLimit in avisynth to preview frequency domain in 1D.

By the way I built a sharpener ex_sharp() that by chance matched unsharp(), but I added a twist by also adding 20% of the sharpness from a lower frequency cutoff as reinforcement. It's frequency based so the varY option of unsharp() is now Fc and you can use 1920 for pixel accuracy, 1920*2 for subpixel accuracy and 1920*0.5, or simply 960 to sharpen low frequency. I also finished designing the butterworth slope, first order is actually the 6dB/oct slope, very gaussian like.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 24th October 2021 at 12:12.
Dogway is offline   Reply With Quote
Old 5th November 2021, 09:17   #600  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,338
Just updated SMDegrain with a battery of changes. You can read the log in the commit description.

To expand, I repurposed the LFR argument so now it describes frequency. The higher the more higher frequencies you restore, notice the frequency is bound to clip width (typically) resolution so 300 is not the same for a 1080p clip than for a 2160p one. By default it's to set to 300Hz for 1080p, 600Hz for 1080p and so on.
I reworked the LFR code in non-MDegrain modes to use the one in MDegrain which is sensibly faster.

I included a new setting called DCTFlicker, this is a problem I described some weeks ago which is low frequency noise so I wanted to do something with it. It happened I stumbled over this Didée's post to tackle this very same issue. For that I had to port FluxSmoothT to Expr() which was a pending task in order to expand temporal radius and include a soft threshold. FluxSmoothT is nice because it's the minimum change of a temporal average and a temporal median, along with the soft threshold it makes for a good low frequency calmer. It's not perfect, but there's no perfect solution either (reference). That's why a multistep solution although slower might be desired. Check below with the great sample clip from tormento.

raw

DNR..........................................................................DNR+LFR
............
DNR+LFR+DCTR........................................................DNR+LFR+DCTR (tailored: multi-step)
............

Call for the multi-step solution
Code:
pre=smdegrain(tr=1,mode="temporalsoften",blksize=32,thSAD=900,LFR=400,prefilter=5,DCTFlicker=true,contrasharp=false,refinemotion=true)
smdegrain(tr=2,mode="MDegrain",blksize=32,prefilter=pre,thSAD=400,LFR=false,contrasharp=true,refinemotion=true)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 5th November 2021 at 09:22.
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 03:35.


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