[Ffmpeg-devel] [RFC] Support building universal binaries of FFmpeg on Darwin
Dan Villiom Podlaski Christiansen
Wed Jun 22 18:49:12 CEST 2005
Attached below is an initial patch to allow building a universal, or
fat, binary of FFmpeg on Darwin 8.0 and later using GCC 4.0. The
generated binary will contain 4 architectures: G3, G4, G5 and x86.
Having the three PowerPC architectures allows GCC to tune for the
specified CPU, and possibly vectorize code.
The configure script needed a lot of hackery to defer detection of e.g.
AltiVec to compile-time. Source code changes mainly involve ensuring
that files in libavcodec/ppc and libavcodec/i386 compile with both PPC
and x86 compilers. A few cases where CONFIG_DARWIN was incorrectly
assumed to mean Motorola AltiVec syntax was also fixed.
However, I ran into a major issue: The Darwin assembler is an old
version of GNU as, and it does not support the i386 syntax used in
FFmpeg. I believe the issues boil down to:
- The asm macro syntax used in Darwin is different from the currently
used syntax. It appears to not support named arguments and use
".endmacro" instead of ".endm". Perhaps using C macros would be better?
- The .balign pseudo-op doesn't exist. The best substitute I could find
was .align. (In i386/dsputil_mmx.c)
- I get a lot of errors about "Junk character 47 (/)". I don't know what
that means :/ (In i386/simple_idct_mmx.c)
I don't know x86 assembly, so I have no idea how to fix this. I was
hoping someone else might be able to help. All other files compile fine.
- Dan Christiansen
P.S. Please Cc any replies directly to me, as I'm not subscribed to
either of these lists. Alex Beregszaszi said on IRC that this might be
of interest to MPlayer developers as well, so this mail is Cc'ed there.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the ffmpeg-devel