[FFmpeg-devel] [PATCH] fix --enable-runtime-cpudetect --disable-amd3dnow compilation

Alexander Strange astrange
Tue Sep 7 08:40:17 CEST 2010


On Sep 4, 2010, at 7:08 PM, Michael Niedermayer wrote:

> On Fri, Sep 03, 2010 at 06:06:11PM -0400, Alexander Strange wrote:
>> CC      libswscale/swscale.o
>> ...
>> libswscale/swscale.c: In function ?ff_getSwsFunc?:
>> libswscale/swscale.c:1268: warning: implicit declaration of function ?sws_init_swScale_3DNow?
>> libswscale/swscale.c:1269: error: ?swScale_3DNow? undeclared (first use in this function)
>> libswscale/swscale.c:1269: error: (Each undeclared identifier is reported only once
>> libswscale/swscale.c:1269: error: for each function it appears in.)
>> 
>> Alternatively, it could declare prototypes for sws_init_swScale_3DNow / swScale_3DNow even if they aren't being compiled.
>> That would let us use "if (COMPILE_TEMPLATE_AMD3DNOW && flags & SWS_CPU_CAPS_3DNOW)" instead of #ifdefs. But it might make some of the other templating more complex. 
>> 
> 
> the code was designed for 2 cases
> 1. runtime cpu detection (for distros) to support whatever cpu the user has
> 2. compiletime detection (for an individual user) to support his cpu
> 
> what is it that you are trying to do?
> finding some arbitrary (possibly nonsencical) flag combinations that fail?
> if iam guessing correctly then ithink we first should ask if this combinatio
> of flags makes any sense

Building binary libraries for darwin that did runtime cpu detection.
darwin doesn't run on anything with 3dnow and probably never will, so it's safe to save binary size by not including that.

In the end it turned out swscale wasn't being used for anything (and of course it's the only thing --enable-runtime-cpudetect affects anyway), so I've just turned it off.



More information about the ffmpeg-devel mailing list