Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd February 2006, 06:18   #1  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,863
conditionalfilter

Hi,
this is my first filter. I'm trying to duplicate decomb in script form, this is very rough but something like:
#decomb as a script
clip=avisource("test.avi")
weave=weave(clip)
bob=tdeint(clip)
conditionalfilter(weave,bob,weave,"IsCombed()","equals","true")

I'm not sure if conditialfilter works on every frame or I need frameevaluate somehow. I want to pick a frame from the weave or bob clips depending on iscombed. It's that simple.

Next question, how do I make it a function I can pass a clip to.
Next question, put iscombed into a variable because I need to work on two clips at once.
I want to return frames from weave1 and weave2, or bob1 and bob2, which will get merged later.

thx
jmac698 is offline   Reply With Quote
Old 3rd March 2006, 09:56   #2  |  Link
MOmonster
Registered User
 
Join Date: May 2005
Location: Germany
Posts: 495
I donīt really understand the reason for this function. Using tdeint as postprocessor after a weaving is no problem. Also your function doesnīt simulate decomb, itīs just something like tdeint(full=false).
If you want to put your script into a function you can do it this way:
Code:
function decombscript(clip "deint", clip "weaved")
{
clipre = conditionalfilter(weaved,deint,weaved,"IsCombed()","equals","true")
return(clipre)
}
(not tested)
And then you use the function this way:
Code:
clip=avisource("test.avi")

decombscript(weaved=weave(clip), deint=tdeint(clip))
I marked the important things of the function. I hope this helps you.

Edit:
I like scriptclip more for this conditional decissions because the more possibilities:
Code:
conditionalfilter(weaved,deint,weaved,"IsCombed()","equals","true")
is similar to:
scriptclip(last, "iscombed(weaved)==true ? deint : weaved")

Last edited by MOmonster; 3rd March 2006 at 10:02.
MOmonster is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:40.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.