Hello ffmpeg developers,

This commit [1] is causing problems when compiling with Clang on Windows:

..\..\third_party\ffmpeg\libavutil/x86/intmath.h(53,33) :  error:
always_inline function '__tzcnt_u32' requires target feature 'bmi',
but would be inlined into function 'ff_ctzll_x86' that is compiled
without support for 'bmi'
    return ((uint32_t)v == 0) ? _tzcnt_u32((uint32_t)(v >> 32)) + 32 :
_tzcnt_u32((uint32_t)v);
                                ^

Essentially the compiler is saying that it won't allow using this
intrinsic unless compiling for a target that supports BMI.

Is there a performance reason for using __tzcnt_u32 instead of
_BitScanForward, or was it mainly to simplify the code?

We're working around this in Chromium by #define'ing __tzcnt_u32 to
__builtin_ctz at the moment, but it would be good if we could find a
nicer solution that could be applied upstream.

Cheers,
Hans

 [1]. 
https://github.com/FFmpeg/FFmpeg/commit/6c6ac9cb17c4944514bde833f2fa8aa8dafa974a
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to