Log in

View Full Version : Suggestion for "TemporalDegrain" for HD contents


Pages : 1 [2]

moviefan
13th April 2008, 16:25
So after a wide discussion that exceeded a little bit the topic of this thread, I would like to come back to it and ask for a conclusion how I could degrain my 1080p source to in the first place make it as much compressible as possible with as little OBVIOUS quality/detail loss as possible. I don't care about grain that has some special effect for a movie like in e.g. 300 since in whatever movie I find it disturbing. So my primary target is to achieve the said degraining combined with my second (less important, but if possible) target to do this in a reasonable amount of time.

Terranigma
13th April 2008, 17:40
how I could degrain my 1080p source to in the first place make it as much compressible as possible with as little OBVIOUS quality/detail loss as possible. I don't care about grain that has some special effect for a movie like in e.g. 300 since in whatever movie I find it disturbing. So my primary target is to achieve the said degraining combined with my second (less important, but if possible) target to do this in a reasonable amount of time.

motion-compensated ttempsmooth, and for stabilizing the grain, use hqdn3d as a prefilter. No need for fft3d tbh with you.

moviefan
13th April 2008, 21:40
What do you exactly mean? Motion compensation using MVTools and between the interleave and the SelectEvery part the ttempsmooth?

Terranigma
13th April 2008, 22:04
What do you exactly mean? Motion compensation using MVTools and between the interleave and the SelectEvery part the ttempsmooth?

Yes, and the way you'd use prefilter this way, is by assigning different idx values for mvanalyse and mvcompensate.

