git: 91af44585eea - main - multimedia/ffmpeg: update to 6.1

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Fri, 17 Nov 2023 08:50:28 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=91af44585eeaf773a4a1294ccaab764f8341d3aa

commit 91af44585eeaf773a4a1294ccaab764f8341d3aa
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-11-11 00:25:26 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-11-17 08:48:56 +0000

    multimedia/ffmpeg: update to 6.1
    
    - HARFBUZZ (like ASS option) is enabled to keep -vf drawtext
    - Rebuild mpv to expose --hwdec=vulkan
    
    Changes:        https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/n6.1:/Changelog
    PR:             272575
    Reported by:    Repology
    Exp-run by:     antoine
---
 multimedia/ffmpeg/Makefile                     | 27 ++++++++++++++-----
 multimedia/ffmpeg/distinfo                     |  8 +++---
 multimedia/ffmpeg/files/patch-libplacebo-6.292 | 37 --------------------------
 multimedia/ffmpeg/pkg-plist                    | 18 +++++++------
 multimedia/mpv/Makefile                        |  2 +-
 5 files changed, 36 insertions(+), 56 deletions(-)

diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile
index 8854c5573baa..8292d7c9ffda 100644
--- a/multimedia/ffmpeg/Makefile
+++ b/multimedia/ffmpeg/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	ffmpeg
-PORTVERSION=	6.0.1
+PORTVERSION=	6.1
 PORTEPOCH=	1
 CATEGORIES=	multimedia audio net
 MASTER_SITES=	https://ffmpeg.org/releases/
@@ -30,9 +30,9 @@ NOPRECIOUSMAKEVARS=	yes # ARCH
 PORTSCOUT=	limit:^6\.
 
 # Option CHROMAPRINT disabled, it cannot work and people are baffled.
-OPTIONS_DEFINE=	ALSA AMR_NB AMR_WB AOM ARIBB24 ASM ASS BS2B CACA CDIO \
+OPTIONS_DEFINE=	ALSA AMR_NB AMR_WB AOM ARIBB24 ARIBCAPTION ASM ASS BS2B CACA CDIO \
 		CODEC2 DAV1D DAVS2 DC1394 DEBUG DOCS DRM FDK_AAC FLITE \
-		FONTCONFIG FREETYPE FREI0R FRIBIDI GLSLANG GME GSM ICONV ILBC \
+		FONTCONFIG FREETYPE FREI0R FRIBIDI GLSLANG GME GSM HARFBUZZ ICONV ILBC \
 		JACK JXL KLVANC KVAZAAR LADSPA LAME LCMS2 LENSFUN LIBBLURAY LIBPLACEBO LIBRSVG2 \
 		LIBXML2 LTO LV2 MODPLUG MYSOFA NETWORK NVENC OPENAL OPENCL OPENGL \
 		OPENH264 OPENJPEG OPENMPT OPENVINO OPTIMIZED_CFLAGS OPUS POCKETSPHINX \
@@ -46,7 +46,7 @@ OPTIONS_DEFINE_amd64=	MFX VPL
 OPTIONS_DEFINE_i386=	MFX
 
 OPTIONS_DEFAULT=	AOM ASM ASS DAV1D DRM FONTCONFIG FREETYPE FREI0R GMP \
-			GNUTLS ICONV JXL LAME LCMS2 LIBPLACEBO LIBXML2 NETWORK \
+			GNUTLS HARFBUZZ ICONV JXL LAME LCMS2 LIBPLACEBO LIBXML2 NETWORK \
 			OPTIMIZED_CFLAGS OPUS RTCPU SVTAV1 V4L VAAPI VDPAU VMAF \
 			VORBIS VPX VULKAN WEBP X264 X265 XCB
 OPTIONS_DEFAULT_amd64=	NVENC
@@ -55,6 +55,11 @@ OPTIONS_DEFAULT_i386=	NVENC
 # i386 is too register-starved for LTO (PR257124)
 OPTIONS_EXCLUDE_i386=	LTO
 
+.if !exists(${.CURDIR:H:H}/multimedia/libaribcaption)
+# https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/b6138633cdf2
+OPTIONS_EXCLUDE+=	ARIBCAPTION
+.endif
+
 .if !exists(${.CURDIR:H:H}/multimedia/davs2)
 # https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/5985a1bf7233
 OPTIONS_EXCLUDE+=	DAVS2
@@ -89,6 +94,7 @@ OPTIONS_GROUP_LICENSE=	GPL3 NONFREE
 ASS_DESC=	Subtitles rendering via libass
 AOM_DESC=	AV1 video encoding/decoding via libaom
 ARIBB24_DESC=	ARIB text and caption decoding via libaribb24
+ARIBCAPTION_DESC=	ARIB text and caption decoding via libaribcaption
 BS2B_DESC=	Bauer Stereophonic-to-Binaural filter
 CHROMAPRINT_DESC=	Audio fingerprinting with chromaprint
 CODEC2_DESC=	Codec 2 audio encoding/decoding via libcodec2
