[FFmpeg-devel] [PATCH] Fix apply_welch_window_sse2 compilation on Mac OS X/x86

Pierre d'Herbemont pdherbemont
Wed Oct 17 16:26:50 CEST 2007


Sorry, I though the you were only downgrading from O2 or O3.

To me, omit-frame-pointer frees %ebx, which is nice, but not enough  
here (I was already compiling it with fomit-frame-pointer):

(funit-at-a-time doesn't help too).

gcc -I"~ffmpeg"/libswscale -I"~ffmpeg"/libavcodec  -DHAVE_AV_CONFIG_H  
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE - 
I"~ffmpeg" -I"~ffmpeg" -I"~ffmpeg"/libavutil -no-cpp-precomp -pipe - 
force_cpusubtype_ALL -Wno-sign-compare -fomit-frame-pointer -g - 
Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled- 
optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -O3   
-c -o i386/dsputil_mmx.o i386/dsputil_mmx.c
i386/dsputil_mmx.c: In function 'gmc_mmx':
i386/dsputil_mmx.c:2666: warning: suggest parentheses around  
arithmetic in operand of |
i386/dsputil_mmx.c:2666: warning: suggest parentheses around  
arithmetic in operand of |
i386/dsputil_mmx.c:2667: warning: suggest parentheses around  
arithmetic in operand of |
i386/dsputil_mmx.c:2667: warning: suggest parentheses around  
arithmetic in operand of |
i386/dsputil_mmx.c:2667: warning: suggest parentheses around  
arithmetic in operand of |
i386/dsputil_mmx.c: In function 'dsputil_init_mmx':
i386/dsputil_mmx.c:3748: warning: assignment from incompatible  
pointer type
i386/dsputil_mmx.c:3756: warning: assignment from incompatible  
pointer type
i386/dsputil_mmx.c: In function 'flac_compute_autocorr_sse2':
i386/dsputil_mmx.c:3003: error: can't find a register in class  
'GENERAL_REGS' while reloading 'asm'
i386/dsputil_mmx.c:3005: error: can't find a register in class  
'GENERAL_REGS' while reloading 'asm'
make[1]: *** [i386/dsputil_mmx.o] Error 1
make: *** [lib] Error 2

Pierre.

On Oct 17, 2007, at 4:10 PM, Graham Booker wrote:

> What I did there turns optimizations ON!  These are the minimum  
> optimizations necessary for the files to build.  These files only  
> fail to build if you have certain optimizations off, which is what  
> I assumed you were trying to do in the first place, otherwise it  
> would have just built.
>
> most likely you are missing the omit-frame-pointer, but you also  
> need at least O1.  It works with O3 as well.
>
> On Oct 17, 2007, at 8:59 AM, Pierre d'Herbemont wrote:
>
>> Thanks, but what is the point of having no optimization? This patch
>> should just work.
>>
>> Pierre.
>>
>> On Oct 17, 2007, at 3:40 PM, Graham Booker wrote:
>>
>>> If you do:
>>> cd libavcodec
>>> export CFLAGS="-O1 -fomit-frame-pointer -funit-at-a-time"; make
>>> h264.o cabac.o i386/dsputil_mmx.o h264_parser.o
>>> unset CFLAGS;
>>> cd ..
>>>
>>> Then you can build everything else without the optimizations
>>> enabled for those four files.
>>>
>>>
>>> On Oct 17, 2007, at 3:29 AM, Pierre d'Herbemont wrote:
>>>
>>>> Hi,
>>>>
>>>> Here is a fix for:
>>>>
>>>> i386/dsputil_mmx.c:3003: error: can't find a register in class
>>>> 'GENERAL_REGS' while reloading 'asm'
>>>> i386/dsputil_mmx.c:3005: error: can't find a register in class
>>>> 'GENERAL_REGS' while reloading 'asm'
>>>> make[4]: *** [i386/dsputil_mmx.o] Error 1
>>>> make[3]: *** [lib] Error 2
>>>> make[2]: *** [.ffmpeg] Error 2
>>>> make[1]: *** [src] Error 2
>>>>
>>>> We don't have enough free registers around on Mac OS X/x86. Feel
>>>> free to commit a better fix.
>>>>
>>>> Pierre.<osx_intel_apply_welch_window_sse2.diff.txt>________________ 
>>>> __
>>>> _____________________________
>>>> ffmpeg-devel mailing list
>>>> ffmpeg-devel at mplayerhq.hu
>>>> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>>>
>>> _______________________________________________
>>> ffmpeg-devel mailing list
>>> ffmpeg-devel at mplayerhq.hu
>>> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at mplayerhq.hu
>> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel





More information about the ffmpeg-devel mailing list