Skip to content

Commit c357217

Browse files
committed
patches for fftutorial
1 parent 4353d14 commit c357217

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

configs/libs/fftutorial.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export LIPO_LIBS="libavcodec libavformat libavutil libswscale libswresample"
2323
export LIB_DEPENDS_BIN="nasm pkg-config"
2424
export GIT_LOCAL_REPO=extra/ffmpeg
2525
export REPO_DIR=ffmpeg
26+
export PATCH_DIR=fftutorial
2627

2728
# you can export GIT_FFMPEG_UPSTREAM=git@xx:yy/FFmpeg.git use your mirror
2829
if [[ "$GIT_FFMPEG_UPSTREAM" != "" ]] ;then
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 1ebd4c062a886049f3c3255c50fe56f6621b9844 Mon Sep 17 00:00:00 2001
2+
From: qianlongxu <qianlongxu@gmail.com>
3+
Date: Fri, 26 Jul 2024 16:11:14 +0800
4+
Subject: [PATCH 18] 'supportsFamily:' is only available on iOS 13.0 or newer
5+
6+
---
7+
libavfilter/metal/utils.m | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/libavfilter/metal/utils.m b/libavfilter/metal/utils.m
11+
index f365d3c..bb1825a 100644
12+
--- a/libavfilter/metal/utils.m
13+
+++ b/libavfilter/metal/utils.m
14+
@@ -31,7 +31,7 @@ void ff_metal_compute_encoder_dispatch(id<MTLDevice> device,
15+
BOOL fallback = YES;
16+
// MAC_OS_X_VERSION_10_15 is only defined on SDKs new enough to include its functionality (including iOS, tvOS, etc)
17+
#ifdef MAC_OS_X_VERSION_10_15
18+
- if (@available(macOS 10.15, iOS 11, tvOS 14.5, *)) {
19+
+ if (@available(macOS 10.15, iOS 13, tvOS 14.5, *)) {
20+
if ([device supportsFamily:MTLGPUFamilyCommon3]) {
21+
MTLSize threadsPerGrid = MTLSizeMake(width, height, 1);
22+
[encoder dispatchThreads:threadsPerGrid threadsPerThreadgroup:threadsPerThreadgroup];
23+
--
24+
2.39.3 (Apple Git-146)
25+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From 338d6fb305a992bc2a24347e4d7793e02b54345d Mon Sep 17 00:00:00 2001
2+
From: qianlongxu <qianlongxu@gmail.com>
3+
Date: Thu, 31 Oct 2024 10:55:33 +0800
4+
Subject: [PATCH 21] Adapt to clang 16
5+
6+
---
7+
configure | 8 +++++++-
8+
1 file changed, 7 insertions(+), 1 deletion(-)
9+
10+
diff --git a/configure b/configure
11+
index 16d0177..edbb925 100755
12+
--- a/configure
13+
+++ b/configure
14+
@@ -5623,7 +5623,13 @@ case $target_os in
15+
enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress
16+
strip="${strip} -x"
17+
add_ldflags -Wl,-dynamic,-search_paths_first
18+
- check_cflags -Werror=partial-availability
19+
+ # https://gitlab.gnome.org/GNOME/gimp/-/issues/8649
20+
+ # from clang 15 int <-> pointer conversions now defaults as an error
21+
+ check_cflags -Wno-int-conversion
22+
+ # from clang 16 VTPixelTransferSessionCreate' has been marked as being introduced in tvOS 16.0 here, but the deployment target is tvOS 12.0.0
23+
+ check_cflags -Wno-unguarded-availability -Wno-unguarded-availability-new
24+
+
25+
+ # check_cflags -Werror=partial-availability
26+
SLIBSUF=".dylib"
27+
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
28+
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
29+
--
30+
2.39.5 (Apple Git-154)
31+

0 commit comments

Comments
 (0)