@@ -101,6 +107,7 @@ FLITE_DESC=	Voice synthesis support via libflite
 GLSLANG_DESC=	GLSL->SPIRV compilation via libglslang
 GME_DESC=	Game Music Emu demuxer
 GPL3_DESC=	Allow (L)GPL version 3 code(cs)
+HARFBUZZ_DESC=	Text shaping via HarfBuzz
 ILBC_DESC=	Internet Low Bit Rate codec
 KLVANC_DESC=	Kernel Labs VANC processing
 KVAZAAR_DESC=	H.265 video codec support via Kvazaar
@@ -168,6 +175,10 @@ AOM_CONFIGURE_ENABLE=	libaom
 ARIBB24_LIB_DEPENDS=	libaribb24.so:multimedia/aribb24
 ARIBB24_CONFIGURE_ENABLE=	libaribb24
 
+# aribcaption
+ARIBCAPTION_LIB_DEPENDS=	libaribcaption.so:multimedia/libaribcaption
+ARIBCAPTION_CONFIGURE_ENABLE=	libaribcaption
+
 # asm support
 ASM_CONFIGURE_ENABLE=	asm
 
@@ -272,6 +283,10 @@ GMP_IMPLIES=		GPL3
 GSM_LIB_DEPENDS=	libgsm.so:audio/gsm
 GSM_CONFIGURE_ENABLE=	libgsm
 
+# harfbuzz
+HARFBUZZ_LIB_DEPENDS=	libharfbuzz.so:print/harfbuzz
+HARFBUZZ_CONFIGURE_ENABLE=	libharfbuzz
+
 # iconv
 ICONV_USES=	iconv
 ICONV_CONFIGURE_ENABLE=	iconv
@@ -332,7 +347,7 @@ LIBXML2_LIB_DEPENDS=	libxml2.so:textproc/libxml2
 LIBXML2_CONFIGURE_ENABLE=	libxml2
 
 # lto
-LTO_CONFIGURE_ENABLE=	lto
+LTO_CONFIGURE_ON=	--enable-lto
 
 # lv2
 LV2_BUILD_DEPENDS=	lv2>0:audio/lv2
@@ -499,7 +514,7 @@ SVTHEVC_PATCHFILES=	master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.pa
 # svt-vp9
 SVTVP9_LIB_DEPENDS=	libSvtVp9Enc.so:multimedia/svt-vp9
 SVTVP9_CONFIGURE_ON=	--enable-libsvtvp9
-SVTVP9_PATCH_SITES=	https://github.com/OpenVisualCloud/SVT-VP9/raw/v0.3.0-17-g15bd454/ffmpeg_plugin/:svtvp9
+SVTVP9_PATCH_SITES=	https://github.com/OpenVisualCloud/SVT-VP9/raw/v0.3.0-20-gbab25a6/ffmpeg_plugin/:svtvp9
 SVTVP9_PATCHFILES=	master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch:-p1:svtvp9
 .if make(makesum)
 .MAKEFLAGS:		WITH+=SVTVP9
diff --git a/multimedia/ffmpeg/distinfo b/multimedia/ffmpeg/distinfo
index 18175f34b21a..df5c5e16e578 100644
--- a/multimedia/ffmpeg/distinfo
+++ b/multimedia/ffmpeg/distinfo
@@ -1,9 +1,9 @@
-TIMESTAMP = 1699585987
-SHA256 (ffmpeg-6.0.1.tar.xz) = 9b16b8731d78e596b4be0d720428ca42df642bb2d78342881ff7f5bc29fc9623
-SIZE (ffmpeg-6.0.1.tar.xz) = 10240172
+TIMESTAMP = 1699662326
+SHA256 (ffmpeg-6.1.tar.xz) = 488c76e57dd9b3bee901f71d5c95eaf1db4a5a31fe46a28654e837144207c270
+SIZE (ffmpeg-6.1.tar.xz) = 10455956
 SHA256 (master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch) = e8fdc940474f3819b9a8d30cab8164774584c051322acb6194bcb03d56e8175a
 SIZE (master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch) = 25395
 SHA256 (0002-doc-Add-libsvt_hevc-encoder-docs.patch) = a164ebdc4d281352bf7ad1b179aae4aeb33f1191c444bed96cb8ab333c046f81
 SIZE (0002-doc-Add-libsvt_hevc-encoder-docs.patch) = 5461
-SHA256 (master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch) = d8b91ea5f07d0208cbe0290567083808708014a1953fda322d13cb619349c9ee
+SHA256 (master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch) = 0433016c8523c7ce159523946a76c8fa06a926f33f94b70e8de7c2082d14178c
 SIZE (master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch) = 25894
