View Full Version : Dogway's Filters Packs
Guest
12th March 2023, 03:27
The speed difference and slightly visual difference is probably because SMDegrain uses ex_sbr() after ex_Median() when selecting prefilter=4 or mode "IQMST"
Thnx LeXXuz,
I might change the scripts then..
madey83
12th March 2023, 17:50
@FTLOY: It's the structuring element and why I chose that, maybe some users might find it useful/interesting, it's open source after all so you can fork it where you liked. I mean time is relative and FluxSmoothST was never in the pecking order as you could see with my numerous edits. What I don't want to do is to give the false sensation that prefilter="FluxSmoothST" is good, because it's not, and that's why I changed it. I only want things that make sense, are simple and work as you would expect, at any rate is not like I butchered the filter, it's still in ExTools and you can load as prefilter, but if you have followed my development you would have realized already that my scripts are finished after a last 2 weeks crunch and their versioning, and now I'm done unless something exceptional arises or time permits. I'm on other tasks now but still give support here and in Github if anyone asks like with LeXXuz.
@madey83: This is how you use DGHDRtoSDR. I also posted an example for ClipClop, you can add as many clips as you want, I'm using 15 on a personal project and it doesn't slow down. And also the new IQMST just after DGHDRtoSDR as prefilter.
ConvertBits(16)
deep_resize(1920,edge="Zopti1080")
# Remove big chroma "blocks"
CCD(15)
# Remove blocking and smooth out jagged edges (only applies where motion match fails)
mb=Deblock_QED(quant1=30, quant2=40, aOff1=1, aOff2=1, bOff1=2, bOff2=2, uv=1)
mb=mb.ex_smooth(1, mode="SG", limit=true, sharp=true)
pre =DGHDRtoSDR(mode="pq",white=112)
pre2=pre.ex_Median(mode="IQMST", UV=3, thres=255)
r0=SMDegrain(prefilter=pre2, mfilter=mb, tr=3, thSAD=300, thSADC=150, thSCD1=400, thSCD2=120, LFR=false, plane=4, limits=false, DCTFlicker=false, refinemotion=true, search=5, subpixel=3)
r1=SMDegrain(prefilter=pre2, mfilter=mb, tr=4, thSAD=400, thSADC=200, thSCD1=400, thSCD2=120, LFR=false, plane=4, limits=false, DCTFlicker=false, refinemotion=true, search=5, subpixel=3)
ClipClop(r0,r1,SCmd="r0(0,2937);r1(2938,3854);...")
@LeXXuz: I'll make some room and let you know.
EDIT: By the way I found this (https://forum.doom9.org/showthread.php?t=174706) infamous thread and checked the result and actually felt challenged ^^ The guy probably used Video Artifact which is an old payware solution based on AVS, it has good ideas like the motion compensated sharpening (more like deblur though), and the 420 to 444 chroma reconstruction. I was playing with the sharpening (just spatially) and reached to some point, still need to add some temporal as the example showed increased details not present spatially. One thing I could achieve was better high frequency sharpening leading to a much more HD feel. Still more experimentation is needed.
Orig
https://i.imgur.com/U91Obxl.png
Mine
https://i.imgur.com/nWFB1KX.png
VA
https://i.imgur.com/0bGb6fP.png
@Dogway,
thank you so mutch for this... going to test this out. :)
madey83
13th March 2023, 14:23
@Dogway,
i have tested your proposition with below
# Remove blocking and smooth out jagged edges (only applies where motion match fails)
mb=Deblock_QED(quant1=30, quant2=40, aOff1=1, aOff2=1, bOff1=2, bOff2=2, uv=1)
mb=mb.ex_smooth(1, mode="SG", limit=true, sharp=true)
pre =DGHDRtoSDR(mode="pq",white=112)
pre2=pre.ex_Median(mode="IQMST", UV=3, thres=255)
r0=SMDegrain(prefilter=pre2, mfilter=mb, tr=3, thSAD=300, thSADC=150, thSCD1=400, thSCD2=120, LFR=false, plane=4, limits=false, DCTFlicker=false, refinemotion=true, search=5, subpixel=3)
r1=SMDegrain(prefilter=pre2, mfilter=mb, tr=4, thSAD=400, thSADC=200, thSCD1=400, thSCD2=120, LFR=false, plane=4, limits=false, DCTFlicker=false, refinemotion=true, search=5, subpixel=3)
ClipClop(r0,r1,SCmd="r0(0,2937);r1(2938,3854);...")
but unfortunatly convert HDR to SDR mess sothing up with the DV colors and picture is broken.
i have tried to replace
pre =DGHDRtoSDR(mode="pq",white=112)
pre2=pre.ex_Median(mode="IQMST", UV=3, thres=255)
by
pre=ex_BM3D(sigma=10,preset="normal",radius=1,UV=1,gpuid=0,tv_range=true)
pre2=ex_BM3D(sigma=10,preset="noisy",radius=3,UV=1,gpuid=0,tv_range=true)
r0=SMDegrain(prefilter=pre2, mfilter=mb, tr=3, thSAD=300, thSADC=150, thSCD1=400, thSCD2=120, LFR=false, plane=4, limits=false, DCTFlicker=false, refinemotion=true, search=5, subpixel=3)
r1=SMDegrain(prefilter=pre2, mfilter=mb, tr=6, thSAD=600, thSADC=200, thSCD1=400, thSCD2=120, LFR=false, plane=4, limits=false, DCTFlicker=false, refinemotion=true, search=5, subpixel=3)
ClipClop(r0,r1,SCmd="r0(0,2937);r1(2938,3854);...")
but i still have lots of gain. i can't force SMDegrain to remove more grain.
anton_foy
13th March 2023, 20:08
Regarding the topic of motion protecting temporal filtering, could this reasoning be of use/inspiration(?):
function mprotect(clip c, int "tr"){
q=temporalsoften(c,tr,255,255,255,2).repair(c,mode=16).neo_vd() #neo vd is fast
q.ex_blur3D(0,0,tr+1,"weighted",UV=3).ex_AddDiff(ex_MakeDiff(c,q,UV=3),UV=4) #parameters borrowed from Dideé, not sure uv=4 is working with ex_adddiff
return last
}
Not tested yet. Maybe IQMT would replace temporalsoften+repair in this case?
DTL
13th March 2023, 22:34
"i can't force SMDegrain to remove more grain."
To remove more grain it is typically require higher tr and thSAD. tr may be 20 and more. Upper limit is 128. With thSAD user adjust beginning of denoising and amount of blurred details.
Also:
thSAD=600, thSADC=200, thSCD1=400,
thSCD1 must be > thSAD or it will limit degraining to nothing. If thSCD1 is comparable or below noise-SAD it cause to treat all frames as scenechange and no denoising applied at all with any tr.
It is better to set condition check and error-throwing in SMDegrain script if user set thSCD1 < thSAD.
To make adjustments easier you can set user equation like
my_thSAD = N
my_thSCD1 = my_thSAD + 100
thSAD=my_thSAD, thSADC=my_thSAD - 100, thSCD1=my_thSCD1,
zorr
14th March 2023, 00:23
Feature request: an optional argument to define prop name in similarity metric functions (GMSD, MDSI, SSIM & others).
Sometimes I need to measure similarity more than once in a Zopti script. For example you can optimize for two different similarities at the same time. Currently you need to rename the similarity metric props before you call the metric the second time. It would be easier (and faster) to be able to define the prop's name in the first place.
For example
GMSD(clip, ref, propName="_PlaneGMSD_first")
GMSD(clip2, ref2, propName="_PlaneGMSD_second")
madey83
14th March 2023, 08:09
"i can't force SMDegrain to remove more grain."
To remove more grain it is typically require higher tr and thSAD. tr may be 20 and more. Upper limit is 128. With thSAD user adjust beginning of denoising and amount of blurred details.
Also:
thSAD=600, thSADC=200, thSCD1=400,
thSCD1 must be > thSAD or it will limit degraining to nothing. If thSCD1 is comparable or below noise-SAD it cause to treat all frames as scenechange and no denoising applied at all with any tr.
It is better to set condition check and error-throwing in SMDegrain script if user set thSCD1 < thSAD.
To make adjustments easier you can set user equation like
my_thSAD = N
my_thSCD1 = my_thSAD + 100
thSAD=my_thSAD, thSADC=my_thSAD - 100, thSCD1=my_thSCD1,
Thank you DTL, script has been adjusted to your guidence. :thanks:
Dogway
14th March 2023, 08:47
@madey83: Then I need to have a look at the clip, a small sample is enough.
@FTLOY: Yes, internally IQMST also adds ex_sbr(3) so it might be slower, but in contrast it does so over the halved source clip, as by default UHD is using downscaled vectors. You can either set UHDhalf=false, or use another less aggressive prefilter preset.
The different IQMs fill different purposes, IQM is the canonical algo over a 3x3 kernel, IQM5 is the same over a 5x5 kernel, both spatial. IQMV is IQM + IQM5 thresholded by variance, so it's a very good spatial prefilter specially for anime where temporal (pre)filters causes more harm than good, it's similar to what ex_MinBlur(3) would look like but much faster. Then the new IQMST is a spatio-temporal custom kernel as explained above for very grainy live action HD sources, you can also use BM3D for this, but that's more kind of brute force and probably slower. If you want a lighter spatio-temporal prefilter maybe use prefilter=6 or set up a custom one using STTWM.
@anton_foy: I don't understand the script much, I rewrite it here:
function mprotect(clip a, int "tr") {
tr = Default(tr,2)
a
TemporalSoften(tr,255,255,255,2)
repair(a,mode=16)
# or ex_median("IQMT")
neo_vd()
q=last
ex_blur3D(0,0,tr+1,mode="weighted",UV=3)
ex_MakeAddDiff(a,q,last,UV=6) }
So you diff 'a' vs 'q' which is a lot of grain and add it back to ex_blur3D() ? What you get is exactly that, a TemporalGauss with some grain recovered. With 'IQMT' the difference is greater so it's mostly a noop. I still find 'IQMST' the better option, take a bunch of samples, spatial+temporal, remove 50% of the furthermost samples (outliers), make an average of the remaining. You can expand on this idea by using different spatial and temporal kernels depending on your needs like "not much blurring", or "more temporal weighting", etc. For example, an interesting one would be cross(4) + square(9) + cross(4) or dot(1) + cross(4) + square(25) + cross(4) + dot(1)
@zorr: Done, updating in a few moments
BTW I updated QTGMC+ with new EdiModes that preserve details better, so the presets have been changed with new EdiModes but now should look better overall, now speedwise it can't be compared to original QTGMC as it's not an apples to apples. I also fixed an issue on chroma, and a regression in the last version for sourcematch.
Boulder
14th March 2023, 09:01
thSCD1 must be > thSAD or it will limit degraining to nothing. If thSCD1 is comparable or below noise-SAD it cause to treat all frames as scenechange and no denoising applied at all with any tr.
It is better to set condition check and error-throwing in SMDegrain script if user set thSCD1 < thSAD.
As far as I've understood, thSCD1 is the SAD threshold to mark a block as a valid scene change. thSCD2 is then the limit to determine if the frame contains enough of such blocks to mark it as a scene change. I suggest using MShow to see how it works and if the thresholds require tuning.
madey83
14th March 2023, 09:43
[QUOTE=Dogway;1984444]@madey83: Then I need to have a look at the clip, a small sample is enough.
sample: https://mega.nz/file/4RhxEZSL#CfNkhLSRSaGwSHWSIFr-HUPLqmra8keKAVfwi58nZTg
:thanks:
Dogway
14th March 2023, 11:09
@madey83: Then I need to have a look at the clip, a small sample is enough.
sample:
:thanks:
What, are you guys testing me? lol, lots of crap over shading! That's very difficult since you have to refine over and over with 'pre' and 'LFR'. Here an attempt:
src = last
pref = pref_DeWobble()
pre=smdegrain(2,mode="TemporalSoften",thSAD=500,prefilter=pref,mfilter=pref,LFR=true,DCTFlicker=false)
ft =smdegrain(3,mode="MDegrain" ,thSAD=400,prefilter=pre.ex_gaussianblur(2),mfilter=pre,LFR=true,refinemotion=true)
ex_merge(pre.ex_Median(mode="IQM5",thres=255), ft, MotionMask(pref,scale=10,sharpness=0))
ex_LFR(src,LFR=Width()/24.,UV=3)
smdegrain(1,mode="MDegrain",thSAD=400,refinemotion=true)
# Some film grain here
function pref_DeWobble(clip clp) {
clp.ex_blur3D(0,0,2,"weighted",UV=3)
ex_LFR(clp)
ex_gaussianblur(2)
ex_unsharp(-0.3,Fc=width()/2.5)
MergeChroma(clp) }
LeXXuz
14th March 2023, 11:36
Then the new IQMST is a spatio-temporal custom kernel as explained above for very grainy live action HD sources, you can also use BM3D for this, but that's more kind of brute force and probably slower. If you want a lighter spatio-temporal prefilter maybe use prefilter=6 or set up a custom one using STTWM.
What does the threshold do in IQMST? Can it be used to adjust the filters strength somehow? Filtering and speed is very good but it's too strong to my taste. BM3D IS a lot slower but it can be adjusted in strength seamlessly.
KNLM has a higher quality than DGDenoise, I guess? The latters speed is unmatched on the other hand.
I can't find STTWM, is this one of your filters?
Regarding my wobbling problem:
With Scenestats enabled and needed for ex_Autolevels() I have a performance problem on longer encodes. It works well for shorter clips or scenes but slows down the script the longer the clip to encode is. Looking in task manager it pauses the encode every couple of seconds for a few seconds (probably gathering scene data?) then continues. But these pauses get longer and longer. Inflating the overall encode time quite a lot.
Is this maybe because scene data is gathered on the fly? Maybe it would be better to gather data for the entire video and store it in a file?
madey83
14th March 2023, 11:49
What, are you guys testing me? lol, lots of crap over shading! That's very difficult since you have to refine over and over with 'pre' and 'LFR'. Here an attempt:
pref = pref_DeWobble()
pre=smdegrain(2,mode="TemporalSoften",thSAD=500,prefilter=pref,mfilter=pref,LFR=true,DCTFlicker=false)
ft =smdegrain(3,mode="MDegrain" ,thSAD=400,prefilter=pre.ex_gaussianblur(2),mfilter=pre,LFR=true,refinemotion=true)
ex_merge(pre.ex_Median(mode="IQM5",thres=255), ft, MotionMask(pref,scale=10,sharpness=0))
smdegrain(1,mode="MDegrain",thSAD=400,refinemotion=true)
ex_LFR(pre,LFR=Width()/16.,UV=3)
# Some film grain here
function pref_DeWobble(clip clp) {
clp.ex_blur3D(0,0,2,"weighted",UV=3)
ex_LFR(clp)
ex_gaussianblur(2)
ex_unsharp(-0.3,Fc=width()/2.5) }
Hi Dogway,
i'm not testing You, i'm looking for help from you how to handle that shitty source.
I'm going to test your call. Thank you for that :)
anton_foy
14th March 2023, 11:51
@anton_foy: I don't understand the script much, I rewrite it here:
Code:
function mprotect(clip a, int "tr") {
tr = Default(tr,2)
a
TemporalSoften(tr,255,255,255,2)
repair(a,mode=16)
# or ex_median("IQMT")
neo_vd()
q=last
ex_blur3D(0,0,tr+1,mode="weighted",UV=3)
ex_MakeAddDiff(a,q,last,UV=6) }
So you diff 'a' vs 'q' which is a lot of grain and add it back to ex_blur3D() ? What you get is exactly that, a TemporalGauss with some grain recovered. With 'IQMT' the difference is greater so it's mostly a noop. I still find 'IQMST' the better option, take a bunch of samples, spatial+temporal, remove 50% of the furthermost samples (outliers), make an average of the remaining. You can expand on this idea by using different spatial and temporal kernels depending on your needs like "not much blurring", or "more temporal weighting", etc. For example, an interesting one would be cross(4) + square(9) + cross(4) or dot(1) + cross(4) + square(25) + cross(4) + dot(1)
Damn sorry, I copied and pasted and modified an old script so I think I mixed up somethings. My idea was to use temporalsoften.repair mode=16 and neo_vd'spixels to get the difference (the temporal with hard motion ptotection of mode=16 then extra pixels of neo_vd) in order for the applied temporal filter to be "limited" to those pixels of the difference. But I did not test it so I screwed up :D
My reasoning is to get away from too much prefiltering and get such a good motion protected temporal filtering technique so that medium-to-high motion is not smeared or motion blurred and to let the spatial handle that part.
Dogway
14th March 2023, 12:18
@LeXXuz: Not strength per se but threshold, by default it's set to around 20 when used standalone with ex_median() as it recovers some details. For prefilter this is not important as edges should be soft. It's meant for VERY grainy sources. If you don't like STTWM() (inside ExTools) simply use IQMST and with a lut dial back some strength like "x y + 0.5 *". There are alternative kernels I explained in the last page, but they have to be built.
KNLMeansCL is spatio-temporal, while DGDenoise can only do temporal and it's CUDA based so maybe those 2 reasons are why it's much faster, I haven't benchmarked though
On SceneStats, yes, for every new scene it looks ahead all the scene's information, then proceeds as normal. The longer the scene the longer the pause, but it shouldn't repercute whether you are in the begginning of the encode or later on, it only depends on scene's length. Now there might be memory leak issues in ScriptClip as I reported to pinterf. He should be releasing the fix soon in next test build. SceneStats is a proof of concept, to show that a scene based workflow is possible, ideally someone should port it to a plugin for best performance.
@madey83: I updated the script, give it a test.
@anton_foy: Read my suggestion to LeXXuz, you can dial back IQMST with a lut. If you want motion discretization for a fast alternative to SMDegrain use MotionMask() as shown in the above script.
madey83
14th March 2023, 12:23
@madey83: I updated the script, give it a test.
testing...
is there an option to put this whole call to one variable and assignt it to
ClipClop(r0,r1....)?
Dogway
14th March 2023, 12:34
Yes, call back the src pointer.
r0=xx
r2=xx
src=last
[the above script]
r1=last
src
ClipClop(r0,r1,r2...)
madey83
14th March 2023, 12:42
Yes, call back the src pointer.
r0=xx
r2=xx
src=last
[the above script]
r1=last
src
ClipClop(r0,r1,r2...)
Your script does some "black magic" (would be super to know what exactly each line does - if you have time for explanation of course) with this video. It looks increadible.
Thank you, Thank you for Your help. :D:D:D:D:D:D:D
madey83
14th March 2023, 13:06
Yes, call back the src pointer.
r0=xx
r2=xx
src=last
[the above script]
r1=last
src
ClipClop(r0,r1,r2...)
i think i did what you explained:
mb=Deblock_QED(quant1=30, quant2=40, aOff1=1, aOff2=1, bOff1=2, bOff2=2, uv=3)
mb=mb.ex_smooth(1, mode="SG", limit=true, sharp=true)
pre=ex_BM3D(sigma=10,preset="normal",radius=1,UV=3,gpuid=0,tv_range=true)
my_TR = 3
my_thSAD = 250
my_thSCD1 = my_thSAD + 100
r0=SMDegrain(prefilter=pre, mfilter=mb, tr=my_TR, thSAD=my_thSAD, thSADC=my_thSAD-100, thSCD1=my_thSCD1, thSCD2=120, LFR=false, plane=4, limits=false, DCTFlicker=false, refinemotion=true, search=5, subpixel=3)
src = last
pref = pref_DeWobble()
pre=smdegrain(2,mode="TemporalSoften",thSAD=500,prefilter=pref,mfilter=pref,LFR=true,DCTFlicker=false)
ft =smdegrain(3,mode="MDegrain" ,thSAD=400,prefilter=pre.ex_gaussianblur(2),mfilter=pre,LFR=true,refinemotion=true)
ex_merge(pre.ex_Median(mode="IQM5",thres=255), ft, MotionMask(pref,scale=10,sharpness=0))
ex_LFR(src,LFR=Width()/24.,UV=3)
smdegrain(1,mode="MDegrain",thSAD=400,refinemotion=true)
# Some film grain here
function pref_DeWobble(clip clp) {
clp.ex_blur3D(0,0,2,"weighted",UV=3)
ex_LFR(clp)
ex_gaussianblur(2)
ex_unsharp(-0.3,Fc=width()/2.5)
MergeChroma(clp) }
r1=last
src
ClipClop(r0,r1,SCmd="r0(0,24400);r1(24401,32210);r0(32211,41679)")
Script error: ConverttoYUV444 does not have a named argument 'param1' SMDgrain.avsi, line 1147
:scared::scared:
LeXXuz
14th March 2023, 13:16
Script error: ConverttoYUV444 does not have a named argument 'param1' SMDgrain.avsi, line 1147
:scared::scared:
Update to Avisynth+ 3.7.3 test 7 (20230223):
https://forum.doom9.org/showthread.php?t=181351
madey83
14th March 2023, 14:00
Update to Avisynth+ 3.7.3 test 7 (20230223):
https://forum.doom9.org/showthread.php?t=181351
thank you LeXXuz, but still the same..
LeXXuz
14th March 2023, 14:18
Have you updated plugins and system files from the package correctly? Check version you are using with version() command. What does it show?
madey83
14th March 2023, 14:26
Have you updated plugins and system files from the package correctly? Check version you are using with version() command. What does it show?
[Avisynth info]
VersionString: AviSynth+ 3.7.3 (r3940, master, x86_64)
VersionNumber: 2.60
File / Product version: 3.7.3.0 / 3.7.3.0
Interface Version: 10
Multi-threading support: Yes
Avisynth.dll location: C:\Windows\SYSTEM32\avisynth.dll
Avisynth.dll time stamp: 2023-02-23, 15:54:11 (UTC)
PluginDir2_5 (HKLM, x64): C:\Program Files (x86)\AviSynth+\plugins64
PluginDir+ (HKLM, x64): C:\Program Files (x86)\AviSynth+\plugins64+
[C++ 2.6 Plugins (64 Bit)]
C:\Program Files (x86)\AviSynth+\plugins64+\ConvertStacked.dll [2023-02-23]
C:\Program Files (x86)\AviSynth+\plugins64+\DirectShowSource.dll [2022-04-19]
C:\Program Files (x86)\AviSynth+\plugins64+\ImageSeq.dll [2023-02-23]
C:\Program Files (x86)\AviSynth+\plugins64+\Shibatch.dll [2023-02-23]
C:\Program Files (x86)\AviSynth+\plugins64+\TimeStretch.dll [2023-02-23]
C:\Program Files (x86)\AviSynth+\plugins64+\VDubFilter.dll [2023-02-23]
[Scripts (AVSI)]
C:\Program Files (x86)\AviSynth+\plugins64+\colors_rgb.avsi [2021-01-11]
[Uncategorized files]
C:\Program Files (x86)\AviSynth+\plugins64+\colors_rgb.txt [2021-01-11]
i think i forgot to update my StaxRip folder dlls....
edit: no longer error apears :). Thank you :D
LeXXuz
16th March 2023, 12:28
@LeXXuz: Not strength per se but threshold, by default it's set to around 20 when used standalone with ex_median() as it recovers some details.
So, the higher the threshold the more it recovers, or vice versa? So far I like the speed and result on very noisy sources. Looks more homogeneous than with BM3D indeed. And leaves more detail intact. BM3D kills too much fine detail when used with higher sigma values.
...simply use IQMST and with a lut dial back some strength like "x y + 0.5 *".
I tried to figure out how to do that, but couldn't make it work. Could you give me hint?
As for STTWM. It works good on sources with fine grain.
But I wonder where to adjust from the default call STTWM(sw=24,tw=49,aw=1,sthres=5,tthres=5,UV=3), to modify 'strength' a little if it can be called that way.
Sw/tw or sthres/tthres? Do those thresholds work similar as with IQMST?
Lan4
16th March 2023, 17:52
I have a question about SharpenersPack. Tell me, what speed filters are recommended to use now?
I liked Finesharp (HBD mod). But now I've tried DetailSharpen (by Dogway) and I see some of its benefits. Which of these filters do you prefer? Or maybe use both?
I do not need to diligently select the best video processing option. Some distortion and file size increase are acceptable. My videos are middle quality (or worse), a lot of phone videos. Before the sharpen filter, I use down resize (UserDefined2ResizeMT), down bitrate (VCEEnc 265 CQP), denoise (FFT3DGPU AMD). I would really like it if you could use one processing method for all videos, even if this is not the best option.
Dogway
16th March 2023, 20:38
So, the higher the threshold the more it recovers, or vice versa?
I tried to figure out how to do that, but couldn't make it work. Could you give me hint?
As for STTWM. It works good on sources with fine grain.
But I wonder where to adjust from the default call
You can test though, the higher the thres the less protection. Just like TemporalSoften using 255 is unprotected.
To balance the strength use the following, change 0.3 to anything between 0.1 and 0.9:
pre=ex_Median(mode="IQMST",thres=255)
ex_lutxy(pre,"x dup y - 0.3 * -")
After you comment the other day I revised STTWM and set new defaults (not uploaded yet), as the old ones were mostly noop. I also noted so examples:
# STTWM(sw=20,tw=80,aw=100,sthres=255,tthres=7) # Strong temporal
# STTWM(sw=40,tw=60,aw=100,sthres=255,tthres=5) # Strong spatial
# STTWM(sw=50,tw=50,aw=100,sthres= 5,tthres=5) # Balanced
# STTWM(sw=50,tw=50,aw= 10,sthres= 5,tthres=5) # Light
This is more for fine grain as you say, not for sticky grain. 'sw' and 'tw' are meant to sum 100, but is not mandatory, it will be scaled internally to a range of 100 if they don't sum that.
Also you can try now the ex_autolevels() script, AVS+ test 9 might have fixed the memory leak issues we talked about.
I have a question about SharpenersPack. Tell me, what speed filters are recommended to use now?
I liked Finesharp (HBD mod). But now I've tried DetailSharpen (by Dogway) and I see some of its benefits. Which of these filters do you prefer? Or maybe use both?
I do not need to diligently select the best video processing option. Some distortion and file size increase are acceptable. My videos are middle quality (or worse), a lot of phone videos. Before the sharpen filter, I use down resize (UserDefined2ResizeMT), down bitrate (VCEEnc 265 CQP), denoise (FFT3DGPU AMD). I would really like it if you could use one processing method for all videos, even if this is not the best option.
I do like ex_unsharp() a lot, and lately use it oftenly not only to sharpen, but also for deconvolution. You can sharpen or blur different frequencies, it's very fast and can use the 'safe' arg to alleviate ringing. Anyhow it's not masked so it will also sharpen grain, since your videos lack grain I think it might be a nice solution. I also like FineSharpPlus quite a bit, I implemented the non-linearity of LSFplus but I found to dislike the default 'xstr' value, IMO set 'xstr' to 0.0. Another option with masking is LSFplus with 'LSF' preset, but this last option is a bit slower than the other two solutions. Also experiment with the other filters, I haven't done a thorough quality comparison.
DTL
16th March 2023, 21:41
" down resize (UserDefined2ResizeMT)"
It can be already 'very sharp' if use low enough b and c values. Though to add sharpnes at output it require not very blurry source and large enough downsaize ratio (like 2 and more). Also I forgot to upload of pre-release of version with also adjustable 'support/s' param. In old versions it is fixed to 2 (2.0) but it was found can visibly add 'sharpness/acutance' (increasing width of halo) if adjusting to the larger value (in range 2..3 is the most visible difference). So in newer versions it is expected to adjust in range 1.5..15 with default to 2.2. Unfortunately latest updates from jpsdr require MFC for VisualStudio to build and I typically not install it. Trying to download and install now to make a pre-release build for users to test.
The pull-request to jpsdr plugins and main AVS core is created at Febuary of 2023 but it may takes again months and/or years for accepting after some user tests and reports.
If your source is very blurry you need sharpeners with larger 'radius' or kernel size - you can try GeneralConvolution with kernels from 5x5 and larger. See example at https://forum.doom9.org/showthread.php?p=1984297#post1984297 .
Lan4
16th March 2023, 21:42
Dogway, thank you for answer.
your videos lack grain I think
Yes. I mainly need a sharpener to remove the blur that appears in the previous steps.
I also like FineSharpPlus
I don't understand how hdmp works in FineSharpPlus. I take the values I need from FineSharp and use them in FineSharpPlus. And the video becomes blurry compared to FineSharp. Always, no matter what value of hdmp I set.
The values in FineSharp are something like this:
mode=1, sstr=3.9, cstr=0.1, xstr=0, lstr=1.2, pstr=4, ldmp=1.3
LeXXuz
17th March 2023, 11:28
To balance the strength use the following, change 0.3 to anything between 0.1 and 0.9:
pre=ex_Median(mode="IQMST",thres=255)
ex_lutxy(pre,"x dup y - 0.3 * -")
Thanks! Is it possible to replace the number by a variable? I guess not, as this is probably read as a whole string, right?
After you comment the other day I revised STTWM and set new defaults (not uploaded yet), as the old ones were mostly noop. I also noted so examples:
# STTWM(sw=20,tw=80,aw=100,sthres=255,tthres=7) # Strong temporal
# STTWM(sw=40,tw=60,aw=100,sthres=255,tthres=5) # Strong spatial
# STTWM(sw=50,tw=50,aw=100,sthres= 5,tthres=5) # Balanced
# STTWM(sw=50,tw=50,aw= 10,sthres= 5,tthres=5) # Light
This is more for fine grain as you say, not for sticky grain. 'sw' and 'tw' are meant to sum 100, but is not mandatory, it will be scaled internally to a range of 100 if they don't sum that.
Took a quick test with those presets. Exactly what I was looking for on films with fine grain. :)
Also you can try now the ex_autolevels() script, AVS+ test 9 might have fixed the memory leak issues we talked about.
Already running a test. :D
Could you take a quick look over this template? I'm still uncertain on how to use filter 'cascades' correctly and if the filter chain works in the order I intended.
What it should do is:
First DeWobble is used with ex_autolevels() on the clip. Then this should be denoised by IQMST, which is strength controlled by ex_lutxy().
Lastly brightness and gamma corrected to be fed as prefilter for 1st stage of SMDegrain, mode=TemporalSoften.
Then all this is fed as prefilter to the 2nd stage of SMDegrain, with a 2nd and weaker instance of IQMST as mfilter for those motion areas where MVtools can't find a match.
Lastly some final sharpening and minor debanding.
ConvertBits(16)
crop(4, 4, -4, -4)
SceneStats("Range+Stats")
#
Stage=06#
#
PREl1 = ex_autolevels( true ,true, true,Deflicker=true,tv_out=false)
PREl2 = ex_autolevels(PREl1,false,true,false,Deflicker=true,tv_out=false)
PREmo = ex_Median(mode="IQMST", UV=3,thres=min(100,(Stage*10)))
PREmv = ex_Median(mode="IQMST", UV=3,thres=min(200,(Stage*20)))
PREm = ex_lutxy(PREmo,"x dup y - 0.3 * -").ex_sbr(1,UV=3)
PREv = pref_DeWobble(PREl2).ex_lutxy(PREmv,"x dup y - 0.6 * -").ex_sbr(2,UV=3).Levels(0,1.25,255*256,(((Stage*2)-2)*256),((208-(Stage*8))*256))
#
PREs = SMDegrain(mode="TemporalSoften", tr=6, thSAD=(Stage*70), thSADc=(Stage*60), thSCD1=max(400,(Stage*80)), Str=2.0, contrasharp=false, LFR=false, DCTFlicker=false, refinemotion=false, truemotion=true, blksize=16, search=5, pel=2, subpixel=3, prefilter=PREv, chroma=true, plane=4, gpuid=-1, interlaced=false)
#
SMDegrain(mode="MDegrain", tr=6, thSAD=(Stage*60), thSADc=(Stage*50), thSCD1=max(400,(Stage*70)), Str=2.0, contrasharp=true, LFR=true, DCTFlicker=true, refinemotion=true, truemotion=true, blksize=16, search=5, pel=2, subpixel=3, mfilter=PREm, prefilter=PREs, chroma=true, plane=4, gpuid=-1, interlaced=false)
ex_unsharp(Stage/40.).ex_unsharp((Stage/20.),Fc=width()/1.5)
F3KDB_3(range=20, Y=32, Cb=24, Cr=24, grainY=24, grainC=16, dither_algo=2)
#
Prefetch(48)
Return(Last)
#
#
function pref_DeWobble(clip clp) {
# temporal gaussian average
clp.ex_blur3D(0,0,2,"weighted",UV=3)
# Final edge blur
removegrain(20)
ex_unsharp(-0.3,Fc=width()/2.5) }
I decided not to use MotionMask as it doesn't work well on scenes with high motion.
And I don't want to chop the film in countless areas to treat differently.
It is not that stable of course and leaves a little wobble but it's a compromise between effort and filtering quality.
DTL
17th March 2023, 11:53
Finally build a test release of ResampleMT with added s-param to UserDefined2Resize - https://forum.doom9.org/showthread.php?p=1984621#post1984621
Default s-param is not 2 as was in old processing versions but 2.2f so old scripts will give somehow 'sharper' output (larger amplitude and/or wider 'halo' around transients) or require to set s=2.0 manually. For best possible 'linear' processing in sinc-based workflows s-value of >3.0 is recommended (max is currently limited to 15). Though it can not create as thin 'peaking' as possible with limiting s to about 2. For semi-non-linear the s-value may be tested around from ~1.8..1.9 to ~2.5 (also depends on size reduction ratio significantly).
Dogway
17th March 2023, 12:56
Yes. I mainly need a sharpener to remove the blur that appears in the previous steps.
I'm trying to devise a new method to unblur, which is something different than sharpening. You can see an experiment 2 pages back (108 (https://forum.doom9.org/showpost.php?p=1984264&postcount=2148)), although it's not happening soon and it will surely be a stack of filters, not a one liner algorithm.
I don't understand how hdmp works in FineSharpPlus. I take the values I need from FineSharp and use them in FineSharpPlus. And the video becomes blurry compared to FineSharp. Always, no matter what value of hdmp I set.
Please try now. I updated FineSharpPlus, maybe I screwed things up when implementing the non-linearity.
Thanks! Is it possible to replace the number by a variable? I guess not, as this is probably read as a whole string, right?
pre=ex_Median(mode="IQMST",thres=255)
str=0.3
ex_lutxy(pre,Format("x dup y - {str} * -"))
I'll have a look on the code in the afternoon. At a glance I don't know if IQMST works as intended for your case (16mm clip?) since it was meant as a replacement for pref_DeWobble() and you are applying both(?). Will elaborate later.
Boulder
17th March 2023, 14:16
What light denoising filters from your pack would you recommend as coupled with MDegrain for areas where motion match fails?
Lan4
17th March 2023, 15:52
" down resize (UserDefined2ResizeMT)"
It can be already 'very sharp' if use low enough b and c values. Though to add sharpnes at output it require not very blurry source and large enough downsaize ratio (like 2 and more).
You mean you can do without a sharpener? I think it's not, I've tried different down resize methods. The image is blurry due to the decrease in bitrate and the action of the denoiser.
If your source is very blurry you need sharpeners with larger 'radius'
The source is slightly blurry, generally normal. I need to make amends for my own actions. In other words, return the sharpness that was in the source. It is possible to increase the sharpness a little.
Dogway
17th March 2023, 16:19
What light denoising filters from your pack would you recommend as coupled with MDegrain for areas where motion match fails?
A good spatial only filter, NLMeans for anime and ex_MinBlur() for live action ("IQM" is similar but not quite there or as fast). Use sharp=true if you don't want to blur edges, or leave at default false for a kinda motion blur effect.
The source is slightly blurry, generally normal. I need to make amends for my own actions. In other words, return the sharpness that was in the source. It is possible to increase the sharpness a little.
You can also use ex_contrasharpening() for that. If your downscale is big like 1.5 or 2.0 ratio you can leverage the downscaler as a sharpener as DTL mentioned. Depending on source and target dimensions you can use any of the following (https://github.com/Dogway/Avisynth-Scripts/blob/b6695de081072f27ff5edae89d4ea2225db53221/TransformsPack%20-%20Main.avsi#L1954). Simply use as RatioResize(0.5, "%", kernel="ZoptiH")
DTL
17th March 2023, 17:40
You mean you can do without a sharpener?
The source is slightly blurry, generally normal. I need to make amends for my own actions. In other words, return the sharpness that was in the source. It is possible to increase the sharpness a little.
It is better to show a sample of input before resize and a required sharpened output.
The SinPow and UserDefined2 (also classic Bicubic) resizers have adjustable 'sharp' effect when downsizing. See 'acutance' effect caused by 'peaking or edges enhancement' description - https://en.wikipedia.org/wiki/Acutance
The SinPow and UserDefined2 designed to have adjustable 'acutance' while downsizing while saving from ringing as much as possible at sinc-based workflows. Bicubic typically can not save from ringing but also can change 'edge enhancement'.
Lan4
17th March 2023, 21:17
If your downscale is big like 1.5 or 2.0 ratio you can leverage the downscaler as a sharpener as DTL mentioned. Depending on source and target dimensions you can use any of the following. Simply use as RatioResize(0.5, "%", kernel="ZoptiH")
Honestly, I do not have such knowledge to understand how to use it. But you also want to say that sharpeners are not usually used, and you need to look for other methods of image compensation?
Dogway
18th March 2023, 02:14
Honestly, I do not have such knowledge to understand how to use it. But you also want to say that sharpeners are not usually used, and you need to look for other methods of image compensation?
My videos are middle quality (or worse), a lot of phone videos. Before the sharpen filter, I use down resize (UserDefined2ResizeMT) (...)
If you are going to downscale anyway you can sharpen within the resizer kernel, with Bicubic's 'b' and 'c' params, or with the suggestions by DTL. It's better you can upload a sample, an frame shot is also fine at original size and tell what you want to do, so we can help you better with specific filters. So yes, there many ways to do the same thing (sharpening) depending on source and goal.
Guest
18th March 2023, 03:22
Is this in the proper order...?
pre=ex_Median(mode="IQMST")
STTWM(sw=50,tw=50,aw=100,sthres=5,tthres=5)
SMDegrain(tr=2,thSAD=200,thSADC=100,contrasharp=true,prefilter=pre,str=1.2,refinemotion=true)
OR
pre=ex_Median(mode="IQMST")
SMDegrain(tr=2,thSAD=200,thSADC=100,contrasharp=true,prefilter=pre,str=1.2,refinemotion=true)
STTWM(sw=50,tw=50,aw=100,sthres=5,tthres=5)
OR not recommended ??
Dogway
18th March 2023, 09:53
Is this in the proper order...?
pre=ex_Median(mode="IQMST")
STTWM(sw=50,tw=50,aw=100,sthres=5,tthres=5)
SMDegrain(tr=2,thSAD=200,thSADC=100,contrasharp=true,prefilter=pre,str=1.2,refinemotion=true)
Yes, the first example, I doubt you will do much running it after SMDegrain. And if you are not getting what you want directly from SMDegrain tune the filter settings or modify the prefilter. My stance is to never use spatial filtering for video unless tackling a very specific issue.
By the way, and this is also for LeXXuz, since I'm very expression oriented I used a bad example for modulating IQMST's strength.
You can use the proper filter for that and probably at no extra perf cost.
pre=ex_Median(mode="IQMST",thres=255)
ex_blend(pre,"blend",opacity=0.3)
LeXXuz
18th March 2023, 12:02
By the way, and this is also for LeXXuz, since I'm very expression oriented I used a bad example for modulating IQMST's strength.
You can use the proper filter for that and probably at no extra perf cost.
pre=ex_Median(mode="IQMST",thres=255)
ex_blend(pre,"blend",opacity=0.3)
Works a little faster. If the output is nearly the same or even better, I'll take it. :D
Btw. what is the actual order within SMDegrain?
1)
(Gamma/Luma correction with str/amp) -> (Prefilter 0-8) -> (MVTools)
or
2)
(Prefilter 0-8) -> (Gamma/Luma correction with str/amp) -> (MVTools)
Dogway
18th March 2023, 12:51
Yes, second. Not long ago I modified it to allow normalization also for external prefilters. Also it reads its frameprops so no problem if they are already in PC levels, only dark enhancement is performed.
Lan4
18th March 2023, 14:43
Please try now. I updated FineSharpPlus, maybe I screwed things up when implementing the non-linearity.
The values above approximately HDMP = 0.12 will give strong distortion and a huge file size. It should be?
An increase in "PSTR" should soften sharpness and blur the image, and reduce the size of the file. But the result is opposite, the sharpness and size of the file increases.
Total, it seems to me the FineSharpPlus less changes the original image, optimally increases sharpness, makes noise less, makes less file size. I correctly understand the meaning of FineSharpPlus compared to FineSharp?
Dogway
18th March 2023, 17:05
Yes, it's normal. I forgot to remap the values as 0.01 made reference to the non reciprocal value, now it aligns more to LSFplus with a range between 0 and 255 and default of 48. The problem was that LSFplus uses a limiter while here it doesn't. I added a fast one now when HDMP>0. Not sure if I want to turn this into a mini LSFplus though hehe.
Will be uploading in a moment. I'll have a look at PSTR.
EDIT: No, PSTR increases the non-linear exponent, thus making the sharpening more acute. Check the graph here (https://www.desmos.com/calculator/gefrbv9tum).
madey83
18th March 2023, 19:42
ConvertBits(16)
crop(4, 4, -4, -4)
SceneStats("Range+Stats")
#
Stage=06#
#
PREl1 = ex_autolevels( true ,true, true,Deflicker=true,tv_out=false)
PREl2 = ex_autolevels(PREl1,false,true,false,Deflicker=true,tv_out=false)
PREmo = ex_Median(mode="IQMST", UV=3,thres=min(100,(Stage*10)))
PREmv = ex_Median(mode="IQMST", UV=3,thres=min(200,(Stage*20)))
PREm = ex_lutxy(PREmo,"x dup y - 0.3 * -").ex_sbr(1,UV=3)
PREv = pref_DeWobble(PREl2).ex_lutxy(PREmv,"x dup y - 0.6 * -").ex_sbr(2,UV=3).Levels(0,1.25,255*256,(((Stage*2)-2)*256),((208-(Stage*8))*256))
#
PREs = SMDegrain(mode="TemporalSoften", tr=6, thSAD=(Stage*70), thSADc=(Stage*60), thSCD1=max(400,(Stage*80)), Str=2.0, contrasharp=false, LFR=false, DCTFlicker=false, refinemotion=false, truemotion=true, blksize=16, search=5, pel=2, subpixel=3, prefilter=PREv, chroma=true, plane=4, gpuid=-1, interlaced=false)
#
SMDegrain(mode="MDegrain", tr=6, thSAD=(Stage*60), thSADc=(Stage*50), thSCD1=max(400,(Stage*70)), Str=2.0, contrasharp=true, LFR=true, DCTFlicker=true, refinemotion=true, truemotion=true, blksize=16, search=5, pel=2, subpixel=3, mfilter=PREm, prefilter=PREs, chroma=true, plane=4, gpuid=-1, interlaced=false)
ex_unsharp(Stage/40.).ex_unsharp((Stage/20.),Fc=width()/1.5)
F3KDB_3(range=20, Y=32, Cb=24, Cr=24, grainY=24, grainC=16, dither_algo=2)
#
Prefetch(48)
Return(Last)
#
#
function pref_DeWobble(clip clp) {
# temporal gaussian average
clp.ex_blur3D(0,0,2,"weighted",UV=3)
# Final edge blur
removegrain(20)
ex_unsharp(-0.3,Fc=width()/2.5) }
.
@LeXXuz,
could it be possible to add some comments to your script - to have same basic understand what each line does - exept SMDegrain ;)?
And to what kind of film grain source it could be used ?
LeXXuz
18th March 2023, 20:09
pre=ex_Median(mode="IQMST",thres=255)
str=0.3
ex_lutxy(pre,Format("x dup y - {str} * -"))
I'll have a look on the code in the afternoon. At a glance I don't know if IQMST works as intended for your case (16mm clip?) since it was meant as a replacement for pref_DeWobble() and you are applying both(?). Will elaborate later.
Did you have a chance to look at the script template I provided? :)
https://forum.doom9.org/showthread.php?p=1984619#post1984619
It's not so much about the outcome, but more if my description provided about what the filter chain should do is correct, or I'm still misunderstanding the way filter chains can be interconnected. :o
That would be a big help, so I don't create more crap. :D
And I followed your advice and removed the pref_dewobble() from that chain. Seems to work a little better with not really more wobble than before. :)
Btw:
I noticed an effect on moving objects before textured backgrounds. Here are two screenshots for comparison:
https://abload.de/thumb/originaluscz5.jpg (https://abload.de/image.php?img=originaluscz5.jpg)https://abload.de/thumb/denoised2pcke.jpg (https://abload.de/image.php?img=denoised2pcke.jpg)
Notice the blurred area left of the actor, who is moving from left to right in that scene. Any idea what causes this, and how to reduce it a little? Don't tell me MotionMask pls. :D
I've noticed this in other noisy films before, so not only in this one with the script provided above. What they have/had in common was using 2 stages of SMDegrain. Either directly after another or like in this case with one being the prefilter of the other one. Can't be from the IQMST oder STTWM (pre)filters or the dewobbling/autolevels stuff as I hadn't used them back then.
LeXXuz
18th March 2023, 20:20
@LeXXuz,
could it be possible to add some comments to your script - to have same basic understand what each line does - exept SMDegrain ;)?
And to what kind of film grain source it could be used ?
Well, that is not really for general use. It's more of an adaption of some of Dogway's little magic :D we talked about earlier, starting here:
https://forum.doom9.org/showthread.php?p=1982511#post1982511
It's an attempt to stabilze a very noisy and quite unstable SD source I provided samples for to Dogway and here in the forums.
The goal was to reduce an ugly wobbling effect that occured especially strong on that film when trying to denoise with SMDegrain.
Dogway
18th March 2023, 20:44
Let me update the script as you would have it now:
SceneStats("Range+Stats")
PREl1 = ex_autolevels( true ,true, true,Deflicker=true,tv_out=false)
PREl2 = ex_autolevels(PREl1,false,true,false,Deflicker=true,tv_out=false)
PREmo = ex_Median(mode="IQMST", UV=3,thres=min(100,(Stage*10)))
PREmv = ex_Median(mode="IQMST", UV=3,thres=min(200,(Stage*20)))
PREm = ex_blend(PREmo,"blend",opacity=0.3).ex_sbr(1,UV=3)
PREv = pref_DeWobble(PREl2).ex_lutxy(PREmv,"x dup y - 0.6 * -").ex_sbr(2,UV=3).Levels(0,1.25,255*256,(((Stage*2)-2)*256),((208-(Stage*8))*256))
#
PREs = SMDegrain(mode="TemporalSoften", tr=6, thSAD=(Stage*70), thSADc=(Stage*60), thSCD1=max(400,(Stage*80)), Str=2.0, contrasharp=false, LFR=false, DCTFlicker=false, refinemotion=false, truemotion=true, blksize=16, search=5, pel=2, subpixel=3, prefilter=PREv, chroma=true, plane=4, gpuid=-1, interlaced=false)
#
SMDegrain(mode="MDegrain", tr=6, thSAD=(Stage*60), thSADc=(Stage*50), thSCD1=max(400,(Stage*70)), Str=2.0, contrasharp=true, LFR=true, DCTFlicker=true, refinemotion=true, truemotion=true, blksize=16, search=5, pel=2, subpixel=3, mfilter=PREm, prefilter=PREs, chroma=true, plane=4, gpuid=-1, interlaced=false)
ex_unsharp(Stage/40.).ex_unsharp((Stage/20.),Fc=width()/1.5)
F3KDB_3(range=20, Y=32, Cb=24, Cr=24, grainY=24, grainC=16, dither_algo=2)
Since IQMST was supposed to replace pre_DeWobble() it should read the autoleveled clip. Also you use search=5 which I don't know if it improves something on your end.
SceneStats("Range+Stats")
PREl1 = ex_autolevels( true ,true, true,Deflicker=true,tv_out=false)
PREl2 = ex_autolevels(PREl1,false,true,false,Deflicker=true,tv_out=false)
PREmo = ex_Median(PREl2,mode="IQMST", UV=3,thres=min(100,(Stage*10)))
PREm = ex_blend(PREl2,PREmo,"blend",opacity=0.3).ex_sbr(1,UV=3)
#
PREs = SMDegrain(mode="TemporalSoften", tr=6, thSAD=(Stage*70), thSADc=(Stage*60), thSCD1=max(400,(Stage*80)), Str=2.0, contrasharp=false, LFR=false, DCTFlicker=false, refinemotion=false, truemotion=true, blksize=16, search=5, pel=2, subpixel=3, prefilter=PREmo, chroma=true, plane=4, gpuid=-1, interlaced=false)
#
SMDegrain(mode="MDegrain", tr=6, thSAD=(Stage*60), thSADc=(Stage*50), thSCD1=max(400,(Stage*70)), Str=2.0, contrasharp=true, LFR=true, DCTFlicker=true, refinemotion=true, truemotion=true, blksize=16, search=5, pel=2, subpixel=3, mfilter=PREm, prefilter=PREs, chroma=true, plane=4, gpuid=-1, interlaced=false)
ex_unsharp(Stage/40.).ex_unsharp((Stage/20.),Fc=width()/1.5)
F3KDB_3(range=20, Y=32, Cb=24, Cr=24, grainY=24, grainC=16, dither_algo=2)
The MotionMask trick was for the 16mm source that was shaking or motion flickering like hell, and was very unstable on what was supposed to be static areas. The MotionMask helped to use a very strong TemporalSoften SMDegrain for backgrounds, and a refined MV for moving objects. I don't think you need it in most cases.
Referring to your sample image I don't see a reason to use TemporalSoften prefilter? This is only for very specific corrupted sources, not really for generalized use. So what you see is motion occluded areas like the wall texture, same side effects than when using RIFE an motion interpolation filters. You can also reduce 'tr' to alleviate the effect.
Also I would encourage you to fine tune the LFR arg instead of relying on default since you already know what you are doing but only for sources that don't wobble, or if passing through the MotionMask.
LeXXuz
18th March 2023, 21:21
Thanks for the code update and explanation. Will try out those changes you suggested. Much appreciated, as always. :) :thanks:
Lan4
18th March 2023, 22:20
EDIT: No, PSTR increases the non-linear exponent, thus making the sharpening more acute. Check the graph here (https://www.desmos.com/calculator/gefrbv9tum).
Obviously, in FineSharp (HBD mod), the PSTR option makes soft edges on hard objects, like text on walls. Otherwise, when the strength of sharp is increased, the edges of such text look like "cracked ice".
LSTR also softens the image, but in a different way.
Guest
19th March 2023, 02:19
Yes, the first example, I doubt you will do much running it after SMDegrain. And if you are not getting what you want directly from SMDegrain tune the filter settings or modify the prefilter. My stance is to never use spatial filtering for video unless tackling a very specific issue.
By the way, and this is also for LeXXuz, since I'm very expression oriented I used a bad example for modulating IQMST's strength.
You can use the proper filter for that and probably at no extra perf cost.
pre=ex_Median(mode="IQMST",thres=255)
ex_blend(pre,"blend",opacity=0.3)
Thanks for that.
Tried that call you attached, and I'm getting an error:-
There is no function named 'ex_blend'.....
But then I figured out that I needed to add your Grade Pack :)
Some might say that this post is somewhat pointless, but it might help someone....
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.