[Ffmpeg-devel] [PATCH] Universal binary support for Mac OS X

Dan Villiom Podlaski Christiansen danchr
Sat Feb 4 19:39:27 CET 2006


Attached below is a patch which adds a new CPU type to the FFmpeg  
configure system, 'fat'. This is used for building a universal binary  
on Mac OS X 10.4, which runs natively both on PowerPC and x86  
systems. Also added is an easier way to access this this flag, '-- 
enable-universal'. Additionally, tuning for all four CPU families  
that Mac OS X runs on, G3, G4, G5 and Intel, is also possible by  
specifying '--tune=all'. To my knowledge, this has no benefits beyond  
resulting in a binary that takes four times as long to compile and is  
four times as large as a non-fat binary, rather than the ordinary  
universal binary which just doubles the time and space required.

While at it, I added the 'safe' flags that are used in Apple's -fast  
option to GCC 4, which should generate slightly faster binaries.

Other than the obvious changes to the build system, the following  
source level changes where made:
- Most of the changes were made to ensure that the files in  
libavcodec/{ppc,i386} check for architecture rather than assume it.
- The .balign instructions in have been changed to use macros which  
expand to .align on Darwin, and .balign elsewhere, due to the  
different assembler used.
- The assembler macros in fdct_mmx.c have been changed to use  
standard C preprocessor macros.
- The uses of /nop in simple_idct_mmx.c have been changed to be '#'  
-- simply commenting out the line instead.

I hope the changes are acceptable for FFmpeg. If not, please tell me  
what needs to be fixed.


- Dan Villiom Podlaski Christiansen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-fat.diff
Type: application/octet-stream
Size: 49859 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060204/89d70870/attachment.obj>
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1890 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060204/89d70870/attachment.bin>

More information about the ffmpeg-devel mailing list