[FFmpeg-devel] [RFC] Defining ARCH_* through compiler's macros

Diego 'Flameeyes' Pettenò flameeyes
Tue Dec 11 17:45:01 CET 2007

It's not complete yet but I'd rather ask now and get it shot down rather
than completing it and having to scratch it after spending too much time
on it.

The attached file is just a proposal, not complete nor probably accurate
at the moment, to set the ARCH_* variables through the use of compiler's
macros (at least gcc, icc and if I recall correctly sun's cc provide
enough of them).

The idea is to be able to install this and thus not depending on
config.h anymore for the ARCH_* macros.

A couple of notes:

 * ARCH_X86_CPU is a new define, which should, for me, replace __CPU__
   which is currently only used in bswap.h, and is defined by configure
   to be 586 if you enable MMX; __CPU__ is also broken at the moment as
   it's never defined by the build system to anything but 586, if any,
   so the #if in bswap.h never gets to the #else clause (and __CPU__
   sounds like a default macro name, rather than a build system macro
 * As I said it's not complete nor accurate, for instance, I haven't dug
   enough to understand what ARMV4L is supposed to mean, so I simply
   guessed Little-endian ARMv4. Please don't scream too much to me if
   it's wrong, I didn't expect to get it right.
 * I haven't yet checked if there's a way to get the define for
   ARCH_POWERPC_405; on the other hand I fail to find where it's defined
   in FFmpeg either.

/me ducks and covers

-------------- next part --------------
A non-text attachment was scrubbed...
Name: arches.h
Type: text/x-c
Size: 2001 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071211/0d6ebd9c/attachment.bin>
-------------- next part --------------

Diego "Flameeyes" Petten?

More information about the ffmpeg-devel mailing list