Avisynth: Error with the Optimize Optimal Script? - digitalFAQ.com Forums [Archives]
 digitalFAQ.com Forums [Archives] Avisynth: Error with the Optimize Optimal Script?

#1
07-01-2003, 12:05 PM
 audioslave Free Member Join Date: Mar 2003 Location: Sweden Posts: 725 Thanks: 0 Thanked 0 Times in 0 Posts

Quote:
 Evaluate: division by zero ([ScriptClip], line 4 )
What does this mean? If I start a prediction I also get an error in TMPGEnc...
__________________
AudioSlave
Someday, 12:01 PM
 Site Staff / Ad Manager Join Date: Dec 2002 Posts: 42 Thanks: ∞ Thanked 42 Times in 42 Posts
#2
07-01-2003, 12:07 PM
 jorel Invalid Email / Banned / Spammer Join Date: Aug 2002 Location: Brasil - MG - third stone from the sun Posts: 5,570 Thanks: 0 Thanked 0 Times in 0 Posts
copy the script again...some changes(to better).

#3
07-01-2003, 12:09 PM
 audioslave Free Member Join Date: Mar 2003 Location: Sweden Posts: 725 Thanks: 0 Thanked 0 Times in 0 Posts
Yeah, I saw that. Thanks mate!
__________________
AudioSlave
#4
07-01-2003, 06:02 PM
 Dialhot Free Member Join Date: May 2003 Posts: 10,463 Thanks: 0 Thanked 0 Times in 0 Posts
I apologize for this "divide by zero" error, I should have check this.

But this point me to an other problem that the solution found by Kwag introduces :

round(YDifferenceToNext()+1) always gives values >= 1

So round(1/nf) and round(3/nf) will produce only TWO values : 0 or 1.

I'm sorry, I didn't saw that before

I think that the better solution (for speed and accuracy) is :

Code:
```ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= 2 ? \
unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \
TemporalSoften(4, round(1/nf) , round(3/nf) ,0, 2) ")```
(until Kwag give us its advice on temporalcleaner )
#5
07-01-2003, 06:11 PM
 jorel Invalid Email / Banned / Spammer Join Date: Aug 2002 Location: Brasil - MG - third stone from the sun Posts: 5,570 Thanks: 0 Thanked 0 Times in 0 Posts
thanks again Phil.

... waiting for Kwag advice on temporalcleaner
#6
07-01-2003, 08:02 PM
 vhelp Free Member Join Date: Jan 2003 Posts: 1,009 Thanks: 0 Thanked 0 Times in 0 Posts
.
.
Well, I've ben asking for a "different" smoother or noise or whatever you
wanna call it, in my previous requests. Now that someone else has asked
for it, maybe we will see something "better", then the currently used
TemporalSoften in the MA script

-vhelp
#7
07-01-2003, 09:50 PM
 kwag Free Member Join Date: Apr 2002 Location: Puerto Rico, USA Posts: 13,537 Thanks: 0 Thanked 0 Times in 0 Posts
Quote:
 Originally Posted by Dialhot I apologize for this "divide by zero" error, I should have check this.
Don't while doing math
Quote:
 (until Kwag give us its advice on temporalcleaner )
Working on it

-kwag

 Similar Threads Thread Thread Starter Forum Replies Last Post mistermickster Avisynth Scripting 2 08-01-2003 09:36 AM black prince Avisynth Scripting 1 07-09-2003 04:43 PM Dialhot Avisynth Scripting 3 06-14-2003 12:17 PM telemike Avisynth Scripting 3 06-11-2003 08:33 AM beany101uk Video Encoding and Conversion 1 05-14-2003 04:06 PM