[FFmpeg-devel] [PATCH] swscale: Return swScale_*() for RUNTIME_CPUDETECT depending on HAVE_* flags.

Kenan Gillet kenan.gillet
Sun Apr 5 19:31:04 CEST 2009


On Apr 5, 2009, at 10:26 AM, Ramiro Polla wrote:

> Hi,
>
> On Sun, Apr 5, 2009 at 2:23 PM, Kenan Gillet  
> <kenan.gillet at gmail.com> wrote:
>> On Apr 5, 2009, at 10:12 AM, Ramiro Polla wrote:
>>> Runtime cpu detection should only use the arches the user  
>>> specified in
>>> configure (as in if she --disable-mmx2, mmx2 shouldn't be run). They
>>> also shouldn't be compiled, but that will come in a later patch.
>>>
>>> Ramiro Polla
>>
>>> +#if HAVE_MMX2
>>>     if (flags & SWS_CPU_CAPS_MMX2) {
>>>         sws_init_swScale_MMX2(c);
>>>         return swScale_MMX2;
>>>     } else
>>> +#endif
>>
>> what about
>>
>>     if (HAVE_MMX2 && flags & SWS_CPU_CAPS_MMX2) {
>>         sws_init_swScale_MMX2(c);
>>         return swScale_MMX2;
>>     } else
>
> This is not yet possible because it errors in in return swScale_MMX2,
> even under if (0). Later on there will be only one swScale() function,
> and hence no need to return the function pointer, and at that point it
> will be possible to use if (HAVE_*).

ok, good job btw on cleaning up libswscale:)

Kenan




More information about the ffmpeg-devel mailing list