Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

pyramidUp function

Alexander_Karsakov
796 Views

Hello.

Since ippiPyrUp_Gauss5x5_8u_C1R is marked as deprecated. I need to implement analogous function using Pyramid API.

Following the example (http://software.intel.com/en-us/node/504506), I wrote function:

void pyrUp_Gauss(Ipp8u *pSrc, IppiSize srcRoi, int srcStep, Ipp8u *pDst, IppiSize dstRoi, int dstStep)
{
    float rate = 2.f;
    IppiPyramid *gPyr;
    IppStatus ok = ippiPyramidInitAlloc(&gPyr, 2, srcRoi, rate);
    Ipp16s iKernel[5] = { 1, 4, 6, 4, 1 };
    int *gStep = gPyr->pStep;
    Ipp8u **gImage = (Ipp8u**)(gPyr->pImage);
    IppiSize *pRoi = gPyr->pRoi;
    gImage[1] = pSrc;
    gImage[0] = pDst;
    gStep[1] = srcStep;
    gStep[0] = dstStep;
    pRoi[1] = srcRoi;
    pRoi[0] = dstRoi;
    IppiPyramidUpState_8u_C1R **gState = (IppiPyramidUpState_8u_C1R**) &(gPyr->pState);     
    ok = ippiPyramidLayerUpInitAlloc_8u_C1R(gState, srcRoi, rate, iKernel, 5, IPPI_INTER_LINEAR);
    ok = ippiPyramidLayerUp_8u_C1R(gImage[1], gStep[1], pRoi[1], gImage[0], gStep[0], pRoi[0], *gState);
    ok = ippiPyramidLayerUpFree_8u_C1R(*gState);
    ok = ippiPyramidFree(gPyr);
}

When I run this code it fails on ippiPyramidLayerUpFree_8u_C1R with exception: Access violation reading location.

All previous IPP calls return ippStsNoErr. Input parameters are valid. When I replace this code with following code it works correct:

int len;
ippiPyrUpGetBufSize_Gauss5x5(srcRoi.width, ipp8u, 1, &len);
Ipp8u* buffer = ippsMalloc_8u(len);
ok = ippiPyrUp_Gauss5x5_8u_C1R(pSrc, srcStep, pDst, dstStep, srcRoi, buffer);
ippsFree(buffer);

I think error in my code. What do you suggest?

 

 

0 Kudos
1 Reply
Alexander_Karsakov
796 Views

I found out that ippiPyrUp_Gauss5x5_8u_C1R was marked as deprecated by mistake. 

Will remove deprecation warning in the next release?

Thanks,

Alexander.

0 Kudos
Reply