Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
63 Views

Resize on planar data with IPP9.0

Hello All,

I find that ippiResize_8u_P3R is not there any more, which is currently used in our project. Therefore, I try to find an replacement, but from the website of Intel, I could only find the example to use ippiResizeLanczos_8u_C3R.

From the developer reference of IPP9.0, I found that the substitution of P3R (e.g. ippiResizeSqrPixel_16s_P3R)   is Use C1R flavor for each plane, can I use such method for replace the ippiResize_8u_P3R? Is there any example for showing how to  Use C1R flavor for each plane?

Thank you in advance!

Ning

0 Kudos
1 Reply
Highlighted
Beginner
63 Views

Or can I first use the following approach?

ippiCopy_8u_P3C3R

ippiResizeLinear_8u_C3R

ippiCopy_8u_C3P3R

Code is here,

srcStepTmp = src->widthStep * 3;
		pSrcTmp = iplMalloc(srcStepTmp * srcRoi.height);
		dstStepTmp = dst->widthStep * 3;
		pDstTmp = iplMalloc(dstStepTmp * dstRoiSize.height);
         for( i=0; i<3; i++ ) {
            pSrcPlane = pSrc;
            pDstPlane = pDst;
            pSrc += planeSize1;
            pDst += planeSize2;
         }
		 ippiCopy_8u_P3C3R(pSrcPlane, src->widthStep, pSrcTmp, srcStepTmp, roi);
		
			 ippiResizeGetSize_8u(srcSize, dstRoiSize, ippLinear, 0, &specSize, &initSize);
			 pInitBuf = ippsMalloc_8u(initSize);
			 pSpec = (IppiResizeSpec_32f*)ippsMalloc_8u(specSize);
			 ippiResizeLinearInit_8u(srcSize, dstRoiSize, pSpec);
			 ippiResizeGetBufferSize_8u(pSpec, dstRoiSize, dst->nChannels, &bufSize);
			 pBuffer = ippsMalloc_8u(bufSize);
			 ippiResizeLinear_8u_C3R(pSrcTmp, srcStepTmp, pDstTmp, dstStepTmp, dstOffset, dstRoiSize, ippBorderRepl, borderValue, pSpec, pBuffer);
			
		 ippiCopy_8u_C3P3R(pDstTmp, dstStepTmp, pDstPlane, dst->widthStep, dstRoiSize);

		 iplFree(pDstPlane);
		 iplFree(pSrcPlane);

 

Are there anything wrongly implemented?

 

0 Kudos