Skip to content

Commit

Permalink
ffmpeg*: add patch for svt-av1 v3
Browse files Browse the repository at this point in the history
  • Loading branch information
i0ntempest committed Feb 21, 2025
1 parent 74ac82d commit 7dcbc7e
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 5 deletions.
6 changes: 5 additions & 1 deletion multimedia/ffmpeg-devel/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set my_name ffmpeg
conflicts ffmpeg

version 7.1
revision 3
revision 4
epoch 2

license LGPL-2.1+
Expand Down Expand Up @@ -127,6 +127,10 @@ patchfiles-append patch-libavcodec-librsvgdec.diff
# so the FFMpeg team does not seem to care to include this functionality
patchfiles-append patch-add-pixeldensity.diff

# SVT-AV1 v3 has API changes
# See https://gitlab.com/AOMediaCodec/SVT-AV1/-/commit/988e930c1083ce518ead1d364e3a486e9209bf73
patchfiles-append patch-svt-av1-v3.diff

# Typedef AVMediaType to NSString* on older systems
# Patch submitted to upstream, remove once upstream has included it
if {${os.platform} eq "darwin" && ${os.major} < 17} {
Expand Down
11 changes: 11 additions & 0 deletions multimedia/ffmpeg-devel/files/patch-svt-av1-v3.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- libavcodec/libsvtav1.c.orig 2024-07-29 08:54:52
+++ libavcodec/libsvtav1.c 2025-02-21 22:34:45
@@ -262,7 +262,7 @@

svt_enc->eos_flag = EOS_NOT_REACHED;

- svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params);
+ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params);
if (svt_ret != EB_ErrorNone) {
return svt_print_error(avctx, svt_ret, "Error initializing encoder handle");
}
6 changes: 5 additions & 1 deletion multimedia/ffmpeg/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ conflicts ffmpeg-devel

# Please increase the revision of mpv whenever ffmpeg's version is updated.
version 4.4.5
revision 4
revision 5
epoch 1

license LGPL-2.1+
Expand Down Expand Up @@ -121,6 +121,10 @@ patchfiles-append patch-issue-9439-non-b-frame-encoding.diff
# so the FFMpeg team does not seem to care to include this functionality
patchfiles-append patch-add-pixeldensity.diff

# SVT-AV1 v3 has API changes
# See https://gitlab.com/AOMediaCodec/SVT-AV1/-/commit/988e930c1083ce518ead1d364e3a486e9209bf73
patchfiles-append patch-svt-av1-v3.diff

# enable auto configure of asm optimizations
# requires Xcode 3.1 or better on Leopard
minimum_xcodeversions {9 3.1}
Expand Down
11 changes: 11 additions & 0 deletions multimedia/ffmpeg/files/patch-svt-av1-v3.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- libavcodec/libsvtav1.c.orig 2024-07-29 08:54:52
+++ libavcodec/libsvtav1.c 2025-02-21 22:34:45
@@ -262,7 +262,7 @@

svt_enc->eos_flag = EOS_NOT_REACHED;

- svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params);
+ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params);
if (svt_ret != EB_ErrorNone) {
return svt_print_error(avctx, svt_ret, "Error initializing encoder handle");
}
6 changes: 5 additions & 1 deletion multimedia/ffmpeg4/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set my_name ffmpeg

# Please increase the revision of mpv whenever ffmpeg's version is updated.
version 4.4.5
revision 1
revision 2

license LGPL-2.1+
categories multimedia
Expand Down Expand Up @@ -119,6 +119,10 @@ patchfiles-append patch-issue-9439-non-b-frame-encoding.diff
# so the FFMpeg team does not seem to care to include this functionality
patchfiles-append patch-add-pixeldensity.diff

# SVT-AV1 v3 has API changes
# See https://gitlab.com/AOMediaCodec/SVT-AV1/-/commit/988e930c1083ce518ead1d364e3a486e9209bf73
patchfiles-append patch-svt-av1-v3.diff

# enable auto configure of asm optimizations
# requires Xcode 3.1 or better on Leopard
minimum_xcodeversions {9 3.1}
Expand Down
11 changes: 11 additions & 0 deletions multimedia/ffmpeg4/files/patch-svt-av1-v3.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- libavcodec/libsvtav1.c.orig 2024-07-29 08:54:52
+++ libavcodec/libsvtav1.c 2025-02-21 22:34:45
@@ -262,7 +262,7 @@

svt_enc->eos_flag = EOS_NOT_REACHED;

- svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params);
+ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params);
if (svt_ret != EB_ErrorNone) {
return svt_print_error(avctx, svt_ret, "Error initializing encoder handle");
}
6 changes: 5 additions & 1 deletion multimedia/ffmpeg6/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name ffmpeg6
set my_name ffmpeg

version 6.1.2
revision 2
revision 3
epoch 0

license LGPL-2.1+
Expand Down Expand Up @@ -114,6 +114,10 @@ patchfiles-append patch-libavcodec-librsvgdec.diff
# Remove once upstream has included these in the next release
patchfiles-append patch-issue-10695.diff

# SVT-AV1 v3 has API changes
# See https://gitlab.com/AOMediaCodec/SVT-AV1/-/commit/988e930c1083ce518ead1d364e3a486e9209bf73
patchfiles-append patch-svt-av1-v3.diff

# enable auto configure of asm optimizations
# requires Xcode 3.1 or better on Leopard
minimum_xcodeversions {9 3.1}
Expand Down
11 changes: 11 additions & 0 deletions multimedia/ffmpeg6/files/patch-svt-av1-v3.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- libavcodec/libsvtav1.c.orig 2024-07-29 08:54:52
+++ libavcodec/libsvtav1.c 2025-02-21 22:34:45
@@ -262,7 +262,7 @@

svt_enc->eos_flag = EOS_NOT_REACHED;

- svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params);
+ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params);
if (svt_ret != EB_ErrorNone) {
return svt_print_error(avctx, svt_ret, "Error initializing encoder handle");
}
6 changes: 5 additions & 1 deletion multimedia/ffmpeg7/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name ffmpeg7
set my_name ffmpeg

version 7.1
revision 3
revision 4

license LGPL-2.1+
categories multimedia
Expand Down Expand Up @@ -129,6 +129,10 @@ platform darwin {
# https://trac.macports.org/ticket/69678
# patchfiles-append patch-fix-vulkan.diff

# SVT-AV1 v3 has API changes
# See https://gitlab.com/AOMediaCodec/SVT-AV1/-/commit/988e930c1083ce518ead1d364e3a486e9209bf73
patchfiles-append patch-svt-av1-v3.diff

# enable auto configure of asm optimizations
# requires Xcode 3.1 or better on Leopard
minimum_xcodeversions {9 3.1}
Expand Down
11 changes: 11 additions & 0 deletions multimedia/ffmpeg7/files/patch-svt-av1-v3.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- libavcodec/libsvtav1.c.orig 2024-07-29 08:54:52
+++ libavcodec/libsvtav1.c 2025-02-21 22:34:45
@@ -262,7 +262,7 @@

svt_enc->eos_flag = EOS_NOT_REACHED;

- svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params);
+ svt_ret = svt_av1_enc_init_handle(&svt_enc->svt_handle, &svt_enc->enc_params);
if (svt_ret != EB_ErrorNone) {
return svt_print_error(avctx, svt_ret, "Error initializing encoder handle");
}

0 comments on commit 7dcbc7e

Please sign in to comment.