Didée
14th April 2008, 08:12
The first thing to try is plain MVDegrain as shown in the MVTools documentation. Starting from there you've to decide whether that's enough, or if you need stronger filtering. (... and how much more time you're willing to give it if stronger filtering is needed.)

g-force
17th April 2008, 20:26
Didée

I am finally convinced of the benefits of not using the pre-filter as part of the filter chain. I had an idea though. What if the temporal radius 1 was mo-comped and temporal radius 2 wasn't, and then you threw away the min and max and averaged the rest? This should provide the same amount of degraining as a radius 2 mo-comp at least on low-motion areas.

Just a thought. Here is basically what the script would look like. Sorry for all the stuff that I have stolen from TD.

sigma = 16
source = last
filter = source.FFT3DFilter(sigma=sigma,sigma2=sigma*0.625,sigma3=sigma*0.375,sigma4=sigma*0.250,bt=5,bw=16,bh=16,ow=8,oh=8)
filterd = mt_makediff(source,filter)

b1vec = filter.MVAnalyse(isb=true, delta=1,pel=2,overlap=4,blksize=8,idx=1)
f1vec = filter.MVAnalyse(isb=false,delta=1,pel=2,overlap=4,blksize=8,idx=1)

bw2 = blankclip(source).Trim(0,1)+source #just use raw -2 frame
bw1 = source.MVCompensate(b1vec,thSAD=400,idx=2)
fw1 = source.MVCompensate(f1vec,thSAD=400,idx=2)
fw2 = source.Trim(2,0) #just use raw +2 frame

pmax_t = source.MT_Logic(bw1,"max").MT_Logic(fw1,"max").MT_Logic(bw2,"max").MT_Logic(fw2,"max")
pmin_t = source.MT_Logic(bw1,"min").MT_Logic(fw1,"min").MT_Logic(bw2,"min").MT_Logic(fw2,"min")
pavg = MT_Average(pmax_t,pmin_t)

inter = Interleave(bw2,bw1,source,fw1,fw2)
avg = inter.TTempSmoothF(maxr=2,lthresh=255,cthresh=255,strength=8,scthresh=255).SelectEvery(5,2)
nr1 = MT_lutxy(avg,pavg,"x 5 * y 2 * - 3 /") #subtract off min and max and average the rest

#don't do more than filter did
nr1d = MT_MakeDiff(source,nr1)
dd = MT_lutxy(filterd,nr1d,"x 128 - abs y 128 - abs < x y ?")

source.MT_MakeDiff(dd,u=2,v=2)

last.MVDegrain1(b1vec,f1vec,thSAD=400,idx=3) #second MV stage

# contra-sharpening by Didée
s = last.MinBlur(1,1) #requires Didée's minblur script
alld = MT_MakeDiff(source,last)
ssd = MT_MakeDiff(s,s.RemoveGrain(12,-1))
ssdd = ssd.Repair(alld,1)
ssdd = ssdd.MT_lutxy(ssd,"x 128 - abs y 128 - abs < x y ?")

last.MT_AddDiff(ssdd,U=2,V=2)

What do you think?

thetoof... wanna give this a try and report back?

-G

thetoof
17th April 2008, 22:59
RAM usage = 200 MB less than TD
Speed = about 9-12 times faster than TD

Results (http://www.megaupload.com/fr/?d=Q6QY4HXC) (15 frames with high motion + 45 frames with no motion and a scene change)

Too busy to post screenshots... will do later.

Good work!

g-force
17th April 2008, 23:17
RAM usage = 200 MB less than TD
Speed = about 9-12 times faster than TD

Results (http://www.megaupload.com/fr/?d=Q6QY4HXC)

Too busy to post screenshots... will do later.

thetoof,

thanks, I will download and look at the results.

might want to run those comparisons again. I noticed that the sharpening wasn't as good as what is in TD, so I updated my previous post.

-G

Didée
18th April 2008, 15:24
There's an error in the script: "trim(0,2)+..." needs to be "trim(0,1)+..." to get the wished 2-frame offset. (or more elegant: use "SelectEvery(0,-2)" & "SelectEvery(0,2)" for this kind of offsetting). The wrong offset throws the median-like correction a bit out of balance...

Correct that bug, and it's a good one!

g-force
18th April 2008, 16:57
There's an error in the script: "trim(0,2)+..." needs to be "trim(0,1)+..."

Correct that bug, and it's a good one!

Oops, that was a stupid mistake. Thanks for catching that!

Anyone have any suggestions for a name?

-G

SPiKA
18th April 2008, 18:31
Where can I find TemporalDegrain script?

moviefan
18th April 2008, 18:32
http://avisynth.org/mediawiki/Temporal_Degrain

SPiKA
18th April 2008, 18:53
Doh! xD
Thanks...

thetoof
18th April 2008, 21:03
You could call it SpeedyGonzalesDegrain :p

Here's a sample with the updated script. (http://www.mediafire.com/?21j212bb1mi)

sidewinder711
19th April 2008, 00:45
How do I use the last version of g-force's script to get the speed improvement thetoof has mentioned ? I tried SetMTMode(2), but the speed stays at 2-3 fps.


Greetz

thetoof
19th April 2008, 05:00
I get this kind of speed too (well, at single core with many programs running in background)... so I'll let you imagine how slow TD is :p

edit: You should also know that I'm using search=3 and degrain=3 with TD, as well as my own prefiltered reference clip with 2 FFT3DFilter calls (1 for chroma and 1 for luma with a noise pattern), so that's why "my" TD is very very slow. I used the same reference clip with g-force's script, but left all the other settings untouched, so maybe you won't get a speed boost as big as the one I got. Still, the results are very good and it's undoubtedly faster.

sidewinder711
19th April 2008, 06:09
thetoof,
thanks for your feedback. I'm only using the same script posted by g-force, no prog running in the background ... on a DualCore (2.2 Ghz) and get 2-3 fps. The same goes with the last version of TemporalDegrain for me (2-3 fps), which means that I don't see any speed advantage for g-force's version.

BTW: Thanks to Didée for his work... for me TD is the best solution to "tame" noisy vids. Yesterday i discovered that it even works perfectly on a blocked footage I tried to improve. :thanks:

Greetz

g-force
19th April 2008, 15:13
thetoof,
thanks for your feedback. I'm only using the same script posted by g-force, no prog running in the background ... on a DualCore (2.2 Ghz) and get 2-3 fps. The same goes with the last version of TemporalDegrain for me (2-3 fps), which means that I don't see any speed advantage for g-force's version.


That's pretty impressive speed for TD. Are you sure that you're comparing using TD with "degrain" set to 2? If so, maybe I just need a dual core!

Didée,
that would you think of moving the "don't do more than filter..." part to after the second MV stage, in the hopes of preventing more artifacting. Seems to work pretty well on the stuff I'm throwing at it, but wanted your feedback as to why you chose to do it before the second stage.

-G

sidewinder711
21st April 2008, 01:03
g-force
yep, default values for TD with degrain=2. If the afore mentioned speed is impressive for you, you should definitely go with a dual core! ;) I just made a test with a new E8400 dual core processor from intel (3.0 Ghz) and the speed of FastDegrain (i used it for a rip from a dvd) increased by more than 40% in comparison to my E6420.

Greetz

thetoof
21st April 2008, 01:11
That function is in bad shape, short of saying it were b0rked.

You mentioned of FastDegrain... imo you shouldn't use it.

sidewinder711
21st April 2008, 04:18
Thanks thetoof for your hint, but if I remember correctly, that this is an earlier quote made by Didée. He re-defined the FastDegrain function and posted it together with the latest TemporalDegrain to the mediawiki. Here (http://avisynth.org/mediawiki/Temporal_Degrain) you can find the versions I'm using.

Greetz

Didée
21st April 2008, 12:04
He re-defined the FastDegrain function and posted it together with the latest TemporalDegrain to the mediawiki
You are spreading false rumours. I fixed a bug in TemporalDegrain, but I did not touch FastDegrain in any way.

FastDegrain still is a technically correct script with frouzy defaults and too little parameters. Don't really care about it, since it offers nothing new anyway. It's just a wrapper-script for MVDegrainX().LimitedSharpen().HQDN3D() ... and at least for the MVDegrain part, there're morce configurable scripts out there.


@ g-force
that would you think of moving the "don't do more than filter..." part to after the second MV stage, in the hopes of preventing more artifacting. Seems to work pretty well on the stuff I'm throwing at it, but wanted your feedback as to why you chose to do it before the second stage
Put it wherever you want.:)
I'm sure that it works out with some sources ... most probably with those that would be sufficiently treated with just MVDegrain. For the more heavy sources, it won't. The pitfall is that FFT3DFilter is not generally sufficient, and it's not generally failsafe on high motion (which also depends heavily on blocksize and temporal depth and and and ...). From the viewpoint of a general procedure, I definetly wouldn't recommend to use it for limiting at the final stage.

Maybe later I'll show some cases where your script produces artifacts, and eventually expand a bit about the causes.

g-force
28th April 2008, 15:52
So, over the weekend I was playing around with some of the filters that Didée suggested might be suitable alternatives for the FFT prefilter in TD. I have to say they are quite good, but I was getting bad motion vectors in a few spots. I found an alternative that seems to work quite well (at least on sources with medium amounts of grain)

instead of the FFT filter call, use a filter like this:

source = last
temp=source.TemporalSoften(x,255,255,25,2) #x from 1 to 7
Repair(temp,source,mode=9)

so in TD, you would replace the second "filter" line with this:

filter = defined(denoise) ? denoise : filter.TemporalSoften(sigma,255,255,25,2).Repair(o,mode=9)


It's much faster and seems to produce less artifacts than the FFT when used in TD.

-G

Spuds
28th April 2008, 16:40
What kind of artifacts are you seeing with fft3dfilter? In the script the denoised clip is used to search for vectors and then limit the allowed change to the original, its output is not really directly applied to the final image, just curious what you are seeing.

Perhaps changing the script so spat allowed less change to the original would prevent the artifacts, or over denoising, of the clip. Be nice to allow passing a spat clip and not having it tied directly to the filtered clip.


filter = defined(denoise) ? denoise : filter.TemporalSoften(sigma,255,255,25,2).Repair(o,mode=9)

I don't think you want to use sigma there, or if you do you need to pass a new value as the default is 16. You could make it a child of the degrain variable like =2*degrain.

Of course since the script does allow you to pass a denoised clip you could just call it as below instead of having YATDmod.

filtered = last.TemporalSoften(4,255,255,25,2).Repair(last,mode=9)
TemporalDegrain(last,denoise=filtered)

Nikos
28th April 2008, 16:53
@g-force
Me too, i was playing around with some of the Didée's filters :)
The FFT sometimes with high sigmas produce ugly artifacts in the prefilter clip.

For prefiltering try this old Didée's function:

# >> LimitedTemporalSoften <<
# A function by Didée
#
# Soften bigger noise by TemporalSoften(),
# while still minimize ghosting.
#
#
# Full de-noising is only achieved with weak noise, but it IHMO does a pretty
# good job in "calming down" any sort of noise, before handing the clip to any final denoiser(s).
#
# Stronger pre-blurring. The pre-blurring is only a rough spatial cleaner to get a
# better measurement from the full, unrestricted temporal blur. For strong noise,
# replace that "blur(preblur)" with something like
# "bicubicresize([33%~~66%],.33,.33).bicubicresize([100%],1.0,0.0)".
# Finding the "sweetspot of preblurring" is the main trick.
#
#
# blur() -> removegrain(11) is no problem.
# fade does a funky kind of soft thresholding.
# It's value is not intuitive, and even is inverted (smaller 'fade' -> stronger filtering).
#

function LimitedTemporalSoften(clip clp, int "frames", int "limit",
\ float "preblur", float "fade", bool "color")
{
frames = default(frames, 1)
limit = default(limit, 2)
preblur = default(preblur,1.0)
fade = default(fade, 4.0)
color = default(color, true)
limstr = string(limit)
fadestr = string(fade)
uv = color ? 3 : 2

spat = (preblur==0.0) ? clp : clp.blur(preblur)
temp_spat = spat.TemporalSoften(frames, 255, 255, 255, 2)
temp = clp .TemporalSoften(frames, 48, 48, 32, 2)

Diff_SpatTemp = mt_lutxy(spat, temp_spat, Yexpr="255 "+limstr+" * x y - abs "+fadestr+" * /"
\ ,Uexpr="255 "+limstr+" * x y - abs "+fadestr+" * /"
\ ,Vexpr="255 "+limstr+" * x y - abs "+fadestr+" * /",U=uv,V=uv)

out = mt_merge(clp, temp, Diff_SpatTemp, Y=3, U=uv, V=uv)

return(out )
}

Try:
LimitedTemporalSoften(frames=2, limit=4, fade=3)
and you will have more speed and less blurriness than your TemporalSoften and Repair combo.

If your video have flicker, or "dancing" noise try this Didée's script before LimitedTemporalSoften:

o = last
f = o.MinBlur(1,2).MinBlur(2,2).RemoveGrain(11,-1)
f.FluxSmoothT(7).mt_AddDiff(mt_MakeDiff(o,f,U=2,V=2),U=4,V=4)

# eventually, limit the maximum pixel change to +/- 2
mt_LutXY(o,last,"x 2 + y < x 2 + x 2 - y > x 2 - y ? ?",U=2,V=2)

# to compare:
# interleave(o,last)

return(last)

The result is great.

g-force
28th April 2008, 18:24
What kind of artifacts are you seeing with fft3dfilter? In the script the denoised clip is used to search for vectors and then limit the allowed change to the original, its output is not really directly applied to the final image, just curious what you are seeing.

Perhaps changing the script so spat allowed less change to the original would prevent the artifacts, or over denoising, of the clip. Be nice to allow passing a spat clip and not having it tied directly to the filtered clip.



I don't think you want to use sigma there, or if you do you need to pass a new value as the default is 16. You could make it a child of the degrain variable like =2*degrain.

Of course since the script does allow you to pass a denoised clip you could just call it as below instead of having YATDmod.

filtered = last.TemporalSoften(4,255,255,25,2).Repair(last,mode=9)
TemporalDegrain(last,denoise=filtered)


Spuds,

I agree with everything you are saying. I just left it "sigma" so people could pop it in without changing any of the variables to TD, but both of your methods are more elegant.

As for the artifacts I was getting, there are a couple scenes where large objects pass in front of the camera, and the background gets distorted (warped) on the frame where they are still half in the picture. I'll try to post some screenshots when I get home. If I look at the direct output of the FFT filter, I can see how the MV analysis might get confused. Anyway, just posing yet another possibility of a replacement for the slow FFT filter. Maybe someone will find it useful.

-G

g-force
28th April 2008, 18:27
@g-force
Me too, i was playing around with some of the Didée's filters :)
The FFT sometimes with high sigmas produce ugly artifacts in the prefilter clip.

For prefiltering try this old Didée's function:

# >> LimitedTemporalSoften <<
# A function by Didée
#
# Soften bigger noise by TemporalSoften(),
# while still minimize ghosting.
#
#
# Full de-noising is only achieved with weak noise, but it IHMO does a pretty
# good job in "calming down" any sort of noise, before handing the clip to any final denoiser(s).
#
# Stronger pre-blurring. The pre-blurring is only a rough spatial cleaner to get a
# better measurement from the full, unrestricted temporal blur. For strong noise,
# replace that "blur(preblur)" with something like
# "bicubicresize([33%~~66%],.33,.33).bicubicresize([100%],1.0,0.0)".
# Finding the "sweetspot of preblurring" is the main trick.
#
#
# blur() -> removegrain(11) is no problem.
# fade does a funky kind of soft thresholding.
# It's value is not intuitive, and even is inverted (smaller 'fade' -> stronger filtering).
#

function LimitedTemporalSoften(clip clp, int "frames", int "limit",
\ float "preblur", float "fade", bool "color")
{
frames = default(frames, 1)
limit = default(limit, 2)
preblur = default(preblur,1.0)
fade = default(fade, 4.0)
color = default(color, true)
limstr = string(limit)
fadestr = string(fade)
uv = color ? 3 : 2

spat = (preblur==0.0) ? clp : clp.blur(preblur)
temp_spat = spat.TemporalSoften(frames, 255, 255, 255, 2)
temp = clp .TemporalSoften(frames, 48, 48, 32, 2)

Diff_SpatTemp = mt_lutxy(spat, temp_spat, Yexpr="255 "+limstr+" * x y - abs "+fadestr+" * /"
\ ,Uexpr="255 "+limstr+" * x y - abs "+fadestr+" * /"
\ ,Vexpr="255 "+limstr+" * x y - abs "+fadestr+" * /",U=uv,V=uv)

out = mt_merge(clp, temp, Diff_SpatTemp, Y=3, U=uv, V=uv)

return(out )
}

Try:
LimitedTemporalSoften(frames=2, limit=4, fade=3)
and you will have more speed and less blurriness than your TemporalSoften and Repair combo.

If your video have flicker, or "dancing" noise try this Didée's script before LimitedTemporalSoften:

o = last
f = o.MinBlur(1,2).MinBlur(2,2).RemoveGrain(11,-1)
f.FluxSmoothT(7).mt_AddDiff(mt_MakeDiff(o,f,U=2,V=2),U=4,V=4)

# eventually, limit the maximum pixel change to +/- 2
mt_LutXY(o,last,"x 2 + y < x 2 + x 2 - y > x 2 - y ? ?",U=2,V=2)

# to compare:
# interleave(o,last)

return(last)

The result is great.

Nikos,

cool! I'll try those out.

-G

Spuds
28th April 2008, 19:22
LimitedTemporalSoften(frames=2, limit=4, fade=3)
and you will have more speed and less blurriness than your TemporalSoften and Repair combo.

Speed I'll agree with (along with less noise removal), but less blurriness? I hardly think so. You can't expect a filter that cleans only by smoothing to have less blurriness (softness), it selectively smooths and does so very well.

Look into his eye's, they are loosing life with limitedtemporalsoften

http://img266.imageshack.us/img266/952/ltsce5.th.jpg (http://img266.imageshack.us/my.php?image=ltsce5.jpg)http://img266.imageshack.us/img266/728/tdwdntk1.th.jpg (http://img266.imageshack.us/my.php?image=tdwdntk1.jpg)http://img266.imageshack.us/img266/8093/tdpl6.th.jpg (http://img266.imageshack.us/my.php?image=tdpl6.jpg)http://img236.imageshack.us/img236/6302/tdtsip2.th.jpg (http://img236.imageshack.us/my.php?image=tdtsip2.jpg)

g-force
28th April 2008, 19:42
Speed I'll agree with (along with less noise removal), but less blurriness? I hardly think so. You can't expect a filter that cleans only by smoothing to have less blurriness (softness), it selectively smooths and does so very well.

Look into his eye's, they are loosing life with limitedtemporalsoften



Nikos,

are you advocating using LTS instead of TD, or just as the replacement for the FFT portion of TD?

Spuds,

judging by your response, I take it that you think he is looking to replace all of TD with LTS, which is how I read it too, but just wanted to make sure. Also, did you use my suggested filter as the input to TD in the middle picture?

-G

Nikos
28th April 2008, 19:45
@Spuds and g-force i recommended limitedtemporalsoften only for prefiltering stage in contrast the temporalsoften+repair combo :)

From my previous post:

For prefiltering try this old Didée's function:
......

Spuds
28th April 2008, 21:46
As for the artifacts I was getting, there are a couple scenes where large objects pass in front of the camera, and the background gets distorted (warped) on the frame where they are still half in the picture. I'll try to post some screenshots when I get home. If I look at the direct output of the FFT filter, I can see how the MV analysis might get confused. Anyway, just posing yet another possibility of a replacement for the slow FFT filter. Maybe someone will find it useful.

Cool, just wanted to get an example of what type of scene would cause the erroneous vectors and how those would then manifest on the output. Given that sigma=16 as a default I'd expect some prefilter distortion. Yup FFT3dfilter is slow especially when you lower the blocksize and increase bt as is done in temporaldegrain. You can gain a lot of speed back with bt=1 and blocksize=32 for less noisy sources.

i recommended limitedtemporalsoften only for prefiltering stage Thanks, it was the LimitedTemporalSoften(frames=2, limit=4, fade=3)
and you will have more speed and less blurriness than your TemporalSoften and Repair combo. that made it sound like it was a full replacement. Now if it is intended as the prefilter then I'll let you off on the less blurry part (maybe), but now how are two calls to temporalsoften, a lutxy plus a merge faster than a single temporalsoften + repair :). Fast yes, faster?

Also, did you use my suggested filter as the input to TD in the middle picture The third one was your prefilter passed via denoise. For completeness I added a 4th view using what Nikos suggested.

g-force
28th April 2008, 22:14
The third one was your prefilter passed via denoise. For completeness I added a 4th view using what Nikos suggested.

Nice! Results look pretty similar, although it appears that the "don't do more than" part is keeping a little more noise in Nikos' suggestion than in my suggestion. I think these are both pretty decent alternatives. Maybe worth updating the TD Wiki entry to include these as well as Didée's suggestions from page one of this thread as faster alternatives to the internal FFT filter.

-G

Nikos
28th April 2008, 22:23
From a quick test with VirtualDub's "Run Video analysis pass" with this script:

SetMTMode(5,4)

SetMemoryMax(256)
DirectShowSource("BSG.GRF", audio=false, seek=true, fps=23.976023976023976023976023976024, framecount=136152)

trim(45295, 46265)

SetMTMode(2)

Spline36Resize(1280,720,4,4,1912,1072)

my.prefilter()

a. fft3dfilter(sigma=4), 15 fps

b. TemporalSoften(2, 255, 255, 25, 2) + Repair, 23.25 fps

c. LimitedTemporalSoften(frames=2, limit=4, fade=3), 29.5 fps

CPU: Intel Q6600, 2400 MHz

I think that we need a Didee's suggestion for an alternative fast prefilter in Temporal Degrain :)
The LimitedTemporalSoften alone is week for very grainy sources.

Unfortunately, in my opinion every source need a different prefilter.

This is my prefilter chain for noisy sources: [Thanks Didee for the teach :)]


