From f9f2b55c852c58d56e75e4a6c50fd3bf13d72b77 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Mon, 4 Nov 2024 02:26:30 +0100 Subject: [PATCH] [ffmpeg] Update to 7.1 (#41856) --- ports/ffmpeg/0004-dependencies.patch | 6 +- ports/ffmpeg/0005-fix-nasm.patch | 144 ++++++++++-------- ports/ffmpeg/0012-Fix-ssl-110-detection.patch | 14 -- ports/ffmpeg/0043-fix-miss-head.patch | 4 +- ports/ffmpeg/portfile.cmake | 3 +- ports/ffmpeg/vcpkg.json | 5 +- versions/baseline.json | 4 +- versions/f-/ffmpeg.json | 5 + 8 files changed, 92 insertions(+), 93 deletions(-) delete mode 100644 ports/ffmpeg/0012-Fix-ssl-110-detection.patch diff --git a/ports/ffmpeg/0004-dependencies.patch b/ports/ffmpeg/0004-dependencies.patch index bf91f88bda..f1f6e72bee 100644 --- a/ports/ffmpeg/0004-dependencies.patch +++ b/ports/ffmpeg/0004-dependencies.patch @@ -24,7 +24,7 @@ index a8b74e0..c99f41c 100755 @@ -6772,7 +6773,7 @@ require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; } enabled libopenh264 && require_pkg_config libopenh264 "openh264 >= 1.3.0" wels/codec_api.h WelsGetCodecVersion enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version || - { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } } + { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } } -enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++" +enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create enabled libopenvino && { { check_pkg_config libopenvino openvino openvino/c/openvino.h ov_core_create && enable openvino2; } || @@ -43,7 +43,7 @@ index a8b74e0..c99f41c 100755 enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket @@ -6880,6 +6881,8 @@ enabled openal && { check_pkg_config openal "openal >= 1.1" "AL/al.h" enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel || - check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL || + check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel "-framework OpenCL" || check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL || + check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -lAdvapi32 -lOle32 -lCfgmgr32|| + check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -pthread -ldl || @@ -51,7 +51,7 @@ index a8b74e0..c99f41c 100755 { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" || test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" || @@ -7204,10 +7207,10 @@ enabled amf && - "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x00010004001d0000" + "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400210000" # Funny iconv installations are not unusual, so check it after all flags have been set -if enabled libc_iconv; then diff --git a/ports/ffmpeg/0005-fix-nasm.patch b/ports/ffmpeg/0005-fix-nasm.patch index ea551ec9a8..68b7503b24 100644 --- a/ports/ffmpeg/0005-fix-nasm.patch +++ b/ports/ffmpeg/0005-fix-nasm.patch @@ -1,68 +1,78 @@ -diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile ---- a/libavcodec/x86/Makefile -+++ b/libavcodec/x86/Makefile -@@ -158,6 +158,8 @@ X86ASM-OBJS-$(CONFIG_ALAC_DECODER) += x86/alacdsp.o - X86ASM-OBJS-$(CONFIG_APNG_DECODER) += x86/pngdsp.o - X86ASM-OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsidct.o -+ifdef ARCH_X86_64 - X86ASM-OBJS-$(CONFIG_CFHD_ENCODER) += x86/cfhdencdsp.o -+endif - X86ASM-OBJS-$(CONFIG_CFHD_DECODER) += x86/cfhddsp.o - X86ASM-OBJS-$(CONFIG_DCA_DECODER) += x86/dcadsp.o x86/synth_filter.o - X86ASM-OBJS-$(CONFIG_DIRAC_DECODER) += x86/diracdsp.o \ -@@ -175,15 +177,21 @@ x86/hevc_sao_10bit.o - X86ASM-OBJS-$(CONFIG_JPEG2000_DECODER) += x86/jpeg2000dsp.o - X86ASM-OBJS-$(CONFIG_LSCR_DECODER) += x86/pngdsp.o -+ifdef ARCH_X86_64 - X86ASM-OBJS-$(CONFIG_MLP_DECODER) += x86/mlpdsp.o -+endif - X86ASM-OBJS-$(CONFIG_MPEG4_DECODER) += x86/xvididct.o - X86ASM-OBJS-$(CONFIG_PNG_DECODER) += x86/pngdsp.o -+ifdef ARCH_X86_64 - X86ASM-OBJS-$(CONFIG_PRORES_DECODER) += x86/proresdsp.o - X86ASM-OBJS-$(CONFIG_PRORES_LGPL_DECODER) += x86/proresdsp.o -+endif - X86ASM-OBJS-$(CONFIG_RV40_DECODER) += x86/rv40dsp.o - X86ASM-OBJS-$(CONFIG_SBC_ENCODER) += x86/sbcdsp.o - X86ASM-OBJS-$(CONFIG_SVQ1_ENCODER) += x86/svq1enc.o - X86ASM-OBJS-$(CONFIG_TAK_DECODER) += x86/takdsp.o -+ifdef ARCH_X86_64 - X86ASM-OBJS-$(CONFIG_TRUEHD_DECODER) += x86/mlpdsp.o -+endif - X86ASM-OBJS-$(CONFIG_TTA_DECODER) += x86/ttadsp.o - X86ASM-OBJS-$(CONFIG_TTA_ENCODER) += x86/ttaencdsp.o - X86ASM-OBJS-$(CONFIG_UTVIDEO_DECODER) += x86/utvideodsp.o -diff --git a/libavfilter/x86/Makefile b/libavfilter/x86/Makefile ---- a/libavfilter/x86/Makefile -+++ b/libavfilter/x86/Makefile -@@ -44,6 +44,8 @@ - X86ASM-OBJS-$(CONFIG_AFIR_FILTER) += x86/af_afir.o - X86ASM-OBJS-$(CONFIG_ANLMDN_FILTER) += x86/af_anlmdn.o -+ifdef ARCH_X86_64 - X86ASM-OBJS-$(CONFIG_ATADENOISE_FILTER) += x86/vf_atadenoise.o -+endif - X86ASM-OBJS-$(CONFIG_BLEND_FILTER) += x86/vf_blend.o - X86ASM-OBJS-$(CONFIG_BWDIF_FILTER) += x86/vf_bwdif.o - X86ASM-OBJS-$(CONFIG_COLORSPACE_FILTER) += x86/colorspacedsp.o -@@ -62,6 +62,8 @@ X86ASM-OBJS-$(CONFIG_LUT3D_FILTER) += x86/vf_lut3d.o - X86ASM-OBJS-$(CONFIG_MASKEDCLAMP_FILTER) += x86/vf_maskedclamp.o - X86ASM-OBJS-$(CONFIG_MASKEDMERGE_FILTER) += x86/vf_maskedmerge.o -+ifdef ARCH_X86_64 - X86ASM-OBJS-$(CONFIG_NLMEANS_FILTER) += x86/vf_nlmeans.o -+endif - X86ASM-OBJS-$(CONFIG_OVERLAY_FILTER) += x86/vf_overlay.o - X86ASM-OBJS-$(CONFIG_PP7_FILTER) += x86/vf_pp7.o - X86ASM-OBJS-$(CONFIG_PSNR_FILTER) += x86/vf_psnr.o -diff --git a/libavcodec/x86/vvc/Makefile b/libavcodec/x86/vvc/Makefile ---- a/libavcodec/x86/vvc/Makefile -+++ b/libavcodec/x86/vvc/Makefile -@@ -3,5 +3,7 @@ clean:: +diff --git a/libavcodec/x86/mlpdsp.asm b/libavcodec/x86/mlpdsp.asm +index 3dc641e..609b834 100644 +--- a/libavcodec/x86/mlpdsp.asm ++++ b/libavcodec/x86/mlpdsp.asm +@@ -23,7 +23,9 @@ + + SECTION .text + +-%if ARCH_X86_64 ++%ifn ARCH_X86_64 ++mlpdsp_placeholder: times 4 db 0 ++%else + + %macro SHLX 2 + %if cpuflag(bmi2) +diff --git a/libavcodec/x86/proresdsp.asm b/libavcodec/x86/proresdsp.asm +index 65c9fad..5ad73f3 100644 +--- a/libavcodec/x86/proresdsp.asm ++++ b/libavcodec/x86/proresdsp.asm +@@ -24,7 +24,10 @@ + + %include "libavutil/x86/x86util.asm" + +-%if ARCH_X86_64 ++%ifn ARCH_X86_64 ++SECTION .rdata ++proresdsp_placeholder: times 4 db 0 ++%else + + SECTION_RODATA + +diff --git a/libavcodec/x86/vvc/vvc_mc.asm b/libavcodec/x86/vvc/vvc_mc.asm +index 30aa97c..3975f98 100644 +--- a/libavcodec/x86/vvc/vvc_mc.asm ++++ b/libavcodec/x86/vvc/vvc_mc.asm +@@ -31,7 +31,9 @@ + + SECTION_RODATA 32 + +-%if ARCH_X86_64 ++%ifn ARCH_X86_64 ++vvc_mc_placeholder: times 4 db 0 ++%else + + %if HAVE_AVX2_EXTERNAL + +diff --git a/libavfilter/x86/vf_atadenoise.asm b/libavfilter/x86/vf_atadenoise.asm +index 4945ad3..748b65a 100644 +--- a/libavfilter/x86/vf_atadenoise.asm ++++ b/libavfilter/x86/vf_atadenoise.asm +@@ -20,7 +20,10 @@ + ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ;****************************************************************************** + +-%if ARCH_X86_64 ++%ifn ARCH_X86_64 ++SECTION .rdata ++vf_atadenoise_placeholder: times 4 db 0 ++%else + + %include "libavutil/x86/x86util.asm" + +diff --git a/libavfilter/x86/vf_nlmeans.asm b/libavfilter/x86/vf_nlmeans.asm +index 8f57801..9aef3a4 100644 +--- a/libavfilter/x86/vf_nlmeans.asm ++++ b/libavfilter/x86/vf_nlmeans.asm +@@ -21,7 +21,10 @@ + + %include "libavutil/x86/x86util.asm" + +-%if HAVE_AVX2_EXTERNAL && ARCH_X86_64 ++%ifn HAVE_AVX2_EXTERNAL && ARCH_X86_64 ++SECTION .rdata ++vf_nlmeans_placeholder: times 4 db 0 ++%else + + SECTION_RODATA 32 - OBJS-$(CONFIG_VVC_DECODER) += x86/vvc/vvcdsp_init.o \ - x86/h26x/h2656dsp.o --X86ASM-OBJS-$(CONFIG_VVC_DECODER) += x86/vvc/vvc_mc.o \ -- x86/h26x/h2656_inter.o -+ifdef ARCH_X86_64 -+X86ASM-OBJS-$(CONFIG_VVC_DECODER) += x86/vvc/vvc_mc.o -+endif -+X86ASM-OBJS-$(CONFIG_VVC_DECODER) += x86/h26x/h2656_inter.o diff --git a/ports/ffmpeg/0012-Fix-ssl-110-detection.patch b/ports/ffmpeg/0012-Fix-ssl-110-detection.patch deleted file mode 100644 index b2e5501a13..0000000000 --- a/ports/ffmpeg/0012-Fix-ssl-110-detection.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/configure b/configure -index 2be953f7e7..e075949ffc 100755 ---- a/configure -+++ b/configure -@@ -6497,6 +6497,7 @@ enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0 - { enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR: OpenSSL >=3.0.0 requires --enable-version3"; }; } || - { enabled gpl && ! enabled nonfree && die "ERROR: OpenSSL <3.0.0 is incompatible with the gpl"; } || - check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl || - check_pkg_config openssl openssl openssl/ssl.h SSL_library_init || -+ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto $pthreads_extralibs -ldl || - check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto || - check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto || - check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 || - diff --git a/ports/ffmpeg/0043-fix-miss-head.patch b/ports/ffmpeg/0043-fix-miss-head.patch index eeb5e94615..bad42798c8 100644 --- a/ports/ffmpeg/0043-fix-miss-head.patch +++ b/ports/ffmpeg/0043-fix-miss-head.patch @@ -2,9 +2,9 @@ diff --git a/libavfilter/textutils.c b/libavfilter/textutils.c index ef658d0..c61b0ad 100644 --- a/libavfilter/textutils.c +++ b/libavfilter/textutils.c -@@ -30,6 +30,7 @@ - #include "libavutil/error.h" +@@ -31,6 +31,7 @@ #include "libavutil/file.h" + #include "libavutil/mem.h" #include "libavutil/time.h" +#include "libavutil/time_internal.h" diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 929e061d9c..dae0587e0c 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -2,7 +2,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ffmpeg/ffmpeg REF "n${VERSION}" - SHA512 3ba02e8b979c80bf61d55f414bdac2c756578bb36498ed7486151755c6ccf8bd8ff2b8c7afa3c5d1acd862ce48314886a86a105613c05e36601984c334f8f6bf + SHA512 3b273769ef1a1b63aed0691eef317a760f8c83b1d0e1c232b67bbee26db60b4864aafbc88df0e86d6bebf07185bbd057f33e2d5258fde6d97763b9994cd48b6f HEAD_REF master PATCHES 0001-create-lib-libraries.patch @@ -11,7 +11,6 @@ vcpkg_from_github( 0004-dependencies.patch 0005-fix-nasm.patch 0007-fix-lib-naming.patch - 0012-Fix-ssl-110-detection.patch 0013-define-WINVER.patch 0020-fix-aarch64-libswscale.patch 0024-fix-osx-host-c11.patch diff --git a/ports/ffmpeg/vcpkg.json b/ports/ffmpeg/vcpkg.json index dc40d9381b..32a54b4914 100644 --- a/ports/ffmpeg/vcpkg.json +++ b/ports/ffmpeg/vcpkg.json @@ -1,9 +1,8 @@ { "name": "ffmpeg", - "version": "7.0.2", - "port-version": 7, + "version": "7.1", "description": [ - "a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.", + "A library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.", "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations." ], "homepage": "https://ffmpeg.org", diff --git a/versions/baseline.json b/versions/baseline.json index 9d1b8a8688..b3dcd103df 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2741,8 +2741,8 @@ "port-version": 0 }, "ffmpeg": { - "baseline": "7.0.2", - "port-version": 7 + "baseline": "7.1", + "port-version": 0 }, "ffnvcodec": { "baseline": "12.2.72.0", diff --git a/versions/f-/ffmpeg.json b/versions/f-/ffmpeg.json index a448241938..9a5de38824 100644 --- a/versions/f-/ffmpeg.json +++ b/versions/f-/ffmpeg.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2f0b2eabf82953dfedabf9ed344318d5d411373f", + "version": "7.1", + "port-version": 0 + }, { "git-tree": "d6af07437c8b77783c3184f4d15a2b24d6b8f317", "version": "7.0.2",