- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I'm trying to compile the audio-video codec samples for Intel
Performance Primitives using gcc on linux. I would especially
like to compile the sample mpeg4_enc.
But I get the following error:&nbs p;
src/mp4_enc_me.cpp:401: error: cast from 'Ipp8u*' to 'Ipp32s' loses precision
src/mp4_enc_me.cpp: In function 'void MPEG4_ENC::mp4_ME_QuarterPel_SAD(MPEG4_ENC
::mp4_Data_ME*)':
this file is located in:
& nbsp;
.../ipp-samples/audio-video-codecs/codec/mpeg4_enc/src
line 401 is:
__ALIGN16(Ipp8u, mc, 256);
& nbsp;
the macro __ALIGN16 is defined as:
#if defined(__INTEL_COMPILER) && !defined(_WIN32_WCE)
#define __ALIGN16(type, name, size)
__declspec (align(16)) type name[size]
#else& nbsp;
#if defined(_WIN64) || defined(WIN64) || defined(LINUX64)
#define __ALIGN16(type, name, size)
Ipp8u _a16_##name[(size)*sizeof(type)+15]; type *name = (type*)(((Ipp64s)(_a16_##name) + 15) & ~15)
#else
#define __ALIGN16(type, name, size)
Ipp8u _a16_##name[(size)*sizeof(type)+15]; type *name = (type*)(((Ipp32s)(_a16_##name) + 15) & ~15)
#endif
#endif
since I am using linux 32, the third case gets expanded. Any suggestions how I can get past this compiler error and get it to compile would be appreciated.
Thanks
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - abalk
Hi
I'm trying to compile the audio-video codec samples for Intel
Performance Primitives using gcc on linux. I would especially
like to compile the sample mpeg4_enc.
But I get the following error:&nbs p;
src/mp4_enc_me.cpp:401: error: cast from 'Ipp8u*' to 'Ipp32s' loses precision
src/mp4_enc_me.cpp: In function 'void MPEG4_ENC::mp4_ME_QuarterPel_SAD(MPEG4_ENC
::mp4_Data_ME*)':
...
Any suggestions how I can get past this compiler error and get it to compile would be appreciated.
Thanks
I'm trying to compile the audio-video codec samples for Intel
Performance Primitives using gcc on linux. I would especially
like to compile the sample mpeg4_enc.
But I get the following error:&nbs p;
src/mp4_enc_me.cpp:401: error: cast from 'Ipp8u*' to 'Ipp32s' loses precision
src/mp4_enc_me.cpp: In function 'void MPEG4_ENC::mp4_ME_QuarterPel_SAD(MPEG4_ENC
::mp4_Data_ME*)':
...
Any suggestions how I can get past this compiler error and get it to compile would be appreciated.
Thanks
Hi,
The answer might be several month too late for you, but I came across this thread when experiencing the same problem. Sadly there was no answer to help me out. After figuring it out for myself I am now providing the answer for future reference.
The problem arises (in my case, not sure for abalk) when compiling the code with the build32.sh script on 64bit system. On such a sytem the pointer have 64bit length and a cast to Ipp32s is indeed an error.
Fixing this can simply be done by adding:
ifeq ($(ARCH), linux32)
CFLAGS += -m32
endif
to the Makefile.
Veit
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page