View | Details | Raw Unified | Return to bug 261302 | Differences between
and this patch

Collapse All | Expand All

(-)b/multimedia/ffmpeg/Makefile (-8 / +17 lines)
Lines 1-8 Link Here
1
# Created by: Martin Matuska <mm@FreeBSD.org>
1
# Created by: Martin Matuska <mm@FreeBSD.org>
2
2
3
PORTNAME=	ffmpeg
3
PORTNAME=	ffmpeg
4
PORTVERSION=	4.4.1
4
PORTVERSION=	5.0.1
5
PORTREVISION=	13
6
PORTEPOCH=	1
5
PORTEPOCH=	1
7
CATEGORIES=	multimedia audio net
6
CATEGORIES=	multimedia audio net
8
MASTER_SITES=	https://ffmpeg.org/releases/
7
MASTER_SITES=	https://ffmpeg.org/releases/
Lines 37-54 PORTSCOUT= limit:^4\. Link Here
37
OPTIONS_DEFINE=	ALSA AMR_NB AMR_WB AOM ARIBB24 ASM ASS BS2B CACA CDIO \
36
OPTIONS_DEFINE=	ALSA AMR_NB AMR_WB AOM ARIBB24 ASM ASS BS2B CACA CDIO \
38
		CODEC2 DAV1D DAVS2 DC1394 DEBUG DOCS DRM FDK_AAC FLITE \
37
		CODEC2 DAV1D DAVS2 DC1394 DEBUG DOCS DRM FDK_AAC FLITE \
39
		FONTCONFIG FREETYPE FREI0R FRIBIDI GLSLANG GME GSM ICONV ILBC \
38
		FONTCONFIG FREETYPE FREI0R FRIBIDI GLSLANG GME GSM ICONV ILBC \
40
		JACK KLVANC KVAZAAR LADSPA LAME LENSFUN LIBBLURAY LIBRSVG2 \
39
		JACK KLVANC KVAZAAR LADSPA LAME LENSFUN LIBBLURAY LIBPLACEBO LIBRSVG2 \
41
		LIBXML2 LTO LV2 MFX MODPLUG MYSOFA OPENAL OPENCL OPENGL \
40
		LIBXML2 LTO LV2 MFX MODPLUG MYSOFA OPENAL OPENCL OPENGL \
42
		OPENH264 OPENJPEG OPENMPT OPENVINO OPTIMIZED_CFLAGS OPUS POCKETSPHINX \
41
		OPENH264 OPENJPEG OPENMPT OPENVINO OPTIMIZED_CFLAGS OPUS POCKETSPHINX \
43
		PULSEAUDIO RAV1E RABBITMQ RIST RTCPU RUBBERBAND SDL SMB SNAPPY \
42
		PULSEAUDIO RAV1E RABBITMQ RIST RTCPU RUBBERBAND SDL SHADERC SMB SNAPPY \
44
		SNDIO SOXR SPEEX SRT SSH SVTAV1 SVTHEVC SVTVP9 TENSORFLOW \
43
		SNDIO SOXR SPEEX SRT SSH SVTAV1 SVTHEVC SVTVP9 TENSORFLOW \
45
		TESSERACT THEORA TWOLAME UAVS3D V4L VAAPI VAPOURSYNTH VDPAU VIDSTAB \
44
		TESSERACT THEORA TWOLAME UAVS3D V4L VAAPI VAPOURSYNTH VDPAU VIDSTAB \
46
		VMAF VO_AMRWBENC VORBIS VPX VULKAN WEBP X264 X265 \
45
		VMAF VO_AMRWBENC VORBIS VPX VULKAN WEBP X264 X265 \
47
		XAVS2 XCB XVID XVIDEO ZIMG ZMQ ZVBI
46
		XAVS2 XCB XVID XVIDEO ZIMG ZMQ ZVBI
48
47
49
OPTIONS_DEFAULT=	AOM ASM ASS DAV1D DRM FONTCONFIG FREETYPE FREI0R GMP \
48
OPTIONS_DEFAULT=	AOM ASM ASS DAV1D DRM FONTCONFIG FREETYPE FREI0R GMP \
50
			GNUTLS ICONV LAME LIBXML2 OPTIMIZED_CFLAGS OPUS RTCPU \
49
			GNUTLS ICONV LAME LIBPLACEBO LIBXML2 OPTIMIZED_CFLAGS OPUS RTCPU \
51
			THEORA V4L VAAPI VDPAU VMAF VORBIS VPX X264 X265 XCB XVID
50
			THEORA V4L VAAPI VDPAU VMAF VORBIS VPX VULKAN X264 X265 XCB XVID
