Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Need help with resizing video frame


I'm capture a YUY2 640x480 video frame from camera in DirectShow. I have a transform filter and all I want to do is downsize the 640x480 frame to 320x240 frame. I have no clue what functions I should use for malloc and the actual downsize. Here's the functions I AM using and am not getting the desired results:

IppiSize roiInputSize = { 640, 480};

IppiSize roiOutputSize = { 320, 240 };

IppiRect roi = {0, 0, 640, 480};

ImageYUY2 = ippiMalloc_8u_C2( roiOutputSize.width, roiOutputSize.height, &stepYUY2 );

status = ippiResizeYUV422_8u_C2R(pSrc, roiInputSize, 2 * 640, roi, ImageYUY2, stepYUY2, roiOutputSize, 0.5, 0.5, IPPI_INTER_NN);

Can someone please help me? I'm not sure if I should be using C1, C2, C3 or C4. And I'm not sure what my 'steps' should be.


0 Kudos
1 Reply

There is only one resize flavor for YUV image format:

IPPAPI(IppStatus, ippiResizeYUV422_8u_C2R, (const Ipp8u* pSrc, IppiSize srcSize, int srcStep, IppiRect srcRoi,

Ipp8u* pDst, int dstStep, IppiSize dstRoiSize,

double xFactor, double yFactor, int interpolation))

all other are available for RGB(A) only, so if the above API is not suitable you, then you may have to use an appropriate conversion function from Color Conversion domain to RGB, then resize (SqrPixel is preferable as by slice approach may be used - it is faster to do by slices of L1 size than to go 3 times through memory), and then convert back to YUV.


Naveen Gv

0 Kudos