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. |
12th March 2015, 14:19 | #941 | Link | |
Registered User
Join Date: Mar 2012
Location: Saint-Petersburg
Posts: 239
|
So actually there's still a room for good old 2.5 headers...
Quote:
__________________
SVPflow motion interpolation |
|
12th March 2015, 14:38 | #942 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,664
|
Quote:
|
|
12th March 2015, 14:39 | #943 | Link |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Of course, this is only a problem if you want to distribute a closed-source application or filter. Closed source binaries must use a header from before Aug 14, 2009.
__________________
AviSynth+ Last edited by ultim; 12th March 2015 at 15:36. |
12th March 2015, 15:05 | #944 | Link | |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Quote:
__________________
AviSynth+ |
|
12th March 2015, 19:21 | #945 | Link | |
Registered User
Join Date: Mar 2007
Posts: 407
|
Quote:
Code:
Try {RT_Version()} catch (msg) {assert(false,"This script requires the RT_Stats plugin.")} Try {GEval("")} catch (msg) {assert(false,"This script requires the GScript plugin.")} global ofs=0 #============================================================================ Filename=RT_FSelSaveAs(title="Save Filter list",dir="",filt="Text files|*.txt",fn="_All+Functions_.txt",debug=true) Assert(FileName.IsString(), "Please provide a file name to save the filter list") #============================================================================ RT_WriteFile(Filename, VersionString(), Append=false) Try {assert(false)} catch(err) {Line(err,0)} WriteInternalFunctionsSyntax(RT_InternalFunctions(), Filename) Try {assert(false)} catch(err) {Line(err,0)} WritePluginFunctionsSyntaxBackward(RT_PluginFunctions(), Filename) Try {assert(false)} catch(err) {Line(err,0)} WritePluginFunctionsSyntax(RT_PluginFunctions(), Filename) Try {assert(false)} catch(err) {Line(err,0)} WritePluginFunctionsSyntaxBackward(RT_PluginFunctions(), Filename) Try {assert(false)} catch(err) {Line(err,0)} WritePluginFunctionsSyntax(RT_PluginFunctions(), Filename) Try {assert(false)} catch(err) {Line(err,0)} WritePluginFunctionsSyntaxBackward(RT_PluginFunctions(), Filename) Try {assert(false)} catch(err) {Line(err,0)} WritePluginFunctionsSyntax(RT_PluginFunctions(), Filename) Try {assert(false)} catch(err) {Line(err,0)} WritePluginFunctionsSyntaxBackward(RT_PluginFunctions(), Filename) Try {assert(false)} catch(err) {Line(err,0)} BlankClip().subtitle("Function info is complete.",align=5) #============================================================================ function WriteInternalFunctionsSyntax(string fu_list, string Filename) { Try {assert(false)} catch(err) {Line(err,0)} GScript(""" done="" Try {assert(false)} catch(err) {Line(err,23)} while(fu_list != "") { i = FindStr(fu_list+" ", " ") Try {assert(false)} catch(err) {Line(err,23)} fu_name = LeftStr(fu_list, i-1) Try {assert(false)} catch(err) {Line(err,23)} fu_list = MidStr(fu_list, i+1) Try {assert(false)} catch(err) {Line(err,23)} params = RT_PluginParam(fu_name) Try {assert(false)} catch(err) {Line(err,23)} if (FindStr(done, fu_name+params)==0) { done = done + " "+fu_name+params Try {assert(false)} catch(err) {Line(err,23)} RT_WriteFile(Filename, "internal %s ( %s ) -> %s", fu_name, params, GetReturnType(fu_name, params), Append=true) Try {assert(false)} catch(err) {Line(err,23)} } } """) } #============================================================================ function WritePluginFunctionsSyntax(string fu_list, string Filename) { Try {assert(false)} catch(err) {Line(err,0)} GScript(""" done="" Try {assert(false)} catch(err) {Line(err,41)} while(fu_list != "") { i = FindStr(fu_list+" ", " ") Try {assert(false)} catch(err) {Line(err,41)} fu_name = LeftStr(fu_list, i-1) Try {assert(false)} catch(err) {Line(err,41)} fu_list = MidStr(fu_list, i+1) Try {assert(false)} catch(err) {Line(err,41)} i = FindStr(fu_name, "_") Try {assert(false)} catch(err) {Line(err,41)} if (i>0) { params = RT_PluginParam(fu_name) Try {assert(false)} catch(err) {Line(err,41)} if (FindStr(fu_list, "_"+fu_name)==0 && FindStr(done, "_"+fu_name+params)==0) { done = done + " _"+fu_name+params Try {assert(false)} catch(err) {Line(err,41)} RT_WriteFile(Filename, "plugin %s ( %s ) -> %s", fu_name, params, GetReturnType(fu_name, params), Append=true) Try {assert(false)} catch(err) {Line(err,41)} } } } """) } #============================================================================ function WritePluginFunctionsSyntaxBackward(string fu_list, string Filename) { Try {assert(false)} catch(err) {Line(err,0)} GScript(""" done="" Try {assert(false)} catch(err) {Line(err,62)} fu_list = RevStr(fu_list) Try {assert(false)} catch(err) {Line(err,62)} while(fu_list != "") { i = FindStr(fu_list+" ", " ") Try {assert(false)} catch(err) {Line(err,62)} fu_name = RevStr(LeftStr(fu_list, i-1)) Try {assert(false)} catch(err) {Line(err,62)} fu_list = MidStr(fu_list, i+1) Try {assert(false)} catch(err) {Line(err,62)} i = FindStr(fu_name, "_") Try {assert(false)} catch(err) {Line(err,62)} if (i>0) { params = RT_PluginParam(fu_name) Try {assert(false)} catch(err) {Line(err,62)} if (FindStr(fu_list, "_"+fu_name)==0 && FindStr(done, "_"+fu_name+params)==0) { done = done + " _"+fu_name+params Try {assert(false)} catch(err) {Line(err,62)} RT_WriteFile(Filename, "plugin %s ( %s ) -> %s", fu_name, params, GetReturnType(fu_name, params), Append=true) Try {assert(false)} catch(err) {Line(err,62)} } } } """) } #============================================================================ #function GetReturnType(string fu, string params) { r = "?" } #============================================================================ function GetReturnType(string fu, string params) { Try {assert(false)} catch(err) {Line(err,0)} GScript(""" RT_DebugF("Fu=%s %s", fu, params, name="GetReturnType") Try {assert(false)} catch(err) {Line(err,86)} if (MidStr(fu,3,1)=="+") {fu = LeftStr(fu,2)+MidStr(fu,2) Try {assert(false)} catch(err) {Line(err,86)}} if (MidStr(fu,2,1)=="+") {fu = LeftStr(fu,1)+fu Try {assert(false)} catch(err) {Line(err,86)}} else if (fu=="Assert") {r = "conditional halt" Try {assert(false)} catch(err) {Line(err,86)}} else if (FindStr(fu, "avss_26_DSS2")>0) {r = "clip" Try {assert(false)} catch(err) {Line(err,86)}} else if (FindStr(fu, "ImageSeq_")>0) {r = "clip" Try {assert(false)} catch(err) {Line(err,86)}} else if (FindStr(fu, "LoadCPlugin")>0) {r = "void" Try {assert(false)} catch(err) {Line(err,86)}} else if (FindStr(fu, "LoadVirtualdubPlugin")>0) {r = "void" Try {assert(false)} catch(err) {Line(err,86)}} else if (FindStr(fu, "MDepan")>0) {r = "clip" Try {assert(false)} catch(err) {Line(err,86)}} else if (FindStr(fu, "MSCDetection")>0) {r = "clip" Try {assert(false)} catch(err) {Line(err,86)}} else if (FindStr(fu, "mvtools2_")>0) {r = "clip?" Try {assert(false)} catch(err) {Line(err,86)}} else if (FindStr(fu, "ResampleAudio")>0) {r = "clip" Try {assert(false)} catch(err) {Line(err,86)}} else if (FindStr(fu, "Resize")>0) {r = "clip" Try {assert(false)} catch(err) {Line(err,86)}} else if (FindStr(fu, "RT_Debug")>0) {r = "clip" Try {assert(false)} catch(err) {Line(err,86)}} else if (FindStr(fu, "RT_FSel")>0) {r = "." Try {assert(false)} catch(err) {Line(err,86)}} else if (FindStr(fu, "Source")>0) {r = "clip" Try {assert(false)} catch(err) {Line(err,86)}} else { bc = BlankClip(width=8,height=8,length=1,pixel_type="YV12") Try {assert(false)} catch(err) {Line(err,86)} fp = LeftStr(params,2)=="cc" ? "(bc,bc)" \ : LeftStr(params,2)=="cf" ? "(bc,0.1)" \ : LeftStr(params,3)=="cci" ? "(bc,bc,0)" \ : LeftStr(params,5)=="ciiii" ? "(bc,0,0,0,0)" \ : LeftStr(params,4)=="ciii" ? "(bc,0,0,0)" \ : LeftStr(params,3)=="cii" ? "(bc,0,0)" \ : LeftStr(params,2)=="ci" ? "(bc,0)" \ : LeftStr(params,1)=="c" ? "(bc)" \ : LeftStr(params,2)=="ff" ? "(0.1,0.1)" \ : LeftStr(params,1)=="f" ? "(0.1)" \ : LeftStr(params,2)=="ii" ? "(0,0)" \ : LeftStr(params,1)=="i" ? "(0)" \ : LeftStr(params,2)=="ss" ? "("+chr(34)+"1"+chr(34)+","+chr(34)+"1"+chr(34)+")" \ : LeftStr(params,2)=="si" ? "("+chr(34)+"1"+chr(34)+",1)" \ : LeftStr(params,1)=="s" ? "("+chr(34)+"1"+chr(34)+")" \ : "()" Try {assert(false)} catch(err) {Line(err,86)} Try { Try {assert(false)} catch(err) {Line(err,86)} r = Eval("current_frame=0 "+fu+fp) Try {assert(false)} catch(err) {Line(err,86)} r = r.IsBool ? "bool" : r.IsClip ? "clip" : r.IsInt ? "int" : r.IsFloat ? "float" : r.IsString ? "string" : "?" Try {assert(false)} catch(err) {Line(err,86)} } catch (msg) { Try { r = r.IsBool ? "bool" : r.IsClip ? "clip" : r.IsInt ? "int" : r.IsFloat ? "float" : r.IsString ? "string" : "?" } catch(msg) { r = "?" Try {assert(false)} catch(err) {Line(err,86)} } } if (r=="?") { bc = BlankClip(width=8,height=8,length=1,pixel_type="RGB32") Try {assert(false)} catch(err) {Line(err,86)} fp = LeftStr(params,2)=="cc" ? "(bc,bc)" \ : LeftStr(params,2)=="cf" ? "(bc,0.1)" \ : LeftStr(params,3)=="cci" ? "(bc,bc,0)" \ : LeftStr(params,5)=="ciiii" ? "(bc,0,0,-0,-0)" \ : LeftStr(params,4)=="ciii" ? "(bc,0,0,0)" \ : LeftStr(params,3)=="cii" ? "(bc,0,0)" \ : LeftStr(params,2)=="ci" ? "(bc,0)" \ : "(bc)" Try {assert(false)} catch(err) {Line(err,86)} Try { Try {assert(false)} catch(err) {Line(err,86)} r = Eval("current_frame=0 "+fu+fp) Try {assert(false)} catch(err) {Line(err,86)} r = r.IsBool ? "bool" : r.IsClip ? "clip" : r.IsInt ? "int " : r.IsFloat ? "float" : r.IsString ? "string" : "?" Try {assert(false)} catch(err) {Line(err,86)} } catch (msg) { r = "?" Try {assert(false)} catch(err) {Line(err,86)} } } if (r=="?" && LeftStr(params,1)=="c") {r="clip?" Try {assert(false)} catch(err) {Line(err,86)}} } """) Try {assert(false)} catch(err) {Line(err,0)} return r } #===================================================================================================================== function Line(string s, int ofs) {ofs=default(ofs,0) s=RightStr(s,FindStr(RevStr(s)," ")-1) s=LeftStr(s,StrLen(s)-1) l=int(value(s)+ofs) RT_DebugF("%d",l,name="@line ")} #===================================================================================================================== I do assume that the behavior is machine-dependent, since FFT plugins make it more prone to fail, When reproducing, note that line numbers are logged after the command in that line. Last edited by martin53; 12th March 2015 at 21:17. Reason: supplement |
|
13th March 2015, 10:34 | #948 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,309
|
@Ultim
I've updated as you adviced my avisynth.h to your's last version. I've been obliged to make the following changes : Replace all the Code:
<avs/xxx.h> Code:
"./avs/xxx.h" My real question indeed, is : When i tried to recompile my filters, i have one which use "CACHE_25_RANGE". I guess remplacement should be "CACHE_GET_RANGE", but i want to be sure. Thanks. The exact code is : Code:
child->SetCacheHints(CACHE_25_RANGE,3); ..... v.AsClip()->SetCacheHints(CACHE_25_RANGE,2); Last edited by jpsdr; 13th March 2015 at 10:37. |
13th March 2015, 14:10 | #951 | Link | |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Quote:
__________________
AviSynth+ |
|
13th March 2015, 14:16 | #952 | Link | |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Quote:
While discussing this on the IRC just recently, it was noticed the installer isn't setting AVISYNTH_SDK_PATH at all. Something that slipped through the cracks. This will be fixed in the next installer on our side.
__________________
AviSynth+ |
|
13th March 2015, 14:21 | #953 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,309
|
I think i'll keep what i've done. At least, i'm sure if someone get my project from github :
- He can compile it whatever avisynth version is installed. - I'm sure it will compile with the same files as me, thing not sure with the way you describe. Anyway, thanks for your return and these informations. |
13th March 2015, 14:41 | #954 | Link |
Registered User
Join Date: Dec 2011
Posts: 77
|
It was also discussed that if each plugin keeps its own avisynth.h, when people are compiling it they need to know what version of avisynth.h it is: 2.5? 2.6-a3? 2.6a5? 2.6rc1? 2.6-64bit? Avs+? Even though Avs+ header is compatible with 2.6a5, 2.6rc1 and 2.6MT, in future if breaking change happen (like 2.6rc1 64bit interface), people who are recompiling your plugin need to manually look what version of avisynth.h you are using.
Though personally I also find bundling avisynth.h much easier
__________________
AviSynth+ |
13th March 2015, 15:46 | #955 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,309
|
There is, from my point of view, no perfect solution. If people have 2.6rc1, if they build 64 bit version, compatibility is broken. If they have 2.5 installed or a too old 2.6, it will (or may) not compile at all...
After, personnal taste, i'm not big fan of "Getting my project is not enough, you have also to install X,Y,Z,W, etc... if you want to build it" (in fact, i realy don't like these kind of situations, but unfortunately sometimes it's realy unavoiable), this is why, i personnaly choose the "No need to install anything" solution package. So, for me, both solutions have pro and cons. I choose what i personnaly prefer, because, i like less the other option. After, i'm absolutely not trying to argue to change anything. Things have been explained, for valid reasons, it's totaly Ok for me. |
13th March 2015, 19:53 | #956 | Link | |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Quote:
I've looked at what's happening in detail, and there are three different things going on.
As for point 3), I'm still investigating it. It might be something inside AviSynth+. But due to your script calling all possible plugin functions and many plugins being buggy (see previous point) by not doing nearly enough parameter validations, this too might as well be a result of an erronous plugin. Even probably. Anyway, the crash itself wasn't due to AviSynth+.
__________________
AviSynth+ Last edited by ultim; 13th March 2015 at 19:58. |
|
13th March 2015, 22:28 | #957 | Link |
Registered User
Join Date: Mar 2007
Posts: 407
|
Ultim,
thank you for the detailed analysis! Especially that you took the time to assign the plugin crashes to the particular plugins. Be sure I estimate this right! It is still worrying me that the same buggy plugins started from Avisynth 2.6 MT and Avisynth+ make the system as a whole react so differently. And more than the fact it reproduceably crashes after call of certain plugins - which I probably best can solve by explicitly checking in my script and provide a prepared return value - this extreme pausing is weird. Can Avisynth+ itself do anything more to control/manage plugin crashes even better than now? |
13th March 2015, 22:43 | #958 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
|
|
13th March 2015, 23:13 | #959 | Link | |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Quote:
All the above means that trying to recover from an access violation is pretty much the worst thing you can do. It might seem odd for a user, but in such a case it really is best practice to just terminate loudly, as soon and fast as you can. Any attempt to recover might make things much worse. Hiding it won't do you any good, because even though you can hide it from the user, it is impossible to negate the corruption it has caused. My point is: If a plugin is crashing due to an access violation, I'm glad if the whole process crashes. You should be too. I certainly won't try to manage it any "better". I am already performing sub-optimal by turning it into a C++ exception, but that is to have similar behavior to AviSynth 2.6.
__________________
AviSynth+ Last edited by ultim; 13th March 2015 at 23:17. |
|
13th March 2015, 23:31 | #960 | Link |
Registered User
Join Date: Mar 2007
Posts: 407
|
Maybe it's not worth to put toooo much work into dealing with touchy plugins.
Why did I write this odd script? Because for writing on the Avisynth+ documentation pages I was just interested in an inventory of all available functions (unrecognized plugin funcs too, out of pure curiosity), and if they were clip or non-clip functions. Maybe there is a much better way for that than this dumb script? Of course once the script was in the world, I was also unsettled by the more obvious malfunction in combination with Avisynth+. Yet I agree that malfunctions should either be contained properly, and if they can't - which will sure be mostly the case with access violations - a hidden damage is no better than an obvious one. Last edited by martin53; 13th March 2015 at 23:36. Reason: read above post after writing this one |
Thread Tools | Search this Thread |
Display Modes | |
|
|