52
OPTIONS_DEFAULT_amd64=	SVTAV1
51
OPTIONS_DEFAULT_amd64=	SVTAV1
53
52
54
# i386 is too register-starved for LTO (PR257124)
53
# i386 is too register-starved for LTO (PR257124)
Lines 123-132 RIST_DESC= Reliable Internet Stream Transport protocol via librist Link Here
123
RUBBERBAND_DESC=Time-stretching and pitch-shifting with librubberband
122
RUBBERBAND_DESC=Time-stretching and pitch-shifting with librubberband
124
RTCPU_DESC=	Detect CPU capabilities at runtime
123
RTCPU_DESC=	Detect CPU capabilities at runtime
125
RTMP_DESC=	RTMP(T)E protocol support
124
RTMP_DESC=	RTMP(T)E protocol support
125
SHADERC_DESC=	GLSL->SPIRV compilation via libshaderc
126
SRT_DESC=	Haivision SRT protocol via libsrt
126
SRT_DESC=	Haivision SRT protocol via libsrt
127
SVTAV1_DESC=	AV1 encoding via SVT-AV1
127
SVTAV1_DESC=	AV1 encoding via SVT-AV1
128
SVTHEVC_DESC=	HEVC encoding via SVT-HEVC
128
SVTHEVC_DESC=	HEVC encoding via SVT-HEVC
129
SVTVP9_DESC=	VP9 encoding via SVT-VP9
129
SVTVP9_DESC=	VP9 encoding via SVT-VP9
130
LIBPLACEBO_DESC=GPU filters from libplacebo
130
LIBRTMP_DESC=	${RTMP_DESC} via librtmp
131
LIBRTMP_DESC=	${RTMP_DESC} via librtmp
131
TENSORFLOW_DESC=TensorFlow as a DNN module backend for DNN based filters like sr
132
TENSORFLOW_DESC=TensorFlow as a DNN module backend for DNN based filters like sr
132
TESSERACT_DESC=	Optical Character Recognition via Tesseract
133
TESSERACT_DESC=	Optical Character Recognition via Tesseract
Lines 306-311 LENSFUN_CONFIGURE_ENABLE= liblensfun Link Here
306
LIBBLURAY_LIB_DEPENDS=	libbluray.so:multimedia/libbluray
307
LIBBLURAY_LIB_DEPENDS=	libbluray.so:multimedia/libbluray
307
LIBBLURAY_CONFIGURE_ENABLE=	libbluray
308
LIBBLURAY_CONFIGURE_ENABLE=	libbluray
308
309
310
# libplacebo
311
LIBPLACEBO_LIB_DEPENDS=	libplacebo.so:graphics/libplacebo
312
LIBPLACEBO_CONFIGURE_ENABLE=	libplacebo
313
309
# librsvg
314
# librsvg
310
LIBRSVG2_USES=			gnome
315
LIBRSVG2_USES=			gnome
311
LIBRSVG2_USE=			GNOME=cairo,librsvg2
316
LIBRSVG2_USE=			GNOME=cairo,librsvg2
Lines 425-430 SDL_USES= sdl Link Here
425
SDL_USE=		SDL=sdl2
430
SDL_USE=		SDL=sdl2
426
SDL_CONFIGURE_ENABLE=	sdl2
431
SDL_CONFIGURE_ENABLE=	sdl2
427
432
433
# shaderc
434
SHADERC_LIB_DEPENDS=	libshaderc_shared.so:graphics/shaderc
435
SHADERC_CONFIGURE_ENABLE=	libshaderc
436
SHADERC_PREVENTS=	GLSLANG
437
428
# smbclient
438
# smbclient
429
SMB_USES=		samba:lib
439
SMB_USES=		samba:lib
430
SMB_CONFIGURE_ENABLE=	libsmbclient
440
SMB_CONFIGURE_ENABLE=	libsmbclient
Lines 536-542 VPX_CONFIGURE_ENABLE= libvpx Link Here
536
VULKAN_BUILD_DEPENDS=	vulkan-headers>0:graphics/vulkan-headers
546
VULKAN_BUILD_DEPENDS=	vulkan-headers>0:graphics/vulkan-headers
537
VULKAN_LIB_DEPENDS=	libvulkan.so:graphics/vulkan-loader
547
VULKAN_LIB_DEPENDS=	libvulkan.so:graphics/vulkan-loader
538
VULKAN_CONFIGURE_ENABLE=	vulkan
548
VULKAN_CONFIGURE_ENABLE=	vulkan
539
VULKAN_IMPLIES=		GLSLANG
549
VULKAN_IMPLIES=		${"${PORT_OPTIONS:MGLSLANG}":?GLSLANG:SHADERC}
540
550
541
# webp
551
# webp
542
WEBP_LIB_DEPENDS=	libwebp.so:graphics/webp
552
WEBP_LIB_DEPENDS=	libwebp.so:graphics/webp
Lines 609-615 CONFIGURE_ARGS+=--prefix="${PREFIX}" \ Link Here
609
		--enable-shared \
