git: 3468f1957cf2 - main - multimedia/dav1d: update to 1.0.0

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Fri, 18 Mar 2022 14:41:29 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3468f1957cf25742c60e1066f1174866c42efe96

commit 3468f1957cf25742c60e1066f1174866c42efe96
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-02-27 10:26:48 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-03-18 14:41:26 +0000

    multimedia/dav1d: update to 1.0.0
    
    Changes:        https://code.videolan.org/videolan/dav1d/-/releases/1.0.0
    Reported by:    Repology
---
 Mk/bsd.gecko.mk                             |  3 --
 cad/opencascade/Makefile                    |  2 +-
 graphics/libavif/Makefile                   |  2 +-
 graphics/libheif/Makefile                   |  1 +
 mail/thunderbird/Makefile                   |  3 +-
 mail/thunderbird/files/patch-bug1734058     | 45 +++++++++++++++++++++++++++++
 multimedia/dav1d/Makefile                   |  7 ++---
 multimedia/dav1d/distinfo                   | 10 +++----
 multimedia/dav1d/pkg-plist                  |  4 +--
 multimedia/emby-server-devel/Makefile       |  1 +
 multimedia/emby-server/Makefile             |  2 +-
 multimedia/ffmpeg/Makefile                  |  2 +-
 multimedia/gstreamer1-plugins-rust/Makefile |  2 +-
 multimedia/kodi/Makefile                    |  1 +
 multimedia/libxine/Makefile                 |  1 +
 multimedia/mythtv/Makefile                  |  2 +-
 multimedia/vlc/Makefile                     |  2 +-
 www/firefox-esr/Makefile                    |  3 +-
 www/firefox-esr/files/patch-bug1734058      | 45 +++++++++++++++++++++++++++++
 www/firefox/Makefile                        |  3 +-
 www/firefox/files/patch-bug1559213          | 22 ++++++++++++++
 21 files changed, 139 insertions(+), 24 deletions(-)

diff --git a/Mk/bsd.gecko.mk b/Mk/bsd.gecko.mk
index 7e084efcf947..acd930def68c 100644
--- a/Mk/bsd.gecko.mk
+++ b/Mk/bsd.gecko.mk
@@ -127,13 +127,10 @@ RUSTFLAGS+=	${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/}
 # Standard depends
 _ALL_DEPENDS=	av1 event ffi graphite harfbuzz icu jpeg nspr nss png pixman sqlite vpx webp
 
-# firefox 95 uses a dav1d snapshot > 0.9.2
-.if ${MOZILLA_VER:R:R} < 95
 .if exists(${FILESDIR}/patch-bug1559213)
 av1_LIB_DEPENDS=	libaom.so:multimedia/aom libdav1d.so:multimedia/dav1d
 av1_MOZ_OPTIONS=	--with-system-av1
 .endif
-.endif
 
 event_LIB_DEPENDS=	libevent.so:devel/libevent
 event_MOZ_OPTIONS=	--with-system-libevent
diff --git a/cad/opencascade/Makefile b/cad/opencascade/Makefile
index 4c2313bd1c87..4831b918fd1c 100644
--- a/cad/opencascade/Makefile
+++ b/cad/opencascade/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	opencascade
 PORTVERSION=	7.6.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	cad science
 MASTER_SITES=	LOCAL/thierry
 
diff --git a/graphics/libavif/Makefile b/graphics/libavif/Makefile
index b1f095290148..acc2a2493c8e 100644
--- a/graphics/libavif/Makefile
+++ b/graphics/libavif/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	libavif
 DISTVERSIONPREFIX=	v
 DISTVERSION=	0.9.3
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	graphics
 
 PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
diff --git a/graphics/libheif/Makefile b/graphics/libheif/Makefile
index 4e2f15b42280..698f013b99d6 100644
--- a/graphics/libheif/Makefile
+++ b/graphics/libheif/Makefile
@@ -2,6 +2,7 @@ PORTNAME=	libheif
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.12.0-62
 DISTVERSIONSUFFIX=	-g0082fea
+PORTREVISION=	1
 CATEGORIES=	graphics
 
 MAINTAINER=	makc@FreeBSD.org
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index ebb4d80b4505..b1cf4218f7b1 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	thunderbird
 DISTVERSION=	91.7.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	mail news net-im
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
 		MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build2/source
