[ffmpeg] Update to version 8.1 (#50519)

This commit is contained in:
Kadir 2026-03-24 09:47:30 +03:00 committed by GitHub
parent 6bb5d895fb
commit ed8445dd2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 75 additions and 109 deletions

View File

@ -5,7 +5,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ffmpeg/ffmpeg
REF "n${VERSION}"
SHA512 f31769a7ed52865165e7db4a03e9378b3376012b7aaf0bbc022aa76c3e999e71c3927e6eb8639d8681e04e33362dd73eafa9e7c62a3c71599ff78da09f5cee0a
SHA512 1dee3967057619dd7f2f78c63de85bb97af16c974bd9225c2336d42c7c8765c04f77490aac36af2daf953bc52c7faa37750a09265e133708f6a1709028573834
HEAD_REF master
)

View File

@ -1,6 +1,6 @@
{
"name": "ffmpeg-bin2c",
"version": "8.0.1",
"version": "8.1",
"description": "Host tool bin2c for FFmpeg build",
"license": "LGPL-2.1-or-later",
"supports": "native",

View File

@ -1,27 +0,0 @@
diff --git a/configure b/configure
index 1f0b9497cb..3243e23021 100644
--- a/configure
+++ b/configure
@@ -5697,17 +5697,19 @@ case $target_os in
;;
win32|win64)
disable symver
- if enabled shared; then
+# if enabled shared; then
# Link to the import library instead of the normal static library
# for shared libs.
LD_LIB='%.lib'
# Cannot build both shared and static libs with MSVC or icl.
- disable static
- fi
+# disable static
+# fi
! enabled small && test_cmd $windres --version && enable gnu_windres
enabled x86_32 && check_ldflags -LARGEADDRESSAWARE
add_cppflags -DWIN32_LEAN_AND_MEAN
shlibdir_default="$bindir_default"
+ LIBPREF=""
+ LIBSUF=".lib"
SLIBPREF=""
SLIBSUF=".dll"
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'

View File

