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

segfault in ippiResizeSqrPixel

hi. i'm using ipp6(6.1.2) for image processing to make thumbnail.
and my env is that.

OS : linux(centOS 5.X) 64bit
CPU : 
Intel(R) Xeon(R) CPU E5-2630L 0 @ 2.00GHz

And I got a trouble during upgrage  centOS 5.x --> 6.x

there is no segmentation fault to execute ippiResizeSqrPixel_8u_C3R in CentOS5.X.
but, here is a segmentation fault in CentOS 6.X

of cause, I re-install IPP libs, and re-compile my binary.

 

here is a segfault stack.

#0  0x0000000000502e19 in e9_ownpi_CalcBorder8pxLz ()
No symbol table info available.
#1  0x00000000004ebf04 in e9_ownpiResizeSP ()
No symbol table info available.
#2  0x00000000004c75c9 in e9_ippiResizeSqrPixel_8u_C3R ()

 

What's unique is segfault occur in only special conditions.
============================================
Origial Image Width : 15
Origial Image Hieght : 15
Target Resize Width : 176
Target Resize Height : 176
============================================

SUMMERY

1. when I change target size, it doesn't make segfault.
2. when I execute it in centOS 5.X, it doesn't make segfault.
3. when I change CPU(with CentOS 6.X), it  doesn't make segfault.

 

I guess CPU and IPP and OS has some dependency.
Would somebody help me please?

 

 

0 Kudos
7 Replies
Highlighted
Moderator
6 Views

There were a number of issues were fixed since version 6.2. You can check the problem with the latest version - 8.2. In the case if  the problem would be exist, please let us the example of the code for reproducing and investigation the causes of the problem. 

0 Kudos
Highlighted
Beginner
6 Views

I am also seeing this issue in IPP 8.2 running Xubuntu 14.04 64-bit. The problem is hard to reproduce consistently within our application.

#0 0x0000000001b4cbd0 in y8_ownpi_CalcBorder8pxLz ()
#1 0x00000000017585e7 in y8_ownpiResizeSP ()
#2 0x00000000017db23a in y8_ippiResizeSqrPixel_8u_AC4R ()

0 Kudos
Highlighted
Moderator
6 Views

Would you please give us the example of the code for reproducing the case.

0 Kudos
Highlighted
Employee
6 Views

Hi Aaron,

ResizeSqrPixel is deprecated functionality that will be removed in the next major IPP release from the main IPP package - that means it is not supported anymore. Please use the new resize APIs - ippiResize<Interpolation>. The new Resize<Interpolation> functionality is faster, has optimization for all latest Intel HW, has significantly less footprint in case of static linking and, the main advantage, will be supported in all future IPP versions.

regards, Igor

0 Kudos
Highlighted
Beginner
6 Views

Hello,

Below is a simplified version of our code using ResizeSqrPixel. I would be happy to move to the new Resize<interp> functions but the interface for those has changed quite significantly and we under some time constraints right now.

Are you able to show me how to convert this to the new ResizeLinear function?

void resize(const Image<BGRA_32U>& src, const Rect& src_roi, Image<BGRA_32U>& dst, const Rect& dst_roi, InterpolationMode interp)
{
    double x_factor = (static_cast<double>(dst_roi.cols()-1))/(static_cast<double>(src_roi.cols()-1));
    double y_factor = (static_cast<double>(dst_roi.rows()-1))/(static_cast<double>(src_roi.rows()-1));

    double x_shift = (0.5-0.5*x_factor);
    double y_shift = (0.5-0.5*y_factor);

    // Src ROI must have x and y = 0, pSrc then points to first pixel of src ROI
    IppiRect src_roi_rect = {0, 0, src_roi.width(), src_roi.height()};
    IppiRect dst_roi_rect = convertToIppiRect(dst_roi);

    int buf_size;
    ippiResizeGetBufSize(src_roi_rect, dst_roi_rect, 4, interp.interp(), &buf_size));
    Ipp8u* buffer = ippsMalloc_8u(buf_size);

    const uint8* pSrc = src.plane(0).scanLine(src_roi.y()) + src_roi.x() * Image<BGRA_32U>::BITS_PER_PIXEL / 8;
    uint8* pDst = dst.plane(0).scanLine(dst_roi.y()) + dst_roi.x() * Image<BGRA_32U>::BITS_PER_PIXEL / 8;

    ippiResizeSqrPixel_8u_AC4R(pSrc,
                               src.size(),
                               src.stepBytes(),
                               src_roi_rect,
                               pDst,
                               dst.stepBytes(),
                               dst_roi_rect,
                               x_factor, y_factor, x_shift, y_shift, interp, buffer));
    ippsFree(buffer);
}

Thanks

0 Kudos
Highlighted
Beginner
6 Views

Hi,

Just curious if anyone from Intel support is reviewing my code above and can help with moving to the non-deprecated version.

Regards

0 Kudos
Highlighted
6 Views

Hi Aaron,

You can find examples how to use the new Resize<Interp> by following the link: https://software.intel.com/en-us/node/504353

Best regards,
Valentin

0 Kudos