[Ffmpeg-devel] [PATCH] Fixes for Darwin/x86

Dan Villiom Podlaski Christiansen danchr
Tue Feb 7 12:05:32 CET 2006


On 06/02/2006, at 20.00, Michael Niedermayer wrote:

> Hi
>
> On Mon, Feb 06, 2006 at 07:25:50PM +0100, Dan Villiom Podlaski  
> Christiansen wrote:
>> Hi,
>>
>> The following patch contains the changes needed for libavcodec to
>> compile on Darwin/x86.
>>
>> Please note that I haven't been able to test this specific set of
>> changes, since I don't have access to an Linux/x86 box to test it on.
>> However, it consists of a subset of the changes to libavcodec/i386
>> and related changes to configure. I doubt it brakes anything, but I
>> would suggest verifying this by doing a configure+compile prior to
>> committing.
>>
>> Building dynamic libraries on Darwin/x86 is broken, but the rest
>> ought to work.
>
> [...]
>
>> @@ -559,4 +563,3 @@
>>
>>      fdct_row_sse2(block1, block);
>>  }
>> -
>
> cosmetic
>
>
>> Index: libavcodec/i386/mmx.h
>> ===================================================================
>> RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/i386/mmx.h,v
>> retrieving revision 1.7
>> diff -a -u -u -r1.7 mmx.h
>> --- libavcodec/i386/mmx.h	22 Dec 2005 01:10:09 -0000	1.7
>> +++ libavcodec/i386/mmx.h	6 Feb 2006 18:19:18 -0000
>> @@ -21,6 +21,18 @@
>>  #  define REG_S "esi"
>>  #endif
>>
>> +#ifdef __APPLE__
>> +/* Special case for Darwin/x86 */
>> +#define ASMALIGN() ".align 3 \n\t"
>> +#define ASMALIGN16() ".align 4 \n\t"
>> +#else
>> +#define ASMALIGN() ".balign 8 \n\t"
>> +#define ASMALIGN16() ".balign 16 \n\t"
>> +#endif
>> +
>> +#define JUMPALIGN() __asm __volatile (ASMALIGN()::)
>> +#define JUMPALIGN16() __asm __volatile (ASMALIGN16()::)
>> +
>>  /*
>>   * The type of an value that fits in an MMX register (note that long
>>   * long constant values MUST be suffixed by LL and unsigned long  
>> long
>
> *ALIGN* isnt mmx specific so doesnt belong in mmx.h

However, AFAICT it is only used in code that requires MMX. Which  
header would you rather have it in?

--

- Dan Villiom Podlaski Christiansen






More information about the ffmpeg-devel mailing list