天天看點

圖像處理算法大全(基于libyuv或IPP)----RGB24縮放

《周星星教你學ffmpeg》技巧

ipp源碼:

static void RGB_Resize(BYTE* pin, BYTE* pout, int width,int height,int desWidth,int desHeight)//RGB縮放函數

{

IppiSize srcsz={width,height}, dstroi={desWidth,desHeight}; 

IppiRect srcroi={0,0,width,height}; 

// IppiSize roi = {desWidth,desHeight}; 

IppStatus is =ippiResize_8u_C3R( pin, srcsz, WLEN(width,24), srcroi, pout, WLEN(desWidth,24), dstroi,(double)desWidth/(double)width, (double)desHeight/(double)height, IPPI_INTER_LINEAR ); 

if(is != ippStsNoErr)

{

return;

//convert error

}

}

有問題聯系作者QQ:35744025