Quantcast
Channel: Intel® Software - Intel® Integrated Performance Primitives
Viewing all articles
Browse latest Browse all 1489

ippiWarpPerspectiveQuad makes Exception in Purify

$
0
0

Hi,

we use the Intel_IPPI_ippiWarpPerspectiveQuad_8u_C1R of Intel IPP V7.0 with the interpolation IPPI_INTER_CUBIC.

We tested the software with IBM Purify and it shows an exception and memoryleaks (in both debug and release).

If we use another interpolation like IPPI_INTER_LINEAR or IPPI_INTER_LANZCOS we have no exceptions and memoryleaks, so we think this is a bug of the IPPI.

I attached the purify result as a png image.

Best regards,

Marco

Here is a source code example:

#include <string>
#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
  int iNOL(2048);
  int iNOC(2048);
 
  Ipp8u* pSrc = new Ipp8u[iNOL*iNOC];
  int isrcStep = iNOC;
  IppiSize SrcSize;
  SrcSize.height = iNOL;
  SrcSize.width  = iNOC;

 
  IppiRect srcROI;
  srcROI.x = 0;
  srcROI.y = 0;
  srcROI.width  = iNOC;
  srcROI.height = iNOL;

  double srcQuad[4][2] = {
     {  878,  985 },
     { 1083,  980 },
     { 1083, 1014 },
     {  879, 1019 } };

  Ipp8u* pDst = new Ipp8u[iNOL*iNOC];
  int dstStep = iNOC;
  IppiRect dstROI;
  dstROI.x = 0;
  dstROI.y = 0;  
  dstROI.width = iNOC;
  dstROI.height = iNOL;

  const double dstQuad[4][2] = {
    { 0, 0},
    { iNOC - 1, 0},
    { iNOC - 1, iNOL - 1},
    { 0, iNOL - 1} };

  int interpolation = IPPI_INTER_CUBIC;//IPPI_INTER_NN;//IPPI_INTER_LINEAR;//IPPI_INTER_CUBIC; // IPPI_SMOOTH_EDGE

  // ippiWarpPerspectiveQuad_8u_C1R
  // IPPI_INTER_NN -> OK
  // IPPI_INTER_LINEAR -> No Exception but MemoryLeak
  // IPPI_INTER_CUBIC -> Exception and MemoryLeak
  // IPPI_INTER_SUPER -> OK
  // IPPI_INTER_LANCZOS -> OK

  // ippiWarpPerspective_8u_C1R
  // IPPI_INTER_NN -> OK
  // IPPI_INTER_LINEAR -> OK
  // IPPI_INTER_CUBIC -> Exception and MemoryLeak

  try
  {   
   IppStatus status = ippiWarpPerspectiveQuad_8u_C1R(pSrc, SrcSize, isrcStep, srcROI, srcQuad, pDst, dstStep, dstROI, dstQuad, interpolation);
    cout << "IppStatus: "<< status << endl;
  }
  catch (...)
  {
    cerr << "Error :o("<< endl;
  }

  delete [] pDst;
  delete [] pSrc;

    return 0;
}


Viewing all articles
Browse latest Browse all 1489

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>