View Full Version : TdeintTMMnnedi2 - how for mode=0
Terka
14th November 2009, 20:22
following function is for output 50fps
function TdeintTMMnnedi2(clip c)
{
GetParity(c) ? AssumeTFF(c) : AssumeBFF(c)
Tdeint(c,mode=1,emask=TMM(mode=1),edeint=nnedi2(c,field=-2))
}
when using
tdeint()
you get 25 fps. but its without the TMM and nnedi2.
How to modify TdeintTMMnnedi2 to work with TMM and nnedi2 and
mode=0
(Dont want to make TdeintTMMnnedi2().selecteven())
tritical
15th November 2009, 06:55
Tdeint(emask=TMM(),edeint=nnedi2())
doesn't work?
Terka
15th November 2009, 08:09
no. sorry. got error:
width and height of edeint clip must equal that of the input clip.
tritical
15th November 2009, 19:48
Post your whole script.
avisource()
tdeint(emask=TMM(),edeint=nnedi2())
works for me. For width or height of edeint clip to not match, nnedi2 must be getting fed with different input than tdeint.
Terka
16th November 2009, 11:08
Hi Tritical thank you for answer.
avisource("aaa.avi")
tdeint(emask=TMM(),edeint=nnedi2())
works now.
Error on my side because i played with the fields:
Tried to depan the fields to catch the global motion, to help the
deinterlacer (see below):
# a try to make an deinterlacer based on global motion compensation (provided by depan)
# idea: create global motion compensation BACKWARD and FORWARD
loadplugin("C:\Program Files\AviSynth\plugins\mvbobmod\TMM.dll")
clp = avisource("c:\Program Files\AviSynth\plugins\volejbal.avi")
sf = clp.SeparateFields().ocisluj()
nn = clp.nnedi2(field=-2).ocisluj()
#depan settings
matchfields =false
#create of global mo-compensated fields
sfBwd = sf.GlobalMOCO(prev=1,next=0,matchfields =matchfields).Subtitle("sfBwd").SelectEvery(2,0) #urcite dobre
sfFwd = sf.GlobalMOCO(prev=0,next=1,matchfields =matchfields).Subtitle("sfFwd").SelectEvery(2,1) #urcite dobre
#weave the original and mo-compensated fields together
interleaveFwd=Interleave(sf,sfFwd).weave()
interleaveBwd=Interleave(sf,sfBwd).weave()
#tried bob the interleaved
interleaveBwd.tdeint(mode=1, type=2) .SelectEvery(4, 1,0).vinverse()
#interleaveBwd.Tdeint(mode=1,emask=TMM(mode=1),edeint=nnedi2(field=-2)) #double rate deinterlace
#interleaveBwd. tdeint(emask=TMM(),edeint=nnedi2()) #same rate deinterlace
stackhorizontal(sfBwd,sf,sfFwd)
Interleave(sfBwd,sf,sfFwd) . weave() #.AssumeFrameBased().AssumeBFF()
tdeint(emask=TMM(),edeint=nnedi2()) #same rate
# fce ##############################################################
function GlobalMOCO (clip clp, int "prev", int "next", int "subpixel", bool "matchfields", float "pixaspect", bool "info")
{
#input has to be ConvertToYV12()
#
prev = default( prev , 0 )
next = default( next , 1 )
subpixel = default( subpixel , 2 ) #quality of matching 0-2
#matchfields = default( matchfields, False ) # xxx todo ale neni to stejny!
matchfields = default( matchfields, True ) # xxx todo
pixaspect = default( pixaspect , 1.094 ) #PAL
info = default( info , false ) #PAL
# procedure ##############
mdata = DePanEstimate (clp) #motion data
depa = DePanInterleave(clp, data=mdata, matchfields =matchfields,prev=prev, next=next,pixaspect=pixaspect,subpixel=subpixel,info=info)
return (depa)
}
function ocisluj (clip c)
{
ShowFrameNumber(c,x=10, y=45, font="arial", size=24, text_color=$c00000)
}
but now im getting the TMM error: input clip cannot be field based. What parameter is wrong?
Didée
16th November 2009, 12:28
Interleave(sfBwd,sf,sfFwd) . weave()
That's not good. You should/must not interleave *three* different fields when you're going to weave the fields together. Either 2 fields, or 4, or 6, or 8, ...
With 3 fields to interleave, Avisynth produces ~something~, but probably not that what you are expecting.
Worse, you won't get away with just one pair of compensated fields. TDeint per default uses 5-field-motioncheck, so you'd have to interleave with either -2/+3 or -3/+2 compensated fields. TMM does a 6-field-motioncheck (per docu, it's not quite clear to me how 6-field-check is working), so you'd have to interleave either -3/+4 or -4/+3 compensated fields. (Yes, that's lots of compensations:D )
Terka
16th November 2009, 13:49
Didee,
yes, tried 'the best for me'.
already read that TMM cant be set to do less than 6 (at least in doc).
Ill keep trying.
Terka
16th November 2009, 14:17
but some eg. KernelDeint can handle this
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.