View Single Post
Old 20th September 2008, 05:54   #52  |  Link
halsboss
likes to tinker
 
Join Date: Jan 2004
Location: girt by sea
Posts: 635
Well, that's floored me, look at the signs on SHIFT in this link http://forum.doom9.org/showthread.ph...81#post1172981
Code:
Function Foo(clip clip, float shift) {
  Clip
  Tc=SelectEven().Spline36resize(NewWidth, NewHeight/2, 0, -Shift, Width(), Height()) 
  Bc=SelectOdd().Spline36resize(NewWidth, NewHeight/2, 0, Shift, Width(), Height()) 
  Interleave(Tc, Bc)
  Weave()
}
which, just a few posts later http://forum.doom9.org/showthread.ph...85#post1174185 turns into
Code:
SeparateFields()

Shift = (GetParity() ? -0.25 : 0.25) * (Height()/Float(NewHeight/2)-1.0)

Elum = SelectEven().Spline36Resize(NewWidth, NewHeight/2, 0,    Shift)
Olum = SelectOdd() .Spline36Resize(NewWidth, NewHeight/2, 0,   -Shift)
Echr = SelectEven().Spline36Resize(NewWidth, NewHeight/2, 0,  2*Shift)
Ochr = SelectOdd() .Spline36Resize(NewWidth, NewHeight/2, 0, -2*shift)

Interleave(Elum, Olum)
IsYV12() ? MergeChroma(Interleave(Echr, Ochr)) : Last
Weave()
whihc is it ??
halsboss is offline   Reply With Quote