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. |
|
|
Thread Tools | Search this Thread | Display Modes |
20th March 2020, 00:13 | #1 | Link |
Registered User
Join Date: Oct 2018
Posts: 6
|
How to make it work Multi Threading in Avisynth+ with TweakHist?
Hi!
I have this script: Code:
SetFilterMTMode("DEFAULT_MT_MODE", 2) A1 = avisource("JVC1.avi") A2 = avisource("JVC2.avi") B2 = ScriptClip(A2, "A2.TweakHist(type=2,mclip=A1.Trim(current_frame,-1))") B2 Prefetch(4) if I don't try to use MT (and I comment SetFilterMTModeand prefetch), everything works, but if use those commands on the video appears this error: Script error: Invalid arguments to function 'TweakHist'. ([ScriptClip], line 1) What he don't likes is to read A1 from the runtime environment. If I put there a dummy clip everything works. I've also tried to set the filters-MT-modes singolarly for avisource, tweakhist and whatever. Same result. What's going on here? Thanks to everyone will answer! |
20th March 2020, 10:31 | #2 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Dont know reason for problem, same with Avs+ r2772 and v3.4
Code:
LoadPlugin(".\x86\Modplus.dll") #SetFilterMTMode("DEFAULT_MT_MODE", 2) SetFilterMTMode("TweakHist", MT_NICE_FILTER) #A1 = avisource("d:\Parade.avi") Global A1 = avisource("d:\Parade.avi") A2 = avisource("d:\Parade.avi") SSS=""" # Scriptclip line 1 n=current_frame # Scriptclip line 2 # TweakHist(mclip=A1) # Scriptclip line 3 # Uncomment this and comment out below line, no error Last.TweakHist(type=2,mclip=A1,mf=n) # Scriptclip line 4 # Script error: Invalid arguments to function 'TweakHist'. ([Scriptclip Line 4]) """ ScriptClip(A2,SSS) Prefetch(4) Return Last I've made A1 Global, still problem. Addfunction Call Code:
env->AddFunction("TweakHist", "ci*[type]i[mclip]c[mf]i[limit]i[rgb]i", Create_TweakHist, 0); Not a clue why this is happening. EDIT: Below does not produce error Code:
LoadPlugin(".\x86\Modplus.dll") #SetFilterMTMode("DEFAULT_MT_MODE", 2) SetFilterMTMode("TweakHist", MT_NICE_FILTER) #A1 = avisource("d:\Parade.avi") Global A1 = avisource("d:\Parade.avi") A2 = avisource("d:\Parade.avi") SSS=""" # Scriptclip line 1 n=current_frame # Scriptclip line 2 # TweakHist(mclip=A1) # Scriptclip line 3 # Last.TweakHist(type=2,mclip=A1,mf=n) # Scriptclip line 4 # Script error: Invalid arguments to function 'TweakHist'. ([Scriptclip Line 4]) return A1 """ ScriptClip(A2,SSS) Prefetch(4) Return Last Perhaps down to the "Array of Zero Or More vars of type int (i*), followed by "type" arg ALSO of type int ([type]i), dont know if avs+ borked, or TweakHist borked [less likely], probably better if Type arg (of var type int) did not immediately follow a variable length array of type int. EDIT: Quote:
EDIT: The error message is produced by Avisynth, not TweakHist (so would seem to be an avs+ prob).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 20th March 2020 at 15:52. |
|
20th March 2020, 14:36 | #3 | Link | |
Registered User
Join Date: Oct 2018
Posts: 6
|
Quote:
I'm afraid I'm not Pro enough to understand this... |
|
20th March 2020, 15:23 | #4 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
I think Pinterf needs to take a look at this thread, he should happen by at some point,
but there are recently things happening in the world external to D9 that demand serious attention [ie he could be busy]. EDIT: Because of the Prefetch() thing, I dont think it can be tested on v2.60 standard [dont think Prefetch is available in v2.60 std].
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 20th March 2020 at 16:19. |
20th March 2020, 17:08 | #5 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
I'm here, I'm there. Well, this is a known bug (if it has the same root as the code below) which is hard fix (for me), probably was fixed in Neo but then there came other side-effects.
I'll check it later in my life, I have bookmarked those commits but since they were applied on an already very different code, it was hard to backport (hard = took more time to understand than I had at those times) Code:
BlankClip(width=320,height=200,length=100000,pixel_type="YV24") ScriptClip(last, "Subtitle(String(UDifferenceFromPrevious()))") # UDifferenceFromPrevious() cannot see "current frame" Prefetch(2) Last edited by pinterf; 20th March 2020 at 20:39. Reason: fix script |
22nd March 2020, 16:40 | #9 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Well wadya know, Avisynth+ is gonna get its own forum, not available just yet, gotta get it from the Avisynth+ thread in Avs Devs forum:- https://forum.doom9.org/showthread.p...72#post1904672
EDIT: New Avs+ works fine, above prob is no prob.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 22nd March 2020 at 17:29. |
Thread Tools | Search this Thread |
Display Modes | |
|
|