@ -1,8 +1,8 @@
diff --git a/configure b/configure
index 4a9534a..1f0cb43 100644
index 1759694..fcbae49 100644
--- a/configure
+++ b/configure
@@ -6973,7 +6973,7 @@ fi
@@ -7184,7 +7184,7 @@ fi
enabled zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion ||
check_lib zlib zlib.h zlibVersion -lz; }
@ -11,17 +11,17 @@ index 4a9534a..1f0cb43 100644
enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma
enabled zlib && test_exec $zlib_extralibs <<EOF && enable zlib_gzip
@@ -7110,7 +7110,8 @@ if enabled libmfx; then
@@ -7322,7 +7322,8 @@ if enabled libmfx; then
fi
enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load
-enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs
+enabled libmp3lame && { check_lib libmp3lame lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs ||
+ require libmp3lame lame/lame.h lame_set_VBR_quality -llibmp3lame-static -llibmpghip-static $libm_extralibs; }
enabled libmpeghdec && require_pkg_config libmpeghdec "mpeghdec >= 3.0.0" mpeghdec/mpeghdecoder.h mpeghdecoder_init
enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine ||
require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; }
enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei -lnppif ||
@@ -7125,7 +7126,7 @@ enabled libopencv && { check_headers opencv2/core/core_c.h &&
@@ -7343,7 +7344,7 @@ enabled libopencolorio && require_pkg_config_cxx libopencolorio "OpenColorIO"
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; } }
@ -30,7 +30,7 @@ index 4a9534a..1f0cb43 100644
enabled libopenvino && { { check_pkg_config libopenvino openvino openvino/c/openvino.h ov_core_create && enable openvino2; } ||
{ check_pkg_config libopenvino openvino c_api/ie_c_api.h ie_c_api_version ||
require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api; } }
@@ -7151,8 +7152,8 @@ enabled libshaderc && require_pkg_config spirv_compiler "shaderc >= 2019.
@@ -7369,8 +7370,8 @@ enabled libshaderc && require_pkg_config spirv_library "shaderc >= 2019.1
enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer
enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init ||
require libsmbclient libsmbclient.h smbc_init -lsmbclient; }
@ -41,16 +41,16 @@ index 4a9534a..1f0cb43 100644
enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/sftp.h sftp_init
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
@@ -7246,6 +7247,8 @@ enabled openal && { check_pkg_config openal "openal >= 1.1" "AL/al.h"
@@ -7470,6 +7471,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 "-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 ||
+ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -lAdvapi32 -lOle32 -lCfgmgr32||
+ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -pthread -ldl ||
die "ERROR: opencl not found"; } &&
{ test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
@@ -7578,10 +7581,10 @@ enabled amf &&
@@ -7835,10 +7838,10 @@ enabled amf &&
"(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400240000"
# Funny iconv installations are not unusual, so check it after all flags have been set
@ -62,4 +62,4 @@ index 4a9534a..1f0cb43 100644
+ check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv || check_lib iconv iconv.h iconv -liconv -lcharset
fi
enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
enabled debug && add_allcflags -g"$debuglevel" && add_asflags -g"$debuglevel"

View File

@ -1,5 +1,5 @@
diff --git a/libavcodec/x86/apv_dsp.asm b/libavcodec/x86/apv_dsp.asm
index 60e0f03..12668d3 100644
index e2f30ff..3befc7c 100644
--- a/libavcodec/x86/apv_dsp.asm
+++ b/libavcodec/x86/apv_dsp.asm
@@ -18,7 +18,10 @@
@ -61,6 +61,22 @@ index 1924233..17a0ce4 100644
SECTION_RODATA 64
diff --git a/libavcodec/x86/vp9itxfm_avx2.asm b/libavcodec/x86/vp9itxfm_avx2.asm
index c5ee242..5fe077f 100644
--- a/libavcodec/x86/vp9itxfm_avx2.asm
+++ b/libavcodec/x86/vp9itxfm_avx2.asm
@@ -22,7 +22,10 @@
%include "libavutil/x86/x86util.asm"
-%if ARCH_X86_64 && HAVE_AVX2_EXTERNAL
+%ifn ARCH_X86_64 && HAVE_AVX2_EXTERNAL
+SECTION .rdata
+vp9itxfm_avx2_placeholder: times 4 db 0
+%else
SECTION_RODATA 16
diff --git a/libavcodec/x86/vp9itxfm_avx512.asm b/libavcodec/x86/vp9itxfm_avx512.asm
index d51c507..1f16ba2 100644
--- a/libavcodec/x86/vp9itxfm_avx512.asm
@ -78,12 +94,12 @@ index d51c507..1f16ba2 100644
SECTION_RODATA 64
diff --git a/libavcodec/x86/vvc/mc.asm b/libavcodec/x86/vvc/mc.asm
index 30aa97c..3975f98 100644
index 4f078ea..5cf095b 100644
--- a/libavcodec/x86/vvc/mc.asm
+++ b/libavcodec/x86/vvc/mc.asm
@@ -31,7 +31,9 @@
SECTION_RODATA 32
SECTION_RODATA
-%if ARCH_X86_64
+%ifn ARCH_X86_64

View File

@ -1,28 +0,0 @@
diff --git a/libswscale/aarch64/yuv2rgb_neon.S b/libswscale/aarch64/yuv2rgb_neon.S
index 89d69e7f6c..4bc1607a7a 100644
--- a/libswscale/aarch64/yuv2rgb_neon.S
+++ b/libswscale/aarch64/yuv2rgb_neon.S
@@ -169,19 +169,19 @@ function ff_\ifmt\()_to_\ofmt\()_neon, export=1
sqdmulh v26.8h, v26.8h, v0.8h // ((Y1*(1<<3) - y_offset) * y_coeff) >> 15
sqdmulh v27.8h, v27.8h, v0.8h // ((Y2*(1<<3) - y_offset) * y_coeff) >> 15
-.ifc \ofmt,argb // 1 2 3 0
+.ifc \ofmt,argb
compute_rgba v5.8b,v6.8b,v7.8b,v4.8b, v17.8b,v18.8b,v19.8b,v16.8b
.endif
-.ifc \ofmt,rgba // 0 1 2 3
+.ifc \ofmt,rgba
compute_rgba v4.8b,v5.8b,v6.8b,v7.8b, v16.8b,v17.8b,v18.8b,v19.8b
.endif
-.ifc \ofmt,abgr // 3 2 1 0
+.ifc \ofmt,abgr
compute_rgba v7.8b,v6.8b,v5.8b,v4.8b, v19.8b,v18.8b,v17.8b,v16.8b
.endif
-.ifc \ofmt,bgra // 2 1 0 3
+.ifc \ofmt,bgra
compute_rgba v6.8b,v5.8b,v4.8b,v7.8b, v18.8b,v17.8b,v16.8b,v19.8b
.endif

View File

@ -1,13 +0,0 @@
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 6317ab7d0e..f1f70e9b96 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -453,7 +453,7 @@ static const VulkanOptExtension optional_device_exts[] = {
{ VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME, FF_VK_EXT_VIDEO_DECODE_AV1 },
};
-static VkBool32 VKAPI_CALL vk_dbg_callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
+static VKAPI_ATTR VkBool32 VKAPI_CALL vk_dbg_callback(VkDebugUtilsMessageSeverityFlagBitsEXT severity,
VkDebugUtilsMessageTypeFlagsEXT messageType,
const VkDebugUtilsMessengerCallbackDataEXT *data,
void *priv)

View File

@ -1,10 +1,10 @@
diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index ddf4892..7d9f311 100644
index 06d6f39..53862c3 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -12,8 +12,7 @@ endif
ifndef SUBDIR
@@ -21,8 +21,7 @@ LINK = $(if $(filter -lstdc++,$(1)),$(LDXX) $(filter-out -lstdc++,$(1)),$(LD) $(
endif
endif
-BIN2CEXE = ffbuild/bin2c$(HOSTEXESUF)
-BIN2C = $(BIN2CEXE)
@ -12,13 +12,13 @@ index ddf4892..7d9f311 100644
ifndef V
Q = @
@@ -112,9 +111,6 @@ COMPILE_LASX = $(call COMPILE,CC,LASXFLAGS)
@@ -122,9 +121,6 @@ COMPILE_LASX = $(call COMPILE,CC,LASXFLAGS)
%.h.c:
$(Q)echo '#include "$*.h"' >$@
-$(BIN2CEXE): ffbuild/bin2c_host.o
- $(HOSTLD) $(HOSTLDFLAGS) $(HOSTLD_O) $^ $(HOSTEXTRALIBS)
-
%.metal.air: %.metal
$(METALCC) $< -o $@
RUN_BIN2C = $(BIN2C) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) $@ $(subst .,_,$(basename $(notdir $@)))
RUN_GZIP = $(M)gzip -nc9 $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) >$@
RUN_MINIFY = $(M)sed 's!/\\*.*\\*/!!g' $< | tr '\n' ' ' | tr -s ' ' | sed 's/^ //; s/ $$//' > $@

View File

@ -1,10 +1,10 @@
diff --git a/configure b/configure
index e8cce5d..d465a53 100644
index 1759694..60e0f24 100644
--- a/configure
+++ b/configure
@@ -5178,12 +5178,12 @@ probe_cc(){
@@ -5365,12 +5365,12 @@ probe_cc(){
_flags_filter=msvc_flags_link
_ld_lib='lib%.a'
_ld_lib='%.lib'
_ld_path='-libpath:'
- elif VSLANG=1033 $_cc -nologo- 2>&1 | grep -q ^Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then
+ elif VSLANG=1033 $_cc -nologo- 2>&1 | grep -qi Microsoft || { $_cc -v 2>&1 | grep -q clang && $_cc -? > /dev/null 2>&1; }; then
@ -18,8 +18,8 @@ index e8cce5d..d465a53 100644
else
_ident=$($_cc --version 2>/dev/null | head -n1 | tr -d '\r')
fi
@@ -5293,7 +5293,7 @@ if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then
DEPCCFLAGS=$_flags
@@ -5486,7 +5486,7 @@ if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then
DEPCXXFLAGS=$_flags $_cxxflags
fi
-if VSLANG=1033 $ar 2>&1 | grep -q ^Microsoft; then

View File

@ -2,20 +2,17 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ffmpeg/ffmpeg
REF "n${VERSION}"
SHA512 f31769a7ed52865165e7db4a03e9378b3376012b7aaf0bbc022aa76c3e999e71c3927e6eb8639d8681e04e33362dd73eafa9e7c62a3c71599ff78da09f5cee0a
SHA512 1dee3967057619dd7f2f78c63de85bb97af16c974bd9225c2336d42c7c8765c04f77490aac36af2daf953bc52c7faa37750a09265e133708f6a1709028573834
HEAD_REF master
PATCHES
0001-create-lib-libraries.patch
0002-fix-msvc-link.patch
0003-fix-windowsinclude.patch
0004-dependencies.patch
0005-fix-nasm.patch
0007-fix-lib-naming.patch
0013-define-WINVER.patch
0020-fix-aarch64-libswscale.patch
0024-fix-osx-host-c11.patch
0040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch # Do not remove this patch. It is required by chromium
0044-fix-vulkan-debug-callback-abi.patch
0045-use-prebuilt-bin2c.patch
0046-fix-msvc-detection.patch
)
@ -692,6 +689,18 @@ endif ()
set(OPTIONS_DEBUG "--disable-optimizations --enable-debug")
set(OPTIONS_RELEASE "--enable-optimizations")
if(VCPKG_DETECTED_MSVC)
# Determine base linkage (MT or MD)
set(FFMPEG_CRT_PREFIX "-MT")
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
set(FFMPEG_CRT_PREFIX "-MD")
endif()
# Append Release flags
string(APPEND OPTIONS_RELEASE " --extra-cflags=${FFMPEG_CRT_PREFIX} --extra-cxxflags=${FFMPEG_CRT_PREFIX}")
# Append Debug flags (adding the 'd' suffix for the debug runtime)
string(APPEND OPTIONS_DEBUG " --extra-cflags=${FFMPEG_CRT_PREFIX}d --extra-cxxflags=${FFMPEG_CRT_PREFIX}d")
endif()
set(OPTIONS "${OPTIONS} ${OPTIONS_CROSS}")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")

View File

@ -1,7 +1,6 @@
{
"name": "ffmpeg",
"version": "8.0.1",
"port-version": 2,
"version": "8.1",
"description": [
"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."

View File

@ -303,9 +303,9 @@ fbgemm:arm64-osx=cascade
fbgemm:arm64-windows=cascade
fbthrift(android)=cascade
fcl:arm64-linux=cascade
ffmpeg[all](((!x86 & !x64) | (!android & !linux)) & (!windows | uwp))=cascade
ffmpeg[all-gpl](((!x86 & !x64) | (!android & !linux)) & (!windows | uwp))=cascade
ffmpeg[all-nonfree](((!x86 & !x64) | (!android & !linux)) & (!windows | uwp))=cascade
ffmpeg[all](((!x86 & !x64) | (!android & !linux)) & (!windows | uwp) & !osx)=cascade
ffmpeg[all-gpl](((!x86 & !x64) | (!android & !linux)) & (!windows | uwp) & !osx)=cascade
ffmpeg[all-nonfree](((!x86 & !x64) | (!android & !linux)) & (!windows | uwp) & !osx)=cascade
ffmpeg[all,all-gpl](x64 & android)=feature-fails
ffmpeg[alsa](!linux & !android)=cascade # alsa supports
ffmpeg[amf]:arm64-osx=cascade

View File

@ -2989,11 +2989,11 @@
"port-version": 0
},
"ffmpeg": {
"baseline": "8.0.1",
"port-version": 2
"baseline": "8.1",
"port-version": 0
},
"ffmpeg-bin2c": {
"baseline": "8.0.1",
"baseline": "8.1",
"port-version": 0
},
"ffnvcodec": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ffb65ec24217edcc0740186456fb0569036a1caf",
"version": "8.1",
"port-version": 0
},
{
"git-tree": "ed013f9d8e1da9dd235af3dc379163581bb0ca71",
"version": "8.0.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "437ac286ee1b78217a172c9d745be744029163fb",
"version": "8.1",
"port-version": 0
},
{
"git-tree": "9c05f44e0620c7727bf47629cc031001dbae9bd4",
"version": "8.0.1",