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.2
4
PORTVERSION=	5.0.1
5
PORTREVISION=	1
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 = 1649967228
1
TIMESTAMP = 1649083222
2
SHA256 (ffmpeg-4.4.2.tar.xz) = af419a7f88adbc56c758ab19b4c708afbcae15ef09606b82b855291f6a6faa93
2
SHA256 (ffmpeg-5.0.1.tar.xz) = ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b
3
SIZE (ffmpeg-4.4.2.tar.xz) = 9562968
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
(-)b/multimedia/ffmpeg/files/patch-svtav1 (-50 / +32 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 11-19 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d794b36a7788 Link Here
11
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be
7
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be
12
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a
8
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a
13
9
14
--- configure.orig	2021-10-24 20:47:11 UTC
10
--- configure.orig	2022-04-04 14:40:22 UTC
15
+++ configure
11
+++ configure
16
@@ -6430,7 +6430,7 @@ enabled libsrt            && require_pkg_config libsrt
12
@@ -6611,7 +6611,7 @@ enabled libsrt            && require_pkg_config libsrt
17
 enabled libssh            && require_pkg_config libssh libssh libssh/sftp.h sftp_init
13
 enabled libssh            && require_pkg_config libssh libssh libssh/sftp.h sftp_init
18
 enabled libspeex          && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
14
 enabled libspeex          && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
19
 enabled libsrt            && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
15
 enabled libsrt            && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
Lines 22-32 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a Link Here
22
 enabled libtensorflow     && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
18
 enabled libtensorflow     && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
23
 enabled libtesseract      && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
19
 enabled libtesseract      && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
24
 enabled libtheora         && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
20
 enabled libtheora         && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
25
--- doc/encoders.texi.orig	2021-10-24 20:47:07 UTC
21
--- doc/encoders.texi.orig	2022-01-14 18:45:39 UTC
26
+++ doc/encoders.texi
22
+++ doc/encoders.texi
27
@@ -1754,28 +1754,15 @@ Set the operating point tier.
23
@@ -1775,28 +1775,15 @@ This is the default.
28
 @item tier
24
 @item high
29
 Set the operating point tier.
25
 @end table
30
 
26
 
31
-@item rc
27
-@item rc
32
-Set the rate control mode to use.
28
-Set the rate control mode to use.
Lines 56-62 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a Link Here
56
 @item qp
52
 @item qp
57
 Set the quantizer used in cqp rate control mode (0-63).
53
 Set the quantizer used in cqp rate control mode (0-63).
58
 
54
 
59
@@ -1786,14 +1773,18 @@ Set number of frames to look ahead (0-120).
55
@@ -1807,14 +1794,18 @@ Set number of frames to look ahead (0-120).
60
 Set number of frames to look ahead (0-120).
56
 Set number of frames to look ahead (0-120).
61
 
57
 
62
 @item preset
58
 @item preset
Lines 77-83 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a Link Here
77
 
73
 
78
 @end table
74
 @end table
79
 
75
 
80
--- libavcodec/libsvtav1.c.orig	2021-10-24 20:47:07 UTC
76
--- libavcodec/libsvtav1.c.orig	2022-01-14 18:45:40 UTC
81
+++ libavcodec/libsvtav1.c
77
+++ libavcodec/libsvtav1.c
82
@@ -60,17 +60,20 @@ typedef struct SvtContext {
78
@@ -60,17 +60,20 @@ typedef struct SvtContext {
83
     EOS_STATUS eos_flag;
79
     EOS_STATUS eos_flag;
Lines 198-213 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a Link Here
198
     if (avctx->gop_size > 0)
194
     if (avctx->gop_size > 0)
199
         param->intra_period_length  = avctx->gop_size - 1;
195
         param->intra_period_length  = avctx->gop_size - 1;
200
 
196
 
201
@@ -205,19 +221,56 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
197
@@ -205,21 +221,56 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
202
         param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame;
198
         param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame;
203
     }
199
     }
204
 
200
 
201
-    param->enable_tpl_la = !!param->rate_control_mode;
205
-    if (param->rate_control_mode) {
202
-    if (param->rate_control_mode) {
206
-        param->max_qp_allowed       = avctx->qmax;
203
-        param->max_qp_allowed       = avctx->qmax;
207
-        param->min_qp_allowed       = avctx->qmin;
204
-        param->min_qp_allowed       = avctx->qmin;
208
+    /* 2 = IDR, closed GOP, 1 = CRA, open GOP */
205
-    }
209
+    param->intra_refresh_type = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ? 2 : 1;
206
-
210
+
207
     /* 2 = IDR, closed GOP, 1 = CRA, open GOP */
208
     param->intra_refresh_type = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ? 2 : 1;
209
 
210
-    if (svt_enc->la_depth >= 0)
211
-        param->look_ahead_distance  = svt_enc->la_depth;
211
+#if SVT_AV1_CHECK_VERSION(0, 9, 1)
212
+#if SVT_AV1_CHECK_VERSION(0, 9, 1)
212
+    while ((en = av_dict_get(svt_enc->svtav1_opts, "", en, AV_DICT_IGNORE_SUFFIX))) {
213
+    while ((en = av_dict_get(svt_enc->svtav1_opts, "", en, AV_DICT_IGNORE_SUFFIX))) {
213
+        EbErrorType ret = svt_av1_enc_parse_parameter(param, en->key, en->value);
214
+        EbErrorType ret = svt_av1_enc_parse_parameter(param, en->key, en->value);
Lines 217-223 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a Link Here
217
+            if (avctx->err_recognition & AV_EF_EXPLODE)
218
+            if (avctx->err_recognition & AV_EF_EXPLODE)
218
+                return AVERROR(EINVAL);
219
+                return AVERROR(EINVAL);
219
+        }
220
+        }
220
     }
221
+    }
221
+#else
222
+#else
222
+    if ((en = av_dict_get(svt_enc->svtav1_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
223
+    if ((en = av_dict_get(svt_enc->svtav1_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
223
+        int level = (avctx->err_recognition & AV_EF_EXPLODE) ? AV_LOG_ERROR : AV_LOG_WARNING;
224
+        int level = (avctx->err_recognition & AV_EF_EXPLODE) ? AV_LOG_ERROR : AV_LOG_WARNING;
Lines 228-243 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a Link Here
228
+    }
229
+    }
229
+#endif
230
+#endif
230
 
231
 
231
-    param->intra_refresh_type       = 2; /* Real keyframes only */
232
-    param->tile_columns = svt_enc->tile_columns;
233
-    param->tile_rows    = svt_enc->tile_rows;
232
+    param->source_width     = avctx->width;
234
+    param->source_width     = avctx->width;
233
+    param->source_height    = avctx->height;
235
+    param->source_height    = avctx->height;
234
 
236
 
235
-    if (svt_enc->la_depth >= 0)
236
-        param->look_ahead_distance  = svt_enc->la_depth;
237
+    param->encoder_bit_depth = desc->comp[0].depth;
237
+    param->encoder_bit_depth = desc->comp[0].depth;
238
 
238
+
239
-    param->tile_columns = svt_enc->tile_columns;
240
-    param->tile_rows    = svt_enc->tile_rows;
241
+    if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 1)
239
+    if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 1)
242
+        param->encoder_color_format   = EB_YUV420;
240
+        param->encoder_color_format   = EB_YUV420;
243
+    else if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 0)
241
+    else if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 0)
Lines 248-254 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a Link Here
248
+        av_log(avctx, AV_LOG_ERROR , "Unsupported pixel format\n");
246
+        av_log(avctx, AV_LOG_ERROR , "Unsupported pixel format\n");
249
+        return AVERROR(EINVAL);
247
+        return AVERROR(EINVAL);
250
+    }
248
+    }
251
 
