Hey guys, I know we talked at one point about a technique that could be used with temporal bitmaps to create our own interlaced frames. I am doing this but seeing some results that somewhere my fields are slightly off. Could you confirm if this code makes sense? I am getting the previous frame, the current frame, and the next frame. I am using it in an NTSC sequence, so assuming lower field dominance in some places for now, but I'm quite sure the renderInfo.fieldOrder is indeed lower field dominant.
The "makeFull()" function creates a new double height bitmap and takes the first bitmap and copies it into every other line starting at 1, where then 2nd bitmap is copied into every other line starting at line 0 (thus the lower field assumption).
id temporalAPI;
temporalAPI = [_apiManager apiForProtocol:@protocol(FxTemporalImageAPI)];
///////////////////////////////////////
double before = (long)(renderInfo.frame-1);
double after = (long)(renderInfo.frame+1);
double current = (long)(renderInfo.frame);
FxBitmap *prev1 = NULL;
FxBitmap *prev2 = NULL;
FxBitmap *now1 = NULL;
FxBitmap *now2 = NULL;
FxBitmap *next1 = NULL;
FxBitmap *next2 = NULL;
[temporalAPI getInputBitmap:(FxBitmap **)&prev1
withInfo: renderInfo
atTime:before];
[temporalAPI getInputBitmap:(FxBitmap **)&prev2
withInfo: renderInfo
atTime:before+.5];
[temporalAPI getInputBitmap:(FxBitmap **)&now1
withInfo: renderInfo
atTime:current];
[temporalAPI getInputBitmap:(FxBitmap **)&now2
withInfo: renderInfo
atTime:current+.5];
[temporalAPI getInputBitmap:(FxBitmap **)&next1
withInfo: renderInfo
atTime:after];
[temporalAPI getInputBitmap:(FxBitmap **)&next2
withInfo: renderInfo
atTime:after+.5];
FxBitmap *prevFull = makeFull( prev1, prev2 ); // lower first
FxBitmap *nowFull = makeFull( now1, now2 ); // lower first
FxBitmap *nextFull = makeFull( next1, next2 ); // lower first
///////////////////////////////////////
Any help is appreciated. Thanks,