Currently we are using IPP 5.2 in our application, I try to replace it with IPP 2019 with Nuget package. I don't understand the performance comparison of resize with CUBIC between IPP 5.2 and IPP 2019.
My CPU is Intel Core i7-8700k. In my project. For IPP 5.2 the version information is 0x3BBBF280 "6.0 Update 2 build 167.41", name is 0x3BBBF2A8 "ippip8-6.0.dll+".
For IPP 2019, the version is x3b834230 "2019.0.4 (r62443)" and the name is 0x3b834220 "ippIP AVX2 (h9)". The cubic parameter B is set to 0.15 and C is set to 0.5.
The comparison test for resizing with cubic, the size of source images are kept as the same and the resize factor is varied. The cubic method ippiResizeCubic_16u_C1R is used. The repetition is set to 1000.
When the size of source image is (30, 27) , small image, the performance of IPP 5 is better than IPP 2019. Comparison Test result with size (30,27)
When the size of source image is (150, 136), the performance of IPP 5 is almost the same as IPP 2019. Comparison Test result with size (150,136)
When the size of source image is larger then (150, 136), like the third image with size (480, 517), the speed of IPP 2019 is faster than IPP 5. Comparison Test result with size (480,517)
old IPP resize function in IPL project
ippiResize_16u_C1R((Ipp16u*)pSrc, srcSize, src->widthStep, srcRoi,
(Ipp16u*)pDst, dst->widthStep, dstRoiSize, xFactor, yFactor, interpolation);
new implementation with Cubic interpolation type
ippiResizeGetSize_16u(srcSize, dstRoiSize, ippCubic, 0, &specSize, &initSize);
pInitBuf = ippsMalloc_8u(initSize);
pSpec = (IppiResizeSpec_32f*)ippsMalloc_8u(specSize);
ippiResizeCubicInit_16u(srcSize, dstRoiSize, CubicParameterB, CubicParameterC, pSpec, pInitBuf);
ippiResizeGetBufferSize_8u(pSpec, dstRoiSize,1, &bufSize);
pBuffer = ippsMalloc_8u(bufSize);
ippiResizeCubic_16u_C1R((Ipp16u*)pSrc, src->widthStep, (Ipp16u*)pDst, dst->widthStep, dstOffset, dstRoiSize, ippBorderRepl, borderValue, pSpec, pBuffer);
iplFree(pInitBuf);
iplFree(pSpec);
iplFree(pBuffer);
From the test result I got, the IPP 2019 is faster when dealing with larger image, but slower when resizing smaller image. Is this because different cubic algorithm is used in the IPP 2019.
For resizing the smaller image (30,27), is the quality of resized image with IPP 2019 better than resized with IPP 5?
Thank you for your help, any suggestions are appreciated!
Kind regards,
Ning