source=last
# "calming down" any sort of noise
pre1=source.LimitedTemporalSoften(frames=2, limit=3, fade=3)

# FFT with moderate sigma values
SetMTMode(5)
pre2=pre1.FFT3Dgpu(sigma=..., sigma2=..., sigma3=..., sigma4=..., plane=0, mode=1, precision=2, bt=3, wintype=1, bw=48, bh=48, ow=16, oh=16)
SetMTMode(2)

# Eventualy limit the FFT strength to fit my needs
NRL= some.value
pre=mt_lutxy(pre1, pre2, "x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?", chroma="copy first")
# or
# pre=mt_lutxy(pre1, pre2, "x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - x 51 * y 49 * + 100 / ? ?", chroma="copy first")


It's fast because i utilize the GPU, and effective with rights sigma values.

Spuds
29th April 2008, 01:05
@Nikos,

Those are some non-intuitive results, not doubting what you got its just they don't, on the surface, make sense. For kicks I ran a short pass as well on my laptop with a very basic script to take other variables out of the loop. Also unloaded vdub and avisynth after each pass to avoid favorable cache hits.

avisource("test.avi") # progressive source in yv12 720X480
trim(0,1000) # lets not spend all day on this
test filter a,b,c

a = fft3dfilter(sigma=4) # 17 fps
b = LimitedTemporalSoften(frames=2, limit=4, fade=3) # 60 fps
c = TemporalSoften(4,255,255,25,2).Repair(last,mode=9) # 77 fps

