Log in

View Full Version : Confused with interleave


krieger2005
5th November 2007, 13:48
Hi,

i'm very confused with interleave. Maybe it's best when i show my script first:
interleave(a,b,c)

base=last
bobbed=last

bv1a = base.MVAnalyse(isb=true, truemotion=false,delta=4,lambda=512,pel=2,sharp=2,blksize=16,overlap=16/2,pnew=32,idx=SIDX)
bv1b = base.MVAnalyse(isb=true, truemotion=false,delta=3,lambda=512,pel=2,sharp=2,blksize=16,overlap=16/2,pnew=32,idx=SIDX)
bv1c = base.MVAnalyse(isb=true, truemotion=false,delta=2,lambda=512,pel=2,sharp=2,blksize=16,overlap=16/2,pnew=32,idx=SIDX)
xv1a = base.MVAnalyse(isb=true, truemotion=false,delta=1,lambda=512,pel=2,sharp=2,blksize=16,overlap=16/2,pnew=32,idx=SIDX)
xv1c = base.MVAnalyse(isb=false, truemotion=false,delta=1,lambda=512,pel=2,sharp=2,blksize=16,overlap=16/2,pnew=32,idx=SIDX)
fv1a = base.MVAnalyse(isb=false, truemotion=false,delta=2,lambda=512,pel=2,sharp=2,blksize=16,overlap=16/2,pnew=32,idx=SIDX)
fv1b = base.MVAnalyse(isb=false, truemotion=false,delta=3,lambda=512,pel=2,sharp=2,blksize=16,overlap=16/2,pnew=32,idx=SIDX)
fv1c = base.MVAnalyse(isb=false, truemotion=false,delta=4,lambda=512,pel=2,sharp=2,blksize=16,overlap=16/2,pnew=32,idx=SIDX)

bc1a = bobbed.MVCompensate(bv1a,idx=SIDX)
bc1b = bobbed.MVCompensate(bv1b,idx=SIDX)
bc1c = bobbed.MVCompensate(bv1c,idx=SIDX)
xc1c = bobbed.MVCompensate(xv1a,idx=SIDX)
xc1a = bobbed.MVCompensate(xv1c,idx=SIDX)
fc1a = bobbed.MVCompensate(fv1a,idx=SIDX)
fc1b = bobbed.MVCompensate(fv1b,idx=SIDX)
fc1c = bobbed.MVCompensate(fv1c,idx=SIDX)
global SIDX=SIDX+1

interleave(bc1a,bc1b,bc1a, xc1c,base,xc1a, fc1a,fc1b,fc1a)
SelectEvery(???,???)

As you can see i interleaved the clips a,b and c. the resulted denoised clip should be clip b. the clips xc1a and xc1c are the stabilized clips a and c. But which values should i take for the ???-signs to get back the clip b?

EDIT: For the example above should the following line give the right result?
selectEvery(9,4)
selectEvery(3,1)

AVIL
5th November 2007, 21:41
Hi,

I don't understand very well your script, but a simple method to catch the clip named b is inverting it. Apply a previous filter Invert("YUV") on clip b and count visually position and frequency of inverted frames when display the result of

interleave(bc1a,bc1b,bc1a, xc1c,base,xc1a, fc1a,fc1b,fc1a)

the frequency is the answer to the first group of ? and the offset of the first frame inverted is the answer to the second.

Good luck.

Didée
5th November 2007, 22:26
The double-Select should work in any case, since that way you're just un-doing the Interleaves again, step by step.

With a single Select, it should be SelectEvery(27,13). The period length is 3*9=27, and if no black Voodoo took place, the original frame b should still be in the middle of that.