Log in

View Full Version : TDecimate vs. Srestore?


Vitality
17th January 2019, 23:42
This is my IVTC script using TDecimate:
Q = QTGMC(Preset="Medium", FPSDivisor=2)
TFM(D2V="%source_file%", slow=2, cthresh=4, mi=25, clip2=Q)
TDecimate(mode=1)


And using Srestore:
Q = QTGMC(Preset="Medium", FPSDivisor=2)
TFM(D2V="%source_file%", slow=2, cthresh=4, mi=25, clip2=Q)
LoadPlugin("J:\StaxRip-x64-2.0.0.0\Apps\Plugins\avs\GRunT\GRunT.dll")
Import("J:\StaxRip-x64-2.0.0.0\Apps\Srestore.avsi")
Srestore(frate=23.976)


When I used TDecimate, I got some sort of weird chroma ghosting on one frame. Srestore didn't cause that. https://i.imgur.com/HXc96LC.png

But there seems to be some sort of weird issue in a panning shot. Here's the VOB:
https://cdn.discordapp.com/attachments/523989191030210603/535585221462982656/VTS_06_1.demuxed.m2v
https://cdn.discordapp.com/attachments/523989191030210603/535589656256053249/srestore.mkv

Is it just me, or is the panning shot in the Srestore a lot worse than the VOB? What is causing this?

FranceBB
18th January 2019, 06:41
There's no need to use SRestore, you can use TDecimate.

Indexed sample with DGIndex:
https://i.imgur.com/GVBwu0q.png

Original telecined footage shown by Mpeg2Source:
https://i.imgur.com/quMkeSd.png

IVTC frame with tdeint + tdecimate:
https://i.imgur.com/JqskT7i.png

Unfortunately, since I'm at work, I can only encode XDCAM-50 PAL files, but anyway, this should do it:


#Indexing
MPEG2Source("VTS_06_1.demuxed.d2v")

#Inverse telecine
tfm(mode=1,pp=5,slow=2,micmatching=2,clip2=tdeint(mode=2,type=3))
TDecimate(mode=2, rate=23.976)

#Cropping inactive lines
Crop(4, 4, -4, -4)

#Preserving 4:3 AR with 16:9 1.33 PB resolution
AddBorders(62, 0, 62, 0)

#4% PAL speed-up
AssumeFPS(25, 1, true)

#Antialiasing
maa2(mask=1, chroma=true, ss=2.0, aa=70, show=0)

#Denoise
TNLMeans(Ax=4, Ay=4, Az=0, Sx=2, Sy=2, Bx=1, By=1, ms=false, rm=4, a=1.0, h=0.5, sse=false)

#Converting BT.601 to BT.709
ColorMatrix(mode="Rec.601->Rec.709", clamp=true, interlaced=false, threads=0, thrdmthd=0, opt=3)

#Upscale
LanczosResize(1920, 1080)

#Clipping
Limiter(min_luma=16, max_luma=235, min_chroma=16, max_chroma=240)

#Converting from 4:2:0 planar to 4:2:2 planar
Converttoyv16(interlaced=false)


https://i.imgur.com/vU6iRKH.jpg

Encoded sample: https://we.tl/t-xoe4y6XDoq

It doesn't look bad, actually.
Anyway, since there's no need to use XDCAM-50 PAL as output format, just avoid the PAL speed-up (with eventual pitch adjustment) and ignore the 4:2:2 planar conversion; as to the upscale, you would be better off with NNEDI3 but I suggest you not to go over HD (1280x720), 'cause there's really no need to go to FULL HD like I did, unless you have to prepare something for air-time. Anyway, as I said, since I'm at work, I *had* to encode in XDCAM-50 PAL FULL HD.

Cheers,
Frank.

hello_hello
21st January 2019, 19:18
Is it just me, or is the panning shot in the Srestore a lot worse than the VOB? What is causing this?

Srestore is designed to remove field blending and you'd normally bob de-interlace first
ie de-interlace to 59.94fps followed by SRestore.
You don't want to de-interlace so it's not the right tool for the job.