View Single Post
Old 12th September 2020, 09:54   #5  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
What Hybrid offers is using QTGMC as alternative to the internal deinterlaced during IVTC.
What ChaosKing does is to identify the still combed frames (using tdm.isComded; tdm is part of the TDeintMod filter) after IVTC and apply QTGMC on those.
-> he purposes an additional step after the normal IVTC (independent of whether QTGMC is used during IVTC or not)
Also note that:
a. Hybrid addresses havsfunc through 'hasfunc' while ChaosKing addresses it through 'haf'
b. Hybrid uses 'FPSDivisor=2' which ChaosKing uses '.std.SelectEvery( cycle=2, offsets=0)'
c. Hybrid uses 'TFF=False' while ChaosKing uses 'TFF=True' in QTGMC
c. note that your script needs 'import functools' which Hybrid doesn't import by default.
in case you try to add his proposal as a custom addition to the Vapoursynth script in Hybrid.

So one could combine those two and use QTGMC for both the deinterlacing during IVTC and for the additional decombing and would have something like:
Code:
clip = core.d2v.Source(input="E:/Temp/mpg_2bcf42122044faeeeecd635342234255_853323747.d2v")
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 29.970
clip = core.std.AssumeFPS(clip, fpsnum=30000, fpsden=1001)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
clip2clip=clip
clip2clip = havsfunc.QTGMC(Input=clip2clip, Preset="Very Slow", opencl=True, TFF=False,FPSDivisor=2)
clip = core.vivtc.VFM(clip=clip, clip2=clip2clip, order=0, mode=1)
clip = core.vivtc.VDecimate(clip=clip, clip2=clip2clip)# new fps: 23.976
# Fix combed frames
# adding helper function
def conditionalDeint(n, f, orig, deint):
    if f.props._Combed:
        return deint
    else:
        return orig
clipDeint = havsfunc.QTGMC(Input=clip, Preset="Very Slow", opencl=True, TFF=False, TR2=1, SourceMatch=3, FPSDivisor=2)
clipCombProps = core.tdm.IsCombed(clip=clip, blockx=32, blocky=32)
clip = core.std.FrameEval(clip=clip, eval=functools.partial(conditionalDeint, orig=clip, deint=clipDeint), clipCombProps)
but even when using nnedi3cl instead of nnedi3 or znnedi3 this will probably terribly slow,.... (as to be expected when using QTGMC 'very slow' two times.


Cu Selur
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 12th September 2020 at 12:14.
Selur is offline   Reply With Quote