svn commit: r506252 - in head/multimedia/ffmpeg: . files
Jan Beich
jbeich at FreeBSD.org
Mon Jul 8 22:36:04 UTC 2019
Author: jbeich
Date: Mon Jul 8 22:36:01 2019
New Revision: 506252
URL: https://svnweb.freebsd.org/changeset/ports/506252
Log:
multimedia/ffmpeg: update to 4.1.4
- Backport more dav1d fixes from master branch
Changes: https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/n4.1.4:/Changelog
ABI: https://abi-laboratory.pro/tracker/timeline/ffmpeg/
MFH: 2019Q3 (stabilization, maybe security)
Modified:
head/multimedia/ffmpeg/Makefile (contents, props changed)
head/multimedia/ffmpeg/distinfo (contents, props changed)
head/multimedia/ffmpeg/files/patch-aom (contents, props changed)
head/multimedia/ffmpeg/files/patch-dav1d (contents, props changed)
Modified: head/multimedia/ffmpeg/Makefile
==============================================================================
--- head/multimedia/ffmpeg/Makefile Mon Jul 8 21:14:17 2019 (r506251)
+++ head/multimedia/ffmpeg/Makefile Mon Jul 8 22:36:01 2019 (r506252)
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= ffmpeg
-PORTVERSION= 4.1.3
-PORTREVISION= 14
+PORTVERSION= 4.1.4
PORTEPOCH= 1
CATEGORIES= multimedia audio ipv6 net
MASTER_SITES= https://ffmpeg.org/releases/
Modified: head/multimedia/ffmpeg/distinfo
==============================================================================
--- head/multimedia/ffmpeg/distinfo Mon Jul 8 21:14:17 2019 (r506251)
+++ head/multimedia/ffmpeg/distinfo Mon Jul 8 22:36:01 2019 (r506252)
@@ -1,6 +1,6 @@
-TIMESTAMP = 1554117390
-SHA256 (ffmpeg-4.1.3.tar.xz) = 0c3020452880581a8face91595b239198078645e7d7184273b8bcc7758beb63d
-SIZE (ffmpeg-4.1.3.tar.xz) = 8895988
+TIMESTAMP = 1562609569
+SHA256 (ffmpeg-4.1.4.tar.xz) = f1f049a82fcfbf156564e73a3935d7e750891fab2abf302e735104fd4050a7e1
+SIZE (ffmpeg-4.1.4.tar.xz) = 8896056
SHA256 (0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch) = d653158c8d1c958cdebe9ee50cb95db917f5421ba79ee121202a97ce40c44ade
SIZE (0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch) = 20028
SHA256 (0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch) = cc8ba4ff56cdb38a59650203999c4c8c83fc40bdb905b87b678ff68a4538444d
Modified: head/multimedia/ffmpeg/files/patch-aom
==============================================================================
--- head/multimedia/ffmpeg/files/patch-aom Mon Jul 8 21:14:17 2019 (r506251)
+++ head/multimedia/ffmpeg/files/patch-aom Mon Jul 8 22:36:01 2019 (r506252)
@@ -1,6 +1,5 @@
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/b2ea757f68
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d12d4d4515
-https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/b87063c06d
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/2ddaaaf595
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3991a5a45
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/995889abbf
@@ -202,16 +201,6 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1e
};
static av_cold void log_encoder_error(AVCodecContext *avctx, const char *desc)
-@@ -505,7 +541,8 @@ static av_cold int aom_init(AVCodecContext *avctx,
- enccfg.g_h = avctx->height;
- enccfg.g_timebase.num = avctx->time_base.num;
- enccfg.g_timebase.den = avctx->time_base.den;
-- enccfg.g_threads = avctx->thread_count ? avctx->thread_count : av_cpu_count();
-+ enccfg.g_threads =
-+ FFMIN(avctx->thread_count ? avctx->thread_count : av_cpu_count(), 64);
-
- if (ctx->lag_in_frames >= 0)
- enccfg.g_lag_in_frames = ctx->lag_in_frames;
@@ -558,10 +595,14 @@ static av_cold int aom_init(AVCodecContext *avctx,
// 0-100 (0 => CBR, 100 => VBR)
Modified: head/multimedia/ffmpeg/files/patch-dav1d
==============================================================================
--- head/multimedia/ffmpeg/files/patch-dav1d Mon Jul 8 21:14:17 2019 (r506251)
+++ head/multimedia/ffmpeg/files/patch-dav1d Mon Jul 8 22:36:01 2019 (r506252)
@@ -15,6 +15,10 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/38
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/f6803cfbd2
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/5cd60b6f2e
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/9e62e1a110
+https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/fbc5a27694
+https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/0e07b767c8
+https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/254da41531
+https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/f78172b29a
--- configure.orig 2018-11-05 23:22:33 UTC
+++ configure
@@ -85,7 +89,7 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/9e
extern AVCodec ff_libfdk_aac_decoder;
--- libavcodec/libdav1d.c.orig 2018-12-16 07:22:28 UTC
+++ libavcodec/libdav1d.c
-@@ -0,0 +1,346 @@
+@@ -0,0 +1,369 @@
+/*
+ * Copyright (c) 2018 Ronald S. Bultje <rsbultje gmail com>
+ * Copyright (c) 2018 James Almer <jamrial gmail com>
@@ -126,6 +130,7 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/9e
+
+ Dav1dData data;
+ int tile_threads;
++ int frame_threads;
+ int apply_grain;
+} Libdav1dContext;
+
@@ -136,6 +141,10 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/9e
+ [DAV1D_PIXEL_LAYOUT_I444] = { AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV444P12 },
+};
+
++static const enum AVPixelFormat pix_fmt_rgb[3] = {
++ AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12,
++};
++
+static void libdav1d_log_callback(void *opaque, const char *fmt, va_list vl)
+{
+ AVCodecContext *c = opaque;
@@ -202,6 +211,7 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/9e
+{
+ Libdav1dContext *dav1d = c->priv_data;
+ Dav1dSettings s;
++ int threads = (c->thread_count ? c->thread_count : av_cpu_count()) * 3 / 2;
+ int res;
+
+ av_log(c, AV_LOG_INFO, "libdav1d %s\n", dav1d_version());
@@ -212,10 +222,17 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/9e
+ s.allocator.cookie = dav1d;
+ s.allocator.alloc_picture_callback = libdav1d_picture_allocator;
+ s.allocator.release_picture_callback = libdav1d_picture_release;
-+ s.n_tile_threads = dav1d->tile_threads;
+ s.apply_grain = dav1d->apply_grain;
-+ s.n_frame_threads = FFMIN(c->thread_count ? c->thread_count : av_cpu_count(), DAV1D_MAX_FRAME_THREADS);
+
++ s.n_tile_threads = dav1d->tile_threads
++ ? dav1d->tile_threads
++ : FFMIN(floor(sqrt(threads)), DAV1D_MAX_TILE_THREADS);
++ s.n_frame_threads = dav1d->frame_threads
++ ? dav1d->frame_threads
++ : 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);
++
+ res = dav1d_open(&dav1d->c, &s);
+ if (res < 0)
+ return AVERROR(ENOMEM);
@@ -285,7 +302,7 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/9e
+ return res;
+ }
+
-+ av_assert0(p->data[0] != NULL);
++ av_assert0(p->data[0] && p->allocator_data);
+
+ // This requires the custom allocator above
+ frame->buf[0] = av_buffer_ref(p->allocator_data);
@@ -302,7 +319,8 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/9e
+ frame->linesize[2] = p->stride[1];
+
+ c->profile = p->seq_hdr->profile;
-+ frame->format = c->pix_fmt = pix_fmt[p->p.layout][p->seq_hdr->hbd];
++ c->level = ((p->seq_hdr->operating_points[0].major_level - 2) << 2)
++ | p->seq_hdr->operating_points[0].minor_level;
+ frame->width = p->p.w;
+ frame->height = p->p.h;
+ if (c->width != p->p.w || c->height != p->p.h) {
@@ -324,6 +342,14 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/9e
+ frame->color_trc = c->color_trc = (enum AVColorTransferCharacteristic) p->seq_hdr->trc;
+ frame->color_range = c->color_range = p->seq_hdr->color_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
+
++ if (p->p.layout == DAV1D_PIXEL_LAYOUT_I444 &&
++ p->seq_hdr->mtrx == DAV1D_MC_IDENTITY &&
++ p->seq_hdr->pri == DAV1D_COLOR_PRI_BT709 &&
++ p->seq_hdr->trc == DAV1D_TRC_SRGB)
++ frame->format = c->pix_fmt = pix_fmt_rgb[p->seq_hdr->hbd];
++ else
++ frame->format = c->pix_fmt = pix_fmt[p->p.layout][p->seq_hdr->hbd];
++
+ // match timestamps and packet size
+ frame->pts = frame->best_effort_timestamp = p->m.timestamp;
+#if FF_API_PKT_PTS
@@ -405,7 +431,8 @@ https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/9e
+#define OFFSET(x) offsetof(Libdav1dContext, x)
+#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
+static const AVOption libdav1d_options[] = {
-+ { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, DAV1D_MAX_TILE_THREADS, VD },
++ { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD },
++ { "framethreads", "Frame threads", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD },
+ { "filmgrain", "Apply Film Grain", OFFSET(apply_grain), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VD },
+ { NULL }
+};
More information about the svn-ports-all
mailing list