619
		--enable-shared \
610
		--enable-pic \
620
		--enable-pic \
611
		--enable-gpl \
621
		--enable-gpl \
612
		--enable-avresample \
613
		--cc="${CC}" \
622
		--cc="${CC}" \
614
		--cxx="${CXX}"
623
		--cxx="${CXX}"
615
624
(-)b/multimedia/ffmpeg/distinfo (-3 / +3 lines)
Lines 1-6 Link Here
1
TIMESTAMP = 1635171801
1
TIMESTAMP = 1649083222
2
SHA256 (ffmpeg-4.4.1.tar.xz) = eadbad9e9ab30b25f5520fbfde99fae4a92a1ae3c0257a8d68569a4651e30e02
2
SHA256 (ffmpeg-5.0.1.tar.xz) = ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b
3
SIZE (ffmpeg-4.4.1.tar.xz) = 9557516
3
SIZE (ffmpeg-5.0.1.tar.xz) = 9812524
4
SHA256 (0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch) = 376ea23e9d876390fbca936c80cb437bb9daa6232ff65df0ea91673e18b739ff
4
SHA256 (0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch) = 376ea23e9d876390fbca936c80cb437bb9daa6232ff65df0ea91673e18b739ff
5
SIZE (0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch) = 24259
5
SIZE (0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch) = 24259
6
SHA256 (0002-doc-Add-libsvt_hevc-encoder-docs.patch) = d16589efc4be2602a9f436e9938cfee0cc7b5ccd7a4a6b41c0c9a59ae0859fda
6
SHA256 (0002-doc-Add-libsvt_hevc-encoder-docs.patch) = d16589efc4be2602a9f436e9938cfee0cc7b5ccd7a4a6b41c0c9a59ae0859fda
(-)a/multimedia/ffmpeg/files/patch-dav1d (-39 lines)
Removed Link Here
1
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/61ed1182eeb2
2
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/cc33e73618a9
3
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/a4e1dd694014
4
5
--- libavcodec/libdav1d.c.orig	2021-10-24 20:47:11 UTC
6
+++ libavcodec/libdav1d.c
7
@@ -127,7 +127,11 @@ static av_cold int libdav1d_init(AVCodecContext *c)
8
 {
9
     Libdav1dContext *dav1d = c->priv_data;
10
     Dav1dSettings s;
11
+#if FF_DAV1D_VERSION_AT_LEAST(6,0)
12
+    int threads = c->thread_count;
13
+#else
14
     int threads = (c->thread_count ? c->thread_count : av_cpu_count()) * 3 / 2;
15
+#endif
16
     int res;
17
 
18
     av_log(c, AV_LOG_INFO, "libdav1d %s\n", dav1d_version());
19
@@ -153,7 +157,7 @@ static av_cold int libdav1d_init(AVCodecContext *c)
20
         s.n_threads = FFMAX(dav1d->frame_threads, dav1d->tile_threads);
21
     else
22
         s.n_threads = FFMIN(threads, DAV1D_MAX_THREADS);
23
-    s.max_frame_delay = (c->flags & AV_CODEC_FLAG_LOW_DELAY) ? 1 : s.n_threads;
24
+    s.max_frame_delay = (c->flags & AV_CODEC_FLAG_LOW_DELAY) ? 1 : 0;
25
     av_log(c, AV_LOG_DEBUG, "Using %d threads, %d max_frame_delay\n",
26
            s.n_threads, s.max_frame_delay);
27
 #else
28
@@ -244,8 +248,10 @@ static int libdav1d_receive_frame(AVCodecContext *c, A
29
     if (res < 0) {
30
         if (res == AVERROR(EINVAL))
31
             res = AVERROR_INVALIDDATA;
32
-        if (res != AVERROR(EAGAIN))
33
+        if (res != AVERROR(EAGAIN)) {
34
+            dav1d_data_unref(data);
35
             return res;
36
+        }
37
     }
38
 
39
     res = dav1d_get_picture(dav1d->c, p);
(-)b/multimedia/ffmpeg/files/patch-svtav1 (-43 / +23 lines)
Lines 1-7 Link Here
1
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/04b89e8ae33b
2
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/64e2fb3f9d89
3
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/0463f5d6d56d
4
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/c5f314309067
5
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/c33b4048859a
1
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/c33b4048859a
6
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/a2b090da7932
2
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/a2b090da7932
7
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0
3
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0
Lines 10-18 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/50bc87263576 Link Here
10
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d794b36a7788
6
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d794b36a7788
11
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be
7
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be
12
8
13
--- configure.orig	2021-10-24 20:47:11 UTC
9
--- configure.orig	2022-01-14 18:45:39 UTC
14
+++ configure
10
+++ configure
15
@@ -6430,7 +6430,7 @@ enabled libsrt            && require_pkg_config libsrt
11
@@ -6604,7 +6604,7 @@ enabled libsrt            && require_pkg_config libsrt
16
 enabled libssh            && require_pkg_config libssh libssh libssh/sftp.h sftp_init
12
 enabled libssh            && require_pkg_config libssh libssh libssh/sftp.h sftp_init
17
 enabled libspeex          && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
13
 enabled libspeex          && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
18
 enabled libsrt            && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
14
 enabled libsrt            && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
Lines 21-31 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be Link Here
21
 enabled libtensorflow     && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
17
 enabled libtensorflow     && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
22
 enabled libtesseract      && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
18
 enabled libtesseract      && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
23
 enabled libtheora         && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
19
 enabled libtheora         && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
24
--- doc/encoders.texi.orig	2021-10-24 20:47:07 UTC
20
--- doc/encoders.texi.orig	2022-01-14 18:45:39 UTC
25
+++ doc/encoders.texi
21
+++ doc/encoders.texi
26
@@ -1754,28 +1754,15 @@ Set the operating point tier.
22
@@ -1775,28 +1775,15 @@ This is the default.
27
 @item tier
23
 @item high
28
 Set the operating point tier.
24
 @end table
29
 
25
 
30
-@item rc
26
-@item rc
31
-Set the rate control mode to use.
27
-Set the rate control mode to use.
Lines 55-61 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be Link Here
55
 @item qp
51
 @item qp
56
 Set the quantizer used in cqp rate control mode (0-63).
52
 Set the quantizer used in cqp rate control mode (0-63).
57
 
53
 
58
@@ -1786,14 +1773,18 @@ Set number of frames to look ahead (0-120).
54
@@ -1807,14 +1794,18 @@ Set number of frames to look ahead (0-120).
59
 Set number of frames to look ahead (0-120).
55
 Set number of frames to look ahead (0-120).
60
 
56
 
61
 @item preset
57
 @item preset
Lines 76-82 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be Link Here
76
 
72
 
77
 @end table
73
 @end table
78
 
74
 
79
--- libavcodec/libsvtav1.c.orig	2021-10-24 20:47:07 UTC
75
--- libavcodec/libsvtav1.c.orig	2022-01-14 18:45:40 UTC
80
+++ libavcodec/libsvtav1.c
76
+++ libavcodec/libsvtav1.c
81
@@ -60,17 +60,20 @@ typedef struct SvtContext {
77
@@ -60,17 +60,20 @@ typedef struct SvtContext {
82
     EOS_STATUS eos_flag;
78
     EOS_STATUS eos_flag;
Lines 199-218 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be Link Here
199
     if (avctx->gop_size > 0)
195
     if (avctx->gop_size > 0)
200
         param->intra_period_length  = avctx->gop_size - 1;
196
         param->intra_period_length  = avctx->gop_size - 1;
201
 
197
 
202
@@ -205,19 +263,15 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
198
@@ -205,8 +263,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
203
         param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame;
199
         param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame;
204
     }
200
     }
205
 
201
 
202
-    param->enable_tpl_la = !!param->rate_control_mode;
206
-    if (param->rate_control_mode) {
203
-    if (param->rate_control_mode) {
207
+    avctx->bit_rate                 = param->target_bit_rate;
204
+    avctx->bit_rate                 = param->target_bit_rate;
208
+    if (avctx->bit_rate) {
205
+    if (avctx->bit_rate) {
209
         param->max_qp_allowed       = avctx->qmax;
206
         param->max_qp_allowed       = avctx->qmax;
210
         param->min_qp_allowed       = avctx->qmin;
207
         param->min_qp_allowed       = avctx->qmin;
211
     }
208
     }
212
 
209
@@ -214,12 +272,6 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
213
-    param->intra_refresh_type       = 2; /* Real keyframes only */
210
     /* 2 = IDR, closed GOP, 1 = CRA, open GOP */
214
+    /* 2 = IDR, closed GOP, 1 = CRA, open GOP */
211
     param->intra_refresh_type = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ? 2 : 1;
215
+    param->intra_refresh_type = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ? 2 : 1;
216
 
212
 
217
-    if (svt_enc->la_depth >= 0)
213
-    if (svt_enc->la_depth >= 0)
218
-        param->look_ahead_distance  = svt_enc->la_depth;
214
-        param->look_ahead_distance  = svt_enc->la_depth;
Lines 223-229 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be Link Here
223
     return 0;
219
     return 0;
224
 }
220
 }
225
 
221
 
226
@@ -472,21 +526,22 @@ static const AVOption options[] = {
222
@@ -474,21 +526,22 @@ static const AVOption options[] = {
227
 #define OFFSET(x) offsetof(SvtContext, x)
223
 #define OFFSET(x) offsetof(SvtContext, x)
228
 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
224
 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
229
 static const AVOption options[] = {
225
 static const AVOption options[] = {
Lines 255-266 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be Link Here
255
 
251
 
256
     FF_AV1_PROFILE_OPTS
252
     FF_AV1_PROFILE_OPTS
257
 
253
 
258
@@ -518,21 +573,20 @@ static const AVOption options[] = {
254
@@ -520,21 +573,20 @@ static const AVOption options[] = {
259
         { LEVEL("7.3", 73) },
255
         { LEVEL("7.3", 73) },
260
 #undef LEVEL
256
 #undef LEVEL
261
 
257
 
262
-    { "rc", "Bit rate control mode", OFFSET(rc_mode),
258
-    { "rc", "Bit rate control mode", OFFSET(rc_mode),
263
-      AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 3, VE , "rc"},
259
-      AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, VE , "rc"},
264
-        { "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 },  INT_MIN, INT_MAX, VE, "rc" },
260
-        { "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 },  INT_MIN, INT_MAX, VE, "rc" },
265
-        { "vbr", "Variable Bit Rate, use a target bitrate for the entire stream", 0, AV_OPT_TYPE_CONST, { .i64 = 1 },  INT_MIN, INT_MAX, VE, "rc" },
261
-        { "vbr", "Variable Bit Rate, use a target bitrate for the entire stream", 0, AV_OPT_TYPE_CONST, { .i64 = 1 },  INT_MIN, INT_MAX, VE, "rc" },
266
-        { "cvbr", "Constrained Variable Bit Rate, use a target bitrate for each GOP", 0, AV_OPT_TYPE_CONST,{ .i64 = 2 },  INT_MIN, INT_MAX, VE, "rc" },
262
-        { "cvbr", "Constrained Variable Bit Rate, use a target bitrate for each GOP", 0, AV_OPT_TYPE_CONST,{ .i64 = 2 },  INT_MIN, INT_MAX, VE, "rc" },
Lines 288-328 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be Link Here
288
     {NULL},
284
     {NULL},
289
 };
285
 };
290
 
286
 
291
@@ -544,9 +598,10 @@ static const AVCodecDefault eb_enc_defaults[] = {
287
@@ -546,10 +598,10 @@ static const AVCodecDefault eb_enc_defaults[] = {
292
 };
288
 };
293
 
289
 
294
 static const AVCodecDefault eb_enc_defaults[] = {
290
 static const AVCodecDefault eb_enc_defaults[] = {
295
-    { "b",         "7M"    },
291
-    { "b",         "7M"    },
296
+    { "b",         "0"    },
292
+    { "b",         "0"    },
297
+    { "flags",     "+cgop" },
293
     { "flags",     "+cgop" },
298
     { "g",         "-1"    },
294
     { "g",         "-1"    },
299
-    { "qmin",      "0"     },
295
-    { "qmin",      "0"     },
300
+    { "qmin",      "1"     },
296
+    { "qmin",      "1"     },
301
     { "qmax",      "63"    },
297
     { "qmax",      "63"    },
302
     { NULL },
298
     { NULL },
303
 };
299
 };
304
@@ -561,12 +616,11 @@ AVCodec ff_libsvtav1_encoder = {
300
--- libavcodec/version.h.orig	2022-01-14 18:45:40 UTC
305
     .receive_packet = eb_receive_packet,
306
     .close          = eb_enc_close,
307
     .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS,
308
-    .caps_internal  = FF_CODEC_CAP_AUTO_THREADS,
309
+    .caps_internal  = FF_CODEC_CAP_AUTO_THREADS | FF_CODEC_CAP_INIT_CLEANUP,
310
     .pix_fmts       = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P,
311
                                                     AV_PIX_FMT_YUV420P10,
312
                                                     AV_PIX_FMT_NONE },
313
     .priv_class     = &class,
314
     .defaults       = eb_enc_defaults,
315
-    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
316
     .wrapper_name   = "libsvtav1",
317
 };
318
--- libavcodec/version.h.orig	2021-10-24 20:47:07 UTC
319
+++ libavcodec/version.h
301
+++ libavcodec/version.h
320
@@ -168,5 +168,8 @@
302
@@ -63,5 +63,6 @@
321
 #ifndef FF_API_INIT_PACKET
303
 #define FF_API_MPEGVIDEO_OPTS      (LIBAVCODEC_VERSION_MAJOR < 60)
322
 #define FF_API_INIT_PACKET         (LIBAVCODEC_VERSION_MAJOR < 60)
304
 #define FF_API_FLAG_TRUNCATED      (LIBAVCODEC_VERSION_MAJOR < 60)
323
 #endif
305
 #define FF_API_SUB_TEXT_FORMAT     (LIBAVCODEC_VERSION_MAJOR < 60)
324
+#ifndef FF_API_SVTAV1_OPTS
325
+#define FF_API_SVTAV1_OPTS         (LIBAVCODEC_VERSION_MAJOR < 60)
306
+#define FF_API_SVTAV1_OPTS         (LIBAVCODEC_VERSION_MAJOR < 60)
326
+#endif
327
 
307
 
328
 #endif /* AVCODEC_VERSION_H */
308
 #endif /* AVCODEC_VERSION_H */
(-)b/multimedia/ffmpeg/files/patch-vmaf (-14 / +13 lines)
Lines 1-9 Link Here
1
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/3d29724c008d
1
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/3d29724c008d
2
2
3
--- configure.orig	2021-10-24 20:47:11 UTC
3
--- configure.orig	2022-01-14 18:45:39 UTC
4
+++ configure
4
+++ configure
5
@@ -3663,7 +3663,7 @@ vidstabtransform_filter_deps="libvidstab"
5
@@ -3747,7 +3747,7 @@ vidstabtransform_filter_deps="libvidstab"
6
 vaguedenoiser_filter_deps="gpl"
6
 vflip_vulkan_filter_deps="vulkan spirv_compiler"
7
 vidstabdetect_filter_deps="libvidstab"
7
 vidstabdetect_filter_deps="libvidstab"
8
 vidstabtransform_filter_deps="libvidstab"
8
 vidstabtransform_filter_deps="libvidstab"
9
-libvmaf_filter_deps="libvmaf pthreads"
9
-libvmaf_filter_deps="libvmaf pthreads"
Lines 11-17 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/3d29724c008d Link Here
11
 zmq_filter_deps="libzmq"
11
 zmq_filter_deps="libzmq"
12
 zoompan_filter_deps="swscale"
12
 zoompan_filter_deps="swscale"
13
 zscale_filter_deps="libzimg const_nan"
13
 zscale_filter_deps="libzimg const_nan"
14
@@ -6441,7 +6441,7 @@ enabled libvidstab        && require_pkg_config libvid
14
@@ -6615,7 +6615,7 @@ enabled libvidstab        && require_pkg_config libvid
15
 enabled libuavs3d         && require_pkg_config libuavs3d "uavs3d >= 1.1.41" uavs3d.h uavs3d_decode
15
 enabled libuavs3d         && require_pkg_config libuavs3d "uavs3d >= 1.1.41" uavs3d.h uavs3d_decode
16
 enabled libv4l2           && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl
16
 enabled libv4l2           && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl
17
 enabled libvidstab        && require_pkg_config libvidstab "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit
17
 enabled libvidstab        && require_pkg_config libvidstab "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit
Lines 20-28 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/3d29724c008d Link Here
20
 enabled libvo_amrwbenc    && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
20
 enabled libvo_amrwbenc    && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
21
 enabled libvorbis         && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init &&
21
 enabled libvorbis         && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init &&
22
                              require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init
22
                              require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init
23
--- doc/filters.texi.orig	2021-10-24 20:47:07 UTC
23
--- doc/filters.texi.orig	2022-01-14 18:45:39 UTC
24
+++ doc/filters.texi
24
+++ doc/filters.texi
25
@@ -13867,66 +13867,58 @@ ffmpeg -i input.mov -vf lensfun=make=Canon:model="Cano
25
@@ -14666,68 +14666,60 @@ ffmpeg -i input.mov -vf lensfun=make=Canon:model="Cano
26
 
26
 
27
 @section libvmaf
27
 @section libvmaf
28
 
28
 
Lines 31-36 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/3d29724c008d Link Here
31
+Calulate the VMAF (Video Multi-Method Assessment Fusion) score for a
31
+Calulate the VMAF (Video Multi-Method Assessment Fusion) score for a
32
+reference/distorted pair of input videos.
32
+reference/distorted pair of input videos.
33
 
33
 
34
-The first input is the encoded video, and the second input is the reference video.
35
+The first input is the distorted video, and the second input is the reference video.
36
 
34
 The obtained VMAF score is printed through the logging system.
37
 The obtained VMAF score is printed through the logging system.
35
 
38
 
36
 It requires Netflix's vmaf library (libvmaf) as a pre-requisite.
39
 It requires Netflix's vmaf library (libvmaf) as a pre-requisite.
Lines 115-121 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/3d29724c008d Link Here
115
 @end table
118
 @end table
116
 
119
 
117
 This filter also supports the @ref{framesync} options.
120
 This filter also supports the @ref{framesync} options.
118
@@ -13934,23 +13926,31 @@ This filter also supports the @ref{framesync} options.
121
@@ -14735,23 +14727,31 @@ This filter also supports the @ref{framesync} options.
119
 @subsection Examples
122
 @subsection Examples
120
 @itemize
123
 @itemize
121
 @item
124
 @item
Lines 153-159 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/3d29724c008d Link Here
153
 @end example
156
 @end example
154
 @end itemize
157
 @end itemize
155
 
158
 
156
--- libavfilter/vf_libvmaf.c.orig	2021-10-24 20:47:07 UTC
159
--- libavfilter/vf_libvmaf.c.orig	2022-01-14 18:45:40 UTC
157
+++ libavfilter/vf_libvmaf.c
160
+++ libavfilter/vf_libvmaf.c
158
@@ -24,8 +24,8 @@
161
@@ -24,8 +24,8 @@
159
  * Calculate the VMAF between two input videos.
162
  * Calculate the VMAF between two input videos.
Lines 805-811 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/3d29724c008d Link Here
805
     s->fs.on_event = do_vmaf;
808
     s->fs.on_event = do_vmaf;
806
     return 0;
809
     return 0;
807
 }
810
 }
808
@@ -265,31 +554,36 @@ static int config_input_ref(AVFilterLink *inlink)
811
@@ -256,27 +545,32 @@ static int config_input_ref(AVFilterLink *inlink)
809
 
812
 
810
 static int config_input_ref(AVFilterLink *inlink)
813
 static int config_input_ref(AVFilterLink *inlink)
811
 {
814
 {
Lines 824-833 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/3d29724c008d Link Here
824
+        av_log(ctx, AV_LOG_ERROR, "input width must match.\n");
827
+        av_log(ctx, AV_LOG_ERROR, "input width must match.\n");
825
+        err |= AVERROR(EINVAL);
828
+        err |= AVERROR(EINVAL);
826
     }
829
     }
827
     if (ctx->inputs[0]->format != ctx->inputs[1]->format) {
828
         av_log(ctx, AV_LOG_ERROR, "Inputs must be of same pixel format.\n");
829
         return AVERROR(EINVAL);
830
     }
831
 
830
 
832
-    s->desc = av_pix_fmt_desc_get(inlink->format);
831
-    s->desc = av_pix_fmt_desc_get(inlink->format);
833
-    s->width = ctx->inputs[0]->w;
832
-    s->width = ctx->inputs[0]->w;
Lines 856-862 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/3d29724c008d Link Here
856
     return 0;
855
     return 0;
857
 }
856
 }
858
 
857
 
859
@@ -320,28 +614,80 @@ static int activate(AVFilterContext *ctx)
858
@@ -307,28 +601,80 @@ static int activate(AVFilterContext *ctx)
860
     return ff_framesync_activate(&s->fs);
859
     return ff_framesync_activate(&s->fs);
861
 }
860
 }
862
 
861
 
(-)b/multimedia/ffmpeg/pkg-plist (-23 / +18 lines)
Lines 12-17 include/libavcodec/codec_desc.h Link Here
12
include/libavcodec/codec_id.h
12
include/libavcodec/codec_id.h
13
include/libavcodec/codec_par.h
13
include/libavcodec/codec_par.h
14
include/libavcodec/d3d11va.h
14
include/libavcodec/d3d11va.h
15
include/libavcodec/defs.h
15
include/libavcodec/dirac.h
16
include/libavcodec/dirac.h
16
include/libavcodec/dv_profile.h
17
include/libavcodec/dv_profile.h
17
include/libavcodec/dxva2.h
18
include/libavcodec/dxva2.h
Lines 19-25 include/libavcodec/jni.h Link Here
19
include/libavcodec/mediacodec.h
20
include/libavcodec/mediacodec.h
20
include/libavcodec/packet.h
21
include/libavcodec/packet.h
21
include/libavcodec/qsv.h
22
include/libavcodec/qsv.h
22
include/libavcodec/vaapi.h
23
include/libavcodec/vdpau.h
23
include/libavcodec/vdpau.h
24
include/libavcodec/version.h
24
include/libavcodec/version.h
25
include/libavcodec/videotoolbox.h
25
include/libavcodec/videotoolbox.h
Lines 34-41 include/libavfilter/version.h Link Here
34
include/libavformat/avformat.h
34
include/libavformat/avformat.h
35
include/libavformat/avio.h
35
include/libavformat/avio.h
36
include/libavformat/version.h
36
include/libavformat/version.h
37
include/libavresample/avresample.h
38
include/libavresample/version.h
39
include/libavutil/adler32.h
37
include/libavutil/adler32.h
40
include/libavutil/aes.h
38
include/libavutil/aes.h
41
include/libavutil/aes_ctr.h
39
include/libavutil/aes_ctr.h
Lines 57-62 include/libavutil/common.h Link Here
57
include/libavutil/cpu.h
55
include/libavutil/cpu.h
58
include/libavutil/crc.h
56
include/libavutil/crc.h
59
include/libavutil/des.h
57
include/libavutil/des.h
58
include/libavutil/detection_bbox.h
60
include/libavutil/dict.h
59
include/libavutil/dict.h
61
include/libavutil/display.h
60
include/libavutil/display.h
62
include/libavutil/dovi_meta.h
61
include/libavutil/dovi_meta.h
Lines 130-166 include/libswresample/version.h Link Here
130
include/libswscale/swscale.h
129
include/libswscale/swscale.h
131
include/libswscale/version.h
130
include/libswscale/version.h
132
lib/libavcodec.so
131
lib/libavcodec.so
133
lib/libavcodec.so.58
132
lib/libavcodec.so.59
134
lib/libavcodec.so.58.134.100
133
lib/libavcodec.so.59.18.100
135
lib/libavdevice.so
134
lib/libavdevice.so
136
lib/libavdevice.so.58
135
lib/libavdevice.so.59
137
lib/libavdevice.so.58.13.100
136
lib/libavdevice.so.59.4.100
138
lib/libavfilter.so
137
lib/libavfilter.so
139
lib/libavfilter.so.7
138
lib/libavfilter.so.8
140
lib/libavfilter.so.7.110.100
139
lib/libavfilter.so.8.24.100
141
lib/libavformat.so
140
lib/libavformat.so
142
lib/libavformat.so.58
141
lib/libavformat.so.59
143
lib/libavformat.so.58.76.100
142
lib/libavformat.so.59.16.100
144
lib/libavresample.so
145
lib/libavresample.so.4
146
lib/libavresample.so.4.0.0
147
lib/libavutil.so
143
lib/libavutil.so
148
lib/libavutil.so.56
144
lib/libavutil.so.57
149
lib/libavutil.so.56.70.100
145
lib/libavutil.so.57.17.100
150
lib/libpostproc.so
146
lib/libpostproc.so
151
lib/libpostproc.so.55
147
lib/libpostproc.so.56
152
lib/libpostproc.so.55.9.100
148
lib/libpostproc.so.56.3.100
153
lib/libswresample.so
149
lib/libswresample.so
154
lib/libswresample.so.3
150
lib/libswresample.so.4
155
lib/libswresample.so.3.9.100
151
lib/libswresample.so.4.3.100
156
lib/libswscale.so
152
lib/libswscale.so
157
lib/libswscale.so.5
153
lib/libswscale.so.6
158
lib/libswscale.so.5.9.100
154
lib/libswscale.so.6.4.100
159
libdata/pkgconfig/libavcodec.pc
155
libdata/pkgconfig/libavcodec.pc
160
libdata/pkgconfig/libavdevice.pc
156
libdata/pkgconfig/libavdevice.pc
161
libdata/pkgconfig/libavfilter.pc
157
libdata/pkgconfig/libavfilter.pc
162
libdata/pkgconfig/libavformat.pc
158
libdata/pkgconfig/libavformat.pc
163
libdata/pkgconfig/libavresample.pc
164
libdata/pkgconfig/libavutil.pc
159
libdata/pkgconfig/libavutil.pc
165
libdata/pkgconfig/libpostproc.pc
160
libdata/pkgconfig/libpostproc.pc
166
libdata/pkgconfig/libswresample.pc
161
libdata/pkgconfig/libswresample.pc

Return to bug 261302