[FFmpeg-devel] [PATCH] runtime cpu detection for emms

Måns Rullgård mans
Mon Aug 30 19:17:07 CEST 2010


"Ronald S. Bultje" <rsbultje at gmail.com> writes:

> Hi,
>
> 2010/8/29 M?ns Rullg?rd <mans at mansr.com>:
>>> +static void emms_null(void) ?{ }
>>> +static void emms_mmx(void) ? { __asm__ volatile ("emms;":::"memory"); }
>>> +static void emms_init(void)
>>> +{
>>> + ? ?ff_emms = mm_support() & FF_MM_MMX ? emms_mmx : emms_null;
>>> + ? ?ff_emms();
>>> +}
>>> +void (*ff_emms)(void) = emms_init;
>>
>> This is worse than the original.
>
> We can put the original back if you prefer that...
>
> Aurelien is right that we need some sort of runtime CPU detection,

I disagree.  The number of FFmpeg users on non-mmx-capable x86 is so
vanishingly small that they are not relevant in the slightest.  As
long as we provide a way to build an mmx-less version, that is enough.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list