Log in

View Full Version : Understanding the Effect of SMDegrain SD


MysteryX
16th July 2016, 04:32
I'm still working on my script to upscale 288p VCD into 768p videos. Something I just changed is to tune the KNLMeans denoiser way down as it was blurring the picture too much and the SuperRes algorithm update makes it softer and more tolerant to noise. Plus if I'm applying 2 denoisers, they have to be applied more softly.

I apply the work in this order: KNLMeans, Double, SMDegrain, InterFrame, Double.

Inserting SMDegrain at the beginning kills too much detail, and applying it after a frame double does seem to help... but I'm really not sure what it's actually doing. Shapening must be enabled for it to give good results... and what does it do besides that sharpening? Is SMDegrain's operation affected by doing it right after a frame double that "softens" the picture? Sometimes I see details becoming a little bit clearer, sometimes I see it randomly transforming noise, and sometimes I really don't see much difference at all.

So yeah, what does SMDegrain do exactly and how can I make the best use of it in this context?


file="VCD.mpg"
LWLibavVideoSource(file, cache=False)
AudioDub(LWLibavAudioSource(file, cache=False))
Crop(4, 32, -4, -28)
Dither_convert_8_to_16()
Dither_resize16nr(Width, Height/2, kernel="Spline36", csp="YV24", cplaces="MPEG1")
KNLMeansCL(D=2, A=2, h=0.6, cmode=true, device_type="GPU", device_id=0, lsb_inout=true)
SuperResXBR(5, 1, 0, XbrStr=2.7, XbrSharp=1.3, MatrixIn="Rec601", lsb_in=true, lsb_out=true)
Dither_resize16nr(Width, Height/2, kernel="Spline36", csp="YV12")
SMDegrain(thsad=100, prefilter=1, contrasharp=true, lsb_in=true, lsb_out=true)
DitherPost(mode=6)
InterFrame(Cores=8, Tuning="Smooth", NewNum=60, NewDen=1, GPU=true)
Dither_convert_8_to_16()
Dither_resize16nr(Width, Height/2, kernel="Spline36", csp="YV24")
SuperResXBR(3, 1, 0, XbrStr=2.7, XbrSharp=1.3, fWidth=1288, fHeight=784, fKernel="Bicubic", fB=0, fC=.75, FormatOut="YV12", lsb_in=true)
ResizeX(1280, 768, 4, 8, -4, -8)
Prefetch(8)

MysteryX
17th July 2016, 04:54
I'm getting the impression that with the upscaler's softening, if SMDegrain is too low (100-200), it doesn't do much but sharpening. It's it's a little bit higher (200-500), it sharpens too much. And if it's too high (500+), then it blurs things too much.

Perhaps because there's a threshold of neighbor pixel contrasts that must be reached for it to take effect and the upscaling makes it so that it only starts to kick in at a certain strength?

FranceBB
25th July 2016, 19:56
Dunno, but I tried playing with it a bit, and it seems I get ghosting no matter what...

SMDegrain(tr=5, thSAD=50, thSADC=20, contrasharp=true, RefineMotion=true, plane=4, Interlaced=false, lsb_in=true, lsb_out=true)


p.s AR is wrong, I know, but that's just a test with an old DVD, so I don't really care...

http://ft.trillian.im/60370e90cb2f6ffd369eaa0d0caa4632c7d3dd08/6JgTNFlLPNqTWsfMy0uOPMAZURlz3.png