Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
16th January 2011, 16:48 | #321 | Link | |
Registered User
Join Date: Oct 2009
Posts: 212
|
It's a form of expression.
Quote:
|
|
16th January 2011, 17:28 | #322 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Maybe yes, maybe no. Read on.
Quote:
Remember FluxSmooth is a simple temporal smoother with median-like decision where to filter and where not. Examples: a) a pixel sequence: ... 80 81 85 79 80 ... Flux will filter the "85" and the "79", because these two pixels are overshooting both of their neighbors. b) pixel sequence: ... 80 81 85 85 81 80 Flux will filter *nothing*, because no pixel satisfies the "overshooting both neighbors" criteria. For case b), this means: - IF those two "85" are due to motion, then Flux has done correct. - But IF those two "85" in fact are related to "flicker" in a "flat" a/o "static" area, then Flux has not filtered something that you would like to have filtered. Truth is, this kind of "flickering of low spatial frequencies" is one of the ultimate foes, because right here it is where the nebula-of-uncertainty becomes thick: a) without mocomp, you can't know if it's flicker or motion b) with mocomp, you can't know if the mocomp has been misleaded by the flicker c) With prefiltering before mosearch, you can't know if the prefilter has mangled moving areas (because of a)) and conseqquentially has misleaded the mosearch Chicken-and-egg problem, without any definite solution.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
16th January 2011, 18:25 | #324 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Related - I've though several times if and how the "FluxSmooth principle" could be extended from the current 3-frame temporal window to a 5-frame temporal window.
A reasonable approach would be this: - calculate temporal median with radius=2 - calculate temporal soften with radius=2 - for each pixel, use that result that caused the smaller difference Radius=2 temporal median can be done via MedianBlurT, but this implementation is tooooo slow. Instead, get the nice median2 script by g-force! For convenience and simple usage, create a "TMedian2" wrapper function: Code:
function TMedian2(clip c) { Median2( c.selectevery(1,-2), c.selectevery(1,-1), c, c.selectevery(1,1), c.selectevery(1,2) ) } Code:
function Flux5framesT(clip c, int "th", int "thC") { th = default(th,7) thC = default(thC,th) med = c.TMedian2() avg = c.temporalsoften(2,th,thC,24,2) medD = mt_makediff(c,med,U=3,V=3) avgD = mt_makediff(c,avg,U=3,V=3) DD = mt_lutxy(medD,avgD,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=3,V=3) c.mt_makediff(DD,U=3,V=3) }
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 19th January 2011 at 14:46. Reason: typo: makedif -> makediff |
17th January 2011, 19:47 | #326 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
No, I'm bored of it. Wait for the x256-version of Avisynth 7.0.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
19th January 2011, 13:20 | #327 | Link | |
Registered User
Join Date: Oct 2009
Posts: 212
|
Quote:
|
|
19th January 2011, 14:01 | #328 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
For this one, 'th' and 'thC' are the only knobs to tweak, yes.
Somewhere earlier in this thread I had posted a pre-calm script (with MinBlur() and FluxSmooth) - in essence the same as I suggested at the end of this post to TheProfileth. Depending on the source characteristics, using Flux5 instead of simple Flux within such a pre-calmer can make sense.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
19th January 2011, 14:17 | #329 | Link |
Registered User
Join Date: Oct 2009
Posts: 212
|
Another one for the recipe book. Those sideaffect of shading do not happen with Flux5fremesT script? Thanks Didée.
BTW There is a typo in your Flux5framesT script avgD = mt_makedif(c,avg,U=3,V=3) --> avgD = mt_makediff(c,avg,U=3,V=3) Last edited by SilaSurfer; 19th January 2011 at 14:27. |
19th January 2011, 14:46 | #330 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Yeah, a few minutes ago I discovered that typo, too.
Of course, Flux5 is *not* safe in regards to weak shadings in moving areas. Vanilla Flux is not safe, and Flux5 is even less. Well, you can't expect anything else from a simple, thresholded temporal smoother. It's a compromise the user needs to balance out.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
23rd January 2011, 17:37 | #332 | Link | |
Registered User
Join Date: Oct 2009
Posts: 212
|
Didée from your post #70
Quote:
Flux5FramesT().Flux5FramesT() to really make the clip calm. Last edited by SilaSurfer; 23rd January 2011 at 17:50. Reason: Forgot to write something |
|
24th January 2011, 21:42 | #333 | Link |
Registered User
Join Date: Oct 2009
Posts: 212
|
Didée nevermind my previous post. I wanted to ask you what do you think about this. Would need some suggestions if you have any.
SetMTMode(5,2) SetMemoryMax(1000) MPEG2Source("C:\System\fotr1.d2v", info=3) Colormatrix(hints=true) crop(8,78,704,420) source=last a=source.Fft3dgpu(sigma=16, sigma2=10, Sigma3=6, sigma4=8, bt=4) # Deblocking and some sigma4 help to Flux5framesT() which comes next b = a.RemoveGrain(11) f = b.Flux5FramesT().merge(b,0.49) Nr1=a.mt_makediff(mt_makediff(b,f,U=3,V=3),U=3,V=3) # Prefiltering clip for MAnalyze SetMTMode(2) NR1_super=NR1.Msuper(pel=2, sharp=2) source_super = source.MSuper(pel=2,sharp=2, levels=1) bv2=MAnalyse(NR1_super,isb=true, delta=2, overlap=4, truemotion=false) bv1=MAnalyse(NR1_super,isb=true, delta=1, overlap=4, truemotion=false) fv1=MAnalyse(NR1_super,isb=false,delta=1, overlap=4, truemotion=false) fv2=MAnalyse(NR1_super,isb=false,delta=2, overlap=4, truemotion=false) NR2=source.MDegrain2(source_super, bv1,fv1,bv2,fv2, thsad=300, thscd1=300, thscd2=90).contra(source) # Denoising and Your Contrasharpening. Function (see below) SetMTmode(5) sharp0 = NR2.Seesaw(nrlimit=0, nrlimit2=99, bias=49, sstr=1.24, Spower=3, Szp=12, Sdamplo=4, SdampHi=19, Slimit=99, sootheT=0, sootheS=0) SetMTMode(2) sharpD = mt_makediff(NR2,sharp0) zeroD = sharpD.mt_lut("x",Y=-128) sup1 = NR2.MSuper(pel=2,sharp=2) sup2 = sharpD.MSuper(pel=2,sharp=2,levels=1) zeroD.MDegrain2(sup2,bv1,fv1,bv2,fv2) # Motion Compensated Sharpening. Your 2a variant which doesn't denoise. I split the denoising and sharpening to avoid artefacts. NR2.mt_makediff(last,U=2,V=2) GradFun2DBmod(thr=1.4, str=1.2, mode=2,adapt=64, temp=50) #Some dihtering and adding grain to prevent blocking and banding SetMTMode(5) Spline64resize(704,288) function contra (clip denoised, clip original) { s = denoised.minblur(1,1) # Damp down remaining spots of the denoised clip. allD = mt_makediff(original,denoised) # The difference achieved by the denoising. ssD = mt_makediff(s,s.removegrain(11,-1)) # The difference of a simple kernel blur. ssDD = ssD.repair(allD,1) # Limit the difference to the max of what the denoising removed locally. ssDD = SSDD.mt_lutxy(ssD,"x 128 - abs y 128 - abs < x y ?") # abs(diff) after limiting may not be bigger than before. denoised.mt_adddiff(ssDD,U=2,V=2) # Apply the limited difference. (Sharpening is just inverse blurring.) return( last ) } This was tested on not so good Dvd source. It contains a lot of dark areas where blocking is present. Areas with grain inherit those nice charming LF errors aka Flicker. So what do you think of my first "cough" advanced script? (Also having a flu overhere) Last edited by SilaSurfer; 24th January 2011 at 22:12. |
24th January 2011, 22:09 | #334 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Well, what to say. Technically, the flow of processing is all valid. On some sources this will look great, on some sources it will look desastrous.
Seeing the source is LOTR, I'd say the prefiltering is MUCH too strong. LOTR is rather clean with only little noise, no need to break a fly on a wheel. The current prefiltering will nuke-out enough content to make the motionsearch worse than it could be. Sometimes less is simply more. Also, you're producing a little stamp of 704x288. So much filtering for only so few pixels in the result?
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
25th January 2011, 15:49 | #337 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Maximum is 255. Perhaps more, but in 8-bit-sources pixel differences can not be larger than 255, anyway.
Of course, with such big threshold there will appear motion artifacts. Out of the sleeve, MinBlur(1) FluxSmoothT().merge(last,0.251) sbr() should be a "simple" but effective searchclip-pre-processing for such rather clean sources. If you don't have them in the toolbox - - - Code:
# Highpass of spatial r=1 Gaussian function sbr(clip c) { rg11=c.removegrain(11,-1) rg11D=mt_makediff(c,rg11) rg11DD=mt_makediff(rg11D,rg11D.removegrain(11,-1)).mt_lutxy(rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?") c.mt_makediff(rg11DD,U=2,V=2) } # Nifty Gauss/Median combination function MinBlur(clip clp, int r, int "uv") { uv = default(uv,3) uv2 = (uv==2) ? 1 : uv rg4 = (uv==3) ? 4 : -1 rg11 = (uv==3) ? 11 : -1 rg20 = (uv==3) ? 20 : -1 medf = (uv==3) ? 1 : -333 RG11D = (r==1) ? mt_makediff(clp,clp.removegrain(11,rg11),U=uv2,V=uv2) \ : (r==2) ? mt_makediff(clp,clp.removegrain(11,rg11).removegrain(20,rg20),U=uv2,V=uv2) \ : mt_makediff(clp,clp.removegrain(11,rg11).removegrain(20,rg20).removegrain(20,rg20),U=uv2,V=uv2) RG4D = (r==1) ? mt_makediff(clp,clp.removegrain(4,rg4),U=uv2,V=uv2) \ : (r==2) ? mt_makediff(clp,clp.medianblur(2,2*medf,2*medf),U=uv2,V=uv2) \ : mt_makediff(clp,clp.medianblur(3,3*medf,3*medf),U=uv2,V=uv2) DD = mt_lutxy(RG11D,RG4D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=uv2,V=uv2) clp.mt_makediff(DD,U=uv,V=uv) return(last) }
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 25th January 2011 at 15:57. |
25th January 2011, 20:15 | #338 | Link |
Registered User
Join Date: Oct 2009
Posts: 212
|
I meant SootheS=75. How come every time I ask you something you hit me with another function? Thanks Didée I like it a lot!
BTW this doesn't really belong in this thread but since it is connected to my script: MY script crawls on my system even with SetMTMode it doesn't get any faster and I was meaning to ask you what do you think about MVToolsMulti version which has multithreading built in. I know it is somewhat unstable but I could gain a couple fps? Last edited by SilaSurfer; 25th January 2011 at 20:47. Reason: Fixed some typos |
26th January 2011, 19:56 | #339 | Link | |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,717
|
Quote:
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
26th January 2011, 20:25 | #340 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Yes, sure, that's intentional. Preprocessing for the searchclip. Did you see that?
If you have a nicely sharp & high-contrast clip, with "default operation as per documentation" you'll end up with pretty big SADs wherever there's an edge. Means, little to nothing will happen on edges. Which is quite counterproductive when the goal is to calm (the effect of) a sharpener.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
Thread Tools | Search this Thread |
Display Modes | |
|
|