Log in

View Full Version : Avisynth open failure: I don't know what "a" means


php111
25th October 2008, 18:32
I am trying a script using SeeSaw. I understand my script is very slow without the SeeSaw. A few questions. Slow is not a big deal for me.

1.) With my script, should I add SeeSaw?

2.) If yes above. How can I fix my error?

Here is the error:

Avisynth open failure: I don't know what "a" means.

Here is my script.



LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFT3DFilter.dll")
AVISource("H:\The Breakfast Club (1985)\video.avi")
LanczosResize(640,352)
Converttoyv12()
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
source=last
denoised=FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
backward_vec2 = MVAnalyse(denoised,isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
backward_vec1 = MVAnalyse(denoised,isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec1 = MVAnalyse(denoised,isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec2 = MVAnalyse(denoised,isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
MVDegrain2(source,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)

thetoof
25th October 2008, 18:43
Without a sample, it's hard to say if you really need all that processing...

a and b are not defined

a should be your source and b a predenoised clip to use instead of the internal predenoise of seesaw. b is optional

Something like
...
a=Converttoyv12()
b=a.somedenoiser
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
...

php111
25th October 2008, 18:47
I don't understand. Do you want me to get rid of a and b? That is the impression I get, or else I have no clue. I don't know how to upload clips. I am not ready to learn. I only know how to upload screenshots. Example: I know how to upload a screenshot of a tool or program.









Without a sample, it's hard to say if you really need all that processing...

a and b are not defined

a should be your source and b a predenoised clip to use instead of the internal predenoise of seesaw. b is optional

Something like
...
a=Converttoyv12()
b=a.somedenoiser
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
...

thetoof
25th October 2008, 18:50
No, I'm telling you that you tell avisynth to use "a" for the clip to be filtered by seesaw and "b" for the prefiltered clip to use instead of seesaw's prefilter, but you never tell avisynth what they are.

with the example script I gave you (a= + b=), you tell avisynth what they are (as you did with source=last & denoised=)

php111
25th October 2008, 18:54
Now, it doesn't know what "video"means. I must be doing this right.



LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFT3DFilter.dll")
AVISource("H:\The Breakfast Club (1985)\video.avi")
LanczosResize(640,352)
Converttoyv12()
SeeSaw(video.avi,video.avi, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
source=last
denoised=FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
backward_vec2 = MVAnalyse(denoised,isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
backward_vec1 = MVAnalyse(denoised,isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec1 = MVAnalyse(denoised,isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec2 = MVAnalyse(denoised,isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
MVDegrain2(source,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)

thetoof
25th October 2008, 19:37
No!!!
First, every time you load something in avisynth, you must use xxsource (like you did with avisource("your file.avi")

a and b must be defined within the script, like what I gave you...... you can't use the same file for input and predenoised since doing this disables predenoising (mandatory for seesaw)

The complete script would be:

AVISource("H:\The Breakfast Club (1985)\video.avi")
LanczosResize(640,352)
Converttoyv12()
a=last
b=a.add your denoiser here!!
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
source=last
denoised=FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
backward_vec2 = MVAnalyse(denoised,isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
backward_vec1 = MVAnalyse(denoised,isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec1 = MVAnalyse(denoised,isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec2 = MVAnalyse(denoised,isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
MVDegrain2(source,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)

stickboy
25th October 2008, 20:21
I am not ready to learn.Then how do you expect us to help you?

php111
25th October 2008, 20:21
I still don't understand. a what? b what? I did. I put video.avi in. video is my file with no sound. It's DeMuxed. So, what am I doing wrong? Nothing. I don't know what to put in.

Didée
25th October 2008, 20:38
Like stickboy said,
I am not ready to learn.
with such an attitude, there's no point. If anything beyond "just tell me which knob I must press" is too much, then you better let it be.


But what the heck. A technically valid filter chain would be e.g.
AVISource("H:\The Breakfast Club (1985)\video.avi")
LanczosResize(640,352)
Converttoyv12()
a = last
b = a.FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
c = SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)

backward_vec2 = b.MVAnalyse(denoised,isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
backward_vec1 = b.MVAnalyse(denoised,isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec1 = b.MVAnalyse(denoised,isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec2 = b.MVAnalyse(denoised,isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)

c.MVDegrain2(source,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)
Note: this kind of processing might be okay, but it could just as well be horribly wrong. Judging if some kind of filtering is suited or not is impossible without having seen the source. (It's like asking if some medicine will help or not, but not telling what one is suffering from.)

php111
25th October 2008, 23:02
There is no function named "SeeSaw". Does that mean, I need to import SeeSaw? I will post my script below along with a screenshot of the error.




LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFT3DFilter.dll")
AVISource("H:\The Breakfast Club (1985)\video.avi")
LanczosResize(640,352)
Converttoyv12()
a = last
b = a.FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
c = SeeSaw(a, b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
denoised=FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
backward_vec2 = MVAnalyse(denoised,isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
backward_vec1 = MVAnalyse(denoised,isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec1 = MVAnalyse(denoised,isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec2 = MVAnalyse(denoised,isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
MVDegrain2(source,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)






Like stickboy said,

with such an attitude, there's no point. If anything beyond "just tell me which knob I must press" is too much, then you better let it be.


But what the heck. A technically valid filter chain would be e.g.
AVISource("H:\The Breakfast Club (1985)\video.avi")
LanczosResize(640,352)
Converttoyv12()
a = last
b = a.FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
c = SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)

backward_vec2 = b.MVAnalyse(denoised,isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
backward_vec1 = b.MVAnalyse(denoised,isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec1 = b.MVAnalyse(denoised,isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec2 = b.MVAnalyse(denoised,isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)

c.MVDegrain2(source,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)
Note: this kind of processing might be okay, but it could just as well be horribly wrong. Judging if some kind of filtering is suited or not is impossible without having seen the source. (It's like asking if some medicine will help or not, but not telling what one is suffering from.)

Guest
26th October 2008, 00:21
There is no function named "SeeSaw". Does that mean, I need to import SeeSaw? Yes, that is correct.

php111
26th October 2008, 01:10
Yes, that is correct.


neuron2,


Which of these lines do I save to import, or all of them?





# SeeSaw v0.3e (02 Jan 2006)
#
# (Full Name: "Denoiser-and-Sharpener-are-riding-the-SeeSaw" )
#
# This function provides a (simple) implementation of the "crystality sharpen" principle.
# In conjunction with a user-specified denoised clip, the aim is to enhance
# weak detail, hopefully without oversharpening or creating jaggies on strong
# detail, and produce a result that is temporally stable without detail shimmering,
# while keeping everything within reasonable bitrate requirements.
# This is done by intermixing source, denoised source and a modified sharpening process,
# in a seesaw-like manner.
#
# This version is considered alpha.
#
# Usage:
#
# a = TheNoisySource
# b = a.YourPreferredDenoising()
# SeeSaw( a, b, [parameters] )
#
# You're very much encouraged to feed your own custom denoised clip into SeeSaw.
# If the "denoised" clip parameter is omitted, a simple "spatial pressdown" filter is used.
#
#
# Fiddled together by Didée, for your pleasure.
#


# ======= Main function =======

function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "SdampLo", float "SdampHi", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
SdampLo = default( SdampLo, Spower+1 ) # reduces overdrive sharpening for very small changes
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.

Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
SdampLo = SdampLo / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )

ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
#ZRP = string( abs(Szp) )
#PWR = string( abs(Spower) )
#DMP = string( SdampLo )

denoised = defined(denoised) ? denoised : mt_lutxy(clp,clp.removegrain(4,-1),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",chroma="copy first")

NRdiff = mt_makediff(clp,denoised,chroma="process")
tame = mt_lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,4)
# head = head.mt_merge(tame,tame.prewitt(multiplier=1.0).mt_expand().removegrain(20))

(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head.bicubicresize(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)

SootheSS(last,tame,sootheT,sootheS)
sharpdiff= mt_makediff(tame,last)

(NRlimit==0) ? clp : \
mt_lutxy(clp,NRdiff, "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",chroma="process")

Slimit>=0 ? mt_lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",chroma="copy first")
\ : mt_lutxy(last,sharpdiff,"y 128 == x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",chroma="copy first")

return( last )
}


# ======= Modified sharpening function =======

function sharpen2(clip clp, float strength, int power, float zp, float lodmp, float hidmp, int rgmode)
{
STR = string( strength )
PWR = string( 1.0/float(power) )
ZRP = string( ZP )
DMP = string( lodmp )
HDMP = (hidmp==0) ? "1" : "1 x y - abs "+string(hidmp)+" / 4 ^ +"

mt_lutxy( clp, clp.RemoveGrain(rgmode,-1,-1), \
"x y == x x x y - abs "+ZRP+" / "+PWR+" ^ "+ZRP+" * "+STR+" * x y - 2 ^ x y - 2 ^ "+DMP+" + / * x y - x y - abs / * "+HDMP+" / + ?",chroma="copy first")
return( last )
}


# ======= Soothe() function to stabilze sharpening =======

function SootheSS(clip sharp, clip orig, int "sootheT", int "sootheS")
{
sootheT = default(sootheT, 25 )
sootheS = default(sootheS, 0 )
sootheT = (sootheT > 100) ? 100 : (sootheT < -100) ? -100 : sootheT
sootheS = (sootheS > 100) ? 100 : (sootheS < 0) ? 0 : sootheS
ST = string( 100 - abs(sootheT))
SSPT = string( 100 - abs(sootheS))

mt_makediff(orig,sharp)

(sootheS==0) ? last
\ : mt_lutxy( last, last.removegrain(20,-1,-1),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+SSPT+" * 128 + x 128 - abs y 128 - abs > x "+SSPT+" * y 100 "+SSPT+" - * + 100 / x ? ?", chroma="ignore")

(sootheT==0) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", chroma="ignore")

(sootheT > -1) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?",chroma="ignore")

mt_makediff(orig,last)
# mergechroma(sharp) # not needed in SeeSaw
return( last )
}


# ======= MOD4-and-atleast-16 helper function =======

function m4(float x) {x<16?16:int(round(x/4.0)*4)}

php111
26th October 2008, 01:26
I saved that whole script in wordpad. I did a Google for this error. I couldn't find a way to fix it.


Avisynth open failure:
Script error: expected a , or)



Here is a copy of my script below.



LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFT3DFilter.dll")
import("C:\Program Files\AviSynth 2.5\plugins\SeeSaw.avs"
AVISource("H:\The Breakfast Club (1985)\video.avi")
LanczosResize(640,352)
Converttoyv12()
a = last
b = a.FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
c = SeeSaw(a, b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
denoised=FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
backward_vec2 = MVAnalyse(denoised,isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
backward_vec1 = MVAnalyse(denoised,isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec1 = MVAnalyse(denoised,isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec2 = MVAnalyse(denoised,isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
MVDegrain2(source,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)

Guest
26th October 2008, 01:30
Your third line is missing the closing parenthesis. The error message tells you that as well as the exact line number!

php111
26th October 2008, 01:34
What is this complaining about, now? I did put that in my third line.


Here is a screenshot of the error.

Guest
26th October 2008, 01:58
You need MaskTools2:

http://manao4.free.fr/mt_masktools.html

This is very advanced stuff you are doing. You might want to consider getting a better grounding in Avisynth processing before attempting these difficult things.

Sagekilla
26th October 2008, 05:18
It sounds like he's copy pasting from a bunch of premade scripts without any real knowledge of what's going on.

Do everyone a favor, especially yourself, and read up on the basics of avisynth scripting.. Once you do it'll be much easier to do this without having to keep coming back here every five minutes with a problem. In fact, if you spent as much time learning this stuff as you do blindly asking questions, you'll have already figured out a lot..


Everyone starts as a beginner, and (usually) no one is an expert when they start this stuff, so take some time and learn it :)

thetoof
26th October 2008, 07:02
meh, I had read "I am ready to learn"... so
Like stickboy said,with such an attitude, there's no point.Do everyone a favor, especially yourself, and read up on the basics of avisynth scripting.. Yes, yes and yes!!

A very good place to start learning is at the well-built wiki : http://avisynth.org/mediawiki/Main_Page

php111
26th October 2008, 18:55
You need MaskTools2:

http://manao4.free.fr/mt_masktools.html

This is very advanced stuff you are doing. You might want to consider getting a better grounding in Avisynth processing before attempting these difficult things.


I understand, neuron2.

I added the log of SeeSaw.avs. I got another error of mt_makediff, I had done a Google search for it. I also re-installed Avisynth. That was the advice. After, re-installing it. I still get the error. I think the links was on, Doom9 (here), and VideoHelp. I had re-installed Avisynth, yesterday.

Guest
27th October 2008, 00:12
As I told you, you need to install MaskTools2 to get mt_makediff.

php111
27th October 2008, 00:44
As I told you, you need to install MaskTools2 to get mt_makediff.

I had MaskTools v2.

This is the file I have: masktools-v2.0a9.zip

I used WinRAR to extract it to my plugins folder. I get the following folders.


A folder called, masktools. In that folder, the following.

avs25
build
common
documentation
filters
helpers
software
clean.bat
gpl.txt
mt_masktools.dll (It's just a single file, not in a folder. I copied it to my plugins folder. I tried loading it into VirtualDubMod. I get the script error: Something about mt_makediff. I didn't see a makediff file to copy to plugins).

Sagekilla
27th October 2008, 00:49
php111: Please post exact error messages. Don't give us abbreviated error messages, copy it verbatim or we can't help you.

Copy only mt_masktools.dll to your plugins directory. One thing you need to know is any plugins you'll be using, generally the only file you'll need for the plugin to work is any of the .dll files. You usually won't need all the other files except the readme file perhaps.

php111
27th October 2008, 01:01
php111: Please post exact error messages. Don't give us abbreviated error messages, copy it verbatim or we can't help you.

Copy only mt_masktools.dll to your plugins directory. One thing you need to know is any plugins you'll be using, generally the only file you'll need for the plugin to work is any of the .dll files. You usually won't need all the other files except the readme file perhaps.

I done that. I have only the dll's, now. Here is the error I still get.


Avisynth open failure:
Script error: there is no function named "mt_makediff"
(C:\Program Files\AviSynth 2.5\plugins\SeeSaw.avs, line 72)
(H:\The Breakfast Club (1985)\movie.avs, line 11)


Here is my script, below.



LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFT3DFilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\removegrain.dll")
import("C:\Program Files\AviSynth 2.5\plugins\SeeSaw.avs")
AVISource("H:\The Breakfast Club (1985)\video.avi")
LanczosResize(640,352)
Converttoyv12()
a = last
b = a.FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
c = SeeSaw(a, b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
denoised=FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
backward_vec2 = MVAnalyse(denoised,isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
backward_vec1 = MVAnalyse(denoised,isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec1 = MVAnalyse(denoised,isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec2 = MVAnalyse(denoised,isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
MVDegrain2(source,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)

Guest
27th October 2008, 01:10
What version of Avisynth are you running?

If you copied it to your plugins directory, why are you loading it explicitly? That isn't right. Do you understand that DLLs in the plugins directory are automatically loaded? The same applies to all the DLLs you are explicitly loading.

This is one example of why we keep saying you need to get your Avisynth foundations mastered first.

php111
27th October 2008, 01:12
What version of Avisynth are you running?

Avisynth_257.exe


Would it be because I am missing lines out of my SeeSaw.avs, that I saved?

Guest
27th October 2008, 01:14
Would it be because I am missing lines out of my SeeSaw.avs, that I saved? Would WHAT be?

What lines are you missing?

Didée
27th October 2008, 01:17
You don't need to extract ALL of that archive. You need to extract the *.dll, and the html documentation to read up on the usage.

Then, the latest version is masktools-v2.0a35 (http://manao4.free.fr/masktools-v2.0a35.zip).

This one doesn't contain only *one* DLL, it contains *two* different DLLs. (Seems to indicates you didn't download the actual version).

From these two DLLs, you must not use "mt_masktools-26.dll". This one is only for use with Avisynth v2.6 (developpers only).

You need to extract and import the DLL "mt_masktools-25.dll", which is for usage with the Avisynth v2.5.x branch.

php111
27th October 2008, 01:17
Would WHAT be?

What lines are you missing?


My import of SeeSaw. In the error it said line 72. I will post from what I saved. Are any lines missing from the avs log?



# SeeSaw v0.3e (02 Jan 2006)
#
# (Full Name: "Denoiser-and-Sharpener-are-riding-the-SeeSaw" )
#
# This function provides a (simple) implementation of the "crystality sharpen" principle.
# In conjunction with a user-specified denoised clip, the aim is to enhance
# weak detail, hopefully without oversharpening or creating jaggies on strong
# detail, and produce a result that is temporally stable without detail shimmering,
# while keeping everything within reasonable bitrate requirements.
# This is done by intermixing source, denoised source and a modified sharpening process,
# in a seesaw-like manner.
#
# This version is considered alpha.
#
# Usage:
#
# a = TheNoisySource
# b = a.YourPreferredDenoising()
# SeeSaw( a, b, [parameters] )
#
# You're very much encouraged to feed your own custom denoised clip into SeeSaw.
# If the "denoised" clip parameter is omitted, a simple "spatial pressdown" filter is used.
#
#
# Fiddled together by Didée, for your pleasure.
#


# ======= Main function =======

function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "SdampLo", float "SdampHi", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
SdampLo = default( SdampLo, Spower+1 ) # reduces overdrive sharpening for very small changes
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.

Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
SdampLo = SdampLo / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )

ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
#ZRP = string( abs(Szp) )
#PWR = string( abs(Spower) )
#DMP = string( SdampLo )

denoised = defined(denoised) ? denoised : mt_lutxy(clp,clp.removegrain(4,-1),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",chroma="copy first")

NRdiff = mt_makediff(clp,denoised,chroma="process")
tame = mt_lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,4)
# head = head.mt_merge(tame,tame.prewitt(multiplier=1.0).mt_expand().removegrain(20))

(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head.bicubicresize(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)

SootheSS(last,tame,sootheT,sootheS)
sharpdiff= mt_makediff(tame,last)

(NRlimit==0) ? clp : \
mt_lutxy(clp,NRdiff, "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",chroma="process")

Slimit>=0 ? mt_lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",chroma="copy first")
\ : mt_lutxy(last,sharpdiff,"y 128 == x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",chroma="copy first")

return( last )
}


# ======= Modified sharpening function =======

function sharpen2(clip clp, float strength, int power, float zp, float lodmp, float hidmp, int rgmode)
{
STR = string( strength )
PWR = string( 1.0/float(power) )
ZRP = string( ZP )
DMP = string( lodmp )
HDMP = (hidmp==0) ? "1" : "1 x y - abs "+string(hidmp)+" / 4 ^ +"

mt_lutxy( clp, clp.RemoveGrain(rgmode,-1,-1), \
"x y == x x x y - abs "+ZRP+" / "+PWR+" ^ "+ZRP+" * "+STR+" * x y - 2 ^ x y - 2 ^ "+DMP+" + / * x y - x y - abs / * "+HDMP+" / + ?",chroma="copy first")
return( last )
}


# ======= Soothe() function to stabilze sharpening =======

function SootheSS(clip sharp, clip orig, int "sootheT", int "sootheS")
{
sootheT = default(sootheT, 25 )
sootheS = default(sootheS, 0 )
sootheT = (sootheT > 100) ? 100 : (sootheT < -100) ? -100 : sootheT
sootheS = (sootheS > 100) ? 100 : (sootheS < 0) ? 0 : sootheS
ST = string( 100 - abs(sootheT))
SSPT = string( 100 - abs(sootheS))

mt_makediff(orig,sharp)

(sootheS==0) ? last
\ : mt_lutxy( last, last.removegrain(20,-1,-1),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+SSPT+" * 128 + x 128 - abs y 128 - abs > x "+SSPT+" * y 100 "+SSPT+" - * + 100 / x ? ?", chroma="ignore")

(sootheT==0) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", chroma="ignore")

(sootheT > -1) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?",chroma="ignore")

mt_makediff(orig,last)
# mergechroma(sharp) # not needed in SeeSaw
return( last )
}


# ======= MOD4-and-atleast-16 helper function =======

function m4(float x) {x<16?16:int(round(x/4.0)*4)}

php111
27th October 2008, 01:26
I just got the new version of MaskTools. My script is below. I get this error.



Avisynth open failure:
Script error: MVAnalyse does not have a named argument "delta"





H:\The Breakfast Club (1985)\movie.avs, line 9)





import("C:\Program Files\AviSynth 2.5\plugins\SeeSaw.avs")
AVISource("H:\The Breakfast Club (1985)\video.avi")
LanczosResize(640,352)
Converttoyv12()
a = last
b = a.FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
c = SeeSaw(a, b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
denoised=FFT3DFilter(sigma=6,sigma2=6,sigma3=5,sigma4=4,bt=5,bw=32,bh=32,ow=16,oh=16,plane=4)
backward_vec2 = MVAnalyse(denoised,isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
backward_vec1 = MVAnalyse(denoised,isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec1 = MVAnalyse(denoised,isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
forward_vec2 = MVAnalyse(denoised,isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,dct=1)
MVDegrain2(source,backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=2)

Sagekilla
27th October 2008, 01:34
Same question as before: You're certain you have the latest stable build of MVTools? Download 1.11 from here: http://avisynth.org.ru/mvtools/mvtools.html#download to be sure

Guest
27th October 2008, 01:37
Spoon feeding and hand holding eventually come to an end. These are issues that a person with a solid foundation in Avisynth would be able to solve on their own. I suggest you take our advice about developing that foundation.

You're trying to do calculus without knowing algebra.