moviefan
29th April 2008, 13:28
@Spuds: With reference to the latest development of this thread: Wouldn't the improved prefilter chain also be beneficial to your mcspuds script?

Spuds
30th April 2008, 03:11
@moviefan

Oh yes, I'm always on the lookout for a clean, fast, detail saving, noise removing prefilter :) The 'standard' one in mc_spuds is relatively slow but effective, its based on fft3dfilter.

The prefilter that prefast=true invokes in the latest beta is about 57fps, just a tad slower then limitedtemporalsoften and works well on not so noisy sources. Of course there is always room for improvement !

Nikos
30th April 2008, 14:08
Hi Spuds, i try for prefiltering the RemoveGrain and FluxSmoothT combo with limiter in each stage.

clp=last

s = clp.RemoveGrain(mode=xx, modeU=2)
spat = mt_lutxy(clp, s, "x "+NLS+" + y < x "+NLS+" + x "+NLS+" - y > x "+NLS+" - y ? ?", Y=3, U=3, V=3)

st=spat.FluxSmoothT(y)
prefilter=mt_lutxy(spat, st, "x "+NLT+" + y < x "+NLT+" + x "+NLT+" - y > x "+NLT+" - y ? ?", Y=3, U=3, V=3)

It's fast and effective.

My question is:
The logical order is spatial first temporal then
or temporal first spatial then?

In my eyes the results are identical.