From nobody Sun Feb 20 15:23:06 2022 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 2B49119D8AF6; Sun, 20 Feb 2022 15:23:07 +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 4K1q230fpRz3R7h; Sun, 20 Feb 2022 15:23:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645370587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HS661s6cKnABgQaJ/JT7bXs6LgKiTMWfMVeSzrPijW0=; b=NHtbYkR3XWc7it5pu7KP05FrCgAq2qg6pZl384AY6/SAcrGYuSS9kqc5p+dH3ntDZ1cSG5 JURk6JTkivsueem0l0ubuHMV1NaBU0rkD+RleMYWckj9wh5NJVx+fpGRnIah7kO1bMmioe lltVZbxnT/epovOONFBDMb0biBK459lN+KrB6nto/CC2wwWjMOHGz8XYKdCEV82ksM+bFj KOT94rPe4Ta70gr48Bpv++MHoqMNU3EQaSGM8yqbqhyU686dtMB7K/aFmdYQyfrTS/w4PZ mMoJHeEfmC8zDAQ62xsqq9vjMIPrNgBljT2ALirAUlD++AXpPne2iuUJaY2xUw== 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 EA4F21EAE9; Sun, 20 Feb 2022 15:23:06 +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 21KFN6Zh090544; Sun, 20 Feb 2022 15:23:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21KFN6Dw090543; Sun, 20 Feb 2022 15:23:06 GMT (envelope-from git) Date: Sun, 20 Feb 2022 15:23:06 GMT Message-Id: <202202201523.21KFN6Dw090543@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: 7bd8fb0a8c61 - 2022Q1 - multimedia/emby-server: unbreak with dav1d 1.0.0 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/2022Q1 X-Git-Reftype: branch X-Git-Commit: 7bd8fb0a8c61caa3b9cc5ee050202e2fd867de5d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645370587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HS661s6cKnABgQaJ/JT7bXs6LgKiTMWfMVeSzrPijW0=; b=PT3Yu2E9xYRu1agmLcRiDbhSccSfy8flXcmdynTK7BbMP8Uh8BJ52tmIwOER7iEglxWvaA PZIMBJqZ1UeGCst9ZWlY3KThlRb9dYHHha7jEm3YxqViC8yWD9vqHr7kiIFHbCih/VSkDR FaxVblVz7PacId5Dtt4VBVXTjUjwWA9utLXDpv6S4Z/jhXkd2g2L4y3RJdlMkmfFmndrug sYcf+FeFaaiEpBDi4+nU0DYSDE0fJIkDdIh2yDmK4XYqqR9+yzne5e1al4CvZMntV3JcXk NgEslknm9Q21XmirwD8y/2NXk6q5o5aTyZ/MNa4GZiMQkU8zdjbwet++sqm8Rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645370587; a=rsa-sha256; cv=none; b=fiUKGtWZbhCZa8Nwgtbc0619QLwpZkHhbnSS3DPOotaHCpMlk/XuOL3UMvtB8TvN3A8tqD hVv7Uu9rRlRML0zA4Oll/ZbNfBiRuyPppVO4pQrZPJu69V37l+Wd0wd2PaBK35gVDxeEtT Og1aSRCabg/N8TKKh47GT/5ccDMHKq+ynfU78p4HaSLe/n1aLJHqE8yF/7i2rOehFm0cOS vbpqqNyQv7iSsOzpHEoo5cSdgPEmDXHw4FEmgg2HkZMJTqMgpoJXVeI3PKIcWglwFWQzV1 +14FRzoAzptTeaUIa0oS1At0PVfCxx8bMtzkgCzUiVljd+qhqHdoSXDhaPRoIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch 2022Q1 has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=7bd8fb0a8c61caa3b9cc5ee050202e2fd867de5d commit 7bd8fb0a8c61caa3b9cc5ee050202e2fd867de5d Author: Jan Beich AuthorDate: 2022-02-20 14:23:59 +0000 Commit: Jan Beich CommitDate: 2022-02-20 15:22:43 +0000 multimedia/emby-server: unbreak with dav1d 1.0.0 libavcodec/libdav1d.c:137:7: error: no member named 'n_tile_threads' in 'struct Dav1dSettings' s.n_tile_threads = dav1d->tile_threads ~ ^ libavcodec/libdav1d.c:144:14: error: no member named 'n_frame_threads' in 'struct Dav1dSettings' s.n_frame_threads, s.n_tile_threads); ~ ^ (cherry picked from commit 1133c44239e4d97453dadd9a16f2c1b768a3d95c) --- multimedia/emby-server-devel/files/patch-dav1d-1.0 | 111 +++++++++++++++++++++ multimedia/emby-server/files/patch-dav1d-1.0 | 111 +++++++++++++++++++++ 2 files changed, 222 insertions(+) diff --git a/multimedia/emby-server-devel/files/patch-dav1d-1.0 b/multimedia/emby-server-devel/files/patch-dav1d-1.0 new file mode 100644 index 000000000000..1c4ca68a21f9 --- /dev/null +++ b/multimedia/emby-server-devel/files/patch-dav1d-1.0 @@ -0,0 +1,111 @@ +https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/5e61fce832f7 + +libavcodec/libdav1d.c:137:7: error: no member named 'n_tile_threads' in 'struct Dav1dSettings' + s.n_tile_threads = dav1d->tile_threads + ~ ^ +libavcodec/libdav1d.c:139:52: error: use of undeclared identifier 'DAV1D_MAX_TILE_THREADS' + : FFMIN(floor(sqrt(threads)), DAV1D_MAX_TILE_THREADS); + ^ +libavcodec/libdav1d.c:139:52: error: use of undeclared identifier 'DAV1D_MAX_TILE_THREADS' +libavcodec/libdav1d.c:140:7: error: no member named 'n_frame_threads' in 'struct Dav1dSettings' + s.n_frame_threads = dav1d->frame_threads + ~ ^ +libavcodec/libdav1d.c:142:48: error: no member named 'n_tile_threads' in 'struct Dav1dSettings' + : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS); + ~ ^ +./libavutil/common.h:96:22: note: expanded from macro 'FFMIN' +#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) + ^ +libavcodec/libdav1d.c:142:65: error: use of undeclared identifier 'DAV1D_MAX_FRAME_THREADS'; did you mean 'DAV1D_OBU_FRAME_HDR'? + : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS); + ^~~~~~~~~~~~~~~~~~~~~~~ + DAV1D_OBU_FRAME_HDR +./libavutil/common.h:96:28: note: expanded from macro 'FFMIN' +#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) + ^ +/usr/local/include/dav1d/headers.h:48:5: note: 'DAV1D_OBU_FRAME_HDR' declared here + DAV1D_OBU_FRAME_HDR = 3, + ^ +libavcodec/libdav1d.c:142:65: error: use of undeclared identifier 'DAV1D_MAX_FRAME_THREADS'; did you mean 'DAV1D_OBU_FRAME_HDR'? + : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS); + ^~~~~~~~~~~~~~~~~~~~~~~ + DAV1D_OBU_FRAME_HDR +./libavutil/common.h:96:34: note: expanded from macro 'FFMIN' +#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) + ^ +/usr/local/include/dav1d/headers.h:48:5: note: 'DAV1D_OBU_FRAME_HDR' declared here + DAV1D_OBU_FRAME_HDR = 3, + ^ +libavcodec/libdav1d.c:142:48: error: no member named 'n_tile_threads' in 'struct Dav1dSettings' + : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS); + ~ ^ +./libavutil/common.h:96:40: note: expanded from macro 'FFMIN' +#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) + ^ +libavcodec/libdav1d.c:144:14: error: no member named 'n_frame_threads' in 'struct Dav1dSettings' + s.n_frame_threads, s.n_tile_threads); + ~ ^ +libavcodec/libdav1d.c:144:33: error: no member named 'n_tile_threads' in 'struct Dav1dSettings' + s.n_frame_threads, s.n_tile_threads); + ~ ^ +libavcodec/libdav1d.c:378:94: error: use of undeclared identifier 'DAV1D_MAX_TILE_THREADS' + { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD }, + ^ +libavcodec/libdav1d.c:379:97: error: use of undeclared identifier 'DAV1D_MAX_FRAME_THREADS'; did you mean 'DAV1D_OBU_FRAME_HDR'? + { "framethreads", "Frame threads", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD }, + ^~~~~~~~~~~~~~~~~~~~~~~ + DAV1D_OBU_FRAME_HDR +/usr/local/include/dav1d/headers.h:48:5: note: 'DAV1D_OBU_FRAME_HDR' declared here + DAV1D_OBU_FRAME_HDR = 3, + ^ + +--- libavcodec/libdav1d.c.orig 2021-05-11 03:40:43 UTC ++++ libavcodec/libdav1d.c +@@ -30,6 +30,9 @@ + #include "decode.h" + #include "internal.h" + ++#define FF_DAV1D_VERSION_AT_LEAST(x,y) \ ++ (DAV1D_API_VERSION_MAJOR > (x) || DAV1D_API_VERSION_MAJOR == (x) && DAV1D_API_VERSION_MINOR >= (y)) ++ + typedef struct Libdav1dContext { + AVClass *class; + Dav1dContext *c; +@@ -134,6 +137,15 @@ static av_cold int libdav1d_init(AVCodecContext *c) + if (dav1d->apply_grain >= 0) + s.apply_grain = dav1d->apply_grain; + ++#if FF_DAV1D_VERSION_AT_LEAST(6,0) ++ if (dav1d->frame_threads || dav1d->tile_threads) ++ s.n_threads = FFMAX(dav1d->frame_threads, dav1d->tile_threads); ++ else ++ s.n_threads = FFMIN(threads, DAV1D_MAX_THREADS); ++ s.max_frame_delay = (c->flags & AV_CODEC_FLAG_LOW_DELAY) ? 1 : s.n_threads; ++ av_log(c, AV_LOG_DEBUG, "Using %d threads, %d max_frame_delay\n", ++ s.n_threads, s.max_frame_delay); ++#else + s.n_tile_threads = dav1d->tile_threads + ? dav1d->tile_threads + : FFMIN(floor(sqrt(threads)), DAV1D_MAX_TILE_THREADS); +@@ -142,6 +154,7 @@ static av_cold int libdav1d_init(AVCodecContext *c) + : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS); + av_log(c, AV_LOG_DEBUG, "Using %d frame threads, %d tile threads\n", + s.n_frame_threads, s.n_tile_threads); ++#endif + + res = dav1d_open(&dav1d->c, &s); + if (res < 0) +@@ -371,6 +384,13 @@ static av_cold int libdav1d_close(AVCodecContext *c) + + return 0; + } ++ ++#ifndef DAV1D_MAX_FRAME_THREADS ++#define DAV1D_MAX_FRAME_THREADS DAV1D_MAX_THREADS ++#endif ++#ifndef DAV1D_MAX_TILE_THREADS ++#define DAV1D_MAX_TILE_THREADS DAV1D_MAX_THREADS ++#endif + + #define OFFSET(x) offsetof(Libdav1dContext, x) + #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM diff --git a/multimedia/emby-server/files/patch-dav1d-1.0 b/multimedia/emby-server/files/patch-dav1d-1.0 new file mode 100644 index 000000000000..1c4ca68a21f9 --- /dev/null +++ b/multimedia/emby-server/files/patch-dav1d-1.0 @@ -0,0 +1,111 @@ +https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/5e61fce832f7 + +libavcodec/libdav1d.c:137:7: error: no member named 'n_tile_threads' in 'struct Dav1dSettings' + s.n_tile_threads = dav1d->tile_threads + ~ ^ +libavcodec/libdav1d.c:139:52: error: use of undeclared identifier 'DAV1D_MAX_TILE_THREADS' + : FFMIN(floor(sqrt(threads)), DAV1D_MAX_TILE_THREADS); + ^ +libavcodec/libdav1d.c:139:52: error: use of undeclared identifier 'DAV1D_MAX_TILE_THREADS' +libavcodec/libdav1d.c:140:7: error: no member named 'n_frame_threads' in 'struct Dav1dSettings' + s.n_frame_threads = dav1d->frame_threads + ~ ^ +libavcodec/libdav1d.c:142:48: error: no member named 'n_tile_threads' in 'struct Dav1dSettings' + : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS); + ~ ^ +./libavutil/common.h:96:22: note: expanded from macro 'FFMIN' +#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) + ^ +libavcodec/libdav1d.c:142:65: error: use of undeclared identifier 'DAV1D_MAX_FRAME_THREADS'; did you mean 'DAV1D_OBU_FRAME_HDR'? + : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS); + ^~~~~~~~~~~~~~~~~~~~~~~ + DAV1D_OBU_FRAME_HDR +./libavutil/common.h:96:28: note: expanded from macro 'FFMIN' +#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) + ^ +/usr/local/include/dav1d/headers.h:48:5: note: 'DAV1D_OBU_FRAME_HDR' declared here + DAV1D_OBU_FRAME_HDR = 3, + ^ +libavcodec/libdav1d.c:142:65: error: use of undeclared identifier 'DAV1D_MAX_FRAME_THREADS'; did you mean 'DAV1D_OBU_FRAME_HDR'? + : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS); + ^~~~~~~~~~~~~~~~~~~~~~~ + DAV1D_OBU_FRAME_HDR +./libavutil/common.h:96:34: note: expanded from macro 'FFMIN' +#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) + ^ +/usr/local/include/dav1d/headers.h:48:5: note: 'DAV1D_OBU_FRAME_HDR' declared here + DAV1D_OBU_FRAME_HDR = 3, + ^ +libavcodec/libdav1d.c:142:48: error: no member named 'n_tile_threads' in 'struct Dav1dSettings' + : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS); + ~ ^ +./libavutil/common.h:96:40: note: expanded from macro 'FFMIN' +#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) + ^ +libavcodec/libdav1d.c:144:14: error: no member named 'n_frame_threads' in 'struct Dav1dSettings' + s.n_frame_threads, s.n_tile_threads); + ~ ^ +libavcodec/libdav1d.c:144:33: error: no member named 'n_tile_threads' in 'struct Dav1dSettings' + s.n_frame_threads, s.n_tile_threads); + ~ ^ +libavcodec/libdav1d.c:378:94: error: use of undeclared identifier 'DAV1D_MAX_TILE_THREADS' + { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD }, + ^ +libavcodec/libdav1d.c:379:97: error: use of undeclared identifier 'DAV1D_MAX_FRAME_THREADS'; did you mean 'DAV1D_OBU_FRAME_HDR'? + { "framethreads", "Frame threads", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD }, + ^~~~~~~~~~~~~~~~~~~~~~~ + DAV1D_OBU_FRAME_HDR +/usr/local/include/dav1d/headers.h:48:5: note: 'DAV1D_OBU_FRAME_HDR' declared here + DAV1D_OBU_FRAME_HDR = 3, + ^ + +--- libavcodec/libdav1d.c.orig 2021-05-11 03:40:43 UTC ++++ libavcodec/libdav1d.c +@@ -30,6 +30,9 @@ + #include "decode.h" + #include "internal.h" + ++#define FF_DAV1D_VERSION_AT_LEAST(x,y) \ ++ (DAV1D_API_VERSION_MAJOR > (x) || DAV1D_API_VERSION_MAJOR == (x) && DAV1D_API_VERSION_MINOR >= (y)) ++ + typedef struct Libdav1dContext { + AVClass *class; + Dav1dContext *c; +@@ -134,6 +137,15 @@ static av_cold int libdav1d_init(AVCodecContext *c) + if (dav1d->apply_grain >= 0) + s.apply_grain = dav1d->apply_grain; + ++#if FF_DAV1D_VERSION_AT_LEAST(6,0) ++ if (dav1d->frame_threads || dav1d->tile_threads) ++ s.n_threads = FFMAX(dav1d->frame_threads, dav1d->tile_threads); ++ else ++ s.n_threads = FFMIN(threads, DAV1D_MAX_THREADS); ++ s.max_frame_delay = (c->flags & AV_CODEC_FLAG_LOW_DELAY) ? 1 : s.n_threads; ++ av_log(c, AV_LOG_DEBUG, "Using %d threads, %d max_frame_delay\n", ++ s.n_threads, s.max_frame_delay); ++#else + s.n_tile_threads = dav1d->tile_threads + ? dav1d->tile_threads + : FFMIN(floor(sqrt(threads)), DAV1D_MAX_TILE_THREADS); +@@ -142,6 +154,7 @@ static av_cold int libdav1d_init(AVCodecContext *c) + : FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS); + av_log(c, AV_LOG_DEBUG, "Using %d frame threads, %d tile threads\n", + s.n_frame_threads, s.n_tile_threads); ++#endif + + res = dav1d_open(&dav1d->c, &s); + if (res < 0) +@@ -371,6 +384,13 @@ static av_cold int libdav1d_close(AVCodecContext *c) + + return 0; + } ++ ++#ifndef DAV1D_MAX_FRAME_THREADS ++#define DAV1D_MAX_FRAME_THREADS DAV1D_MAX_THREADS ++#endif ++#ifndef DAV1D_MAX_TILE_THREADS ++#define DAV1D_MAX_TILE_THREADS DAV1D_MAX_THREADS ++#endif + + #define OFFSET(x) offsetof(Libdav1dContext, x) + #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM