The cabac inline assembly is very brittle to assemble properly
on i386 windows with clang; libavcodec/hevc_cabac.c fails to build
in the default mode (which is -march=pentium4), it only works if
ffmpeg is configured with --cpu=i686 (translating to -march=i686),
and likewise, the inline assembly fails to assemble in
libavcodec/h264_cabac.c if building with optimizations disabled.

Instead of trying to step around the problem (and end up bit by it
occasionally), just disable the inline assembly for this configuration.
---
 libavcodec/x86/cabac.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h
index cfd3b759c9..5f1b97cec0 100644
--- a/libavcodec/x86/cabac.h
+++ b/libavcodec/x86/cabac.h
@@ -27,7 +27,7 @@
 #include "libavutil/x86/asm.h"
 #include "config.h"
 
-#if   (defined(__i386) && defined(__clang__) && (__clang_major__<2 || 
(__clang_major__==2 && __clang_minor__<10)))\
+#if   (defined(__i386) && defined(__clang__) && (__clang_major__<2 || 
(__clang_major__==2 && __clang_minor__<10)) || defined(_WIN32))\
    || (                  !defined(__clang__) && defined(__llvm__) && 
__GNUC__==4 && __GNUC_MINOR__==2 && __GNUC_PATCHLEVEL__<=1)\
    || (defined(__INTEL_COMPILER) && defined(_MSC_VER))
 #       define BROKEN_COMPILER 1
-- 
2.17.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to