From 03b3b6d85a6cac2961a143726052e8b9a56f6dc7 Mon Sep 17 00:00:00 2001 From: Rudi Heitbaum Date: Wed, 26 Apr 2023 17:15:00 +0000 Subject: [PATCH 1/2] include missing to support gcc-13 gcc 13 moved some includes around and as a result is no longer transitively included [1]. Explicitly include it for uint{32,64}_t. [1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes Signed-off-by: Rudi Heitbaum --- src/utils/DiskUtils.h | 1 + src/utils/HttpProxy.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/DiskUtils.h b/src/utils/DiskUtils.h index 79e34268..f900ec58 100644 --- a/src/utils/DiskUtils.h +++ b/src/utils/DiskUtils.h @@ -7,6 +7,7 @@ #pragma once +#include #include namespace ffmpegdirect diff --git a/src/utils/HttpProxy.h b/src/utils/HttpProxy.h index eb0c99cb..d203ce36 100644 --- a/src/utils/HttpProxy.h +++ b/src/utils/HttpProxy.h @@ -7,6 +7,7 @@ #pragma once +#include #include namespace ffmpegdirect @@ -36,4 +37,4 @@ namespace ffmpegdirect std::string m_user; std::string m_password; }; -} //namespace ffmpegdirect \ No newline at end of file +} //namespace ffmpegdirect From 6c052d75a80dbfd1253193ef158b38051444abba Mon Sep 17 00:00:00 2001 From: daiaji Date: Sat, 30 Sep 2023 01:54:10 +0800 Subject: [PATCH 2/2] Fix FFmpeg compilation with binutils >= 2.41. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is from FFmpeg commit effadce6c756247ea8bae32dc13bb3e6f464f0eb . Author: Rémi Denis-Courmont Date: Sun Jul 16 18:18:02 2023 +0300 avcodec/x86/mathops: clip constants used with shift instructions within inline assembly Fixes assembling with binutil as >= 2.41 Signed-off-by: James Almer Refs #164 --- ...4-Fixes-assembling-w-binutil-as-2.41.patch | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 depends/common/ffmpeg/04-Fixes-assembling-w-binutil-as-2.41.patch diff --git a/depends/common/ffmpeg/04-Fixes-assembling-w-binutil-as-2.41.patch b/depends/common/ffmpeg/04-Fixes-assembling-w-binutil-as-2.41.patch new file mode 100644 index 00000000..d46e5ade --- /dev/null +++ b/depends/common/ffmpeg/04-Fixes-assembling-w-binutil-as-2.41.patch @@ -0,0 +1,73 @@ +From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= +Date: Sun, 16 Jul 2023 18:18:02 +0300 +Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift + instructions within inline assembly + +Fixes assembling with binutil as >= 2.41 + +Signed-off-by: James Almer +--- + libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) + +diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h +index 6298f5ed1983..ca7e2dffc107 100644 +--- a/libavcodec/x86/mathops.h ++++ b/libavcodec/x86/mathops.h +@@ -35,12 +35,20 @@ + static av_always_inline av_const int MULL(int a, int b, unsigned shift) + { + int rt, dummy; ++ if (__builtin_constant_p(shift)) + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) +- :"a"(a), "rm"(b), "ci"((uint8_t)shift) ++ :"a"(a), "rm"(b), "i"(shift & 0x1F) + ); ++ else ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++ :"a"(a), "rm"(b), "c"((uint8_t)shift) ++ ); + return rt; + } + +@@ -113,19 +121,31 @@ __asm__ volatile(\ + // avoid +32 for shift optimization (gcc should do that ...) + #define NEG_SSR32 NEG_SSR32 + static inline int32_t NEG_SSR32( int32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + + #define NEG_USR32 NEG_USR32 + static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } +