ajk
7th January 2012, 18:10
I've been trying to get some use out of the i7 by moving to multi-threaded Avisynth scripts. Many things run just fine, but some don't, and I really can't tell where the problem spot is.
Here is my latest attempt, source is just a regular PAL DVD.
LoadPlugin("C:\Program Files (x86)\dgmpgdec158\DGDecode.dll")
SetMemoryMax(1200)
SetMTMode(3)
MPEG2Source("source.d2v") #, 4)
#AVISource("source.avi") # Tried a pre-pass of just Stab() here but it didn't really make any difference
SetMTMode(2)
Checkmate(10)
Stab(dxmax=1,dymax=1)
a = last
b = a.Denoise()
b = assumefps(b,true)
#SetMTMode(5) # Saw this suggestion in some older thread but it didn't change much either
SeeSaw(a, b, Sstr=1.25)
#SetMTMode(2)
return last
# Little helper function
function Denoise( clip i )
{
# See http://avisynth.org.ru/mvtools/mvtools2.html
super = MSuper(i, pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
return MDegrain2(i, super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
}
Things run ok for a while when encoding in VirtualDub, but eventually at some point the thing will just grind to a halt, like in the screenshot here:
http://ajk.pp.fi/vdub_t.jpg (http://ajk.pp.fi/vdub.jpg)
Prior to this happening the core utilization is around 98% so things are going well, then when it stops, one core remains at full utilization and the others go idle.
I'm using AviSynth 2.6 32 bits and VirtualDub 1.9.11. All plugins should be the ones recommended for each script and AviSynth 2.6, but it's hard to say for sure.
Memory use does not seem that high and remains stable once the script is running, so at least there is no leak that is visible in the task manager.
Some other things I ran without SeeSaw worked ok, I didn't yet look that deeply into what it uses, but could this perhaps be a masktools issue? I recall getting some memory out-of-bounds errors from that with something I tried, but can't remember what I was exactly doing differently then.
I can provide a source clip if needed, but I don't think the problem is related to that, and it would need to be pretty long in order to bring out the issue.
Any ideas?
Here is my latest attempt, source is just a regular PAL DVD.
LoadPlugin("C:\Program Files (x86)\dgmpgdec158\DGDecode.dll")
SetMemoryMax(1200)
SetMTMode(3)
MPEG2Source("source.d2v") #, 4)
#AVISource("source.avi") # Tried a pre-pass of just Stab() here but it didn't really make any difference
SetMTMode(2)
Checkmate(10)
Stab(dxmax=1,dymax=1)
a = last
b = a.Denoise()
b = assumefps(b,true)
#SetMTMode(5) # Saw this suggestion in some older thread but it didn't change much either
SeeSaw(a, b, Sstr=1.25)
#SetMTMode(2)
return last
# Little helper function
function Denoise( clip i )
{
# See http://avisynth.org.ru/mvtools/mvtools2.html
super = MSuper(i, pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
return MDegrain2(i, super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
}
Things run ok for a while when encoding in VirtualDub, but eventually at some point the thing will just grind to a halt, like in the screenshot here:
http://ajk.pp.fi/vdub_t.jpg (http://ajk.pp.fi/vdub.jpg)
Prior to this happening the core utilization is around 98% so things are going well, then when it stops, one core remains at full utilization and the others go idle.
I'm using AviSynth 2.6 32 bits and VirtualDub 1.9.11. All plugins should be the ones recommended for each script and AviSynth 2.6, but it's hard to say for sure.
Memory use does not seem that high and remains stable once the script is running, so at least there is no leak that is visible in the task manager.
Some other things I ran without SeeSaw worked ok, I didn't yet look that deeply into what it uses, but could this perhaps be a masktools issue? I recall getting some memory out-of-bounds errors from that with something I tried, but can't remember what I was exactly doing differently then.
I can provide a source clip if needed, but I don't think the problem is related to that, and it would need to be pretty long in order to bring out the issue.
Any ideas?