Mug Funky
26th August 2004, 14:23
hi. i'm currently playing with using telecide as a fallback option for smartdecimate, so i needn't do bobbing at all on film material.
i've got something that works in a script, but when i put it in an external function, i get access violations after 3 frames... when i comment out smartdecimate all is well, and if i use the same code in script, all is well.
is this a C plugin thing, and are there workarounds for it?
by the way, here's the code in case anyone's interested :)
loadCplugin("c:\mediatools\avisynth 2.5\Cplugins\SmartDecimate.dll")
function DoubleTelecide(clip c, bool "post")
{
post = default(post,true)
order = (c.getparity==true)? 1 : 0
odd = (post==true)? c.doubleweave().selectodd().telecide(order=order,guide=1,hints=true).kerneldeint(order=0,threshold=3) :
\ c.doubleweave().selectodd().telecide(order=1-order,guide=1,post=0)
even = (post==true)? c.doubleweave().selecteven().telecide(order=order,guide=1,hints=true).kerneldeint(order=1,threshold=3) :
\ c.doubleweave().selecteven().telecide(order=order,guide=1,post=0)
return interleave(even,odd)
}
function IVTCboy(clip c, int "num", int "den", bool "post")
{
num = default(num,24)
den = default(den,60)
post = default(post,false)
b=c.doubletelecide(post=post)
c.smartdecimate(num,den,bob=b)
}
i've got something that works in a script, but when i put it in an external function, i get access violations after 3 frames... when i comment out smartdecimate all is well, and if i use the same code in script, all is well.
is this a C plugin thing, and are there workarounds for it?
by the way, here's the code in case anyone's interested :)
loadCplugin("c:\mediatools\avisynth 2.5\Cplugins\SmartDecimate.dll")
function DoubleTelecide(clip c, bool "post")
{
post = default(post,true)
order = (c.getparity==true)? 1 : 0
odd = (post==true)? c.doubleweave().selectodd().telecide(order=order,guide=1,hints=true).kerneldeint(order=0,threshold=3) :
\ c.doubleweave().selectodd().telecide(order=1-order,guide=1,post=0)
even = (post==true)? c.doubleweave().selecteven().telecide(order=order,guide=1,hints=true).kerneldeint(order=1,threshold=3) :
\ c.doubleweave().selecteven().telecide(order=order,guide=1,post=0)
return interleave(even,odd)
}
function IVTCboy(clip c, int "num", int "den", bool "post")
{
num = default(num,24)
den = default(den,60)
post = default(post,false)
b=c.doubletelecide(post=post)
c.smartdecimate(num,den,bob=b)
}