[FFmpeg-devel] [PATCH] Fix configure to disable MMX for Pentium Pro

Måns Rullgård mans
Thu Aug 26 21:00:33 CEST 2010

Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:

> On Thu, Aug 26, 2010 at 02:50:28PM +0100, M?ns Rullg?rd wrote:
>> "Ronald S. Bultje" <rsbultje at gmail.com> writes:
>> > On Thu, Aug 26, 2010 at 9:34 AM, Alex Converse <alex.converse at gmail.com> wrote:
>> >> ./configure --cpu=prentiumpro says build me an FFmpeg for a
>> >> PentiumPro. The result will no longer run on a PentiumPro.
>> >
>> > A) It should require --disable-mmx (and thus the configure patch to
>> > disable mmx should be changed to error out unless mmx is disabled),
>> That's a stupid idea.  Specifying a CPU without MMX should of course
>> disable MMX.  That stands to reason.  It is also how all the other
>> architectures work.
> I don't want to flame you or anything, but in my view "it stands to reason"
> that this is because the other architectures were designed so idiotically
> that you can't test properly if the SIMD instructions are supported and thus
> we just can't really chose the best code at runtime anyway.

There are differences between CPUs beyond SIMD availability.  The most
obvious example for x86 is the CMOV instruction, which compilers use
quite a bit when compiling C code.  Only around half the execution
time is spent in asm functions, so the performance of the C code is
just as important.

> Also that reasoning would mean you should disable SSE with --cpu=pentium-mmx
> as well...

Yes, of course.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list