- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi pascala,
For your question, the ippiResizeGetSize function is mainly to get input image structure & external buffer for resize transform initialization. Not all resize type would e required to get a returned buffer size from ippiResizeGetSize. For example, the ResizeLanczosInit funtion required a parameter of puffer for cubic filter initialization, the value of this parameter can be get from returned value "pInitBufSize" of ippiResizeGetSize. But ResizeLinearInit & ResizeSuperInit do not required this pointer of buffer. This buffer size is depends on what interpolation algorithms you decided to choose. You do not need to worrying without using this return value for supper sampling.
And another buffer value which is get from function "ippiResizeGetBufferSize" is used for resize calculation "ippiResizeSuper". They are actually two different buffer for different use. You could refer following code to understand:
//for antialiasing linear resize required init buffer Ipp32s pInitBufSize=0; ippiResizeGetSize_8u(srcSize, dstSize, ippLinear, 1, &specSize, &pInitBufSize); IppiResizeSpec_32f* pSpec = (IppiResizeSpec_32f*)ippsMalloc_32f(specSize); Ipp8u* pInitBuf = ippsMalloc_8u(pInitBufSize); ippiResizeAntialiasingLinearInit(srcSize, dstSize, pSpec, pInitBuf); Ipp32s bufSize=0; ippiResizeGetBufferSize_8u(pSpec, dstSize, 3, &bufSize); Ipp8u* pBuffer = ippsMalloc_8u(bufSize); ... ippiResizeAntialiasing_8u_C3R(pSrc, srcStep, pDst, dstStep, dstOffset, dstSize, border, 0, pSpec, pBuffer); //for super sampling resize not required init buffer Ipp32s pInitBufSize=0; ippiResizeGetSize_8u(srcSize, dstSize, ippLinear, 1, &specSize, &pInitBufSize); IppiResizeSpec_32f* pSpec = (IppiResizeSpec_32f*)ippsMalloc_32f(specSize); ippiResizeSuperInit_8u(srcSize, dstSize, pSpec); Ipp32s bufSize=0; ippiResizeGetBufferSize_8u(pSpec, dstSize, 3, &bufSize); Ipp8u* pBuffer = ippsMalloc_8u(bufSize); ... ippiResizeSuper_8u_C3R(pSrc, srcStep, pDst, dstStep, dstOffset, dstSize, pSpec, pBuffer);
![](/skins/images/BB1F1F4A87ADD5519B4C7EA2DE1D225A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page