[Ffmpeg-devel] Compiling ffmpeg as a universal shared library on Mac OS X - Need help with MMX
Jean-Francois Roy
bahamut
Fri Aug 26 15:00:23 CEST 2005
Hello,
I am currently working on a Xcode 2.1 project to compile ffmpeg as a
shared library containing 3 architectures (generic G4, G5 and generic
i386 tuned to pentium4). Everything works nicely except the MMX
optimizations of the i386 architecture. Since arguably I'm much more
of a PowerPC guy and not too much of an assembly freak, so I thought
I'd share the errors I am getting with the list see if anyone
understands them.
A bit of info about the build environment:
gcc version: powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 (Apple
Computer, Inc. build 5026)
Xcode tools: 2.2 dev preview 1 (Xcode IDE: 622.0, Xcode Core: 622.0,
ToolSupport: 610.0)
I'm building straight off from CVS.
The compiler arguments look something like this for any given file
when building for i386:
/usr/bin/gcc-4.0 -x c -arch i386 -pipe -std=gnu99 -Wno-trigraphs -
fpascal-strings -fasm-blocks -O3 -Wreturn-type -Wno-four-char-
constants -Wno-pointer-sign -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_GNU_SOURCE -fmessage-length=0 -ffast-math
<snip> -march=pentium4 -mtune=pentium4 -msse -msse2 -mfpmath=sse -
mdynamic-no-pic -force_cpusubtype_ALL <snip> -ftree-vectorize -
finline-functions -fobey-inline <snip> -c <snip> -o <snip>
The important parts of the i386 config.h:
#define FFMPEG_CONFIGURATION " --enable-shared --enable-pthreads --
disable-vhook --disable-ffserver --disable-ffplay --disable-encoders "
#define ARCH_X86 1
#define TUNECPU generic
#define HAVE_MMX 1
#define __CPU__ 586
#define HAVE_BUILTIN_VECTOR 1
#define HAVE_LOCALTIME_R 1
#define HAVE_PTHREADS 1
#define HAVE_THREADS 1
#define HAVE_LRINTF 1
#define CONFIG_ENCODERS 1
#define CONFIG_DECODERS 1
#define CONFIG_MPEGAUDIO_HP 1
#define CONFIG_HAVE_DLOPEN 1
#define CONFIG_HAVE_DLFCN 1
#define CONFIG_NETWORK 1
#define CONFIG_ZLIB 1
#define CONFIG_DARWIN 1
#undef HAVE_MALLOC_H
#undef HAVE_MEMALIGN
#define SIMPLE_IDCT 1
#define restrict __restrict__
Here are the errors.
fdct_mmx.c:
{standard input}:unknown:file contains unmatched .macro and .endmacro
for: FDCT_ROW_SSE2_H1it
gcc exits with code 1.
dsputil_mmx.c:
{standard input}:92:Unknown pseudo-op: .balign
{standard input}:92:Rest of line ignored. 1st junk character valued
56 (8).
Above repeated ad-nauseam until gcc exits with code 1.
mpegvideo_mmx.c:
{standard input}:57:Unknown pseudo-op: .balign
{standard input}:57:Rest of line ignored. 1st junk character valued
49 (1).
Above repeated ad-nauseam until gcc exits with code 1.
motion_est_mmx.c:
{standard input}:34:Unknown pseudo-op: .balign
{standard input}:34:Rest of line ignored. 1st junk character valued
49 (1).
Above repeated ad-nauseam until gcc exits with code 1.
simple_idct_mmx.c:
{standard input}:401:Junk character 47 (/).
{standard input}:401:Rest of line ignored. 1st junk character valued
110 (n).
Above repeated ad-infinitum until gcc exits with code 1.
Everything else is fine, and the 2 Power PC architectures build just
fine as well. Also, if I disable the MMX and native vector defines in
the i386 config.h and remove the i386 files from compilation, the
i386 architecture builds fine.
Ideas, thoughts, comments, fixes, questions?
Best regards,
Jean-Francois Roy
--
Co-Founder of MacStorm
Programmer at MacStorm
http://www.macstorm.org
http://www.devklog.net
bahamut at macstorm.org
http://www.macstorm.org/bahamut/Jean-Francois.gpgkey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050826/081cb3d2/attachment.pgp>
More information about the ffmpeg-devel
mailing list