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

64 bit compiler warnings

alex78
New Contributor I
361 Views

Hi all,

yes, I know there have been similar threads in the past, but I did not find a final answer to this problem. Compiling the H264 and MPEG4 decoders from Intel IPP 6.1.6 (taken from the 6.1.6 samples) in Visual Studio produces some warnings when the "Detect 64bit portability issues" is turned on for the compiler. The H264 decoder produces 5 warnings of type "conversion from type size_t to Ipp32s(u), possible loss of data". The MPEG4 decoder produces 6 warnings - same as above. Additionaly it produces some "pointer truncation" and "int to pointer conversion" warnings for the _ALIGN16 macro, but these are obviously harmless because there is a special 64bit version of this macro under an #ifdef.

1. Can anybody confirm that the size_t conversion warnings are harmless when compiling for a 64 bit platform?

2. Does anybody know if upgrading to IPP 7 helps to get rid of the warnings?

Thanks
Alex

0 Kudos
5 Replies
SergeyKostrov
Valued Contributor II
361 Views
Quoting alex78
...The H264 decoder produces 5 warnings of type "conversion from type size_t to Ipp32s(u), possible loss of data".
The MPEG4 decoder produces
6 warnings - same as above...

1. Can anybody confirm that the size_t conversion
warnings are harmless when compiling for a 64 bit platform?

     [SergeyK] There are 11 warnings in total and I would investigate every case because on a 64-bit platform that loss of data
                        could create problems.

 
Please take a look at a thread:

     Tips for Porting software to a 64-bit platform
     http://redfort-software.intel.com/en-us/forums/showthread.php?t=106025&o=a&s=lr

Best regards,
Sergey

0 Kudos
alex78
New Contributor I
361 Views
Hi Sergey,

thank you very much for your reply. However, it does not really answer my question. In particular, I would like to know if Intel is concerned about these warnings, with other words, can we consider the sample code provided by Intel to be 64-bit compatible? Or are we on our own here to investigate the 64 bit compiler warnings to create a 64 bit compatible code? I also hoped that anybody tried to run these decoders on Win64 so that we can hear some experience.

Thanks for your patience.

Alex
0 Kudos
SergeyKostrov
Valued Contributor II
361 Views
Hi Alex,

Quoting alex78
...I would like to know if Intel is concerned about these warnings...

     [SergeyK] I can't answer. There is a possibility that Intel software developer simply didn't see that warning
                        because a Warning Level was set to 1, 2 or 3 in a Visual Studio.

...Can we consider the sample code provided by Intel to be 64-bit compatible?

     [SergeyK] I think Yes. However, you need to test and verify it on a 64-bit platform. Unfortunately, you didn't provide
                        a piece of code(s) that generates one of these compatibility warnings. It is really hard to say if there is some "danger"...

Or are we on our own here to investigate the 64 bit compiler warnings to create a 64 bit compatible code?

     [SergeyK] Please see above.

Best regards,
Sergey
0 Kudos
Sergey_K_Intel
Employee
361 Views
Hi Alex,
 
Have you tried 7.0.x samples? I cannot see warnings like these. And as far as i know, there were no issues specific to 64 bits.
 
Regards,
Sergey
0 Kudos
alex78
New Contributor I
361 Views
Hi Sergey,

I had a quick look at the 7.0.X samples I can see that these warnings have been removed. All the cases with size_t to int conversion have been solved by adding type casts like (Ipp32s) before the size_t value. For anybody who might be interested, this means that the 64bit compiler warnings generated by VS for the 6.1.6 samples are harmless, becase adding the type casts in 7.0.X samples indicates that the size_t variables will not overflow the int range.

Thanks for your replies and have a nice day.

Alex
0 Kudos
Reply