Si
8th September 2003, 00:03
I was looking into how Bob works (its a long story thats getting longer :) ) and I got as far as the FieldWise class (function/procedure/subroutine thingy ...) in field.cpp
Fieldwise::Fieldwise(PClip _child1, PClip _child2)
: GenericVideoFilter(_child1), child2(_child2) {}
PVideoFrame __stdcall Fieldwise::GetFrame(int n, IScriptEnvironment* env)
{
return (child->GetParity(n) ? child2 : child)->GetFrame(n, env);
}
It semms to me (I just guess at these things) that it returns 2 different clips depending on parity (assumed field order to me).
I can see that this would be good as part of a Bob filter.:)
But why does the filter seem to return child or child2 when it has parameters of child1 and child2 :confused:
Or is it me getting totally lost with just 4 lines of C++ (again :o )
regards
Simon
Fieldwise::Fieldwise(PClip _child1, PClip _child2)
: GenericVideoFilter(_child1), child2(_child2) {}
PVideoFrame __stdcall Fieldwise::GetFrame(int n, IScriptEnvironment* env)
{
return (child->GetParity(n) ? child2 : child)->GetFrame(n, env);
}
It semms to me (I just guess at these things) that it returns 2 different clips depending on parity (assumed field order to me).
I can see that this would be good as part of a Bob filter.:)
But why does the filter seem to return child or child2 when it has parameters of child1 and child2 :confused:
Or is it me getting totally lost with just 4 lines of C++ (again :o )
regards
Simon