View Full Version : Dogway's Filters Packs
kedautinh12
22nd October 2022, 14:50
I think need change Deblock_deblock to deblock won't meet same error in future anymore
tormento
22nd October 2022, 16:08
Let's wait for the final word of Dogway :)
Dogway
22nd October 2022, 17:30
You need to download Deblock (https://github.com/299792458m/Avisynth-Deblock/releases) plugin.
The plugin prefix Deblock_ is to not be confused with other Deblock called functions, it was a change in 2014 by GMJCZP.
It shouldn't trigger an error, it doesn't for me. As Reel.Deel stated the plugin should be called Deblock.dll (case insensitive).
As for the nnedi3resize bug I will try to do a commit later today with the recent changes.
kedautinh12
22nd October 2022, 17:49
nnedi3resize bug had same bug with deep_resize when use with AnimeITVC or TDecimate().TFM()
Reel.Deel
22nd October 2022, 17:55
The plugin prefix Deblock_ is to not be confused with other Deblock called functions, it was a change in 2014 by GMJCZP.
It shouldn't trigger an error, it doesn't for me. As Reel.Deel stated the plugin should be called Deblock.dll (case insensitive).
The problem is that the x64 binary from MysteryX is named Deblock-x64.dll. I doubt many are changing of the name of the binaries. I just download them and stick in the auto-load folder.
I also use 299792458m version so the binary is already named deblock.dll.
kedautinh12
22nd October 2022, 17:55
But if ver from real.finder, i think Deblock_deblock change to deblock won't have any error when use different others name for Deblock.dll
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/Deblock_QED_MT2.avsi
tormento
22nd October 2022, 19:15
You need to download Deblock (https://github.com/299792458m/Avisynth-Deblock/releases) plugin.
Where can I find a build? There are sources only there.
Reel.Deel
22nd October 2022, 19:32
Where can I find a build? There are sources only there.
In the Release and x64/Release folders: https://github.com/299792458m/Avisynth-Deblock/tree/master/Src
tormento
23rd October 2022, 09:08
/Avisynth-Deblock/tree/master/Src
Looking for a build inside a src directory, unfortunately, goes beyond the capabilities of my OCD mind. :p
DTL
23rd October 2022, 11:51
Ryzen 7000 series support AVX 512 now. I think you can buy it :D
Any chance for speed-up RIFE when RIFE updated with more new models??
As I see AVS RIFE is based on rife-ncnn-vulkan and it is based on ncnn https://github.com/Tencent/ncnn that can support both CPU and GPU on windows. So may be if CPU is underloaded or much faster it may help to ncnn. Need to ask RIFE and rife-ncnn-vulkan developers if they can support both CPU and GPU execution of ncnn.
tormento
23rd October 2022, 16:06
You need to download Deblock plugin.
Downloaded and installed but the error about deblock_deblock is still there.
Looking at the dll itself, it has a Deblock function but not a deblock_deblock one.
kedautinh12
23rd October 2022, 16:14
Downloaded and installed but the error about deblock_deblock is still there.
Looking at the dll itself, it has a Deblock function but not a deblock_deblock one.
You can change deblock_deblock to deblock in script. Error will gone :D
Reel.Deel
23rd October 2022, 16:24
Downloaded and installed but the error about deblock_deblock is still there.
Looking at the dll itself, it has a Deblock function but not a deblock_deblock one.
Did you rename the plug in to something else? The dll must be named "deblock.dll".
tormento
23rd October 2022, 16:53
You can change deblock_deblock to deblock in script. Error will gone :D
I have changed deblock_deblock to deblock in the script but AVSPmod crashes when I try to preview, without any error message.
In VirtualDub2 I get:
An instruction not supported by the CPU was executed in module 'VirtualDub64'.
If Deblock.dll needs something more than AVX, on my Sandy Bridge I am f*cked.
Anyway, the script is:
SetMemoryMax()
SetFilterMTMode("DEFAULT_MT_MODE", 2)
LoadPlugin("D:\Eseguibili\Media\DGDecNV\DGDecodeNV.dll")
#LoadPlugin("D:\Eseguibili\Media\DGHDRtoSDR\DGHDRtoSDR.dll")
DGSource("F:\In\Tatami\01.dgi")
ConvertBits(16)
CCD(15) # Remove big chroma "blocks"
# Remove blocking and smooth out jagged edges (only applies where motion match fails)
mb=Deblock_QED(quant1=30, quant2=40,UV=1)
mb=mb.ex_smooth(1, mode="SG", limit=true, sharp=true)
# Prefiltering with radius 3 for more coherence. I found preset "normal" to clean edges better.
pre=ex_BM3D(sigma=10,preset="normal",radius=3,UV=1,gpuid=0,tv_range=true)
# Large radius for more coherence. LFR to recover some smearing. limits=false to don't sharpen motion areas
SMDegrain(6, 400, prefilter=pre, mfilter=mb, ContraSharp=true, RefineMotion=true, plane=4, LFR=300, limits=false, DCTFlicker=false)
# Debanding to reduce posterization in walls/defocused backgrounds
GradFun3plus(thr=0.25, radius=10, mask=2, smode=0,UV=1)
kedautinh12
23rd October 2022, 17:00
opt in deblock plugin of 299792458m will auto-detect, if you use cpu had AVX and below, opt will choose sse4.2. Try add opt=2 in deblock() or maybe you copy wrong ver: x86 in VirtualDub64
tormento
23rd October 2022, 17:30
opt in deblock plugin of 299792458m will auto-detect, if you use cpu had AVX and below, opt will choose sse4.2. Try add opt=2 in deblock() or maybe you copy wrong ver: x86 in VirtualDub64
Nope, I did it right.
As far as I can see, deblock doesn't have a opt switch.
DTL
23rd October 2022, 17:33
An instruction not supported by the CPU was executed in module 'VirtualDub64'.
If Deblock.dll needs something more than AVX, on my Sandy Bridge I am f*cked.
May be try to add manual limiting of CPU in AVS in the script with SetMaxCPU ?
Like SetMaxCPU("mmx+, sse+, sse2+, sse3+, ssse3+, sse4+, sse4.1+, sse4.2+, avx+") . May be even start from SetMaxCPU("none") to check if it help any.
But it will not help if executable was compiled for AVX2 or later execution environment and compiler may add some AVX2 or newer instructions not guarded by AVS environment or internal detector of MaxCPU features avaialble.
The project build settings lists
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
https://github.com/299792458m/Avisynth-Deblock/blob/9802e0366dc17c693bb310c7f0441e28debdac11/Src/Deblock.vcxproj#L98
So it most probably compiled with instructions used up to AVX2. So someone need to download source and compile for SSE2 as lower option in typical visual studio or any other compatible compiler.
Reel.Deel
23rd October 2022, 17:39
As far as I can see, deblock doesn't have a opt switch.
299792458m Deblock does have an opt parameter. But you might be onto something. When I use deblock() it works but when I use deblock_deblock() or deblock(opt=x) I get the "An instruction not supported by the CPU was executed in module 'VirtualDub64'." error.
The project build settings lists
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
https://github.com/299792458m/Avisynth-Deblock/blob/9802e0366dc17c693bb310c7f0441e28debdac11/Src/Deblock.vcxproj#L98
So it most probably compiled with instructions used up to AVX2. So someone need to download source and compile for SSE2 as lower option in typical visual studio or any other compatible compiler.
https://i.ibb.co/fC8hnrn/deblock-compile.png
Should it be "Not Set" ?
Edit: compiled with "Not Set" and now the opt parameter works without crashing ...
kedautinh12
23rd October 2022, 17:46
Nope, I did it right.
As far as I can see, deblock doesn't have a opt switch.
Are you sure??
https://github.com/299792458m/Avisynth-Deblock#moded-by-299792458m
kedautinh12
23rd October 2022, 18:01
Can you share "not set" compiled file, Reel.Deel??
tormento
23rd October 2022, 18:53
Are you sure??
Nope. Another pair of glasses is needed. :cool:
Anyway I have to edit the avsi to use it. I will try.
Boulder
23rd October 2022, 19:24
https://drive.google.com/file/d/1AO1_n7dKhjEAbb6Au5qTL9RrfzFHyzjP/view?usp=sharing
Straight from the Avs+ wiki.
Reel.Deel
23rd October 2022, 19:38
https://drive.google.com/file/d/1AO1_n7dKhjEAbb6Au5qTL9RrfzFHyzjP/view?usp=sharing
Straight from the Avs+ wiki.
I forgot it was there. Asd added that. No wonder when I went to replace the deblock plugin it showed a more recent date.
Edit: updated the Deblock wiki page (http://avisynth.nl/index.php/DeBlock) with 299792458m's version built by Asd. I modified the folder structure of the zip so that the binaries are not inside the src folder: https://files.videohelp.com/u/223002/Avisynth-Deblock_299792458m_noAVX2req.7z
DTL
23rd October 2022, 23:02
https://i.ibb.co/fC8hnrn/deblock-compile.png
Should it be "Not Set" ?
Not set is something undefined (may be something like SSE/SSE2 to make not completely poor build). I typically set line ending with /arch:SSE2 for SSE2 builds. It is expected at 2022 year with x64 CPUs most users have at least SSE2.
StvG
24th October 2022, 00:06
Not set is something undefined (may be something like SSE/SSE2 to make not completely poor build). I typically set line ending with /arch:SSE2 for SSE2 builds. It is expected at 2022 year with x64 CPUs most users have at least SSE2.
The default arch is SSE2. For x64 SSE2 is also the minimum arch.
tormento
25th October 2022, 00:44
@Dogway
Is possible to have a porting of maa2 (http://avisynth.nl/index.php/MAA2) inside your tools?
kedautinh12
25th October 2022, 01:48
@Dogway
Is possible to have a porting of maa2 (http://avisynth.nl/index.php/MAA2) inside your tools?
real.finder was updated it
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.6%20and%20up/maa2.avsi
madey83
25th October 2022, 06:47
real.finder was updated it
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.6%20and%20up/maa2.avsi
hi,
what is the benefit of using maa2 filter?
kedautinh12
25th October 2022, 07:03
hi,
what is the benefit of using maa2 filter?
Anti-aliasing scripts
tormento
25th October 2022, 09:39
real.finder was updated it
Thanks. Does it support Asd-g porting of VS Sangnom2?
I was asking Dogway as he did a real good job optimizing scripts within his extools "library".
I read about the use of nnedi3 as antialiasing tool but don't really know how. It would be even faster as it has a OpenCL port.
kedautinh12
25th October 2022, 10:01
Yes, it supports Asd-g's porting
madey83
25th October 2022, 15:51
Yes, it supports Asd-g's porting
hi,
could i ask for some example how to use it with SMDegrain, LSFplus, GradFun3plus
kedautinh12
25th October 2022, 16:03
hi,
could i ask for some example how to use it with SMDegrain, LSFplus, GradFun3plus
You only need use it when your video had aliasing
madey83
25th October 2022, 16:12
You only need use it when your video had aliasing
@kedautinh12
based on what criteria i will know if my video needs this filter?
That this do the same:
# Remove blocking and smooth out jagged edges (only applies where motion match fails)
mb=Deblock_QED(quant1=30, quant2=40,UV=1)
mb=mb.ex_smooth(1, mode="SG", limit=true, sharp=true)
?
kedautinh12
25th October 2022, 16:45
@kedautinh12
based on what criteria i will know if my video needs this filter?
That this do the same:
# Remove blocking and smooth out jagged edges (only applies where motion match fails)
mb=Deblock_QED(quant1=30, quant2=40,UV=1)
mb=mb.ex_smooth(1, mode="SG", limit=true, sharp=true)
?
That script used if your video had blocking. maa2 use in some case your video had aliasing. Example for anti-aliasing:
https://forum.doom9.org/showthread.php?p=1060089#post1060089
madey83
25th October 2022, 18:17
That script used if your video had blocking. maa2 use in some case your video had aliasing. Example for anti-aliasing:
https://forum.doom9.org/showthread.php?p=1060089#post1060089
:thanks:
Dogway
26th October 2022, 02:43
Ok sorry for the delay, I couldn't deal with ResizersPack since I was involved with WhitePoint() for the last few days non-stop, but now that's finished I will resume ResizersPack from tomorrow.
What I did with WhitePoint was to calculate a new fit for the Planckian and Daylight locus of the 1931 matching function, minimizing errors. The twist here is that I used new derivations for the temperatures with the colour-science Python module. But not only I calculated new chromaticity coordinates, I went as far as recalculate them from the SPD (Spectral Power Distribution) with updated universal constants (Boltzman, Avogadro, etc). Also the SPDs were linear interpolated from 10nm intervals, I reinterpolated them with Sprague interpolation as recommended now by the CIE. The same procedure was done for the 1964 10º Standard Observer color matching function, which is a novel thing since nobody tried to fit a locus for this observer (that I know of).
I know this might all look like a free offshoot from the official standard specifications, but it follows the rationale I chose for TransformsPack which is to derive all the values. My intention is to also put the fits in CMF() to good use to derive values from a SPD standpoint for any matching function (ie. WhitePoint in CIE 2015 2º), this is the goal for the work-in-progress Chromaticity_xy() function.
Matching functions are and will always be the weakest link in any color science/management procedure, but using derivations will ensure the most accurate representation for the given CMF, only limited in AviSynth by its single float precision constraint.
On another note, last week I updated EOTF_2084() and now is production ready. Paired with TM_2446C() tonemapper it can give a good SDR rendition of the HDR counterpart.
"420P10 source"
ConvertBits(32)
YUV_to_RGB("2020")
EOTF_2084()
TM_2446C(k1=1,k3=0.52,EOTFi="linear")
ConvertFormat(1,1,"RGB","420",cs_out="709",OETFi="linear",EOTFi="1886",tv_out=true)
ConvertBits(8,dither=1)
In the future the plan is to implement this within ConvertFormat().
I also want to output peak white stats from ScenesPack() and do some IQM averaging for the tonemapper. I will be adding more tonemappers as time permits.
ENunn
26th October 2022, 15:37
I'm getting this error whenever I use QTGMC+ with AVISource. I started to get this error after updating it.
https://i.imgur.com/05y3lPt.png
This doesn't happen when I load the video with LSMASH, but loading and scrubbing is just way too slow. Is there a fix?
I don't recommend you loading interlaced with avisource since it doesn't index the frames.
You can try LSmash, FFMS2, DGIndex or DGDecNV. I prefer the later two because it will detect parity swaps on interlaced content.
Going back to this problem, using LWLibav works (although I'm not a fan because of how slow it is to index and I can't use DGDecNV because the source codec is FFV1). However, I'm using a Virtualdub filter (CCD) before I deinterlace, so I converted to RGB32 and then to YV24, however I get this exact same error when I run the latest version of QTGMC after it. I grabbed an older version of it that I downloaded back in August, and the issue goes away.
My script is like this:
setmemorymax(63448)
v = lwlibavvideosource("G:\virtualdub\tape transfers\g4techtv and misc 2004 cap 2.mkv", fpsnum=30000,fpsden=1001)
a = lwlibavaudiosource("g:\recordings\g4techtv and misc 2004.w64")
audiodub(v,a)
delayaudio(-0.100)
assumetff().converttoyuv422(matrix="rec601", interlaced=true).convertbits(10)
#Crop(8, 4, -24, -6)
#tweak(bright=-23.5, cont=1.11, coring=false, dither=true).convertbits(8)
#Levels(85, 1, 1008, 0, 1023, coring=false,dither=true).convertbits(8)
Levels(85, 1, 1008, 0, 1023, coring=false,dither=true).tweak(hue=-3, coring=false, dither=true).convertbits(8)
#turnRight().Histogram().TurnLeft()
Trim(68, 628838)
LoadVirtualdubPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\ccd_64bit.vdf", "CCD", 1)
ConverttoRGB32(matrix="rec601",interlaced=true)
CCD(10,1)
ConvertToYv24(matrix="rec601",interlaced=true)
qtgmcp(preset="faster")
Any fixes?
kedautinh12
26th October 2022, 15:59
Are you using this latest ver??
https://gitlab.com/uvz/AviSynthPlus-Builds
And i think L-Smash Source faster in index than ffms and DGDecNV
Dogway
26th October 2022, 22:33
FFV1? That had to be converted from another format.
You can do two things, use Avisynth's CCD() (https://github.com/Dogway/Avisynth-Scripts/blob/5993a9c51144f0778927c54906ab9a22393e7071/EX%20mods/DeblockPack.avsi#L227) or sideload the original file with DGDecNV and copy its frameproperties to the FFV1 video.
Second option looks like this:
orig = DGSource("original.dgi")
ffvideosource("FFV1_YUV444")
propCopy(orig,props="_ChromaLocation", exclude=true)
tormento
28th October 2022, 10:43
Would you please expose all the parameters for NNEDI3CL 1.0.4 version in the wrapper?
What is the advantage of using it instead of a direct call? I mean, how do the various script added values interact with native NNEDI3CL ones? Such as sharpness.
Dogway
28th October 2022, 11:16
What settings do you miss for NNEDI3CL?
You mean advantage of using nnedi3wrap()? nnedi3 was fine as it was, but NNEDI3CL wasn't, it doesn't have a factor multiplier so a loop is needed, also it doesn't fix pixel/chroma shift. Making a wrapper was also useful to simply change from cpu to gpu nnedi3 without tinkering with settings. I also made it simpler to deal with interlaced content, 'dh' has to be set to true for interlaced, then frameprops are honored. So several QoL changes, for myself and whoever finds it useful. It makes it simpler when implemented into SMDegrain, deep_resize(), etc.
I haven't resumed yet the work in ResizersPack because I was researching on typefaces, for coding in general but also for a side project I have where legible fonts are much needed. The problem I had wasn't Lucida Console, it's monospaced, but the grammar scheme was mixing bold and regular fonts, after I removed the bold types everything aligned nicely. I also tested other mono fonts, but Lucida Console really grew on me, everything else is too condensed (vertical), or interline space is too big.
madey83
28th October 2022, 14:13
hi,
could someone advice what to do with this issue:
Script Error
BM3D: 'cudaMallocPitch( &d_src.data, &_d_pitch, max_width * sizeof(float), (final_() ? 2 : 1) * num_input_planes * temporal_width * max_height)' failed: CUDA-capable device(s) is/are busy or unavailable
(E:\4k_encode\Avisynth-Scripts-master\SMDegrain v3.5.5d\SMDegrain v3.5.5d.avsi, line 1094)
(E:\4k_encode\Avisynth-Scripts-master\SMDegrain v3.5.5d\SMDegrain v3.5.5d.avsi, line 264)
(E:\movie.avs, line 146)
SMDegrain call: SMDegrain(tr=2, thSAD=275, thSCD1=415, thSCD2=115, prefilter=6) and this
and this:
BM3D: 'cudaMallocPitch( &d_src.data, &_d_pitch, max_width * sizeof(float), (final_() ? 2 : 1) * num_input_planes * temporal_width * max_height)' failed: CUDA-capable device(s) is/are busy or unavailable
(E:\4k_encode\Avisynth-Scripts-master\SMDegrain v3.5.5d\SMDegrain v3.5.5d.avsi, line 1094)
(E:\movie.avs, line 145)
for this call:
pre=ex_BM3D(sigma=10,preset="normal",radius=3,UV=1,gpuid=0,tv_range=true)
SMDegrain(tr=2, thSAD=275, thSCD1=415, thSCD2=115, prefilter=pre)
this started when i have updated drivers to my RTX 2060
edit:
reboot solved the issue. but i did reboot many times, so i do not really knew what fixed it.
tormento
28th October 2022, 17:18
What settings do you miss for NNEDI3CL?
Field, to override, force or ignore frame properties.
DW an DH I can't find the utility right now but who knows.
Planes, to achieve some speed.
ST to give it a run and see if it's useful.
Console really grew on me, everything else is too condensed (vertical), or interline space is too big.
What about variable fonts? I find them really nice to use.
Dogway
29th October 2022, 11:08
Ok so:
field=-2 (interlaced forced. Automatic order)
field=-1 (automatic)
field= 0 (progressive forced)
field= 1 (interlaced forced. "bottom-field first" forced)
field= 2 (interlaced forced. "top-field first" forced)
DW and DH go away.
'ST' is deprecated I think, the issue it pretended to fix was solved AFAIK.
Planes? How that works? You can't resize only one plane, or deinterlace only one plane... If your thought is more like 420 to 444 you can try UVrecon, maybe directly using ConvertFormat which handles plane multiplexing.
EDIT: oops, looks like I already did pass the 'planes' arg from NNEDI3CL, it's an int_array though
Variable fonts depend on software support I think because in Notepad2 and Notepad3 they didn't seem to work. Maybe Visual Studio Code? where do you use it?
ENunn
29th October 2022, 16:44
Are you using this latest ver??
https://gitlab.com/uvz/AviSynthPlus-Builds
Didn't even know there was a new version out, thanks. It didn't fix the issue sadly.
And i think L-Smash Source faster in index than ffms and DGDecNV
Still really slow for my cases.
FFV1? That had to be converted from another format.
It was, the original file was huffyuv. I converted it to FFV1 for the file size decrease while still keeping it lossless. However, the issue happens regardless of source.
You can do two things, use Avisynth's CCD() (https://github.com/Dogway/Avisynth-Scripts/blob/5993a9c51144f0778927c54906ab9a22393e7071/EX%20mods/DeblockPack.avsi#L227)...
Didn't even know that was a thing! :p Anyways, I get this error:
https://i.imgur.com/HH52eoY.png
My source is YUY2.
...or sideload the original file with DGDecNV and copy its frameproperties to the FFV1 video.
I don't have the original file unfortunately. Even if I did, it doesn't seem to support huffyuv.
https://i.imgur.com/W8bhmuO.png
Dogway
29th October 2022, 17:44
Ok, I will update soon, meanwhile edit the first CombinePlanes line with:
a4 = CombinePlanes(y.BicubicResize(w/2, is422(a) ? h : h/2, -0.5, 0.3), a, planes="YUV", pixel_type="YUV444P"+string(bi==32 ? "S" : bi))
Then you have to preconvert the 422 to planar and call with CCD():
ConvertToYUV422()
CCD()
Try to play a bit with the CCD() values so the effect scales to your artifacts.
kedautinh12
30th October 2022, 02:56
Still really slow for my cases.
You want fast like Directshowsource?? But it't almost error accurate frame and you're greed. I think more fast more cost error. Why you don't still waiting CPU can support it to below 1s in Index :D
tormento
30th October 2022, 10:59
Variable fonts depend on software support I think because in Notepad2 and Notepad3 they didn't seem to work. Maybe Visual Studio Code? where do you use it?
I use multiple editors, Notepad3 (https://github.com/rizonesoft/Notepad3/issues/1129) too. You need to have OS support and enable DirectWrite (Direct 2D) rendering in the software configuration. Thus doing, you have full variable font support.
Adub
31st October 2022, 21:09
This might be an ill informed question, but while reading the SMDegrain source code, the use of searchparam seems a bit odd.
https://github.com/Dogway/Avisynth-Scripts/blob/master/SMDegrain%20v3.5.5d/SMDegrain%20v3.5.5d.avsi#L171
Notably, when using search=4 (like in the case of RefineMotion), searchparam values range from 1-5, all of which seems quite low given the MVTools documentation:
> search = 4 : Hexagon search, searchparam is the range. (similar to x264).
For x264, the 'merange' defaults to around 16, and can be scaled up for (U)HD footage to values like 24, 32, etc.
Given this, using range values of 1, 2, 5, etc seem extremely small when using search=4.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.