[FFmpeg-devel] [PATCH 2/2] configure: Use intel math.h header.
protogonoi at gmail.com
Sun May 11 10:41:43 CEST 2014
On 11 May 2014 18:17, Dave Yeo <daveryeo at telus.net> wrote:
> On 05/10/14 10:42 PM, Matt Oliver wrote:
>> Is an ICL build even faster than a GCC build? Or why are you using it?
>>> >MSVC builds are significantly slower than GCC builds, even if I
>>> >disable inline assembly in the GCC build - and in my experience ICL
>>> >doesn't provide*that* much of a bonus.
>> ICL is at times significantly faster than msvc depending on the code (SIMD
>> heavy stuff benefits more). Comparing to gcc the benefits aren't that
>> significant performance wise. However on Windows the comparison is with
>> MinGW and the advantage that icl has is that its a native toolchain that
>> can directly use the latest native windows headers/libs
> Is it also true that non-intel processors also benefit from ICL?
There are different optimizations that can be enabled with icl. For
instance with vectorization -arch:SSE2 will enable SSE2 optimizations for
all SSE2 capable cpus (non-intel included). Then theres the intel Qx:SSE2
which enables SSE2 optimization that are faster again but these only work
on intel cpus. FFmpeg doesnt and should never use the intel cpu specific
optimization settings (which are always disabled by default). But any
general purpose optimizations made by icl are also applicable to any
capable cpu (amd included). ICL has been criticized in the past for
favouring intel cpus over amd ones but that is mostly with things like
Qx/Qax settings and the MKL libs which non of are used in FFmpeg so arent
as relevant to us. So to answer your question since we dont use intel cpu
specific optimization settings then any performance improvement over msvc
is also generally applicable to non-intel cpus as well.
I think the patch is good, and I'd also say the patch to use the other math
> header can still be interesting, but only if an actual performance benefit
> can be shown (most likely in some of the less-optimized float audio codecs
> like on2avc).
Well I think your right in that for consistency icl should be fp:precise by
default as in the last patch. Using the intel math header is potentially
interesting but i ran some benchmarks over the main codecs and as they are
mostly hand tuned asm there is no difference. It would only affect those
less-optimized codecs that rely more on libs math funxtions but I was not
familiar enough to know which ones would be likely candidates, So thanks
for the heads up about on2avc ill look into potentially doing some
benchmarks at some point and see if its worth it.
In the mean time though if there are no objections we should apply the
fp:precise patch as that keeps things consistent and fixes an error that
has actually been in FFmpeg for several years now.
More information about the ffmpeg-devel