I can't find DeinterlaceBlend sample in samples folder...

My task - deinterlace video from analog TV tuner. I'm writing directshow filters and don' know how i can split frames to top and bottom, required for Blend and some other deinterlace filters. I'm not sure that it's possible.

My blend code:

//fill srcPlane from history buffer
const BYTE * pSrcPlane[3];
pSrcPlane[0] = pHistory[2];
pSrcPlane[1] = pHistory[1];
pSrcPlane[2] = pHistory[0];

IppiSize sizex;
sizex.height = size.height;
sizex.width = size.width * 3;

//all parameters by default
int blendThresh[2];
blendThresh[0] = 5;
blendThresh[1] = 9;

double blendConstants[2];
blendConstants[0] = 0.3;
blendConstants[1] = 0.7;

IppiDeinterlaceBlendState_8u_C1 * ppState;

int topFirst = 0;
int topField = 0;
int copyField = 0;

ippiDeinterlaceBlendInitAlloc_8u_C1(sizex, blendThresh, blendConstants, &ppState);
ippiDeinterlaceBlend_8u_C1(pSrcPlane, srcPitch, pOut, destPitch, sizex, 1, topField, 1, ppState);

Maybe somebody can show my error or tell me better deinterlace method.Triangle and Medium doesn't help too.

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.