249
+
252
+    if ((param->encoder_color_format == EB_YUV422 || param->encoder_bit_depth > 10)
250
+    if ((param->encoder_color_format == EB_YUV422 || param->encoder_bit_depth > 10)
253
+         && param->profile != FF_PROFILE_AV1_PROFESSIONAL ) {
251
+         && param->profile != FF_PROFILE_AV1_PROFESSIONAL ) {
254
+        av_log(avctx, AV_LOG_WARNING, "Forcing Professional profile\n");
252
+        av_log(avctx, AV_LOG_WARNING, "Forcing Professional profile\n");
Lines 263-269 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a Link Here
263
     return 0;
261
     return 0;
264
 }
262
 }
265
 
263
 
266
@@ -472,21 +525,22 @@ static const AVOption options[] = {
264
@@ -474,21 +525,22 @@ static const AVOption options[] = {
267
 #define OFFSET(x) offsetof(SvtContext, x)
265
 #define OFFSET(x) offsetof(SvtContext, x)
268
 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
266
 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
269
 static const AVOption options[] = {
267
 static const AVOption options[] = {
Lines 295-306 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a Link Here
295
 
293
 
296
     FF_AV1_PROFILE_OPTS
294
     FF_AV1_PROFILE_OPTS
297
 
295
 
298
@@ -518,21 +572,20 @@ static const AVOption options[] = {
296
@@ -520,21 +572,20 @@ static const AVOption options[] = {
299
         { LEVEL("7.3", 73) },
297
         { LEVEL("7.3", 73) },
300
 #undef LEVEL
298
 #undef LEVEL
301
 
299
 
302
-    { "rc", "Bit rate control mode", OFFSET(rc_mode),
300
-    { "rc", "Bit rate control mode", OFFSET(rc_mode),
303
-      AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 3, VE , "rc"},
301
-      AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, VE , "rc"},
304
-        { "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 },  INT_MIN, INT_MAX, VE, "rc" },
302
-        { "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 },  INT_MIN, INT_MAX, VE, "rc" },
305
-        { "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" },
303
-        { "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" },
306
-        { "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" },
304
-        { "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 328-368 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a Link Here
328
     {NULL},
326
     {NULL},
329
 };
327
 };
330
 
328
 
331
@@ -544,9 +597,10 @@ static const AVCodecDefault eb_enc_defaults[] = {
329
@@ -546,10 +597,10 @@ static const AVCodecDefault eb_enc_defaults[] = {
332
 };
330
 };
333
 
331
 
334
 static const AVCodecDefault eb_enc_defaults[] = {
332
 static const AVCodecDefault eb_enc_defaults[] = {
335
-    { "b",         "7M"    },
333
-    { "b",         "7M"    },
336
+    { "b",         "0"    },
334
+    { "b",         "0"    },
337
+    { "flags",     "+cgop" },
335
     { "flags",     "+cgop" },
338
     { "g",         "-1"    },
336
     { "g",         "-1"    },
339
-    { "qmin",      "0"     },
337
-    { "qmin",      "0"     },
340
+    { "qmin",      "1"     },
338
+    { "qmin",      "1"     },
341
     { "qmax",      "63"    },
339
     { "qmax",      "63"    },
342
     { NULL },
340
     { NULL },
343
 };
341
 };
344
@@ -561,12 +615,11 @@ AVCodec ff_libsvtav1_encoder = {
342
--- libavcodec/version.h.orig	2022-01-14 18:45:40 UTC
345
     .receive_packet = eb_receive_packet,
346
     .close          = eb_enc_close,
347
     .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS,
348
-    .caps_internal  = FF_CODEC_CAP_AUTO_THREADS,
349
+    .caps_internal  = FF_CODEC_CAP_AUTO_THREADS | FF_CODEC_CAP_INIT_CLEANUP,
350
     .pix_fmts       = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P,
351
                                                     AV_PIX_FMT_YUV420P10,
352
                                                     AV_PIX_FMT_NONE },
353
     .priv_class     = &class,
354
     .defaults       = eb_enc_defaults,
355
-    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
356
     .wrapper_name   = "libsvtav1",
357
 };
358
--- libavcodec/version.h.orig	2021-10-24 20:47:07 UTC
359
+++ libavcodec/version.h
343
+++ libavcodec/version.h
360
@@ -168,5 +168,8 @@
344
@@ -63,5 +63,6 @@
361
 #ifndef FF_API_INIT_PACKET
345
 #define FF_API_MPEGVIDEO_OPTS      (LIBAVCODEC_VERSION_MAJOR < 60)
362
 #define FF_API_INIT_PACKET         (LIBAVCODEC_VERSION_MAJOR < 60)
346
 #define FF_API_FLAG_TRUNCATED      (LIBAVCODEC_VERSION_MAJOR < 60)
363
 #endif
347
 #define FF_API_SUB_TEXT_FORMAT     (LIBAVCODEC_VERSION_MAJOR < 60)
364
+#ifndef FF_API_SVTAV1_OPTS
365
+#define FF_API_SVTAV1_OPTS         (LIBAVCODEC_VERSION_MAJOR < 60)
348
+#define FF_API_SVTAV1_OPTS         (LIBAVCODEC_VERSION_MAJOR < 60)
366
+#endif
367
 
349
 
368
 #endif /* AVCODEC_VERSION_H */
350
 #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