View Full Version : Avisynth 2.6 MT
Pages :
1
2
3
4
5
6
7
8
9
10
11
12
13
[
14]
15
16
17
18
19
20
21
22
06_taro
21st March 2013, 18:35
Your script has nothing to do with masktools2, what it uses is mvtools2.
bennynihon
22nd March 2013, 20:01
Your script has nothing to do with masktools2, what it uses is mvtools2.
You're absolutely right! That's embarrassing. My full script includes a lot of Masktools calls, which is why I had it engrained in my mind. But in trying to debug the source of the problem I had completely removed all Masktools calls, leaving just the MVTools lines. No wonder why the different Masktools variants didn't help my cause! I'll have to dig deeper with MVTools.
UPDATE: Updating to FFMS2 r742 did the trick!
LigH
28th March 2013, 01:46
I am still curious (http://forum.doom9.org/showthread.php?p=1619659#post1619659) about a deeper explanation of the MT modes >3.
LigH
8th April 2013, 09:08
Is SEt the only person who can explain the MT modes in detail?
Evil_Burrito
16th April 2013, 22:38
Is SEt the only person who can explain the MT modes in detail?
Probably one of the few. I think mode has to do with read/write cycles. The longer a filter waits in the memory, the more memory needed/used, thus slowing down the process. But honestly, I don't know.
bxyhxyh
18th April 2013, 08:02
Can SetMTMode(1) load all internal filters?
LigH
18th April 2013, 08:25
It won't be recommendable for any *Source filters, even internal (e.g. AviSource / OpenDMLSource), because there may be some "non-reentrant" VfW codecs (which will get confused and return corrupt video when executed more than once; this can already be provoked by having more than one video source call in one script). I remember such a failure for a VfW codec originally shipped with Windows XP, I believe it was either MS Video 1 or Cinepak.
Issues with MT source calls might also be circumvented by the function RequestLinear which is provided by TIVTC; example: RequestLinear(rlim=50,clim=50) — this hint (http://forum.gleitz.info/showthread.php?46230-Avisynth-MT-nicht-immer-sinnig&p=435815&viewfull=1#post435815) by courtesy of Didée
Apart from that, most filters should be parallelizable; I can't think of academical exceptions right now, but I can't exclude their existence a priori.
chevy
25th April 2013, 13:41
seem to be running into a problem.i installed official 2.6 replaced the avisynth.dll in sys32 and WOW folder ,when i go to preview my script i get this error
http://img703.imageshack.us/img703/6002/2993d00c38d48523362bcae.png
any help would be great.i've been messing for days trying to figure out MT and get it working.
LigH
25th April 2013, 13:58
If you have a 32-bit Windows, replace the 32-bit AviSynth DLL in C:\Windows\system32.
If you have a 64-bit Windows, replace the 32-bit AviSynth DLL in C:\Windows\SysWOW64. Do not replace any 64-bit AviSynth DLL in C:\Windows\system32. There is no MT replacement for AviSynth 64-bit. Use only a 32-bit AviSynth MT. If you have a 64-bit encoder, use a pipe bridge (e.g. avs4x264mod.exe) to forward the output of a 32-bit AviSynth MT to the 64-bit encoder, to avoid it trying to use the 64-bit AviSynth which is unstable and lacks of 64-bit plugins. Better remove the 64-bit AviSynth installation completely, it is not recommendable until it gets reliable.
chevy
25th April 2013, 14:03
thanks for the quick response.i removed it from the SysWOW64 folder now i am getting the error there is no function named "MT" when i try and preview my script.
LigH
25th April 2013, 14:07
Exactly wrong for a 64-bit Windows.
The 32-bit AviSynth DLL is in SysWOW64. This one you should have kept.
The 64-bit AviSynth DLL is in system32. This one you should remove. And ensure that only the remaining 32-bit AviSynth installation is used, by both 32-bit and 64-bit encoders.
chevy
25th April 2013, 14:17
ok so i re installed the newest avisynth 2.6.i removed the avisynth.dll from the sys32 folder i tried my script and got the same erro about no function named "MT".So then i replaced the SysWOW64 avisynth.dll with the modified avisynth.dll on the first page of this thread.still same error
LigH
25th April 2013, 14:26
Then scan through all harddisk partitions everywhere for other copies of avisynth.dll, you probably have a mess of too many old versions; if AviSynth couldn't be found at all, the error would be different (like not being able to handle *.avs files).
Maybe you are using MeGUI (which provides an own copy of AviSynth in case it is not correctly installed)? You are providing too few useful details; we can not even be certain that you are not trying to use a 64-bit AviSynth...
chevy
25th April 2013, 14:42
yes im useing megui.i installed a 32bit version of avisynth 2.6.so should i delete all avisynth.dll's i find except the one in C:\Windows\SysWOW64?
i just manually loaded the modified avisynth.dll and went to preview my script and it froze megui(turned all the screens white)
StainlessS
25th April 2013, 15:01
Uninstall ALL versions of Avisynth, search for all copies of Avisynth.dll and delete, and new reinstall again.
If you mean System32, then say System32 and not sys32. Also, re-read everything that LigH said.
EDIT: It may be suffiicient to rename your MeGUI directory (temporarily) instead of deleting the dll from there.
chevy
25th April 2013, 15:06
ok i will do all that now,again thank you both for the replys. :)
Groucho2004
25th April 2013, 15:08
got the same erro about no function named "MT".
It looks like you're trying to use the MT plugin with Set's DLL. It's not supported any more.
Also, post your script!
chevy
25th April 2013, 15:15
Ok so how dose one install and use MT now?.I'm just trying it with this
mt("spline36resize(720,last.height)")
mt("spline36resize(last.width,400)",splitvertical=true)
Groucho2004
25th April 2013, 15:36
Ok so how dose one install and use MT now?
One doesn't. Read the first post in this thread, it explains how to use the multi-threading functions.
Evil_Burrito
25th April 2013, 16:22
Ok so how dose [sic] one install and use MT now?.I'm just trying it with this
mt("spline36resize(720,last.height)")
mt("spline36resize(last.width,400)",splitvertical=true)
Distributed frames are preferred over sliced frames these days. Look at the example "Differences between MT() and SetMTMode()" on http://avisynth.org/mediawiki/MT_support_page.
With a little research/reading you can answer your own questions without even asking :-)
chevy
25th April 2013, 19:15
Ok so i deleted all avisynth.dll's.I installed the newest avisynth 2.6 32bit.i replaced the avisynth.dll in C:\Windows\SysWOW64 with the modified one from the first post and still getting same error there is no function named "MT".
Groucho2004
25th April 2013, 21:18
Ok so i deleted all avisynth.dll's.I installed the newest avisynth 2.6 32bit.i replaced the avisynth.dll in C:\Windows\SysWOW64 with the modified one from the first post and still getting same error there is no function named "MT".
If you don't post the script (as I asked you to), nobody will be able to help.
chevy
25th April 2013, 21:44
i did post it earlier but here it is again,sorry i see i didn't post it all earlier here it is now
LoadPlugin("C:\Users\root\Desktop\MeGUI_D\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("C:\Users\root\Documents\VIDEO_TS\VTS_02_1.d2v", info=3)
LoadPlugin("C:\Users\root\Desktop\MeGUI_D\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
#deinterlace
crop(0, 2, 0, 0)
#resize
#denoise
mt("spline36resize(720,last.height)")
mt("spline36resize(last.width,400)",splitvertical=true)
Groucho2004
25th April 2013, 22:11
i did post it earlier but here it is again,sorry i see i didn't post it all earlier here it is now
LoadPlugin("C:\Users\root\Desktop\MeGUI_D\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("C:\Users\root\Documents\VIDEO_TS\VTS_02_1.d2v", info=3)
LoadPlugin("C:\Users\root\Desktop\MeGUI_D\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
#deinterlace
crop(0, 2, 0, 0)
#resize
#denoise
mt("spline36resize(720,last.height)")
mt("spline36resize(last.width,400)",splitvertical=true)
I see you didn't read the instructions in the first post of this thread.
You're still wrapping your resize calls with "mt", a function from a plugin that is not supported by this version of Avisynth.
Also, I don't know why you are even trying to multi-thread such a simple script which would be more than fast enough running in a single thread.
chevy
25th April 2013, 22:17
i was just useing that for testing ,So drop the MT i assume and use SetMTMode()
Groucho2004
25th April 2013, 22:24
So drop the MT i assume and use SetMTMode()
Correct.
luke83
3rd May 2013, 15:42
I'm using that Avisynth MT version: http://code.google.com/p/avisynth-mt/
It works good for me. Why should i use yours?
Q-the-STORM
6th May 2013, 09:34
I'm using that Avisynth MT version: http://code.google.com/p/avisynth-mt/
It works good for me. Why should i use yours?
well.. if you read what's there on the site of your link, then you'll know that:
This is SEt's 2.5.8 MT version compiled with MSVC 2010 (SP1) so it will run on Windows XP SP3 and newer.
it's also SEt's dll, only the old 2.5.8
And if you read the first post, you'll know that in the version from this thread
MT mode stability is way better than Avisynth 2.5.8, general stability - the same as official Avisynth 2.6 (which is again better than 2.5.8 due to many bugfixes since then).
luke83
11th May 2013, 13:23
i use both SetMTMode and MT. I use MT only with FluxSmoothT (temporal smoother) couse it doesn't work with setmtmode.
here is my script. I've deleted some settings
SetMTMode(1,0)
<Plugin loading and/or importing>
MPEG2_Source()
Colormatrix()
SetMTMode(2,0)
# Deinterlacer
AssumeTFF().Telecide(guide=1).Decimate(mode=1,threshold=2.0)
# Spatial Denoiser
RemoveGrain(2).RemoveGrain(2)
# Temporal Denoiser
MT("FluxSmoothT(temporal_threshold=7)",2)
# Cropper
crop()
# Resizer
Spline16Resize()
# Dehalo
fft3dfilter(bt=-1, plane=0, dehalo=1.0, hr=2.0, ht=50, svr=0)
# Sharpener
MSharpen(threshold=10, strength=100,mask=false, highq=true)
aWarpSharp()
ToonLite(0.2)
# Anti-aliasing
AAA()
How can i use any temporal smoother with your new version if i can't use MT("") anymore? :)
Thanks in advance
EDIT:
fluxsmooth produces several artifacts and i've discovered that i've never used it really until now, couse setmtmode makes it unuseful if you don't use MT("") function
Today, when I've used MT(""), it worked but not as good as expected, so i've removed it.
Then i've installed your avisynth version in system32 folder. Have I to replace avisynth.dll file in megui folder too? (I've portable version of megui)
MeGUI preferably uses the installed AviSynth version. An own copy was added in case the user did not install any other AviSynth. This may happen for a "portable" use where installing AviSynth was not possible (e.g. due to a missing administrative access).
I am surprised that FluxSmoothT is an example for a filter which fails with the current multithreading process, and I am certainly interested in details why. Apart from that ... you are using a lot of filters, I really wonder if a different and smaller selection can produce a similar result with less efforts. Especially the double sharpen makes me wonder which kind of source requires that. Or which kind of audience?
luke83
12th May 2013, 12:29
MeGUI preferably uses the installed AviSynth version. An own copy was added in case the user did not install any other AviSynth. This may happen for a "portable" use where installing AviSynth was not possible (e.g. due to a missing administrative access).
I am surprised that FluxSmoothT is an example for a filter which fails with the current multithreading process, and I am certainly interested in details why. Apart from that ... you are using a lot of filters, I really wonder if a different and smaller selection can produce a similar result with less efforts. Especially the double sharpen makes me wonder which kind of source requires that. Or which kind of audience?
k. I've replaced megui version too.
About the double sharpener.
MSharpener is the real sharpener.
aWarpsharp is the filter i use to have lighter lines.
ToonLite is to make darkener lines. aWarpsharp sometimes make it too light
AAA is for anti-aliasing
I'm encoding Lupin 2nd Season
EDIT:
the problem was this version of avisynth. It made a green band on bottom of the video and a lot of artifacts during playing. I've replaced with 2.5.8 version (always Set build) and now it works again
GMJCZP
13th May 2013, 14:15
Using AnimeIVTC has submitted the following error message:
Avisynth Open Failure:
Cache: Filter returned invalid response to CACHE_GETCHILD_CACHE_MODE. 25161872
And says there is a problem with SRestore, AnimeIVTC, in that order. In the script is not enabled SetMTMode.
I am using the Avisynth 2.6.0 MT version of the March 9, 2013
You will have to use a patched version of MaskTools2 (http://forum.doom9.org/showthread.php?p=1619023#post1619023).
GMJCZP
14th May 2013, 22:00
It worked! Thank you.
aldix
17th May 2013, 22:38
Been having problems w/ setmtmode since upgrading to the latest version.
I have 2.5.8 official installed & replaced with latest 2.6 MT in SysWOW, I'm on x64 system (win7).
Script is as follows:
[quote]
setmtmode(5)
setmemorymax(768)
MPEG2Source("C:\Users\redacted\VTS_06_1.d2v", cpu=0)
Crop(16, 0, -12, -0)
Spline36resize(688, 560)
Load_Stdcall_Plugin("c:\program files (x86)\avisynth 2.5\plugins\yadif.dll")
ConvertToYV12(interlaced = true)
global deinterlaced_part = Yadif(order=1)#.Subtitle("deinterlaced frame", align=5)
ScriptClip(last, "IsCombedTIVTC(last, cthresh=7, MI=40) ? deinterlaced_part : last")
import("c:\program files (x86)\avisynth 2.5\plugins\ChubbyRain3.avs")
import("c:\program files (x86)\avisynth 2.5\plugins\vinverse.avs")
Chubbyrain3(thr=5,str=10) ## before anyone notes, this shouldn't be the culprit as x264 hangs both w/and w/o
import("c:\program files (x86)\avisynth 2.5\plugins\ylevels.avs")
import("C:\Program Files (x86)\AviSynth 2.5\plugins\ContraSharpen.avs")
import("c:\program files (x86)\avisynth 2.5\plugins\sbr.avs")
import("c:\program files (x86)\avisynth 2.5\plugins\HQDering.avs")
import("c:\program files (x86)\avisynth 2.5\plugins\BlindDehalo3_mt2.avs")
import("c:\program files (x86)\avisynth 2.5\plugins\DetailSharpen.avs")
loadplugin("c:\program files (x86)\avisynth 2.5\plugins\RedAverage.dll")
loadplugin("c:\program files (x86)\avisynth 2.5\plugins\asharp.dll")
loadplugin("c:\program files (x86)\avisynth 2.5\plugins\flash3kyuu_deband.dll")
import("c:\program files (x86)\avisynth 2.5\plugins\Minblur.avs")
#ColorYUV(gain_y=0,cont_y=0,cont_u=0,cont_v=0,gain_v=0,gain_u=-0,off_y=0,off_u=-0,off_v=-0)
blksize = 16
overlap = blksize/2
hpad = blksize/2
vpad = blksize/2
lambda = 512
search = 5
setmtmode(2)
source = last
preNR = source.bicubicresize(source.width*2, source.height*2).blur(1.3).SharpenDetail(str=2, thr=2).bicubicresize(source.width, source.height)
preNR_super = preNR.MSuper(hpad=hpad, vpad=vpad, pel=2, sharp=2, rfilter=2)
source_super = source.MSuper(hpad=hpad, vpad=vpad, pel=2, sharp=2, levels=1)
vb2 = MAnalyse(preNR_super, isb=true, truemotion=false, delta=2, blksize=blksize, overlap=overlap, search=search, lambda=lambda)
vb1 = MAnalyse(preNR_super, isb=true, truemotion=false, delta=1, blksize=blksize, overlap=overlap, search=search, lambda=lambda)
vf1 = MAnalyse(preNR_super,isb=false, truemotion=false, delta=1, blksize=blksize, overlap=overlap, search=search, lambda=lambda)
vf2 = MAnalyse(preNR_super,isb=false, truemotion=false, delta=2, blksize=blksize, overlap=overlap, search=search, lambda=lambda)
# Use the vectors to create motion and static masks, we use these for prefilter and sharpening masks
maskstar = source.mt_binarize(upper=false)
maskmotion1 = mt_average(source.mmask(kind=0, vb2, gamma=1, ml=130),source.mmask(kind=0, vb1, gamma=1, ml=130))
maskmotion1 = mt_adddiff(maskmotion1, mt_makediff(maskmotion1,source))
maskmotion2 = source.mt_motion(thy1=5,thy2=10,thc1=5,thc2=10,u=3,v=3).mt_lut(expr="x 255 == x 156 - 0 ?")
maskmotion = mt_lutxy(maskmotion1,maskmotion2,expr="x 0 == 0 x y < y x ? ?")
maskstatic = mt_invert(maskmotion)
NR = source.MDegrain2(source_super,vb1,vf1,vb2,vf2,thSAD=300,thSCD1=400,thSCD2=102,limit=102,plane=4)
den = mt_merge(NR,source,maskstar)
ContraSharpen(den,source)
# DEBANDING
f3kdb(sample_mode=2,dynamic_grain=false,keep_tv_range=false,dither_algo=3,y=48,cb=24,cr=24,grainY=48,grainC=24)
BlindDehalo3(rx=2.5, ry=2.5, strength=125)
HQDering()
tweak(sat=1.3, coring=true)
YlevelsS(10,1.0,250,0,255,false)
trim(0, 9000)
#interleave(source.trim(0,9000), last)
[quote]
If I attempt to encode the above (using Mulder's Simple x264 GUI), 2-pass encode hangs in the beginning of 2nd pass, whereas
crf hangs soon after initiating (just tried with adding Distributor() in the end of the script and it hanged under 2k frames, though cpu load was 100% all the time).
Msg is something along the lines of "x264 didn't respond for 60 seconds, it may be deadlocked".
Conversely, when I run the same script w/o any MT involvement at all, it encodes more or less on the same speed (2nd pass/crf @ ~2-2.4 fps on my 4-core i5) and
does it successfully until the last frame w/o hanging.
And it isn't the only script currently which I'm having trouble with. It's just one example which, even so, is cut to basics (it was initially a lot longer and until now worked perfectly fine).
So... what gives?
Thanks a lot in advance!
edit: And when it doesn't hang, I get this (tried with yet another script/source):
x264 [error]: 2nd pass has more frames than 1st pass (8000 vs 442)
x264 [error]: x264_encoder_open failed
edit#2: Additionally, if I'd add this snip of code in the end of the script while there are no SetMTMode and/or SetMemoryMax calls employed,
# display mode and number of threads in use
#Subtitle("Number of threads used: " + String(GetMTMode(true))
# \ + " Current MT Mode: " + String(GetMTMode()))
I get the result that threads used=4 (max of my cpu) and mode (obviously) 0. But how come can there be all the threads in the works if I
haven't explicitly called them?! (And cpu load when encoding is also 100% then, shouldn't it be lower given that MTing isn't indicated within the script?)
I apologize for such a long post, but I'm really, really stumped on this. Help!
real.finder
20th May 2013, 11:49
aldix
try use MP_Pipeline (http://forum.doom9.org/showthread.php?t=163281)
you have two choices, the 1st one is split the script in MP_Pipeline
and the 2nd is increase setmemorymax in MP_Pipeline
the using of MP_Pipeline (even without split) make the avs process independent of x264, and that will make both of them work comfortably
More details http://forum.doom9.org/showthread.php?p=1628332#post1628332
edit: And when it doesn't hang, I get this (tried with yet another script/source):
x264 [error]: 2nd pass has more frames than 1st pass (8000 vs 442)
x264 [error]: x264_encoder_open failed
I have no idea, but it seems that wrong from you because x264 says that the number of frames is different from the first pass
edit#2: Additionally, if I'd add this snip of code in the end of the script while there are no SetMTMode and/or SetMemoryMax calls employed,
# display mode and number of threads in use
#Subtitle("Number of threads used: " + String(GetMTMode(true))
# \ + " Current MT Mode: " + String(GetMTMode()))
I get the result that threads used=4 (max of my cpu) and mode (obviously) 0. But how come can there be all the threads in the works if I
haven't explicitly called them?! (And cpu load when encoding is also 100% then, shouldn't it be lower given that MTing isn't indicated within the script?)
I apologize for such a long post, but I'm really, really stumped on this. Help!
I have no idea, but the x264 is using all threads By default
IIRC, MTMode uses the detected number of cores as default if the very first SetMTMode() call does not limit it, therefore GetMTMode(true) will probably return the detected number of cores, no matter if multithreading is enabled at all. If GetMTMode(false) returns 0, then no multithreading was enabled, only one thread is used.
Regarding the different frame counts: It looks like the statistics from a different first pass still existed. Maybe from a compressibility test. Be certain that a full 1st-pass encoding finished right before the matching 2nd-pass starts.
aldix
20th May 2013, 15:06
I appreciate the replies, thanks!
MP_Pipeline certainly sounds intriguing. Though is it of any use with 4GB RAM?
For my primary problem, I ended up doing some manual grunt work of attempting the encode with only parts of the script (manalyse+degrain only, then +masks, then the rest of the filters one at a time).
Consequently I discovered that HQDering appears to pull down MT functionality (1st pass is never at 100% - fluctuating between 50% and ~85% - while 2nd is but eventually crashes). Once I commented it out, everything normalized.
I moved on to doing some tests with hqdmod (by Mf) & HQDeringMod v0.4 (by mawen1250) and while both seem to require a preceding SetMTMode() to take 100% out of CPU, 1st pass runs at 100% w/o dropping
and 2nd pass doesn't hang with a "potential deadlock". My humble n00b thoughts are that perhaps all these problems are due to patched Masktools (due to latest 2.6 MT version), but then later mods shouldn't work normally either, so I
don't know...
No idea what's the frame count stuff was all about, either.
Thanks again for all the feedback. I'll definitely check out MP_Pipeline, much obliged, real.finder!
pbristow
20th May 2013, 17:20
MP_Pipeline certainly sounds intriguing. Though is it of any use with 4GB RAM?
I've used it successfully with only 3GB (though I have 4GB now, which helps a lot! :) )
You just have to be careful not to use too many threads, and/or to use SetMemoryMax() appropriately (and bear in mind that the SetMemoryMax() function doesn't set the *total* memory used by the script, or the thread instance; it just sets the amount of *frame cache*. The plugins you use will also use some memory of their own; How much depends on how complex they are. A useful rule of thumb, then, is to take the total memory you want to let avisynth use (NB this *MUST* be no more than half your physical memory), divide that by the number of threads you intend to run (to get the maximum memory use per thread), and then divide that by two (allowing each thread to use half its memory space for frame cache). If you have problems, or things seem to be really slow, try running your script against a short clip with two or three different settings of SetMemoryMax, to see whether increasing or decreasing it is likely to help.
The second way of going about it is to estimate how much frame cache you script actually *needs* to run efficiently... but that requires a fair bit of knowledge about how the filters you're using work and interact with each other. Also, it might scare you into spending money on more RAM. ;)
Then there's the third way, which is what I've settled on myself: Just start by bunging SetMemoryMax(64) at the start of each script (including each "mini script" within the MP_Pipeline() call), and then try dropping it to 48 later if there's a chance it might help. :) 64MB per thread usually works fine with four or five threads, and it's enough cache space to store 20 full-HD frames in YV12 format, which is plenty for most scripts.
aldix
20th May 2013, 20:56
Everything sounds good, but somehow it doesn't successfully load for me, tried with both read-me example (loadplugin("MP_Pipeline.dll") and explicitly (loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\MP_Pipeline_0.14\x64\MP_Pipeline.dll"). In first case it just doesn't find it (well, duh!) and in the latter, gives the error=0xc1 unable to load.
Trying it with this, basically mimics read-me examples and Your suggestion, pbristow (appreciated!):
loadplugin("MP_Pipeline.dll")
MP_Pipeline("""
SetMemoryMax(64)
f3kdb(sample_mode=2,dynamic_grain=false,keep_tv_range=false,dither_algo=3,y=48,cb=24,cr=24,grainY=48,grainC=24)
BlindDehalo3(rx=2.5, ry=2.5, strength=125)
hqdmod()
### prefetch: 5,2
### branch: 3
### ###
""")
Would love to actually employ it. What am I doing wrong?
edit: No loadplugin error if I'd use x86 version, but now I'm getting errors with all the filters involved ("unable to create slave process ... script error: invalid arguments in function ...").
Huh?
This question is probably more related to MP_Pipeline than to AviSynth-MT.
real.finder
20th May 2013, 21:49
Everything sounds good, but somehow it doesn't successfully load for me, tried with both read-me example (loadplugin("MP_Pipeline.dll") and explicitly (loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\MP_Pipeline_0.14\x64\MP_Pipeline.dll"). In first case it just doesn't find it (well, duh!) and in the latter, gives the error=0xc1 unable to load.
Trying it with this, basically mimics read-me examples and Your suggestion, pbristow (appreciated!):
loadplugin("MP_Pipeline.dll")
MP_Pipeline("""
SetMemoryMax(64)
f3kdb(sample_mode=2,dynamic_grain=false,keep_tv_range=false,dither_algo=3,y=48,cb=24,cr=24,grainY=48,grainC=24)
BlindDehalo3(rx=2.5, ry=2.5, strength=125)
hqdmod()
### prefetch: 5,2
### branch: 3
### ###
""")
Would love to actually employ it. What am I doing wrong?
edit: No loadplugin error if I'd use x86 version, but now I'm getting errors with all the filters involved ("unable to create slave process ... script error: invalid arguments in function ...").
Huh?
the x64 is for avs 64, SEt build is 32 so you have to use x86
and you must put all files that attached in x86 folder in MP_Pipeline Package to avs plugins folder
and try to read MP_Pipeline_readme.avs for the correct using
This question is probably more related to MP_Pipeline than to AviSynth-MT.
you right
aldix
20th May 2013, 22:06
the x64 is for avs 64, SEt build is 32 so you have to use x86
and you must put all files that attached in x86 folder in MP_Pipeline Package to avs plugins folder
and try to read MP_Pipeline_readme.avs for the correct using
you right
Yeah, you're all right, I apologize. Going to post my questions to the relevant thread shortly.
I am still curious (http://forum.doom9.org/showthread.php?p=1619659#post1619659) about a deeper explanation of the MT modes >3.
Especially now that a user in the german doom9/Gleitz board reported (http://forum.gleitz.info/showthread.php?46373-Fehler-in-der-Framereihenfolge-durch-MT) issues with MPEG2Source rarely producing stray frames with MTMode 3. Is MTMode 5 here still necessary? We would understand better if we understood their differences in detail.
Groucho2004
26th May 2013, 10:32
Especially now that a user in the german doom9/Gleitz board reported (http://forum.gleitz.info/showthread.php?46373-Fehler-in-der-Framereihenfolge-durch-MT) issues with MPEG2Source rarely producing stray frames with MTMode 3. Is MTMode 5 here still necessary? We would understand better if we understood their differences in detail.
Have a look at IanB's posts, like this (http://forum.doom9.org/showthread.php?p=1627093#post1627093) and this (http://forum.doom9.org/showthread.php?p=1629239&highlight=changefps#post1629239). Might be helpful.
OK, thank you very much. This is indeed what I was looking for.
A function Preroll() was mentioned which was introduced in AviSynth MT 2.60 alpha 4; I believe a quite similar feature is offered by TIVTC with RequestLinear() (http://forum.doom9.org/showthread.php?p=804225#post804225).
As I said in the other thread modes 3, 5 and 6 are identical for source filters.
They all implement the same single mutex lock on the GetFrame call. As source filters by definition do not have a child, the different child behaviour of modes 3, 5 and 6 is irrelevant.
I am still curious (http://forum.doom9.org/showthread.php?p=1619659#post1619659) about a deeper explanation of the MT modes >3.
A quick review of the AvisynthMT modes (a revised entry) :-
Mode 1: Unprotected access to a single instance of the filter. All the threads may enter the GetFrame routine concurrently. Code has to be fully thread safe and re-entrant.
Mode 2: Unprotected multiplexed access to thread count instances of the filter. The thread will enter the GetFrame routine of the next free instance of the filter. Code only has to be instance safe. Each filter instance only sees a non-contiguous proportion of the GetFrame calls.
Mode 3: Protected access to a single instance of the filter. Only 1 thread may be within the GetFrame routine concurrently, the lock is released while the routine executes it's child->GetFrame() calls and waits for and reacquires the lock when the child call completes. Code has to be instance safe, re-entrant, and the code up to the child->GetFrame() call thread safe. The filter instance sees all of the GetFrame calls.
Mode 4: Protected multiplexed access to thread count instances of the filter. Only 1 thread may enter the GetFrame routine of the next free instance of the filter, the lock is released while the routine executes it's child->GetFrame() calls, allowing another thread to enter a different instance of the filter. It waits for and reacquires the single lock when the child call completes. Code can be mostly slack, statics and globals must still be thread safe or read only. Like mode 2 each filter instance only sees a non-contiguous proportion of the GetFrame calls, but unlike mode 2 only 1 instance is allowed to run at a time. The code up to the child->GetFrame() call does not need to be thread safe.
Mode 5 and 6: Protected access to a single instance of the filter. Only 1 thread may be executing the GetFrame routine. When the routine executes a child->GetFrame() call the lock is NOT released. However a mini-distributor pre-fetches a number of frames from the remaining graph. The pre-fetch thread count is based on the number, N, of threads concurrently waiting for any mode 5 filter lock. Mode 5 runs N pre-fetch threads, mode 6 runs N+1 pre-fetch threads. Code can be fully slack, statics and globals do not need to be thread safe.
Filters that need to see all accessed frames for their processing algorithm should avoid modes 2 and 4.
Most filters upon entry immediately execute a child->GetFrame(n ,env) call. This prologue is usually re-entrant and thread safe. When this is not so filters need to use mode 2, 4, 5 or 6.
This immediate child->GetFrame behaviour tends to restrict the efficacy of the mode 5 mini-distributor. The active thread grabs the lock, charges straight through to the child->GetFrame routine and finds there are no mode 5 gate waiting threads YET, so start no pre-fetch threads. Other threads arriving and then waiting happens during the long processing phase of the filter. As the first thread completes and releases the lock, the next next thread similarly grabs the lock, charges straight through to the child->GetFrame routine and probably finds there are still no mode 5 gate waiting threads. The first thread is off dealing with the result it calculated, the now running thread is no longer a mode 5 gate waiting thread.
With many concurrent threads and a single heavy lifting mode 5 filter that does bottleneck a reasonable number of threads at once the mode 5 mini-distributor pre-fetching can become effective. Resorting to mode 6 may result in more concurrent ready threads than available cores to run them which can cause cross core L1/L2 cache spoiling, this might be mitigated by selecting 1 fewer initial threads than cores on the first SetMTMode call.
Including source filters as mode 5 is a contentious issue. The wait time is usually fairly short and all the threads usually end up hitting the source so can increase the global mode 5 gate waiting thread count by the average source waiting thread count, which like mode 6 may result in more concurrent ready threads than available cores to run them.
Careful design of the script and much testing is required to achieve optimal performance with AvisynthMT. There is no one size fits all. Never measure CPU business as a criterion (all the cores might be spinning their wheels calculating the same frame multiple times), always check the final FPS.
pbristow
27th May 2013, 09:34
[DELETES ENTIRE ENTRY]
Ignore me, I somehow missed the fact there'd been plenty of replies to that question already. :)
pila13
1st June 2013, 11:48
Hello guys, i need small help with MT, actualy, more like "consultation"
I use this plugin with dfttest, mode 2, but, after chat with fwe people hwo use it back in 2012, i recive not very positive feed backs. Main notice "MT, cause out put of bad frames" i already burned about 10 rips, since yasterday, and didn'tn otice any problem, but it's take about 1,5 - 2 h on burning, since iwhtout Mt - 3.7 - 4.1 fps, but with MT 6.25, or even more.
any how, can any one showme how this "bad frame" look like ? Thank You !
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.