@@ -18,6 +18,7 @@ BUILD_DEPENDS=	nspr>=4.32:devel/nspr \
 		harfbuzz>=2.8.1:print/harfbuzz \
 		graphite2>=1.3.14:graphics/graphite2 \
 		png>=1.6.37:graphics/png \
+		dav1d>=1.0.0:multimedia/dav1d \
 		libvpx>=1.8.2:multimedia/libvpx \
 		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
 		v4l_compat>0:multimedia/v4l_compat \
diff --git a/mail/thunderbird/files/patch-bug1734058 b/mail/thunderbird/files/patch-bug1734058
new file mode 100644
index 000000000000..c3c16f135cba
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1734058
@@ -0,0 +1,45 @@
+commit 874adf9b96df
+Author: Jon Bauman <jbauman@mozilla.com>
+Date:   Tue Oct 26 17:11:36 2021 +0000
+
+    Bug 1734058 - Update dav1d to new version f52aee04fbd711cddab23d0aa9b196e9c963e7b8 from 2021-10-04 21:58:36. r=mjf,haik
+    
+    This is a fairly significant update, so required a few changes to Gecko code, but I've commented on the interesting details, so they should be easy to find
+    
+    Differential Revision: https://phabricator.services.mozilla.com/D129465
+---
+ dom/media/platforms/agnostic/DAV1DDecoder.cpp | 7 +------
+ image/decoders/nsAVIFDecoder.cpp              | 1 +
+ 2 files changed, 2 insertions(+), 6 deletions(-)
+
+diff --git dom/media/platforms/agnostic/DAV1DDecoder.cpp dom/media/platforms/agnostic/DAV1DDecoder.cpp
+index 459531fe8cf0..3c596b1fefe1 100644
+--- dom/media/platforms/agnostic/DAV1DDecoder.cpp
++++ dom/media/platforms/agnostic/DAV1DDecoder.cpp
+@@ -37,13 +37,8 @@ RefPtr<MediaDataDecoder::InitPromise> DAV1DDecoder::Init() {
+   } else if (mInfo.mDisplay.width >= 1024) {
+     decoder_threads = 4;
+   }
+-  settings.n_frame_threads =
++  settings.n_threads =
+       static_cast<int>(std::min(decoder_threads, GetNumberOfProcessors()));
+-  // There is not much improvement with more than 2 tile threads at least with
+-  // the content being currently served. The ideal number of tile thread would
+-  // much the tile count of the content. Maybe dav1d can help to do that in the
+-  // future.
+-  settings.n_tile_threads = 2;
+ 
+   int res = dav1d_open(&mContext, &settings);
+   if (res < 0) {
+diff --git image/decoders/nsAVIFDecoder.cpp image/decoders/nsAVIFDecoder.cpp
+index 9d1b7496a129..3bb9e8f8d08a 100644
+--- image/decoders/nsAVIFDecoder.cpp
++++ image/decoders/nsAVIFDecoder.cpp
+@@ -581,6 +581,7 @@ class Dav1dDecoder final : AVIFDecoderInterface {
+     Dav1dSettings settings;
+     dav1d_default_settings(&settings);
+     settings.all_layers = 0;
++    settings.max_frame_delay = 1;
+     // TODO: tune settings a la DAV1DDecoder for AV1 (Bug 1681816)
+ 
+     return dav1d_open(&mContext, &settings);
diff --git a/multimedia/dav1d/Makefile b/multimedia/dav1d/Makefile
index 93bf89864ee4..cca26101ab5f 100644
--- a/multimedia/dav1d/Makefile
+++ b/multimedia/dav1d/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	dav1d
-DISTVERSION=	0.9.2
-PORTREVISION=	1
+DISTVERSION=	1.0.0
 CATEGORIES=	multimedia
 
 MAINTAINER=	jbeich@FreeBSD.org
@@ -18,7 +17,7 @@ USE_GITLAB=	yes
 USE_LDCONFIG=	yes
 GL_SITE=	https://code.videolan.org
 GL_ACCOUNT=	videolan
-GL_COMMIT=	7b433e077298d0f4faf8da6d6eb5774e29bffa54
+GL_COMMIT=	99172b11470776177939c3d2bc366fe8d904eab7
 LDFLAGS_i386=	-Wl,-z,notext
 
 OPTIONS_DEFINE=	SDL TEST
@@ -31,7 +30,7 @@ SDL_LIB_DEPENDS=	libplacebo.so:graphics/libplacebo \
 			libvulkan.so:graphics/vulkan-loader
 SDL_MESON_TRUE=	enable_examples
 
-TEST_GL_TUPLE=	videolan:dav1d-test-data:4fd8f87d7df509fda1af51e5e2f7c415692afaef:testdata/tests/dav1d-test-data
+TEST_GL_TUPLE=	videolan:dav1d-test-data:0214ee7342c646b238f98267adf8503c56d9df53:testdata/tests/dav1d-test-data
 TEST_MESON_TRUE=enable_tests testdata_tests
 
 .if make(makesum) # for optional distfiles
diff --git a/multimedia/dav1d/distinfo b/multimedia/dav1d/distinfo
index e4f97bd645a7..ee9d1c38a8c4 100644
--- a/multimedia/dav1d/distinfo
+++ b/multimedia/dav1d/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1630680156
-SHA256 (videolan-dav1d-7b433e077298d0f4faf8da6d6eb5774e29bffa54_GL0.tar.gz) = 0dd8de308248282f5743b2ceee0a8d57cc6cf4afcbd15708059c3ac2f600914a
-SIZE (videolan-dav1d-7b433e077298d0f4faf8da6d6eb5774e29bffa54_GL0.tar.gz) = 1186989
-SHA256 (videolan-dav1d-test-data-4fd8f87d7df509fda1af51e5e2f7c415692afaef_GL0.tar.gz) = cc9247a79b9bd0231418dcd31f4d9fe29ac51bfae5d3cea1a131bb3e89835bd0
-SIZE (videolan-dav1d-test-data-4fd8f87d7df509fda1af51e5e2f7c415692afaef_GL0.tar.gz) = 50361909
+TIMESTAMP = 1647610281
+SHA256 (videolan-dav1d-99172b11470776177939c3d2bc366fe8d904eab7_GL0.tar.gz) = 411211625f44301c03858c395061ac87af6b3a0f02bdd3d599b4c87b123ccb27
+SIZE (videolan-dav1d-99172b11470776177939c3d2bc366fe8d904eab7_GL0.tar.gz) = 1375242
+SHA256 (videolan-dav1d-test-data-0214ee7342c646b238f98267adf8503c56d9df53_GL0.tar.gz) = 1399a5a8ddfc8b22c320e30d731c82fce6d962fa28cd16236a742903c969ebe7
+SIZE (videolan-dav1d-test-data-0214ee7342c646b238f98267adf8503c56d9df53_GL0.tar.gz) = 50909709
diff --git a/multimedia/dav1d/pkg-plist b/multimedia/dav1d/pkg-plist
index 6a48c23511f3..18128a512c72 100644
--- a/multimedia/dav1d/pkg-plist
+++ b/multimedia/dav1d/pkg-plist
@@ -7,6 +7,6 @@ include/dav1d/headers.h
 include/dav1d/picture.h
 include/dav1d/version.h
 lib/libdav1d.so
-lib/libdav1d.so.5
-lib/libdav1d.so.5.1.1
+lib/libdav1d.so.6
+lib/libdav1d.so.6.6.0
 libdata/pkgconfig/dav1d.pc
diff --git a/multimedia/emby-server-devel/Makefile b/multimedia/emby-server-devel/Makefile
index 7b1090f54bef..dfb14211058f 100644
--- a/multimedia/emby-server-devel/Makefile
+++ b/multimedia/emby-server-devel/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	emby-server
 DISTVERSION=	4.7.0.31
+PORTREVISION=	1
 CATEGORIES=	multimedia
 MASTER_SITES=	https://github.com/MediaBrowser/Emby.Releases/releases/download/${PORTVERSION}/ \
 		https://mediabrowser.github.io/embytools/
diff --git a/multimedia/emby-server/Makefile b/multimedia/emby-server/Makefile
index 4bfbcd4839e6..07cfdb722487 100644
--- a/multimedia/emby-server/Makefile
+++ b/multimedia/emby-server/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	emby-server
 DISTVERSION=	4.6.7.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	multimedia
 MASTER_SITES=	https://github.com/MediaBrowser/Emby.Releases/releases/download/${PORTVERSION}/ \
 		https://mediabrowser.github.io/embytools/
diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile
index 626f08570496..f0fa6c61f438 100644
--- a/multimedia/ffmpeg/Makefile
+++ b/multimedia/ffmpeg/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	ffmpeg
 PORTVERSION=	4.4.1
-PORTREVISION=	7
+PORTREVISION=	8
 PORTEPOCH=	1
 CATEGORIES=	multimedia audio net
 MASTER_SITES=	https://ffmpeg.org/releases/
diff --git a/multimedia/gstreamer1-plugins-rust/Makefile b/multimedia/gstreamer1-plugins-rust/Makefile
index 8794eb7ed49f..4c73c71b1967 100644
--- a/multimedia/gstreamer1-plugins-rust/Makefile
+++ b/multimedia/gstreamer1-plugins-rust/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	gstreamer1-plugins-rust
 DISTVERSION=	0.7.2
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	multimedia
 
 MAINTAINER=	jbeich@FreeBSD.org
diff --git a/multimedia/kodi/Makefile b/multimedia/kodi/Makefile
index e67133e5e432..19297eda21a0 100644
--- a/multimedia/kodi/Makefile
+++ b/multimedia/kodi/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	kodi
 DISTVERSION=	19.4
 DISTVERSIONSUFFIX=	-${KODI_CODENAME}
+PORTREVISION=	1
 CATEGORIES=	multimedia java
 
 MAINTAINER=	yzrh@noema.org
diff --git a/multimedia/libxine/Makefile b/multimedia/libxine/Makefile
index 9ff1c0daafaf..68bec04f0227 100644
--- a/multimedia/libxine/Makefile
+++ b/multimedia/libxine/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	xine
 DISTVERSION=	1.2.12
+PORTREVISION=	1
 CATEGORIES=	multimedia
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-lib/${PORTVERSION}
 PKGNAMEPREFIX=	lib
diff --git a/multimedia/mythtv/Makefile b/multimedia/mythtv/Makefile
index 508091e28e06..3cd15abf1e63 100644
--- a/multimedia/mythtv/Makefile
+++ b/multimedia/mythtv/Makefile
@@ -3,7 +3,7 @@
 PORTNAME=	mythtv
 DISTVERSIONPREFIX=	v
 DISTVERSION=	31.0
-PORTREVISION=	4
+PORTREVISION=	5
 PORTEPOCH=	1
 CATEGORIES=	multimedia
 
diff --git a/multimedia/vlc/Makefile b/multimedia/vlc/Makefile
index a9050061823a..bb1f9e02beec 100644
--- a/multimedia/vlc/Makefile
+++ b/multimedia/vlc/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	vlc
 DISTVERSION=	3.0.16
-PORTREVISION=	10
+PORTREVISION=	11
 PORTEPOCH=	4
 CATEGORIES=	multimedia audio net www
 MASTER_SITES=	http://download.videolan.org/pub/videolan/${PORTNAME}/${DISTVERSION:S/a$//}/ \
diff --git a/www/firefox-esr/Makefile b/www/firefox-esr/Makefile
index f8c2b00e03cf..990fdbe7e2bf 100644
--- a/www/firefox-esr/Makefile
+++ b/www/firefox-esr/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	firefox
 DISTVERSION=	91.7.1
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	www
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}esr/source \
@@ -20,6 +20,7 @@ BUILD_DEPENDS=	nspr>=4.32:devel/nspr \
 		harfbuzz>=2.8.1:print/harfbuzz \
 		graphite2>=1.3.14:graphics/graphite2 \
 		png>=1.6.37:graphics/png \
+		dav1d>=1.0.0:multimedia/dav1d \
 		libvpx>=1.8.2:multimedia/libvpx \
 		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
 		v4l_compat>0:multimedia/v4l_compat \
diff --git a/www/firefox-esr/files/patch-bug1734058 b/www/firefox-esr/files/patch-bug1734058
new file mode 100644
index 000000000000..c3c16f135cba
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug1734058
@@ -0,0 +1,45 @@
+commit 874adf9b96df
+Author: Jon Bauman <jbauman@mozilla.com>
+Date:   Tue Oct 26 17:11:36 2021 +0000
+
+    Bug 1734058 - Update dav1d to new version f52aee04fbd711cddab23d0aa9b196e9c963e7b8 from 2021-10-04 21:58:36. r=mjf,haik
+    
+    This is a fairly significant update, so required a few changes to Gecko code, but I've commented on the interesting details, so they should be easy to find
+    
+    Differential Revision: https://phabricator.services.mozilla.com/D129465
+---
+ dom/media/platforms/agnostic/DAV1DDecoder.cpp | 7 +------
+ image/decoders/nsAVIFDecoder.cpp              | 1 +
+ 2 files changed, 2 insertions(+), 6 deletions(-)
+
+diff --git dom/media/platforms/agnostic/DAV1DDecoder.cpp dom/media/platforms/agnostic/DAV1DDecoder.cpp
+index 459531fe8cf0..3c596b1fefe1 100644
+--- dom/media/platforms/agnostic/DAV1DDecoder.cpp
++++ dom/media/platforms/agnostic/DAV1DDecoder.cpp
+@@ -37,13 +37,8 @@ RefPtr<MediaDataDecoder::InitPromise> DAV1DDecoder::Init() {
+   } else if (mInfo.mDisplay.width >= 1024) {
+     decoder_threads = 4;
+   }
+-  settings.n_frame_threads =
++  settings.n_threads =
+       static_cast<int>(std::min(decoder_threads, GetNumberOfProcessors()));
+-  // There is not much improvement with more than 2 tile threads at least with
+-  // the content being currently served. The ideal number of tile thread would
+-  // much the tile count of the content. Maybe dav1d can help to do that in the
+-  // future.
+-  settings.n_tile_threads = 2;
+ 
+   int res = dav1d_open(&mContext, &settings);
+   if (res < 0) {
+diff --git image/decoders/nsAVIFDecoder.cpp image/decoders/nsAVIFDecoder.cpp
+index 9d1b7496a129..3bb9e8f8d08a 100644
+--- image/decoders/nsAVIFDecoder.cpp
++++ image/decoders/nsAVIFDecoder.cpp
+@@ -581,6 +581,7 @@ class Dav1dDecoder final : AVIFDecoderInterface {
+     Dav1dSettings settings;
+     dav1d_default_settings(&settings);
+     settings.all_layers = 0;
++    settings.max_frame_delay = 1;
+     // TODO: tune settings a la DAV1DDecoder for AV1 (Bug 1681816)
+ 
+     return dav1d_open(&mContext, &settings);
diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index dd26fbb1184b..993411c04487 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	firefox
 DISTVERSION=	98.0.1
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	2
 CATEGORIES=	www
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
@@ -19,6 +19,7 @@ BUILD_DEPENDS=	nspr>=4.32:devel/nspr \
 		harfbuzz>=3.1.2:print/harfbuzz \
 		graphite2>=1.3.14:graphics/graphite2 \
 		png>=1.6.37:graphics/png \
+		dav1d>=1.0.0:multimedia/dav1d \
 		libvpx>=1.8.2:multimedia/libvpx \
 		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
 		v4l_compat>0:multimedia/v4l_compat \
diff --git a/www/firefox/files/patch-bug1559213 b/www/firefox/files/patch-bug1559213
index ceaba53522aa..09b4dcc58e83 100644
--- a/www/firefox/files/patch-bug1559213
+++ b/www/firefox/files/patch-bug1559213
@@ -61,6 +61,28 @@ index 8509aec..eb6f129 100644
  
  if CONFIG["MOZ_OMX"]:
      EXPORTS += [
+diff --git media/ffvpx/libavcodec/moz.build media/ffvpx/libavcodec/moz.build
+index 0069865..e806fc8 100644
+--- media/ffvpx/libavcodec/moz.build
++++ media/ffvpx/libavcodec/moz.build
+@@ -112,9 +112,15 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
+             'vaapi_vp8.c',
+             'vaapi_vp9.c',
+         ]
++        if CONFIG["MOZ_SYSTEM_AV1"]:
++          CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
++          OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
++        else:
++          USE_LIBS += [
++            'dav1d',
++            'media_libdav1d_asm',
++          ]
+         USE_LIBS += [
+-          'dav1d',
+-          'media_libdav1d_asm',
+           'mozva'
+         ]
+ 
 diff --git toolkit/moz.configure toolkit/moz.configure
 index 0069865..e806fc8 100644
 --- toolkit/moz.configure