[x264-devel] Re: [PATCH] Fix compilation of altivec code on Mac OS X with gcc 3.3

Patrice Bensoussan patrice.bensoussan at free.fr
Tue Mar 6 23:09:08 CET 2007


On 3 Mar 2007, at 16:35, Guillaume POIRIER wrote:

> Hi,
>
> On 3/3/07, Patrice Bensoussan <patrice.bensoussan at free.fr> wrote:
>> On 3 Mar 2007, at 13:05, Guillaume POIRIER wrote:
>> > On 3/3/07, Patrice Bensoussan <patrice.bensoussan at free.fr> wrote:
>> >> Hello,
>> >>
>> >> Here is a patch to fix the compilation of x264 altivec code  
>> with gcc
>> >> 3.3 on Mac OS X.
>> >
>> > Fixed in a slightly cleaner way.
>> >
>> > As I put in the commit message, regression tests do not pass  
>> with this
>> > patch (mc_chroma is broken), and they never did as far as I  
>> remember.
>> > How good is it to be able to compile this program if the results
>> > are wrong?
>> >
>> > Note that I'm not interested in spending some time trying to fix  
>> this
>> > problem, but if you have the time, you're certainly welcome to  
>> have a
>> > look at it, and I'll review your patch if you can come up with one.
>> >
>>
>> Hello Guillaume,
>>
>> Is the regression issue specific to Mac OS X with gcc 3.3? Or is this
>> a known problem on all platforms with gcc 3.3? (Linux too? Intel and
>> PPC?).
>
> The regression test issue exists on PPC with GCC3.x series, no  
> matter the OS.
>
>
>> I think it's important to have this fixed as compiling with
>> gcc 3.3 on Mac OS X is the only way be compatible with all systems
>> (10.2 -> 10.4).
>
> As the issue is in the Altivec code, if you want to use x264 on a
> plate form that only provides GCC3, you just need to disable
> mc_chroma's altivec code (or fix whatever is wrong with it).
>
> I'd also like to point out that Apple's version GCC 4 can be fetched
> and compiled on the machine that lacks it.
> Also, since C ABI hasn't changed between all these versions, it's
> possible to compile x264 on a machine that has GCC4 and use that lib
> on an older system.
>
> Off  course, the best solution is to fix the code; just don't count me
> in, I desperately lack time.
>

I tried to play a bit with compiler options and the regression tests  
are working fine with gcc 3.3 when using -O1 rather than -O4. This  
would be an easy fix as a first step. I'll see if I can find out what  
is causing the problem when using -O2 and above...

Patrice

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list