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

Access violation in ippiWarpBilinear_8u_C1R

VVaneev
Beginner
816 Views

Hi,
I'm getting an access violation in ippiWarpBilinear_8u_C1R on a specific input:

#include <ipp.h>
#include <stdio.h>

int main()
{
    int w = 31;
    int h = 27;
    const double coeffs[2][4]{
        { 9.2383544637999199e-07, 1.0076604435213838, 0.0012804359286828610, 0.0000000000000000 },
        { 0.00069696970735535211, 0.28268182239410561, 0.96599999949336035, 16.584000247120859 }
    };
    int interpolation = IPPI_INTER_CUBIC;

    IppiRect roi{ 0, 0, w, h };
    int src_step{};
    auto src{ ippiMalloc_8u_C1(w, h, &src_step) };
    if (IppStatus status = ippiSet_8u_C1R(0, src, src_step, { w, h }))
        printf("%dx%d ippiSet_8u_C1R: %d\n", w, h, status);
    int dst_step{};
    auto dst{ ippiMalloc_8u_C1(w, h, &dst_step) };

    int buf_size{};
    if (IppStatus status = ippiWarpBilinearGetBufferSize({ w, h }, roi, roi, IppiWarpDirection::ippWarpForward, coeffs, interpolation, &buf_size))
        printf("%dx%d ippiWarpBilinearGetBufferSize: %d\n", w, h, status);
    auto buf{ ippMalloc(buf_size) };

    if (IppStatus status = ippiWarpBilinear_8u_C1R(src, { w, h }, src_step, roi, dst, dst_step, roi, coeffs, interpolation, (Ipp8u*)buf))
        printf("%dx%d ippiWarpBilinear_8u_C1R: %d\n", w, h, status);

    ippiFree(buf);
    ippiFree(src);
    ippiFree(dst);
}

Tested IPP versions: 2021.10, 2021.7

0 Kudos
1 Solution
Gennady_F_Intel
Moderator
315 Views

Vladislav,

the fix of the problem has been added to the IPP version 2021.12 which has been released a few days ago.


see the log with the previous version of IPP ( 2021.11

ipp$ ./a.out

 IPP Version = 2021.11.0 (r0xcd107b02), BuildDate = Jan 30 2024

31x27 ippiSet_8u_C1R: 0

31x27 ippiWarpBilinearGetBufferSize: 472, StatusReturned = 0

Segmentation fault (core dumped)


and the latest version ( IPP 2021.12

IPP Version = 2021.12.0 (r0x9b172c15), BuildDate = Apr 25 2024 

31x27 ippiSet_8u_C1R: 0

31x27 ippiWarpBilinearGetBufferSize: 472, StatusReturned = 0 

31x27 ippiWarpBilinear_8u_C1R: 0


=======

The thread is closing.


--Gennady



View solution in original post

0 Kudos
3 Replies
Gennady_F_Intel
Moderator
775 Views

Vladislav,

here it looks like a problem which we have to investigate and fix if it is the real problem on IPP end.

Could you try to use please try to use LINEAR interpolation mode.

--Gennady


0 Kudos
VVaneev
Beginner
753 Views

It is only reproduced with IPPI_INTER_CUBIC interpolation.

0 Kudos
Gennady_F_Intel
Moderator
316 Views

Vladislav,

the fix of the problem has been added to the IPP version 2021.12 which has been released a few days ago.


see the log with the previous version of IPP ( 2021.11

ipp$ ./a.out

 IPP Version = 2021.11.0 (r0xcd107b02), BuildDate = Jan 30 2024

31x27 ippiSet_8u_C1R: 0

31x27 ippiWarpBilinearGetBufferSize: 472, StatusReturned = 0

Segmentation fault (core dumped)


and the latest version ( IPP 2021.12

IPP Version = 2021.12.0 (r0x9b172c15), BuildDate = Apr 25 2024 

31x27 ippiSet_8u_C1R: 0

31x27 ippiWarpBilinearGetBufferSize: 472, StatusReturned = 0 

31x27 ippiWarpBilinear_8u_C1R: 0


=======

The thread is closing.


--Gennady



0 Kudos
Reply