[FFmpeg-user] Compiling FFmpeg for 32 bits (i386) on Mac OS X

Michael Bradshaw mbradshaw at sorensonmedia.com
Fri Jun 1 19:47:03 CEST 2012

On Fri, Jun 1, 2012 at 11:09 AM, Michael Bradshaw
<mbradshaw at sorensonmedia.com> wrote:
> On Fri, Jun 1, 2012 at 11:01 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>> Michael Bradshaw <mbradshaw <at> sorensonmedia.com> writes:
>>> libswscale/x86/rgb2rgb_template.c: In function ‘rgb15tobgr24_MMX’:
>>> libswscale/x86/rgb2rgb_template.c:814: error: can't find a register in
>>> class ‘GENERAL_REGS’ while reloading ‘asm’
>> It seems the problem is old:
>> https://gist.github.com/1528236
>> I don't have access to an Intel-Mac, I suspect you can disable
>> rgb15tobgr24_MMX for the specific gcc version on OS X.
> I think that may need to be done. --disable-asm works, but I'd rather
> enable assembly.

Turns out rgb15tobgr24 isn't the only function that fails. I get the
same error with rgb16to32, rgb15to32, and rgb16tobgr24. I've added a
macro that replaces the x86 assembly versions of these functions with
their generic, non-assembly definitions if using gcc4.2 on OS X
compiling 32 bit dynamic libs. It's an ugly solution (and I'm sure you
or one of the other devs could do it 100x better), but it compiles.

Ideally, gcc4.2 and clang1.7 (what I have installed) shouldn't have
any problems compiling 32 bit shared libs on 64 bit OS X (Intel
based). I wonder if the real cause could be a configuration script
problem or something that isn't detecting these things right?

Should I work on a patch/take this to the ffmpeg-devel list to discuss
possible solutions?



More information about the ffmpeg-user mailing list