krieger2005
10th February 2005, 15:50
Hi,
i will present you a script for Avisynth for DeInterlacing, with wich i had very good results:
function SecDeInt(clip c, int "ord", int "thres", int "weight", bool "mask"){
thres=default(thres,2)
weight=default(weight,6)
ord=default(ord,1)
mask=default(mask,false)
c
#a1=KernelDeInt(order=ord, sharp=true)
a1=TomsMoComp(ord,30,0)
#a2=SangNom(ord,10)
a2=KernelDeInt(order=ord, sharp=true)
b=a1.KernelDeInt(order=1, sharp=true, threshold=thres)
c=a1.KernelDeInt(order=0, sharp=true, threshold=thres)
E="x y - abs "+string(weight)+" > 255 0 ?"
d=YV12LUTxy(b,c,YExpr=E, VExpr=E, UExpr=E, Y=3,U=3,V=3).inflate
ret=MaskedMerge(a1, a2,d,Y=3,U=3,V=3)
mask ? d : ret
}
Usage: SecDeInt
ord=1 -> TFF, 0 -> BFF
thres=0..X -> this should be cleared with the "mask=true" option
weight -> lower values will produce more blendpoints where "a2" will be blended in (so this is the artefact-factor), so if you have deinterlacing-Artefacts lower weight.
mask -> show you, which parts were blended
I use this funktion, when KernelDeInt and still FildDeinterlace produce deinterlacing artefacts. However, this function use twice KernelDeInt, once TomsMoComp and once Sangnom, so it is slow...
Try it and let me know what do you think about it. Maybe there are suggestions how to improve this function?
greets
krieger2005
i will present you a script for Avisynth for DeInterlacing, with wich i had very good results:
function SecDeInt(clip c, int "ord", int "thres", int "weight", bool "mask"){
thres=default(thres,2)
weight=default(weight,6)
ord=default(ord,1)
mask=default(mask,false)
c
#a1=KernelDeInt(order=ord, sharp=true)
a1=TomsMoComp(ord,30,0)
#a2=SangNom(ord,10)
a2=KernelDeInt(order=ord, sharp=true)
b=a1.KernelDeInt(order=1, sharp=true, threshold=thres)
c=a1.KernelDeInt(order=0, sharp=true, threshold=thres)
E="x y - abs "+string(weight)+" > 255 0 ?"
d=YV12LUTxy(b,c,YExpr=E, VExpr=E, UExpr=E, Y=3,U=3,V=3).inflate
ret=MaskedMerge(a1, a2,d,Y=3,U=3,V=3)
mask ? d : ret
}
Usage: SecDeInt
ord=1 -> TFF, 0 -> BFF
thres=0..X -> this should be cleared with the "mask=true" option
weight -> lower values will produce more blendpoints where "a2" will be blended in (so this is the artefact-factor), so if you have deinterlacing-Artefacts lower weight.
mask -> show you, which parts were blended
I use this funktion, when KernelDeInt and still FildDeinterlace produce deinterlacing artefacts. However, this function use twice KernelDeInt, once TomsMoComp and once Sangnom, so it is slow...
Try it and let me know what do you think about it. Maybe there are suggestions how to improve this function?
greets
krieger2005