diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-03-15 06:20:30 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-03-15 06:20:30 +0000 |
commit | bb007f0b04c719fd2b846d177c3c4739fdb7c318 (patch) | |
tree | 80f756c3d190f4dbf28e8016c211ab618a50ccb9 /media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch | |
parent | 1f048d9b860b8c7b69ac8dd085edc9ee3191b2d5 (diff) |
gentoo auto-resync : 15:03:2023 - 06:20:30
Diffstat (limited to 'media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch')
-rw-r--r-- | media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch b/media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch new file mode 100644 index 000000000000..ed273975452d --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-4.4.3-get_cabac_inline_x86-32-bit.patch @@ -0,0 +1,24 @@ +https://bugs.gentoo.org/901099 and partly https://bugs.gentoo.org/900937. + +Newer compilers may optimise such that < 7 registers are free on 32-bit x86 +and then we get an "invalid asm" error. This is https://bugs.gentoo.org/901099 +and https://trac.ffmpeg.org/ticket/8903. + +Making matters worse, GCC sometimes hangs on invalid asm, so this also +mitigates a hang with e.g. -O3 -march=znver1. See https://bugs.gentoo.org/900937 +and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109137. + +In future, we may want to adjust the definition of HAVE_7REGS to just exclude +32-bit x86, but that's a big sledgehammer, so let's avoid it for now until we have +a reply on the upstream ffmpeg bug. +--- a/libavcodec/x86/cabac.h ++++ b/libavcodec/x86/cabac.h +@@ -175,7 +175,7 @@ + + #endif /* BROKEN_RELOCATIONS */ + +-#if HAVE_7REGS && !BROKEN_COMPILER ++#if HAVE_7REGS && !BROKEN_COMPILER && !ARCH_X86_32 + #define get_cabac_inline get_cabac_inline_x86 + static av_always_inline int get_cabac_inline_x86(CABACContext *c, + uint8_t *const state) |