View Full Version : Help with DeBlocking & Denoising
EuropeanMan
21st January 2010, 22:49
I have a source here that looks like it requires M/5 decimation
TDecimate(cycleR=1)
Dupe every 4/5 frame...
The source is supersharp, and unfortunately as you see in the sample I've uploaded, there is a ton of blocking.
I do have other DVD9s where Dance sequences in Indian films have this same problem, yet the rest of the movie is "just fine" (so to speak).
My questions:
1) any better technique for deinterlacing this? Besides the M in 5...
2) This particular movie here has 6 song/dance sequences which I'd like to encode separately. How would YOU guys denoise this?
3) Alongside the denoising - deblocking is best done via VDub filters (such as MSU DeBl. 2.2) or avisynth filters such as DeBlock? This is one movie I'm not too fond of, except for the song/dance portions. Speed of encoding is of no concern to me.
Hopefully I can get some good help with this, as I'm cutting these songs out for my own personal collection (ie, Songs DVD collection). Thanks guys.
Sample given is m2v file (demuxed via DGI). There is no audio here. Source R0/NTSC/DVD9 - Yuvraaj (2007)
http://www.sendspace.com/file/fctwgx
MatLz
22nd January 2010, 03:42
Hi!
Just use 'force film' option in dgindex, it will be enough to decimate! There is nothing to deinterlace...
Well...for the rest...it's critical....so I would use a strong barbaric method:
Mpeg2source(...,cpu=6).Deblock(33).debanding()... It's doing a decent job...
The main problem is why produce a dvd with that kind of movie (where scenes complexity varie a lot) with the using of CBR ?
poisondeathray
22nd January 2010, 04:08
You could apply filters in segments , or process in segments to avoid "wrecking" the "better" parts
EuropeanMan
22nd January 2010, 05:13
@ Matz / poison - THNX :)
After encoding with cpu6; deblock 33 & gradfun2b (default)
We get this (3 sets of screens): http://comparescreenshots.slicx.com/comparison/32354
I'll assume this is as good as it'll get...
EuropeanMan
22nd January 2010, 05:49
http://www.sendspace.com/file/z3syc3
Source top / Processed bottom
thetoof
22nd January 2010, 05:53
Something I'd tried on a blocky source a while ago (don't know if Didée would approve using parts of his scripts like this, but heh :p) I adapted it to the new filters (like nnedi2), but it will require tweaking for your source (if you dare try to use it ^_^)
s=progressive source
dbl=s.deblock_qed().gradfun2db(2.3) #deblocking and debanding
dblD = mt_makediff(s,dbl,U=3,V=3)
shrpD = mt_makediff(dbl,dbl.removegrain(11),U=3,V=3)
DD = shrpD.repair(dblD,13)
d=dbl.mt_adddiff(DD,U=3,V=3) #contra-sharpening (instead of after denoise, after deblock :p)
soothe(d,dbl) #no need to be crazy on high motion scenes, but you can remove it...
#a bit of denoising
fft3dfilter(plane=3,bt=3,sigma=1.5,bw=32,bh=32,ow=16,oh=16) #kill chroma noise
dfttest(smode=0,sbsize=5,tbsize=3,sigma=.5,u=false,v=false) #luma targeted denoise
#and then it was some crazy (and maybe unnecessary) way too high quality supersample-sharpen like a mad cow on cocaine-sharp downsize with halo prevention)
dull=last
sharp=dull.nnedi2_rpow2(rfactor=2,cshift="spline36resize",qual=3).sssharp(strength=2).automttap3(width(s),height(s))
soothe(sharp,dull) #again... super sharp high motion ain't that good
gradfun2db(1.2) #somehow I had added more debanding
Ain't pretty, but it worked on a crappy anime^^
EuropeanMan
22nd January 2010, 06:02
*shocked* & *awed* What the??????
MatLz
22nd January 2010, 08:01
Don't be afraid this is a thetoof's script!
But...(no, no, it won't slow your filtering/encoding :p)are you sure?:D
EuropeanMan
22nd January 2010, 18:03
I suppose now I need to figure out what filters I need to download...some of these (mt_addif) I've not heard of...
One problem so far:
http://i46.tinypic.com/1zzgisp.jpg
thetoof
22nd January 2010, 18:22
mt_something = masktools2
sssharp + automttap3 - thread by *.mp4 guy iirc
The rest is google friendly...
edit - The problem is with the import command... make sure you have the complete deblock_qed script (i.e. no copy-paste error). Or save it as avsi to avoid importing manually.
EuropeanMan
22nd January 2010, 18:32
I've gotten mt_masktools-25.dll - which is what I'm NOW loading.
Unfortunately though still having problems with DeBlockQED
http://i47.tinypic.com/25heqnn.jpg
# - Replaced the ugly stackXXX cascade with mt_LutSpa() (requires MaskTools v2.0a35)
# - Changed Quant and Offset defaults to 24,28,2,4,4,8
function Deblock_QED ( clip clp, int "quant1", int "quant2",
\ int "aOff1", int "bOff1", int "aOff2", int "bOff2", int "uv" )
{
quant1 = default( quant1, 24 )
quant2 = default( quant2, 28 )
aOff1 = default( aOff1, 2 )
bOff1 = default( bOff1, 4 )
aOff2 = default( aOff2, 4 )
bOff2 = default( bOff2, 8 )
uv = default( uv, 3 ) # u=3 -> use proposed method for chroma deblocking
# u=2 -> no chroma deblocking at all (fastest method)
ox = clp.width() # u=1|-1 -> directly use chroma debl. from the normal|strong deblock()
oy = clp.height()
block = clp.mt_LutSpa(false,"x 1 + 8 % 1 < x 8 % 1 < y 1 + 8 % 1 < y 8 % 1 < | | | 255 0 ?",U=3,V=3)
# create normal deblocking (for block borders) and strong deblocking (for block interiour)
normal = clp.deblock(quant=quant1,aOffset=aOff1,bOffset=bOff1)
strong = clp.deblock(quant=quant2,aOffset=aOff2,bOffset=bOff2)
# build difference maps of both
normalD = mt_makediff(clp,normal,chroma=uv>2?"process":"ignore")
strongD = mt_makediff(clp,strong,chroma=uv>2?"process":"ignore")
# separate border values of the difference maps, and set the interiours to '128'
strongD2 = mt_lutxy(StrongD,block,expr="y 255 == x 128 ?",U=uv,V=uv)
normalD2 = mt_lutxy(normalD,block,expr="y 255 == x 128 ?",U=uv,V=uv)
# interpolate the border values over the whole block: DCTFilter can do it. (Kiss to Tom Barry!)
# (Note: this is not fully accurate, but a reasonable approximation.)
strongD3 = strongD2.mt_lut(expr="x 128 - 1.01 * 128 +",U=uv,V=uv).dctfilter(1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0)# .yv12lut("x 128 - 2 / 128 +")
# apply compensation from "normal" deblocking to the borders of the full-block-compensations calculated
# from "strong" deblocking ...
strongD4 = mt_lutxy(strongD3,normalD2,expr="y 128 == x y ?",U=uv,V=uv)
# ... and apply it.
deblocked= mt_makediff(clp,strongD4,chroma=uv>2?"process":"ignore")
# simple decisions how to treat chroma
deblocked = (uv<0) ? deblocked.mergechroma(strong) : uv<2 ? deblocked.mergechroma(normal) : deblocked
deblocked
return( last )
}
^^ my DeBlock QED avsi
EuropeanMan
22nd January 2010, 18:56
^ I got this figured out...
EuropeanMan
22nd January 2010, 19:05
Finally got everything to work...looks like this will crawl at 0.00001fps on my laptop LOL
Didée
22nd January 2010, 19:51
If you're running the script suggested by thetoof, then yes, that won't run very fast ...
I gave a quick go on good old FFT3DFilter tuned for deblocking, also with a bit of contrasharpen.
mpeg2source("F:\Downloads\blocks.demuxed.ffilm.d2v")
crop(0,48,-0,-48,true)
o = last
fft = o.fft3dfilter(sigma=16,sigma2=6,sigma3=1,sigma4=0.1,bw=16,bh=16,ow=8,oh=8,bt=3,plane=4)
fftD = mt_makediff(o,fft,U=3,V=3)
rg11D = mt_makediff(fft,fft.removegrain(20),U=3,V=3).mt_lut("x 128 - 1.49 * 128 +",U=3,V=3)
DD = mt_lutxy(fftD,rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=3,V=3)
# DD = rg11D.repair(fftD,12) # try: 14,13,12,1 # note: "1", not "11" !
fin = fft.mt_adddiff(DD,U=3,V=3)
# compare
interleave(fin.subtitle("FFT3D+resharp"),o.subtitle("source"),o.deblock(quant=32).subtitle("Deblock(32)"))
High fidelity it surely is not ... but considering the source artifacts, it seems fairly reasonable. Another advantage is that the processing will finish today or tomorrow, instead of next century.
EuropeanMan
22nd January 2010, 21:19
6 hours on my laptop to process the above sample :) with toof's script - I'm going to be an old man...and it's ONLY 1 MINUTE 5 SECONDS for the video!!!
Also Master Didee sir!
ContraSharpening from what I gather just from the word - "Negative sharpening on an already oversharpened source?". IF that's the case, what is your suggested opinion for processing some other sources (in general) that are oversharpened...and by this, I mean movies (DVD9s). Also any suggested reading here on ContraSharpening (doom9 threads)?
Thanks SO MUCH...
Didée
22nd January 2010, 21:57
ContraSharpen is an ad-hoc denomination for:
Restrict a sharpener so that it
a) only un-does what a previous smoothing filter has removed
b) does not add more than what a previous smoothing filter has removed
The exact implementation can vary. The method mt_lutxy(smoothDiff,sharpDiff,"....") is very strict, by compairing pixel-by-pixel. The method sharpDiff.repair(smoothDiff,n) acts more loosely, compairing the actual pixel with more pixels from the neighboring area. Neighorhood size depends on "n". From the possible values n=14|13|12|1, n=14 is a little less strict than the lutxy method, 13,12 are even less strict, and n=1 is the most loose.
The looser repair-method is now added to the script above, but deactivated. Swap the "#" comment to try it.
EuropeanMan
22nd January 2010, 22:42
Hi Didee - thanks for your help as always & explanation above. I suppose I'll have to find a thread to REALLY understand that :)
I ran 3 lags. Source, DeBlock + GradFun2B & your script (as is)
# UNPROCESSED
LoadPlugin("C:\Program Files\megui\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("C:\Users\xxx\Desktop\blocks.d2v", info=3)
TDecimate(cycleR=1)
blackmanresize(720,320,0,44,0,-46)
# DEBLOCK + GRADFUN2B
LoadPlugin("C:\Program Files\megui\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("C:\Users\xxx\Desktop\blocks.d2v", info=3,cpu=6)
TDecimate(cycleR=1)
Deblock(33).gradfun2db()
blackmanresize(720,320,0,44,0,-46)
degrainmedian(mode=5)
dull=last
sharp=dull.limitedsharpenfaster(strength=30, smode=4)
sootheMT(sharp,dull,50).spresso()
# FFT3D + ReSharp
TDecimate(cycleR=1)
blackmanresize(720,320,0,44,0,-46)
o = last
fft = o.fft3dfilter(sigma=16,sigma2=6,sigma3=1,sigma4=0.1,bw=16,bh=16,ow=8,oh=8,bt=3,plane=4)
fftD = mt_makediff(o,fft,U=3,V=3)
rg11D = mt_makediff(fft,fft.removegrain(20),U=3,V=3).mt_lut("x 128 - 1.49 * 128 +",U=3,V=3)
DD = mt_lutxy(fftD,rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=3,V=3)
fft.mt_adddiff(DD,u=3,v=3)
Results of one particular frame
http://i45.tinypic.com/ay0bc7.jpg
http://i45.tinypic.com/2nk8cpx.jpg
http://i50.tinypic.com/2hs3dc1.jpg
In comparing 2nd & 3rd, please notice the hands of the dancers.
It seems to ME, at least, that DeBlock/GradFun2B is 'smoother' than "FFT3D/ReSharp".
What can you say about this please? Your opinion does matter to me. Thanks :)
thetoof
22nd January 2010, 22:59
Another advantage is that the processing will finish today or tomorrow, instead of next century.:D
Throwing ideas...
It goes against the "denoising" request, but is efficient.
crop(0,48,-0,-48,true)
o = last
s=o
fft = o.fft3dfilter(sigma=16,sigma2=3,sigma3=1,sigma4=0.1,bw=16,bh=16,ow=8,oh=8,bt=3,plane=4) #tuned down sigma2 a bit - you could also add a gf2db call here, but adding grain later kills posterization anyways
fftD = mt_makediff(o,fft,U=3,V=3)
rg11D = mt_makediff(fft,fft.removegrain(20),U=3,V=3).mt_lut("x 128 - 1.49 * 128 +",U=3,V=3)
DD = mt_lutxy(fftD,rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=3,V=3)
fin = fft.mt_adddiff(DD,U=3,V=3)
fin.fft3dfilter(plane=3,bt=3,sigma=3,bw=16,bh=16,ow=8,oh=8) #reduce chroma noise (bigger splotches remain, maybe chaining another fft3d instance with bigger blocksize would help, but for speed and quality I prefer not to)
spline36resize(int(width(s)*3),int(height(s)*3)).grainfactory3().spline36resize(width(s),height(s)) # You can try values between 2 and 4 - higher = slower & smaller grain
interleave(last.subtitle("denoise + sharpen+grain"),o.subtitle("source"),fin.subtitle("denoise+sharpen"))
spline36resize(width(s)*2,height(s)*2) #to see what it'd look like...
Less blocking remains at 35.421
Hands look more natural at 58.903
Though of course, slower, but usable this time.
Some neat dehaloing would be nice too...
EuropeanMan
23rd January 2010, 01:02
toof / Didee
I'd like to know what your opinion was re: screens 2 & 3 above.
@ toof - I did run your script just now...I don't know EXACTLY what I'm looking for here as I didn't see MUCH difference between your amended script of Didee's vs. his. Sure grain looks nicer.
I suppose I'm looking at individual frames here, and when the movie actually plays...do you think your script (& Didee's) looks BETTER than say, DeBlock+GradFun2B ?
I'd like to Understand what exactly you guys are doing with those scripts. Thanks in advance for any explanation.
thetoof
23rd January 2010, 01:32
- about "smoothness": deblock + grad fun = deblock and dither (add gradient-targeted grain), while fft3d + resharp = denoise/deblock and resharpen to (try to) compensate for the "smoothing/flatening" effect of fft3d
- the difference is that the remaining artifacts are hidden by the grain, while giving an illusion of detail. On gradients, you will notice less posterization/color banding. On skin during close-ups, it'll look more natural, because will give an illusion of cracks and pores. However, it'll be a compression killer.
What Didée did was using a denoiser with different strengths depending on the frequency. sigma = highest and sigma4=lowest. Oversimplified explanation - high = small detail, low = big areas.
The awesome part of his method is that he doesn't only target blocks (as deblock(_qed) does), but also the other compression artifacts such as ringing. However, since the target is high frequency (sigma and sigma2), it also kills details. Contra-sharpening is then applied (see a) from his explanation).
What I did was adding somewhat random high frequencies (small grain, created by applying grainfactory3 on a supersampled clip) to create the illusion of detail and not only color banding correction (as gradfun2db does).
The second script I posted was done after looking at your sample, while the first was for a far more messed up anime with different needs. (nnedi to preserve the lines, sssharp uses warpsharpening which helped it look good, yadayadayada)
Anyways, that's what I get; his understanding of all this is far beyond me.
EuropeanMan
23rd January 2010, 02:19
^ That explained it well. Thanks. NOW I seem to understand what's going on :) You two rock.
I believe I liked your grain addition on a supersampled position. Will try that also on the deblock/gradfun2b script. I suppose that your guys' methods will work when the movie is actually playing...though screen by screen looks better to me (albeit lack of details) on the deblock/gradfun2b script.
Thanks again.
Didée
23rd January 2010, 02:41
Anyways, that's what I get; ... There's not more to it than what you just said. Good explanation!
Results of one particular frame
<pic>
<pic>
<pic>
In comparing 2nd & 3rd, please notice the hands of the dancers.
It seems to ME, at least, that DeBlock/GradFun2B is 'smoother' than "FFT3D/ReSharp".
Yes indeed, Deblock+Gradfun2db is smoother. That's because the combination of Mpeg2source_PP=6 PLUS Deblock PLUS DegrainMedian is a heavy steamroller, acting like a bull in a chinashop. It kills tons more detail than the script I suggested, and so it necessarily looks smoother in places. That's no miracle. If you're interested in my personal opinion - that result really looks hopelessly over-filtered. It's exactly that blurry washed-out look that typically emerges when unexperienced users only look at freezeframes @ 400% zoom, and add more and more filters until the last evidence of artifacts has been elimiated. Alongside with detail.
BTW, your application of the suggested script is slightly suboptimal - you should not resize before the FFT3D-filterchain, but afterwards instead. When resizing before, then the resize is mangling the frequencies that FFT3D is looking for. It's not that critical like it would be with a standard deblocking filter, but still, resize afterwards is better than before.
thetoof
23rd January 2010, 02:53
Some neat dehaloing would be nice too... This was a somewhat indirect request to you Didée; I have yet to find an appropriate approach for the kind of haloing this source has (basically - big radius) without blurring the whole image. Maybe some mt_convolution lines could do the trick, but I don't understand how to tweak them for now... Maybe it seems OT, but since the halos have been "revealed" by the above processing :rolleyes:
Didée
23rd January 2010, 03:07
Erhm ... in this sample, I don't see any halos that would require to take means. Could you point 'em out more clearly, to an old & half-blind dodderer like me? ;)
thetoof
23rd January 2010, 04:24
mhaha :p
[Magnifying glass]http://img85.imageshack.us/img85/6749/62645190.png
http://img215.imageshack.us/img215/8502/52373972.png[/Magnifying glass]
Actually, as you noticed it's not constant throughout the clip. I most likely jumped on the slight chance that you'd help with the big halos I first encountered 2 years ago and still haven't found a solution to. http://www.mediafire.com/?jz2igmym3vo
I can move this to another tread though.
EuropeanMan
23rd January 2010, 04:54
^ No please. I'm not only laughing...but wish to learn :)
Dogway
23rd January 2010, 20:15
Didée script works like charm. But it smooths out static scenes too. Is there a way to leave untouched low motion scenes? (With MVTools maybe?) or use (as an extension) Deblock_QED only on the low motion scenes.
EuropeanMan
23rd January 2010, 22:14
^ Yes, it would be nice if Didee's system left low motion scenes alone...I'd like to find out if it's possible to have one script, and his portion coming into effect when there is HIGH-MOTION only :) Great idea Dogway...I too noticed that when Salman's face (with black hat) came into view.
Didée
23rd January 2010, 22:36
Good question indeed. It's encouraging to see someone is following.
- The quick way is Soothe(input,deblocked,keep=0). Note that Soothe needs to be adapted for chroma processing, IIRC the official version just does a pass-through on chroma.
- The slower way is MC-Soothe (http://forum.doom9.org/showthread.php?p=1166238#post1166238) - though, for the given context, it also should be altered: ideally do FFT3D first, search vectors on that, then resharp the FFT3D, then do the soothing process.
Dogway
24th January 2010, 00:59
This is what I was trying to do, but I guess it's totally wrong, it doesnt work anyways:
o = DirectShowSource("C:\mysource.avi")
function myDeblock(clip o)
{
fft = o.fft3dfilter(sigma=16,sigma2=6,sigma3=1,sigma4=0,bw=12,bh=12,ow=6,oh=6,bt=5,plane=4,ncpu=2)
fftD = mt_makediff(o,fft,U=3,V=3)
rg11D = mt_makediff(fft,fft.removegrain(20),U=3,V=3).mt_lut("x 128 - 1.49 * 128 +",U=3,V=3)
DD = mt_lutxy(fftD,rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=3,V=3)
DD = rg11D.repair(fftD,1) # try: 14,13,12,1 # note: "1", not "11" !
fin = fft.mt_adddiff(DD,U=3,V=3)
return fin
}
vectors = o.MVAnalyse(isb = false, lambda = 1000)
compensation = o.MVCompensate(vectors, mode = 0)
compensation.myDeblock()
I tried to make the MC'ed Soothe, but that's too much for my brain and knowledge. Instead I tried Soothe, and it worked in part, it deblocked a bit only. Maybe Im lacking the chroma pass, which I dont know how to do :( This is what I have so far:
source = AssumeFPS(24).Crop(0,0,0,-8).trim(3000,5000)
o = source
fft = o.fft3dfilter(sigma=16,sigma2=6,sigma3=1,sigma4=0,bw=12,bh=12,ow=6,oh=6,bt=5,plane=4,ncpu=2)
fftD = mt_makediff(o,fft,U=3,V=3)
rg11D = mt_makediff(fft,fft.removegrain(20),U=3,V=3).mt_lut("x 128 - 1.49 * 128 +",U=3,V=3)
DD = mt_lutxy(fftD,rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=3,V=3)
DD = rg11D.repair(fftD,1) # try: 14,13,12,1 # note: "1", not "11" !
fin = fft.mt_adddiff(DD,U=3,V=3)
Soothe(source,fin,keep=0)
Didée
24th January 2010, 15:41
Instead I tried Soothe, and it worked in part, it deblocked a bit only. Maybe Im lacking the chroma pass, which I dont know how to do
The problem is that, while the general idea of Soothe does fit, the actual implementation does not fit well for this case. Point is the *smoothing* operation of Soothe (temporalsoften). That's reasonable for the original intend, calming of a sharpener. But it's not so good when trying to sieve artifacts. For this, a temporal median like Clense() should be more appropriate.
Quickly made-up scripts:
Clense-Soothe:
function SootheCl(clip sharp, clip orig, int "keep", bool "chroma")
{
Assert(sharp.width == orig.width && sharp.height == orig.height,
\ "Soothe: clip dimensions must match!")
chroma= default(chroma,false)
keep = default(keep, 24)
keep = (keep>100) ? 100 : (keep<0) ? 0 : keep
uv = chroma ? 3 : 2
KP = string(keep)
diff = mt_makediff(orig,sharp,U=uv,V=uv)
diff2 = diff.clense(reduceflicker=false)
diff3 = mt_lutxy(diff,diff2, "x 128 - y 128 - * 0 < x 128 - 100 / " + KP
\ + " * 128 + x 128 - abs y 128 - abs > x " + KP
\ + " * y 100 " + KP + " - * + 100 / x ? ?",U=uv,V=uv)
return( mt_makediff(orig,diff3,U=uv,V=uv) )
}
Use this like "SootheCl(original,deblocked,keep=0,chroma=true)".
The drawback is, of course, that it only works sufficiently in spots with absolutely zero motion. As soon as objects move just a tiny little bit, it's not effective anymore. Alas, that's the expected behaviour without motion compensation.
Full script for MC-Soothing:
mpeg2source("F:\Downloads\blocks.demuxed.ffilm.d2v")
crop(0,48,-0,-48,true)
o = last
fft = o.fft3dfilter(sigma=16,sigma2=6,sigma3=1,sigma4=0.1,bw=16,bh=16,ow=8,oh=8,bt=3,plane=4)
fftD = mt_makediff(o,fft,U=3,V=3)
rg11D = mt_makediff(fft,fft.removegrain(20),U=3,V=3).mt_lut("x 128 - 1.49 * 128 +",U=3,V=3)
DD = mt_lutxy(fftD,rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=3,V=3)
fin = fft.mt_adddiff(DD,U=3,V=3)
fftsup=fft.MSuper()
bv = fftsup.MAnalyse(isb=true,blksize=16,overlap=8,truemotion=false)
fv = fftsup.Manalyse(isb=false,blksize=16,overlap=8,truemotion=false)
finD=mt_makediff(o,fin,U=3,V=3)
osup=o.MSuper()
interleave(o.MCompensate(osup,fv,thSCD1=255,thSCD2=255),fin,o.MCompensate(osup,bv,thSCD1=255,thSCD2=255))
raw=Clense(reduceflicker=false).selectevery(3,1)
rawD=mt_makediff(raw,fin,U=3,V=3)
rawDD=mt_lutxy(rawD,finD,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=3,V=3)
fin2=fin.mt_adddiff(rawDD,U=3,V=3)
interleave(o.subtitle("source"),fin.subtitle("FFT3D+resharp"),fin2.subtitle("FFT3D+resharp+SootheMC"))
Note this is not a straightforward MC-addition to Soothe. In the 2nd part of the script, somehow it seemed more practical to use the backdoor instead of the front entrance. Also, the result isn't outstandingly impressive on lowmotion scenes. Well, just try and judge for yourself if it's feasable. At least, it is technically correct. ;)
EuropeanMan
24th January 2010, 18:33
^ I must ask WHY you & toof are FORCE-FILMING this? Is that preferable to doing Min5 decimation?
Nightshiver
24th January 2010, 19:51
Did you not read the first reply to this thread? Your sample does not need min5 decimation or decimation of any kind. There isn't any interlacing, it just simply needs to be force filmed to 23.976
EuropeanMan
24th January 2010, 20:11
I read THAT part...but when I look at the frames, i see a dupe of every 4th with 5th frames...which to ME, requires M in 5 decimation. I don't understand the WHY of force filming...THAT is my question
Dogway
24th January 2010, 20:33
Clense-Soothe didnt work great at all for my source, I dont know but it didnt deblock enough.
btw you meant "SootheCl(original,deblocked,keep=0,chroma=true)", right?
The MC'ed Soothe works much much better, just like I expected. I didnt understand a thing of the code but, I realised that it is dependet on motion speed, so the effect is gradually applied.
I also noticed that that way of deblocking is based on difference, so I thought adding a deblocking line for the source wouldnt hurt that much, so I can get rid of the static blocking too. It also enhaced the blocking parts as well.
I ended up with this code, Im fine with it although I might be overdone something.
Deblock_QED()
AssumeFPS(24)
Crop(0,0,0,-8)
trim(3000,5000)
Tweak(sat=1.05)
colorYUV(cont_y=10, cont_u=0, cont_v=0,gamma_y=0,gain_y=0)
o = last
fft = o.fft3dfilter(sigma=16,sigma2=6,sigma3=1,sigma4=0,bw=12,bh=12,ow=6,oh=6,bt=5,plane=4)
fftD = mt_makediff(o,fft,U=3,V=3)
rg11D = mt_makediff(fft,fft.removegrain(20),U=3,V=3).mt_lut("x 128 - 1.49 * 128 +",U=3,V=3)
DD = mt_lutxy(fftD,rg11D,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=3,V=3)
DD = rg11D.repair(fftD,1) # try: 14,13,12,1 # note: "1", not "11" !
fin = fft.mt_adddiff(DD,U=3,V=3)
fftsup=fft.MSuper()
bv = fftsup.MAnalyse(isb=true,blksize=16,overlap=8,truemotion=false)
fv = fftsup.Manalyse(isb=false,blksize=16,overlap=8,truemotion=false)
finD=mt_makediff(o,fin,U=3,V=3)
osup=o.MSuper()
interleave(o.MCompensate(osup,fv,thSCD1=255,thSCD2=255),fin,o.MCompensate(osup,bv,thSCD1=255,thSCD2=255))
raw=Clense(reduceflicker=false).selectevery(3,1)
rawD=mt_makediff(raw,fin,U=3,V=3)
rawDD=mt_lutxy(rawD,finD,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?",U=3,V=3)
fin2=fin.mt_adddiff(rawDD,U=3,V=3)
interleave(o.subtitle("source"),fin.subtitle("FFT3D+resharp"),fin2.subtitle("FFT3D+resharp+SootheMC"))
fin2
LimitedSharpenFaster(Smode=4, strength=40, edgemode=1, soft=-1)
GradFun2DBmod(thr=1.6,thrC=1.2,str=0.8,strC=0.4,radius=3,range=3,mode=3,temp=-1,mask=true,adapt=64)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.