[FFmpeg-devel] MP_WORDSIZE usage in libavcodec/h264.c

Rich Felker dalias
Fri Dec 7 19:29:36 CET 2007

On Fri, Dec 07, 2007 at 10:24:20AM -0000, M?ns Rullg?rd wrote:
> Diego Biurrun wrote:
> > libavcodec/h264.c:112 looks like this:
> >
> > #if defined(ARCH_X86_64) || (defined(MP_WORDSIZE) && MP_WORDSIZE >= 64)
> >
> > However, we never define MP_WORDSIZE, MPlayer does.  So should we remove
> > that part, define MP_WORDSIZE ourselves, ignore the issue?
> There is a different check for 64-bit words in simple_idct.c, IIRC, and
> there may be others.  We should change all of them to use one consistently
> named symbol that we set in configure.

IMO if the test is not absolutely needed at preprocessing time,
if (sizeof(long)>=8) would be a perfectly good way to do it. The
compiler should optimize out unreachable code. That's how I always
wrote the tests in my libc..


More information about the ffmpeg-devel mailing list