From nobody Mon Nov 08 17:53:26 2021 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 755EE1843E02; Mon, 8 Nov 2021 17:53:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HnzHW0wc2z4tXl; Mon, 8 Nov 2021 17:53:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1A5C1631B; Mon, 8 Nov 2021 17:53:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1A8HrQg9068851; Mon, 8 Nov 2021 17:53:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1A8HrQCB068850; Mon, 8 Nov 2021 17:53:26 GMT (envelope-from git) Date: Mon, 8 Nov 2021 17:53:26 GMT Message-Id: <202111081753.1A8HrQCB068850@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Jan Beich Subject: git: 93c3542baf30 - 2021Q4 - multimedia/vmaf: unbreak legacy API consumers after 1868dedecc9a List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jbeich X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q4 X-Git-Reftype: branch X-Git-Commit: 93c3542baf308046ae79ee8abd3abd32875aab8c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch 2021Q4 has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=93c3542baf308046ae79ee8abd3abd32875aab8c commit 93c3542baf308046ae79ee8abd3abd32875aab8c Author: Jan Beich AuthorDate: 2021-11-08 16:34:49 +0000 Commit: Jan Beich CommitDate: 2021-11-08 17:37:50 +0000 multimedia/vmaf: unbreak legacy API consumers after 1868dedecc9a $ aomenc --tune=vmaf --output=foo.mp4 foo.y4m Pass 1/2 frame 1/0 0B 0 us 0.00 fpm [ETA unknown] libvmaf ERROR could not read model from path: "/usr/local/share/model/vmaf_v0.6.1.json" Fatal error: Failed to load VMAF model. $ ffmpeg -i foo.y4m -i bar.y4m -lavfi libvmaf -f null - [...] libvmaf INFO `compute_vmaf()` is deprecated and will be removed in a future libvmaf version libvmaf ERROR could not read model from path: "/usr/local/share/model/vmaf_v0.6.1.pkl" libvmaf ERROR support for pkl model files has been removed, use json libvmaf ERROR problem loading model file: /usr/local/share/model/vmaf_v0.6.1.pkl [Parsed_libvmaf_0 @ 0x8061b3b40] libvmaf encountered an error, check log for details (cherry picked from commit 7f163c23e1a732c8b65cb7b8ecfbcd9e8dfd1cd8) --- multimedia/ffmpeg/Makefile | 1 + multimedia/ffmpeg/files/patch-vmaf | 32 +++++++++++++++++++++++++++++++ multimedia/vmaf/Makefile | 6 ++++++ multimedia/vmaf/pkg-plist | 16 ++++++++++++++++ multimedia/x265/Makefile | 2 +- multimedia/x265/files/patch-source_x265.h | 13 +++++++++++++ 6 files changed, 69 insertions(+), 1 deletion(-) diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index 5a5c3ed0b9a4..80fdb8fcbbcf 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -2,6 +2,7 @@ PORTNAME= ffmpeg PORTVERSION= 4.4.1 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= multimedia audio net MASTER_SITES= https://ffmpeg.org/releases/ diff --git a/multimedia/ffmpeg/files/patch-vmaf b/multimedia/ffmpeg/files/patch-vmaf new file mode 100644 index 000000000000..b7b205fd9eb3 --- /dev/null +++ b/multimedia/ffmpeg/files/patch-vmaf @@ -0,0 +1,32 @@ +https://github.com/Netflix/vmaf/commit/122089fa3d23 + +--- doc/filters.texi.orig 2021-10-24 20:47:07 UTC ++++ doc/filters.texi +@@ -13875,14 +13875,14 @@ The obtained VMAF score is printed through the logging + It requires Netflix's vmaf library (libvmaf) as a pre-requisite. + After installing the library it can be enabled using: + @code{./configure --enable-libvmaf}. +-If no model path is specified it uses the default model: @code{vmaf_v0.6.1.pkl}. ++If no model path is specified it uses the default model: @code{vmaf_v0.6.1.json}. + + The filter has following options: + + @table @option + @item model_path + Set the model path which is to be used for SVM. +-Default value: @code{"/usr/local/share/model/vmaf_v0.6.1.pkl"} ++Default value: @code{"/usr/local/share/model/vmaf_v0.6.1.json"} + + @item log_path + Set the file path to be used to store logs. +--- libavfilter/vf_libvmaf.c.orig 2021-10-24 20:47:07 UTC ++++ libavfilter/vf_libvmaf.c +@@ -72,7 +72,7 @@ typedef struct LIBVMAFContext { + #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM + + static const AVOption libvmaf_options[] = { +- {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/local/share/model/vmaf_v0.6.1.pkl"}, 0, 1, FLAGS}, ++ {"model_path", "Set the model to be used for computing vmaf.", OFFSET(model_path), AV_OPT_TYPE_STRING, {.str="/usr/local/share/model/vmaf_v0.6.1.json"}, 0, 1, FLAGS}, + {"log_path", "Set the file path to be used to store logs.", OFFSET(log_path), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, + {"log_fmt", "Set the format of the log (csv, json or xml).", OFFSET(log_fmt), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 1, FLAGS}, + {"enable_transform", "Enables transform for computing vmaf.", OFFSET(enable_transform), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS}, diff --git a/multimedia/vmaf/Makefile b/multimedia/vmaf/Makefile index 1930b845599e..b31de2adff0b 100644 --- a/multimedia/vmaf/Makefile +++ b/multimedia/vmaf/Makefile @@ -1,6 +1,7 @@ PORTNAME= vmaf DISTVERSIONPREFIX= v DISTVERSION= 2.2.1 +PORTREVISION= 1 CATEGORIES= multimedia MAINTAINER= jbeich@FreeBSD.org @@ -22,4 +23,9 @@ USE_LDCONFIG= yes GH_ACCOUNT= Netflix WRKSRC_SUBDIR= lib${PORTNAME} +post-install: +# For legacy API consumers e.g., aom, x265 + (cd ${WRKSRC:H} && ${COPYTREE_SHARE} "model" \ + ${STAGEDIR}${DATADIR:H} "-name *.json") + .include diff --git a/multimedia/vmaf/pkg-plist b/multimedia/vmaf/pkg-plist index 64757f1ec926..2055ea823c47 100644 --- a/multimedia/vmaf/pkg-plist +++ b/multimedia/vmaf/pkg-plist @@ -10,3 +10,19 @@ lib/libvmaf.so lib/libvmaf.so.1 lib/libvmaf.so.1.1.2 libdata/pkgconfig/libvmaf.pc +share/model/other_models/nflx_v1.json +share/model/other_models/nflxtrain_norm_type_none.json +share/model/other_models/vmaf_v0.6.0.json +share/model/other_models/vmaf_v0.6.1mfz.json +share/model/vmaf_4k_rb_v0.6.2/vmaf_4k_rb_v0.6.2.json +share/model/vmaf_4k_v0.6.1.json +share/model/vmaf_b_v0.6.3.json +share/model/vmaf_float_4k_v0.6.1.json +share/model/vmaf_float_b_v0.6.3.json +share/model/vmaf_float_b_v0.6.3/vmaf_float_b_v0.6.3.json +share/model/vmaf_float_v0.6.1.json +share/model/vmaf_float_v0.6.1neg.json +share/model/vmaf_rb_v0.6.2/vmaf_rb_v0.6.2.json +share/model/vmaf_rb_v0.6.3/vmaf_rb_v0.6.3.json +share/model/vmaf_v0.6.1.json +share/model/vmaf_v0.6.1neg.json diff --git a/multimedia/x265/Makefile b/multimedia/x265/Makefile index 985d516efacd..2fec20076168 100644 --- a/multimedia/x265/Makefile +++ b/multimedia/x265/Makefile @@ -2,7 +2,7 @@ PORTNAME= x265 PORTVERSION= 3.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= multimedia MASTER_SITES= https://bitbucket.org/multicoreware/x265_git/get/${BB_TAG}.tar.gz?meow=/ diff --git a/multimedia/x265/files/patch-source_x265.h b/multimedia/x265/files/patch-source_x265.h new file mode 100644 index 000000000000..1fee612613ad --- /dev/null +++ b/multimedia/x265/files/patch-source_x265.h @@ -0,0 +1,13 @@ +https://github.com/Netflix/vmaf/commit/122089fa3d23 + +--- source/x265.h.orig 2020-09-16 15:52:49 UTC ++++ source/x265.h +@@ -733,7 +733,7 @@ typedef struct x265_vmaf_commondata + int enable_conf_interval; + }x265_vmaf_commondata; + +-static const x265_vmaf_commondata vcd[] = { { NULL, (char *)"/usr/local/share/model/vmaf_v0.6.1.pkl", NULL, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 1, 0 } }; ++static const x265_vmaf_commondata vcd[] = { { NULL, (char *)"/usr/local/share/model/vmaf_v0.6.1.json", NULL, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 1, 0 } }; + + /* x265 input parameters + *