diff --git a/multimedia/ffmpeg/files/patch-libplacebo-6.292 b/multimedia/ffmpeg/files/patch-libplacebo-6.292
deleted file mode 100644
index 4036a21389d9..000000000000
--- a/multimedia/ffmpeg/files/patch-libplacebo-6.292
+++ /dev/null
@@ -1,37 +0,0 @@
-https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1231003c3c6d
-
-libavfilter/vf_libplacebo.c:461:10: error: field designator 'force_icc_lut' does not refer to any field in type 'struct pl_render_params'
-        .force_icc_lut = s->force_icc_lut,
-         ^
-
---- doc/filters.texi.orig	2023-02-27 20:43:45 UTC
-+++ doc/filters.texi
-@@ -16242,9 +16242,6 @@ Disable built-in GPU sampling (forces LUT).
- @item disable_builtin
- Disable built-in GPU sampling (forces LUT).
- 
--@item force_icc_lut
--Force the use of a full ICC 3DLUT for gamut mapping.
--
- @item disable_fbos
- Forcibly disable FBOs, resulting in loss of almost all functionality, but
- offering the maximum possible speed.
---- libavfilter/vf_libplacebo.c.orig	2023-02-27 20:43:45 UTC
-+++ libavfilter/vf_libplacebo.c
-@@ -458,7 +458,6 @@ static int process_frames(AVFilterContext *avctx, AVFr
-         .polar_cutoff = s->polar_cutoff,
-         .disable_linear_scaling = s->disable_linear,
-         .disable_builtin_scalers = s->disable_builtin,
--        .force_icc_lut = s->force_icc_lut,
-         .force_dither = s->force_dither,
-         .disable_fbos = s->disable_fbos,
-     };
-@@ -847,7 +846,7 @@ static const AVOption libplacebo_options[] = {
-     { "polar_cutoff", "Polar LUT cutoff", OFFSET(polar_cutoff), AV_OPT_TYPE_FLOAT, {.dbl = 0}, 0.0, 1.0, DYNAMIC },
-     { "disable_linear", "Disable linear scaling", OFFSET(disable_linear), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC },
-     { "disable_builtin", "Disable built-in scalers", OFFSET(disable_builtin), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC },
--    { "force_icc_lut", "Force the use of a full ICC 3DLUT for color mapping", OFFSET(force_icc_lut), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC },
-+    { "force_icc_lut", "Deprecated, does nothing", OFFSET(force_icc_lut), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC | AV_OPT_FLAG_DEPRECATED },
-     { "force_dither", "Force dithering", OFFSET(force_dither), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC },
-     { "disable_fbos", "Force-disable FBOs", OFFSET(disable_fbos), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC },
-     { NULL },
diff --git a/multimedia/ffmpeg/pkg-plist b/multimedia/ffmpeg/pkg-plist
index 994e9a7e1277..ee7093319491 100644
--- a/multimedia/ffmpeg/pkg-plist
+++ b/multimedia/ffmpeg/pkg-plist
@@ -69,6 +69,7 @@ include/libavutil/downmix_info.h
 include/libavutil/encryption_info.h
 include/libavutil/error.h
 include/libavutil/eval.h
+include/libavutil/executor.h
 include/libavutil/ffversion.h
 include/libavutil/fifo.h
 include/libavutil/file.h
@@ -129,6 +130,7 @@ include/libavutil/tx.h
 include/libavutil/uuid.h
 include/libavutil/version.h
 include/libavutil/video_enc_params.h
+include/libavutil/video_hint.h
 include/libavutil/xtea.h
 include/libpostproc/postprocess.h
 include/libpostproc/version.h
@@ -141,28 +143,28 @@ include/libswscale/version.h
 include/libswscale/version_major.h
 lib/libavcodec.so
 lib/libavcodec.so.60
-lib/libavcodec.so.60.3.100
+lib/libavcodec.so.60.31.102
 lib/libavdevice.so
 lib/libavdevice.so.60
-lib/libavdevice.so.60.1.100
+lib/libavdevice.so.60.3.100
 lib/libavfilter.so
 lib/libavfilter.so.9
-lib/libavfilter.so.9.3.100
+lib/libavfilter.so.9.12.100
 lib/libavformat.so
 lib/libavformat.so.60
-lib/libavformat.so.60.3.100
+lib/libavformat.so.60.16.100
 lib/libavutil.so
 lib/libavutil.so.58
-lib/libavutil.so.58.2.100
+lib/libavutil.so.58.29.100
 lib/libpostproc.so
 lib/libpostproc.so.57
-lib/libpostproc.so.57.1.100
+lib/libpostproc.so.57.3.100
 lib/libswresample.so
 lib/libswresample.so.4
-lib/libswresample.so.4.10.100
+lib/libswresample.so.4.12.100
 lib/libswscale.so
 lib/libswscale.so.7
-lib/libswscale.so.7.1.100
+lib/libswscale.so.7.5.100
 libdata/pkgconfig/libavcodec.pc
 libdata/pkgconfig/libavdevice.pc
 libdata/pkgconfig/libavfilter.pc
diff --git a/multimedia/mpv/Makefile b/multimedia/mpv/Makefile
index 93e261f486fd..ce58a575c89e 100644
--- a/multimedia/mpv/Makefile
+++ b/multimedia/mpv/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	mpv
 DISTVERSIONPREFIX=	v
 DISTVERSION=	0.36.0
-PORTREVISION=	5
+PORTREVISION=	6
 PORTEPOCH=	1
 CATEGORIES=	multimedia audio