halsboss
26th January 2009, 14:34
Moved a couple of posts from the dev forum (didn't realise it was the dev forum until just now)...
1. Need guidance with MTi(), mvtools2, and MDePan. I'm sure I've seen stuff before but can't locate the answers.
The MVtools2 doco says use this for interlaced (non-MTi processing) of interlaced material (I have a DV source):-
function MDegrain2i2(clip source, int "overlap", int "dct") {
overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with light flicker
fields=source.AssumeBFF().SeparateFields() # separate by fields
super = fields.MSuper()
backward_vec2 = super.MAnalyse(isb = true, delta = 2, overlap=overlap, dct=dct)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, overlap=overlap, dct=dct)
backward_vec4 = super.MAnalyse(isb = true, delta = 4, overlap=overlap, dct=dct)
forward_vec4 = super.MAnalyse(isb = false, delta = 4, overlap=overlap, dct=dct)
fields.MDegrain2(super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=400)
Weave()
}
which separates the fields the analyses use deltas of 2 and 4 (presumably so even-fields match and odd-fields match).
Can someone please confirm whether this is functionally equivalent to MT's MTi processing http://avisynth.org/mediawiki/MT :-
source1=last.AssumeBFF()
result=MTi(source1,"MDegrain2i2_insideMTi()")
function MDegrain2i2_insideMTi(clip source, int "overlap", int "dct") {
overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with light flicker
fields=source # separate by fields already done by MTi
super = fields.MSuper()
backward_vec2 = super.MAnalyse(isb = true, delta = 1, overlap=overlap, dct=dct)
forward_vec2 = super.MAnalyse(isb = false, delta = 1, overlap=overlap, dct=dct)
backward_vec4 = super.MAnalyse(isb = true, delta = 2, overlap=overlap, dct=dct)
forward_vec4 = super.MAnalyse(isb = false, delta = 2, overlap=overlap, dct=dct)
fields.MDegrain2(super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=400)
}
Also, in the same manner I wonder about Depan of interlaced material too... will this result in a "depanned" interlaced result ?
The mvtools2 documentation says
AssumeBFF().SeparateFields() # set correct fields order
vectors = MSuper().MAnalyse(isb = false)
globalmotion = MDepan(vectors, pixaspect=1.094, thSCD1=400)
DepanStabilize(data=globalmotion, cutoff=2.0, mirror=15, pixaspect=1.094)
Weave()
But I'm guessing that isn't functionally equivalent to this below since Manalyses are only getting 1/2 the fields to look at (MTi feeds each thread only even or odd fields exclusively)
source1=last.AssumeBFF()
result=MTi(source1,"MDepan_insideMTi()")
function MDepan_insideMTi(clip source) {
vectors = MSuper(source).MAnalyse(isb = false)
globalmotion = MDepan(vectors, pixaspect=1.094, thSCD1=400)
source.DepanStabilize(data=globalmotion, cutoff=2.0, mirror=15, pixaspect=1.094)
}
Any suggestions ?
2. Just a query re motion stablilization and the new V2 MDePan-
#MDepan(clip, clip vectors, bool "zoom", bool "rot", float "pixaspect", float "error", bool "info", string "log", float "wrong", float "zerow", int "range", int "thSCD1", int "thSCD2", bool "isse")
super=MSuper()
vectors = MAnalyse(super, isb=false, overlap=4)
globalmotion = MDepan(vectors, zoom=true, rot=true, pixaspect=1.094, thSCD1=400, range=2) #
DepanStabilize(data=globalmotion, cutoff=2.0, mirror=15, pixaspect=1.094) #1.094 for standard PAL
The example in the documentation uses Msuper and then only 1 MAnalyse which looks forward and then feeds the manalyse result into MDePan, am I using it right ? How does that relate to the range parameter; I'd thought MDePan would have to work over the super clip instead ?
Also, do people recommend using the range parameter and if so what values ? I'd assumed the larger the better, eg 2 or 3. And is this correct usage for a prefiltered clip ?
prefiltered = last.FFT3DFilter(sigma=3, interlaced=false, plane=4)
prefilteredSuper = MSuper(prefiltered, pel=2)
#super = MSuper(pel=2)
vectors = prefiltered.MAnalyse(prefilteredSuper, isb=false, overlap=4)
globalmotion = prefiltered.MDepan(vectors, zoom=true, rot=true, pixaspect=1.094, thSCD1=400) #1.094 for standard PAL
last.DepanStabilize(data=globalmotion, cutoff=2.0, mirror=15, pixaspect=1.094) #1.094 for standard PAL
1. Need guidance with MTi(), mvtools2, and MDePan. I'm sure I've seen stuff before but can't locate the answers.
The MVtools2 doco says use this for interlaced (non-MTi processing) of interlaced material (I have a DV source):-
function MDegrain2i2(clip source, int "overlap", int "dct") {
overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with light flicker
fields=source.AssumeBFF().SeparateFields() # separate by fields
super = fields.MSuper()
backward_vec2 = super.MAnalyse(isb = true, delta = 2, overlap=overlap, dct=dct)
forward_vec2 = super.MAnalyse(isb = false, delta = 2, overlap=overlap, dct=dct)
backward_vec4 = super.MAnalyse(isb = true, delta = 4, overlap=overlap, dct=dct)
forward_vec4 = super.MAnalyse(isb = false, delta = 4, overlap=overlap, dct=dct)
fields.MDegrain2(super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=400)
Weave()
}
which separates the fields the analyses use deltas of 2 and 4 (presumably so even-fields match and odd-fields match).
Can someone please confirm whether this is functionally equivalent to MT's MTi processing http://avisynth.org/mediawiki/MT :-
source1=last.AssumeBFF()
result=MTi(source1,"MDegrain2i2_insideMTi()")
function MDegrain2i2_insideMTi(clip source, int "overlap", int "dct") {
overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8)
dct=default(dct,0) # use dct=1 for clip with light flicker
fields=source # separate by fields already done by MTi
super = fields.MSuper()
backward_vec2 = super.MAnalyse(isb = true, delta = 1, overlap=overlap, dct=dct)
forward_vec2 = super.MAnalyse(isb = false, delta = 1, overlap=overlap, dct=dct)
backward_vec4 = super.MAnalyse(isb = true, delta = 2, overlap=overlap, dct=dct)
forward_vec4 = super.MAnalyse(isb = false, delta = 2, overlap=overlap, dct=dct)
fields.MDegrain2(super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=400)
}
Also, in the same manner I wonder about Depan of interlaced material too... will this result in a "depanned" interlaced result ?
The mvtools2 documentation says
AssumeBFF().SeparateFields() # set correct fields order
vectors = MSuper().MAnalyse(isb = false)
globalmotion = MDepan(vectors, pixaspect=1.094, thSCD1=400)
DepanStabilize(data=globalmotion, cutoff=2.0, mirror=15, pixaspect=1.094)
Weave()
But I'm guessing that isn't functionally equivalent to this below since Manalyses are only getting 1/2 the fields to look at (MTi feeds each thread only even or odd fields exclusively)
source1=last.AssumeBFF()
result=MTi(source1,"MDepan_insideMTi()")
function MDepan_insideMTi(clip source) {
vectors = MSuper(source).MAnalyse(isb = false)
globalmotion = MDepan(vectors, pixaspect=1.094, thSCD1=400)
source.DepanStabilize(data=globalmotion, cutoff=2.0, mirror=15, pixaspect=1.094)
}
Any suggestions ?
2. Just a query re motion stablilization and the new V2 MDePan-
#MDepan(clip, clip vectors, bool "zoom", bool "rot", float "pixaspect", float "error", bool "info", string "log", float "wrong", float "zerow", int "range", int "thSCD1", int "thSCD2", bool "isse")
super=MSuper()
vectors = MAnalyse(super, isb=false, overlap=4)
globalmotion = MDepan(vectors, zoom=true, rot=true, pixaspect=1.094, thSCD1=400, range=2) #
DepanStabilize(data=globalmotion, cutoff=2.0, mirror=15, pixaspect=1.094) #1.094 for standard PAL
The example in the documentation uses Msuper and then only 1 MAnalyse which looks forward and then feeds the manalyse result into MDePan, am I using it right ? How does that relate to the range parameter; I'd thought MDePan would have to work over the super clip instead ?
Also, do people recommend using the range parameter and if so what values ? I'd assumed the larger the better, eg 2 or 3. And is this correct usage for a prefiltered clip ?
prefiltered = last.FFT3DFilter(sigma=3, interlaced=false, plane=4)
prefilteredSuper = MSuper(prefiltered, pel=2)
#super = MSuper(pel=2)
vectors = prefiltered.MAnalyse(prefilteredSuper, isb=false, overlap=4)
globalmotion = prefiltered.MDepan(vectors, zoom=true, rot=true, pixaspect=1.094, thSCD1=400) #1.094 for standard PAL
last.DepanStabilize(data=globalmotion, cutoff=2.0, mirror=15, pixaspect=1.094) #1.094 for standard PAL