From nobody Sun Mar 27 20:28:14 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 0D4C31A32AF6; Sun, 27 Mar 2022 20:28:15 +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 4KRS7y6sFhz50lS; Sun, 27 Mar 2022 20:28:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648412895; 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=2JJPGG/w8GoQsnLHYxVWpi4s7J0TuXeKQVFdKl8eEZg=; b=qO0xRNNzXBCqsddKVWY9aMgvG7Rs6s+kEmPtT6QHhTK4EXzRyrDnHioW9MNSu7jftisTSw k6s5hNZ2iMpC9HFE0+NxsRnH8rK5OaWumsIZpHuoQsXhjRzwiGVguqYsvrl+tvRdt2hPxl MYLoY9ulsuX4w70Qg5w8bhWM81SPAtF7zjciIhb5UogyHI+maAOgFMAFkvTegZfjVi3qJG JlHoRoNDH6TWro1+R21K/dyoXfNgj9QaqtgVhRnaK554ZwM+Wa1VAT12ABsG0jsi0p6/Dy BpPmZFcfJon+xp0t+mIQ4cP3vOiQSeh4Vx32f9EiolejbdSM51pVHPdjak7Jfw== 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 CBEE01C0AB; Sun, 27 Mar 2022 20:28:14 +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 22RKSEHd051452; Sun, 27 Mar 2022 20:28:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22RKSESv051451; Sun, 27 Mar 2022 20:28:14 GMT (envelope-from git) Date: Sun, 27 Mar 2022 20:28:14 GMT Message-Id: <202203272028.22RKSESv051451@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jan Beich Subject: git: 1c6198d6c673 - main - multimedia/ffmpeg: backport DAV1D and SVTAV1 fixes 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/main X-Git-Reftype: branch X-Git-Commit: 1c6198d6c6736b2d25787a8cbd6304b8992f666b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648412895; 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=2JJPGG/w8GoQsnLHYxVWpi4s7J0TuXeKQVFdKl8eEZg=; b=O/syzGhFWOT6ZHfP758tsYdiz4I5ixJ707x88M06s65MVdDML3KaPihdPgdfHitqKcjEdc MQhUTqv1v2PtVDx1OMwKpFZeCsCF1aJ+ZP4syLaG76nkeAkhV7N+896SuoVTequJsWqgpT 27nDts1LGl3754rotcndK5mIKfTZ4ghWm5RFZpPvlBganl1s/8kPcr3YB5A+DGkT2pog5K VA7sEP66cvp56ssFIML+aRqaHPr0TGDzCU8QYJD6IACwfru01kdylvibOX2WrgVXfk7E2y U37npkB0D+VdhPhuGuKlgOsS3C12zoQZCEZXzSjZZiUaglNzH1fo54INtK7A7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648412895; a=rsa-sha256; cv=none; b=WYgNkALjHTD227bLy4Ztdz5JfHTn0ThhM/lY34JH+IGn48mVi3fLpx+e698YrzkFpfhQfw x4BtrbqCaAFRkqSrXZ/v37wRdCG4fnuaD59ucqODhw0yr+EnJCQ8QVoOv510y3caFSI8k0 AuFNGR4IvYyB9Vy301WdxYufokokxEpRUSZ66BsXrSExq+nlP8KH+EVbZSrE98mjDsRFjl zCo3sclObFV+WvYkWIF2PruVvxPcabnnnm0PyL2Z7ASerF6QlpVb0FX7Gx+xJYKBie77WL ojc98yIseCJ0u5MGUzk3IOtnVMfObFW4rP2PKQ1XhLi5wAlVbYDfLhXzls4XHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=1c6198d6c6736b2d25787a8cbd6304b8992f666b commit 1c6198d6c6736b2d25787a8cbd6304b8992f666b Author: Jan Beich AuthorDate: 2022-03-27 19:43:19 +0000 Commit: Jan Beich CommitDate: 2022-03-27 20:27:52 +0000 multimedia/ffmpeg: backport DAV1D and SVTAV1 fixes --- multimedia/ffmpeg/Makefile | 2 +- multimedia/ffmpeg/files/patch-dav1d | 39 +++++++++ multimedia/ffmpeg/files/patch-svtav1 | 151 ++++++++++++++++++++++++----------- 3 files changed, 144 insertions(+), 48 deletions(-) diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index 7aba1beef13d..4726bd11e64f 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -2,7 +2,7 @@ PORTNAME= ffmpeg PORTVERSION= 4.4.1 -PORTREVISION= 10 +PORTREVISION= 11 PORTEPOCH= 1 CATEGORIES= multimedia audio net MASTER_SITES= https://ffmpeg.org/releases/ diff --git a/multimedia/ffmpeg/files/patch-dav1d b/multimedia/ffmpeg/files/patch-dav1d new file mode 100644 index 000000000000..4af5b8b518e5 --- /dev/null +++ b/multimedia/ffmpeg/files/patch-dav1d @@ -0,0 +1,39 @@ +https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/61ed1182eeb2 +https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/cc33e73618a9 +https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/a4e1dd694014 + +--- libavcodec/libdav1d.c.orig 2021-10-24 20:47:11 UTC ++++ libavcodec/libdav1d.c +@@ -127,7 +127,11 @@ static av_cold int libdav1d_init(AVCodecContext *c) + { + Libdav1dContext *dav1d = c->priv_data; + Dav1dSettings s; ++#if FF_DAV1D_VERSION_AT_LEAST(6,0) ++ int threads = c->thread_count; ++#else + int threads = (c->thread_count ? c->thread_count : av_cpu_count()) * 3 / 2; ++#endif + int res; + + av_log(c, AV_LOG_INFO, "libdav1d %s\n", dav1d_version()); +@@ -153,7 +157,7 @@ static av_cold int libdav1d_init(AVCodecContext *c) + 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; ++ s.max_frame_delay = (c->flags & AV_CODEC_FLAG_LOW_DELAY) ? 1 : 0; + av_log(c, AV_LOG_DEBUG, "Using %d threads, %d max_frame_delay\n", + s.n_threads, s.max_frame_delay); + #else +@@ -244,8 +248,10 @@ static int libdav1d_receive_frame(AVCodecContext *c, A + if (res < 0) { + if (res == AVERROR(EINVAL)) + res = AVERROR_INVALIDDATA; +- if (res != AVERROR(EAGAIN)) ++ if (res != AVERROR(EAGAIN)) { ++ dav1d_data_unref(data); + return res; ++ } + } + + res = dav1d_get_picture(dav1d->c, p); diff --git a/multimedia/ffmpeg/files/patch-svtav1 b/multimedia/ffmpeg/files/patch-svtav1 index e960c3d2f816..5cb3b47c42eb 100644 --- a/multimedia/ffmpeg/files/patch-svtav1 +++ b/multimedia/ffmpeg/files/patch-svtav1 @@ -5,10 +5,14 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/c5f314309067 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/c33b4048859a https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/a2b090da7932 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 +https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/4e47ebf38b97 +https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/50bc87263576 +https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d794b36a7788 +https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be --- configure.orig 2021-10-24 20:47:11 UTC +++ configure -@@ -6430,7 +6430,7 @@ enabled libsoxr && require libsoxr soxr.h so +@@ -6430,7 +6430,7 @@ enabled libsrt && require_pkg_config libsrt enabled libssh && require_pkg_config libssh libssh 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 @@ -19,7 +23,7 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg --- doc/encoders.texi.orig 2021-10-24 20:47:07 UTC +++ doc/encoders.texi -@@ -1754,28 +1754,15 @@ Set the operating point level. +@@ -1754,28 +1754,15 @@ Set the operating point tier. @item tier Set the operating point tier. @@ -51,7 +55,7 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 @item qp Set the quantizer used in cqp rate control mode (0-63). -@@ -1786,14 +1773,18 @@ Enable scene change detection. +@@ -1786,14 +1773,18 @@ Set number of frames to look ahead (0-120). Set number of frames to look ahead (0-120). @item preset @@ -74,44 +78,51 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 --- libavcodec/libsvtav1.c.orig 2021-10-24 20:47:07 UTC +++ libavcodec/libsvtav1.c -@@ -37,6 +37,10 @@ - #include "avcodec.h" - #include "profiles.h" - -+#ifndef SVT_AV1_CHECK_VERSION -+#define SVT_AV1_CHECK_VERSION(major, minor, patch) 0 -+#endif -+ - typedef enum eos_status { - EOS_NOT_REACHED = 0, - EOS_SENT, -@@ -60,10 +64,11 @@ typedef struct SvtContext { +@@ -60,17 +60,20 @@ typedef struct SvtContext { EOS_STATUS eos_flag; // User options. + AVDictionary *svtav1_opts; ++#if FF_API_SVTAV1_OPTS int hierarchical_level; int la_depth; - int enc_mode; +- int enc_mode; - int rc_mode; -+ int crf; int scd; - int qp; +- int qp; + + int tier; -@@ -151,7 +156,63 @@ static int config_enc_params(EbSvtAv1EncConfiguration + int tile_columns; + int tile_rows; ++#endif ++ int enc_mode; ++ int crf; ++ int qp; + } SvtContext; + + static const struct { +@@ -151,7 +154,62 @@ static int config_enc_params(EbSvtAv1EncConfiguration { SvtContext *svt_enc = avctx->priv_data; const AVPixFmtDescriptor *desc; + AVDictionaryEntry *en = NULL; + // Update param from options ++#if FF_API_SVTAV1_OPTS + param->hierarchical_levels = svt_enc->hierarchical_level; ++ param->tier = svt_enc->tier; ++ param->scene_change_detection = svt_enc->scd; ++ param->tile_columns = svt_enc->tile_columns; ++ param->tile_rows = svt_enc->tile_rows; ++ ++ if (svt_enc->la_depth >= 0) ++ param->look_ahead_distance = svt_enc->la_depth; ++#endif + + if (svt_enc->enc_mode >= 0) + param->enc_mode = svt_enc->enc_mode; + -+ param->tier = svt_enc->tier; -+ + if (avctx->bit_rate) { + param->target_bit_rate = avctx->bit_rate; + if (avctx->rc_max_rate != avctx->bit_rate) @@ -125,19 +136,11 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 + if (svt_enc->crf > 0) { + param->qp = svt_enc->crf; + param->rate_control_mode = 0; -+ param->enable_tpl_la = 1; + } else if (svt_enc->qp > 0) { + param->qp = svt_enc->qp; + param->rate_control_mode = 0; -+ param->enable_tpl_la = 0; ++ param->enable_adaptive_quantization = 0; + } -+ param->scene_change_detection = svt_enc->scd; -+ -+ if (svt_enc->la_depth >= 0) -+ param->look_ahead_distance = svt_enc->la_depth; -+ -+ param->tile_columns = svt_enc->tile_columns; -+ param->tile_rows = svt_enc->tile_rows; + +#if SVT_AV1_CHECK_VERSION(0, 9, 1) + while ((en = av_dict_get(svt_enc->svtav1_opts, "", en, AV_DICT_IGNORE_SUFFIX))) { @@ -162,7 +165,24 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 param->source_width = avctx->width; param->source_height = avctx->height; -@@ -184,16 +245,6 @@ static int config_enc_params(EbSvtAv1EncConfiguration +@@ -169,6 +227,16 @@ static int config_enc_params(EbSvtAv1EncConfiguration + return AVERROR(EINVAL); + } + ++ param->color_primaries = avctx->color_primaries; ++ param->matrix_coefficients = (desc->flags & AV_PIX_FMT_FLAG_RGB) ? ++ AVCOL_SPC_RGB : avctx->colorspace; ++ param->transfer_characteristics = avctx->color_trc; ++ ++ if (avctx->color_range != AVCOL_RANGE_UNSPECIFIED) ++ param->color_range = avctx->color_range == AVCOL_RANGE_JPEG; ++ else ++ param->color_range = !!(desc->flags & AV_PIX_FMT_FLAG_RGB); ++ + if (avctx->profile != FF_PROFILE_UNKNOWN) + param->profile = avctx->profile; + +@@ -184,16 +252,6 @@ static int config_enc_params(EbSvtAv1EncConfiguration param->profile = FF_PROFILE_AV1_HIGH; } @@ -179,7 +199,7 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 if (avctx->gop_size > 0) param->intra_period_length = avctx->gop_size - 1; -@@ -205,19 +256,15 @@ static int config_enc_params(EbSvtAv1EncConfiguration +@@ -205,19 +263,15 @@ static int config_enc_params(EbSvtAv1EncConfiguration param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame; } @@ -203,18 +223,39 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 return 0; } -@@ -480,8 +527,8 @@ static const AVOption options[] = { - { "la_depth", "Look ahead distance [0, 120]", OFFSET(la_depth), - AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 120, VE }, +@@ -472,21 +526,22 @@ static const AVOption options[] = { + #define OFFSET(x) offsetof(SvtContext, x) + #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM + static const AVOption options[] = { +- { "hielevel", "Hierarchical prediction levels setting", OFFSET(hierarchical_level), +- AV_OPT_TYPE_INT, { .i64 = 4 }, 3, 4, VE , "hielevel"}, ++#if FF_API_SVTAV1_OPTS ++ { "hielevel", "Hierarchical prediction levels setting (Deprecated, use svtav1-params)", OFFSET(hierarchical_level), ++ AV_OPT_TYPE_INT, { .i64 = 4 }, 3, 4, VE | AV_OPT_FLAG_DEPRECATED , "hielevel"}, + { "3level", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 3 }, INT_MIN, INT_MAX, VE, "hielevel" }, + { "4level", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 4 }, INT_MIN, INT_MAX, VE, "hielevel" }, + +- { "la_depth", "Look ahead distance [0, 120]", OFFSET(la_depth), +- AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 120, VE }, ++ { "la_depth", "Look ahead distance [0, 120] (Deprecated, use svtav1-params)", OFFSET(la_depth), ++ AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 120, VE | AV_OPT_FLAG_DEPRECATED }, - { "preset", "Encoding preset [0, 8]", - OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = MAX_ENC_PRESET }, 0, MAX_ENC_PRESET, VE }, +- +- { "tier", "Set operating point tier", OFFSET(tier), +- AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, "tier" }, ++ { "tier", "Set operating point tier (Deprecated, use svtav1-params)", OFFSET(tier), ++ AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE | AV_OPT_FLAG_DEPRECATED, "tier" }, + { "main", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, VE, "tier" }, + { "high", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0, VE, "tier" }, ++#endif + { "preset", "Encoding preset", + OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, MAX_ENC_PRESET, VE }, - { "tier", "Set operating point tier", OFFSET(tier), - AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, "tier" }, -@@ -518,21 +565,19 @@ static const AVOption options[] = { + FF_AV1_PROFILE_OPTS + +@@ -518,21 +573,20 @@ static const AVOption options[] = { { LEVEL("7.3", 73) }, #undef LEVEL @@ -227,22 +268,27 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 + AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 63, VE }, + { "qp", "Initial Quantizer level value", OFFSET(qp), + AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 63, VE }, ++#if FF_API_SVTAV1_OPTS ++ { "sc_detection", "Scene change detection (Deprecated, use svtav1-params)", OFFSET(scd), ++ AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE | AV_OPT_FLAG_DEPRECATED }, - { "qp", "Quantizer to use with cqp rate control mode", OFFSET(qp), - AV_OPT_TYPE_INT, { .i64 = 50 }, 0, 63, VE }, -- - { "sc_detection", "Scene change detection", OFFSET(scd), - AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, - - { "tile_columns", "Log2 of number of tile columns to use", OFFSET(tile_columns), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, VE}, - { "tile_rows", "Log2 of number of tile rows to use", OFFSET(tile_rows), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 6, VE}, ++ { "tile_columns", "Log2 of number of tile columns to use (Deprecated, use svtav1-params)", OFFSET(tile_columns), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 4, VE | AV_OPT_FLAG_DEPRECATED }, ++ { "tile_rows", "Log2 of number of tile rows to use (Deprecated, use svtav1-params)", OFFSET(tile_rows), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 6, VE | AV_OPT_FLAG_DEPRECATED }, ++#endif +- { "sc_detection", "Scene change detection", OFFSET(scd), +- AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, + { "svtav1-params", "Set the SVT-AV1 configuration using a :-separated list of key=value parameters", OFFSET(svtav1_opts), AV_OPT_TYPE_DICT, { 0 }, 0, 0, VE }, -+ + +- { "tile_columns", "Log2 of number of tile columns to use", OFFSET(tile_columns), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, VE}, +- { "tile_rows", "Log2 of number of tile rows to use", OFFSET(tile_rows), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 6, VE}, +- {NULL}, }; -@@ -544,9 +589,10 @@ static const AVClass class = { +@@ -544,9 +598,10 @@ static const AVCodecDefault eb_enc_defaults[] = { }; static const AVCodecDefault eb_enc_defaults[] = { @@ -255,7 +301,7 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 { "qmax", "63" }, { NULL }, }; -@@ -561,12 +607,11 @@ AVCodec ff_libsvtav1_encoder = { +@@ -561,12 +616,11 @@ AVCodec ff_libsvtav1_encoder = { .receive_packet = eb_receive_packet, .close = eb_enc_close, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS, @@ -269,3 +315,14 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, .wrapper_name = "libsvtav1", }; +--- libavcodec/version.h.orig 2021-10-24 20:47:07 UTC ++++ libavcodec/version.h +@@ -168,5 +168,8 @@ + #ifndef FF_API_INIT_PACKET + #define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 60) + #endif ++#ifndef FF_API_SVTAV1_OPTS ++#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 60) ++#endif + + #endif /* AVCODEC_VERSION_H */