I was going to write a Npassaverage function but it seemed much easier to write a 3 and 5 pass average separately. I don’t think we’ll ever see a need for a 7passaverage and it has to be an odd number greater than 1 so it kind of narrows it down to 3 and 5. The middle clip is the output clip in both functions so pass3 for the 5pa and pass2 for the 3pa.
Function FivePassAverage(clip pass1,clip pass2,clip pass3, clip pass4, clip pass5)
{
interleave=interleave(pass1,pass2,pass3,pass4,pass5)
super=msuper(interleave,pel=2,mt=true)
multivectors=manalyse(super,multi=true,delta=2,mt=true)
multiclip=mcompensate(interleave,super,multivectors,mt=true,tr=2,center=true)
average=temporalsoften(multiclip,2,255,255,50,2).selectevery(25,12)
return(average)
}
Function ThreePassAverage(clip pass1,clip pass2,clip pass3)
{
interleave=interleave(pass1,pass2,pass3)
super=msuper(interleave,pel=2,mt=true)
multivectors=manalyse(super,multi=true,delta=1,mt=true)
multiclip=mcompensate(interleave,super,multivectors,mt=true,tr=1,center=true)
average=temporalsoften(multiclip,1,255,255,50,2).selectevery(9,4)
return(average)
}
I believe the math is right. This should only use the motion compensated frames when temporalsoften compares surrounding frames instead of the actual clip frames. This is set by default to 255 for the luma and chroma threshold so it will hard blend everything.
So far testing of the hdtv caps has not really been beneficial that I can tell. The good news is that, as far as I can tell, the hdtv caps and blu-ray are perfectly registered against one another after doing a quick x/y adjustment. I guess that’s no big surprise since they all came from the same digital master assumedly.