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

Different results on Linux and Windows with ippiResize_8u_C1R using version 5.1

Nils_van_der_Struis
554 Views
When calling ippiResize_8u_C1R on both Linux and Windows with the same input image, the results are slightly different. I verified that the input images are binary equal with the diff tool on Linux. The same diff tool tells me the resulting images are different. When I examine the difference between the output images with Paint.NET( image editing tool) I do see a non-black image when I scale(stretch) the difference. The difference image shows only completely black and completely white pizels. So probably, this is some kind of rounding issue.
I tried other modi than IPPI_INTER_LINEAR. Only the modus IPPI_INTER_NN results in equal output images, all other modi give non-equal output images on Linux and Windows.
0 Kudos
12 Replies
Vladimir_Dudnik
Employee
554 Views

Hello,

first of all please note that the latest IPP version is 6.0 and the next 6.1 is just coming. There is several years distance from IPP 5.1.

Are you use the same processor on Linux as on Windows?

Regards,
Vladimir
0 Kudos
nvdstruis
Beginner
554 Views
Hello mr. Dudnik,

I will try to link against version 6 on Monday.

Regarding your second question: yes, we do use the same processor on Linux and Windows. I implemented my own image resampling and achieved equal output on Windows and Linux. I suspect though, that it will be slower than the ipp resize.

Thank you,
N. van der Struis


Quoting - Vladimir Dudnik (Intel)
Hello mr. Dudnik,

I will try to link against version 6 on Monday.

Regarding your second question: yes, we do use the same processor on Linux and Windows. I implemented my own image resampling and achieved equal output on Windows and Linux. I suspect though, that it will be slower than the ipp resize.

Thank you,
N. van der Struis


Hello,

first of all please note that the latest IPP version is 6.0 and the next 6.1 is just coming. There is several years distance from IPP 5.1.

Are you use the same processor on Linux as on Windows?

Regards,
Vladimir

0 Kudos
nvdstruis
Beginner
554 Views
I checked out version 6.0. We still have the same issue, output differs between Linux and Windows.

This is quite an issue for us. Does anybody have a possible solution for me ? I also implemented this function myself, but Intel's routine is 3.5 times faster.

Thanks

Quoting - Nils van der Struis
When calling ippiResize_8u_C1R on both Linux and Windows with the same input image, the results are slightly different. I verified that the input images are binary equal with the diff tool on Linux. The same diff tool tells me the resulting images are different. When I examine the difference between the output images with Paint.NET( image editing tool) I do see a non-black image when I scale(stretch) the difference. The difference image shows only completely black and completely white pizels. So probably, this is some kind of rounding issue.
I tried other modi than IPPI_INTER_LINEAR. Only the modus IPPI_INTER_NN results in equal output images, all other modi give non-equal output images on Linux and Windows.

0 Kudos
Vladimir_Dudnik
Employee
554 Views
Hello,

could you please provide test case for this issue and source and resulting images? This will help us in investigation of your case.

Regards,
Vladimir
0 Kudos
nvdstruis
Beginner
554 Views
Hello mr. Dudnik,

I made a small project to show the issue. The program makes a Jaehne image and then resizes that image in both the x and y directions by a factor 4. I dump the pixel data of both the Jaehne image and its resized version to binary files called image_in.bin and image_out.bin respectively.
By using the diff tool on Linux, I can show that the file image_in.bin on windows is binary equal to the one from linux, but the image_out.bin produced on Windows is different from the image_out.bin produced on Linux.

Please find a zip file attached.

Thank you in advance, regards,
N. van der Struis

Quoting - Vladimir Dudnik (Intel)
Hello,

could you please provide test case for this issue and source and resulting images? This will help us in investigation of your case.

Regards,
Vladimir

0 Kudos
nvdstruis
Beginner
554 Views
Hello,

Just wanted to know whether this issue is still on the list ... Is it being looked at at Intel ?

Thanks, NvdS

Quoting - nvdstruis


0 Kudos
Vladimir_Dudnik
Employee
554 Views
Hello,

it seems your application on Windows built by Borland tools? Most probably Borland tools have different precision settings for FPU. I think if you compile application by Microsoft or Intel compiler you will have the same results as on Linux. If that is case, you may need to check Borland project settings.

Regards,
Vladimir
0 Kudos
nvdstruis
Beginner
554 Views
Hello mr. Dudnik,

I tried various options in the Borland project settings, but still have that difference. Are you sure this could make any difference, the Intel library can't be influenced by my code, or can it ?
Could somebody compile and run my sample program on Windows with Intel or VS compiler and post the 2 resulting files ?

Regards, Nils

Quoting - Vladimir Dudnik (Intel)
Hello,

it seems your application on Windows built by Borland tools? Most probably Borland tools have different precision settings for FPU. I think if you compile application by Microsoft or Intel compiler you will have the same results as on Linux. If that is case, you may need to check Borland project settings.

Regards,
Vladimir

0 Kudos
Vladimir_Dudnik
Employee
554 Views
Hi Nils,

there is what I get by googling 'default FPU precision in Borland': System initialization differences are allowed to affect FPU Control Word


Regards,
Vladimir
0 Kudos
nvdstruis
Beginner
554 Views
Hi Vladimir,

I checked the precision in my test program on Windows, it uses default extended precision. Also, my own implementation of the resize function produced equal results, which I think suggests there isn't any precision difference between Windows(Borland) and Linux in this case.

I really would like to solve this issue, because it slows down our progress and success.

Regards,
Nils

Quoting - Vladimir Dudnik (Intel)
Hi Nils,

there is what I get by googling 'default FPU precision in Borland': System initialization differences are allowed to affect FPU Control Word


Regards,
Vladimir

0 Kudos
nvdstruis
Beginner
554 Views
Hi Vladimir,

I rebuilt the ResizeTest executable (which I posted the other day at your request) with the Intel compiler. I found that the output difference between Windows and Linux executables has gone now !

The question remains how we can force the Borland compiler to link the same way as the Intel compiler and which setting(s) we should change ?! I have tried a lot but haven't seen any improvement. Can somebody shed some light on this Borland issue ?

Thanks, regards,
Nils

Quoting - nvdstruis


0 Kudos
Vladimir_Dudnik
Employee
554 Views
Hi Nils,

based on the article I referred in previous post my understanding is that you need to explicitly set desired FPU control word (to set FPU accuracy) in your Borland program before any IPP call.

Regards,
Vladimir
0 Kudos
Reply