[Ffmpeg-devel] Re: [patch] fixes for some compiler warnings

Dieter freebsd
Wed Feb 15 20:40:11 CET 2006


>>> In preparation for trying Dan's interlace patch, I updated my
>>> sources and found that someone has forgotten that int and pointer
>>> are not always the same size.  So here is an updated patch
>>> that fixes some of the compiler warnings.
>>
>> I'm curious, when is that the case?
>
> 64-bit architectures often have 32-bit ints and 64-bit pointers.

Modern general purpose machines are either ILP32 or LP64.
ILP32 means ints, longs and pointers are all 32 bits.
LP64 means ints are 32 bits, longs and pointers are 64 bits.

Thus, it is reasonable to assume that long and pointer are the same
size, but it is not safe to assume that int and long are the same
size, nor to assume that int and pointer are the same size.

If someone wants to port ffmpeg to something like a DEC PDP-10 or
a CDC-6x00, I suspect they have their work cut out for them.  :-)

> However, I don't see any fixes of this nature in the patch.

Look at libavcodec/zmbv.c





More information about the ffmpeg-devel mailing list