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=	4
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 35-52 PORTSCOUT= limit:^4\. Link Here
35
OPTIONS_DEFINE=	ALSA AMR_NB AMR_WB AOM ARIBB24 ASM ASS BS2B CACA CDIO \
34
OPTIONS_DEFINE=	ALSA AMR_NB AMR_WB AOM ARIBB24 ASM ASS BS2B CACA CDIO \
36
		CODEC2 DAV1D DAVS2 DC1394 DEBUG DOCS DRM FDK_AAC FLITE \
35
		CODEC2 DAV1D DAVS2 DC1394 DEBUG DOCS DRM FDK_AAC FLITE \
37
		FONTCONFIG FREETYPE FREI0R FRIBIDI GLSLANG GME GSM ICONV ILBC \
36
		FONTCONFIG FREETYPE FREI0R FRIBIDI GLSLANG GME GSM ICONV ILBC \
38
		JACK KLVANC KVAZAAR LADSPA LAME LENSFUN LIBBLURAY LIBRSVG2 \
37
		JACK KLVANC KVAZAAR LADSPA LAME LENSFUN LIBBLURAY LIBPLACEBO LIBRSVG2 \
39
		LIBXML2 LTO LV2 MFX MODPLUG MYSOFA OPENAL OPENCL OPENGL \
38
		LIBXML2 LTO LV2 MFX MODPLUG MYSOFA OPENAL OPENCL OPENGL \
40
		OPENH264 OPENJPEG OPENMPT OPENVINO OPTIMIZED_CFLAGS OPUS POCKETSPHINX \
39
		OPENH264 OPENJPEG OPENMPT OPENVINO OPTIMIZED_CFLAGS OPUS POCKETSPHINX \
41
		PULSEAUDIO RAV1E RABBITMQ RIST RTCPU RUBBERBAND SDL SMB SNAPPY \
40
		PULSEAUDIO RAV1E RABBITMQ RIST RTCPU RUBBERBAND SDL SHADERC SMB SNAPPY \
42
		SNDIO SOXR SPEEX SRT SSH SVTAV1 SVTHEVC SVTVP9 TENSORFLOW \
41
		SNDIO SOXR SPEEX SRT SSH SVTAV1 SVTHEVC SVTVP9 TENSORFLOW \
43
		TESSERACT THEORA TWOLAME UAVS3D V4L VAAPI VAPOURSYNTH VDPAU VIDSTAB \
42
		TESSERACT THEORA TWOLAME UAVS3D V4L VAAPI VAPOURSYNTH VDPAU VIDSTAB \
44
		VMAF VO_AMRWBENC VORBIS VPX VULKAN WEBP X264 X265 \
43
		VMAF VO_AMRWBENC VORBIS VPX VULKAN WEBP X264 X265 \
45
		XAVS2 XCB XVID XVIDEO ZIMG ZMQ ZVBI
44
		XAVS2 XCB XVID XVIDEO ZIMG ZMQ ZVBI
46
45
47
OPTIONS_DEFAULT=	AOM ASM ASS DAV1D DRM FONTCONFIG FREETYPE FREI0R GMP \
46
OPTIONS_DEFAULT=	AOM ASM ASS DAV1D DRM FONTCONFIG FREETYPE FREI0R GMP \
48
			GNUTLS ICONV LAME LIBXML2 OPTIMIZED_CFLAGS OPUS RTCPU \
47
			GNUTLS ICONV LAME LIBPLACEBO LIBXML2 OPTIMIZED_CFLAGS OPUS RTCPU \
49
			THEORA V4L VAAPI VDPAU VMAF VORBIS VPX X264 X265 XCB XVID
48
			THEORA V4L VAAPI VDPAU VMAF VORBIS VPX VULKAN X264 X265 XCB XVID
50
OPTIONS_DEFAULT_amd64=	SVTAV1
49
OPTIONS_DEFAULT_amd64=	SVTAV1
51
50
52
# i386 is too register-starved for LTO (PR257124)
51
# i386 is too register-starved for LTO (PR257124)
Lines 121-130 RIST_DESC= Reliable Internet Stream Transport protocol via librist Link Here
121
RUBBERBAND_DESC=Time-stretching and pitch-shifting with librubberband
120
RUBBERBAND_DESC=Time-stretching and pitch-shifting with librubberband
122
RTCPU_DESC=	Detect CPU capabilities at runtime
121
RTCPU_DESC=	Detect CPU capabilities at runtime
123
RTMP_DESC=	RTMP(T)E protocol support
122
RTMP_DESC=	RTMP(T)E protocol support
123
SHADERC_DESC=	GLSL->SPIRV compilation via libshaderc
124
SRT_DESC=	Haivision SRT protocol via libsrt
124
SRT_DESC=	Haivision SRT protocol via libsrt
125
SVTAV1_DESC=	AV1 encoding via SVT-AV1
125
SVTAV1_DESC=	AV1 encoding via SVT-AV1
126
SVTHEVC_DESC=	HEVC encoding via SVT-HEVC
126
SVTHEVC_DESC=	HEVC encoding via SVT-HEVC
127
SVTVP9_DESC=	VP9 encoding via SVT-VP9
127
SVTVP9_DESC=	VP9 encoding via SVT-VP9
128
LIBPLACEBO_DESC=GPU filters from libplacebo
128
LIBRTMP_DESC=	${RTMP_DESC} via librtmp
129
LIBRTMP_DESC=	${RTMP_DESC} via librtmp
129
TENSORFLOW_DESC=TensorFlow as a DNN module backend for DNN based filters like sr
130
TENSORFLOW_DESC=TensorFlow as a DNN module backend for DNN based filters like sr
130
TESSERACT_DESC=	Optical Character Recognition via Tesseract
131
TESSERACT_DESC=	Optical Character Recognition via Tesseract
Lines 304-309 LENSFUN_CONFIGURE_ENABLE= liblensfun Link Here
304
LIBBLURAY_LIB_DEPENDS=	libbluray.so:multimedia/libbluray
305
LIBBLURAY_LIB_DEPENDS=	libbluray.so:multimedia/libbluray
305
LIBBLURAY_CONFIGURE_ENABLE=	libbluray
306
LIBBLURAY_CONFIGURE_ENABLE=	libbluray
306
307
308
# libplacebo
309
LIBPLACEBO_LIB_DEPENDS=	libplacebo.so:graphics/libplacebo
310
LIBPLACEBO_CONFIGURE_ENABLE=	libplacebo
311
307
# librsvg
312
# librsvg
308
LIBRSVG2_USES=			gnome
313
LIBRSVG2_USES=			gnome
309
LIBRSVG2_USE=			GNOME=cairo,librsvg2
314
LIBRSVG2_USE=			GNOME=cairo,librsvg2
Lines 423-428 SDL_USES= sdl Link Here
423
SDL_USE=		SDL=sdl2
428
SDL_USE=		SDL=sdl2
424
SDL_CONFIGURE_ENABLE=	sdl2
429
SDL_CONFIGURE_ENABLE=	sdl2
425
430
431
# shaderc
432
SHADERC_LIB_DEPENDS=	libshaderc_shared.so:graphics/shaderc
433
SHADERC_CONFIGURE_ENABLE=	libshaderc
434
SHADERC_PREVENTS=	GLSLANG
435
426
# smbclient
436
# smbclient
427
SMB_USES=		samba:lib
437
SMB_USES=		samba:lib
428
SMB_CONFIGURE_ENABLE=	libsmbclient
438
SMB_CONFIGURE_ENABLE=	libsmbclient
Lines 534-540 VPX_CONFIGURE_ENABLE= libvpx Link Here
534
VULKAN_BUILD_DEPENDS=	vulkan-headers>0:graphics/vulkan-headers
544
VULKAN_BUILD_DEPENDS=	vulkan-headers>0:graphics/vulkan-headers
535
VULKAN_LIB_DEPENDS=	libvulkan.so:graphics/vulkan-loader
545
VULKAN_LIB_DEPENDS=	libvulkan.so:graphics/vulkan-loader
536
VULKAN_CONFIGURE_ENABLE=	vulkan
546
VULKAN_CONFIGURE_ENABLE=	vulkan
537
VULKAN_IMPLIES=		GLSLANG
547
VULKAN_IMPLIES=		${"${PORT_OPTIONS:MGLSLANG}":?GLSLANG:SHADERC}
538
548
539
# webp
549
# webp
540
WEBP_LIB_DEPENDS=	libwebp.so:graphics/webp
550
WEBP_LIB_DEPENDS=	libwebp.so:graphics/webp
Lines 607-613 CONFIGURE_ARGS+=--prefix="${PREFIX}" \ Link Here
607
		--enable-shared \
617
		--enable-shared \
608
		--enable-pic \
618
		--enable-pic \
609
		--enable-gpl \
619
		--enable-gpl \
610
		--enable-avresample \
611
		--cc="${CC}" \
620
		--cc="${CC}" \
612
		--cxx="${CXX}"
621
		--cxx="${CXX}"
613
622
(-)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 (-41 / +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 15-23 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/ded0334d214f Link Here
15
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/70887d44ffa3
11
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/70887d44ffa3
16
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/fe100bc556d7
12
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/fe100bc556d7
17
13
18
--- configure.orig	2021-10-24 20:47:11 UTC
14
--- configure.orig	2022-04-04 14:40:22 UTC
19
+++ configure
15
+++ configure
20
@@ -6430,7 +6430,7 @@ enabled libsrt            && require_pkg_config libsrt
16
@@ -6611,7 +6611,7 @@ enabled libsrt            && require_pkg_config libsrt
21
 enabled libssh            && require_pkg_config libssh libssh libssh/sftp.h sftp_init
17
 enabled libssh            && require_pkg_config libssh libssh libssh/sftp.h sftp_init
22
 enabled libspeex          && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
18
 enabled libspeex          && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
23
 enabled libsrt            && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
19
 enabled libsrt            && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
Lines 26-36 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/fe100bc556d7 Link Here
26
 enabled libtensorflow     && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
22
 enabled libtensorflow     && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
27
 enabled libtesseract      && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
23
 enabled libtesseract      && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
28
 enabled libtheora         && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
24
 enabled libtheora         && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
29
--- doc/encoders.texi.orig	2021-10-24 20:47:07 UTC
25
--- doc/encoders.texi.orig	2022-01-14 18:45:39 UTC
30
+++ doc/encoders.texi
26
+++ doc/encoders.texi
31
@@ -1754,28 +1754,15 @@ Set the operating point tier.
27
@@ -1775,28 +1775,15 @@ This is the default.
32
 @item tier
28
 @item high
33
 Set the operating point tier.
29
 @end table
34
 
30
 
35
-@item rc
31
-@item rc
36
-Set the rate control mode to use.
32
-Set the rate control mode to use.
Lines 60-66 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/fe100bc556d7 Link Here
60
 @item qp
56
 @item qp
61
 Set the quantizer used in cqp rate control mode (0-63).
57
 Set the quantizer used in cqp rate control mode (0-63).
62
 
58
 
63
@@ -1786,14 +1773,18 @@ Set number of frames to look ahead (0-120).
59
@@ -1807,14 +1794,18 @@ Set number of frames to look ahead (0-120).
64
 Set number of frames to look ahead (0-120).
60
 Set number of frames to look ahead (0-120).
65
 
61
 
66
 @item preset
62
 @item preset
Lines 81-87 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/fe100bc556d7 Link Here
81
 
77
 
82
 @end table
78
 @end table
83
 
79
 
84
--- libavcodec/libsvtav1.c.orig	2021-10-24 20:47:07 UTC
80
--- libavcodec/libsvtav1.c.orig	2022-01-14 18:45:40 UTC
85
+++ libavcodec/libsvtav1.c
81
+++ libavcodec/libsvtav1.c
86
@@ -60,17 +60,20 @@ typedef struct SvtContext {
82
@@ -60,17 +60,20 @@ typedef struct SvtContext {
87
     EOS_STATUS eos_flag;
83
     EOS_STATUS eos_flag;
Lines 248-254 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/fe100bc556d7 Link Here
248
     if ((param->encoder_color_format == EB_YUV422 || param->encoder_bit_depth > 10)
244
     if ((param->encoder_color_format == EB_YUV422 || param->encoder_bit_depth > 10)
249
          && param->profile != FF_PROFILE_AV1_PROFESSIONAL ) {
245
          && param->profile != FF_PROFILE_AV1_PROFESSIONAL ) {
250
         av_log(avctx, AV_LOG_WARNING, "Forcing Professional profile\n");
246
         av_log(avctx, AV_LOG_WARNING, "Forcing Professional profile\n");
251
@@ -184,40 +296,21 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
247
@@ -184,42 +296,21 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
252
         param->profile = FF_PROFILE_AV1_HIGH;
248
         param->profile = FF_PROFILE_AV1_HIGH;
253
     }
249
     }
254
 
250
 
Lines 284-295 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/fe100bc556d7 Link Here
284
+        cpb_props->avg_bitrate = avctx->bit_rate;
280
+        cpb_props->avg_bitrate = avctx->bit_rate;
285
     }
281
     }
286
 
282
 
283
-    param->enable_tpl_la = !!param->rate_control_mode;
287
-    if (param->rate_control_mode) {
284
-    if (param->rate_control_mode) {
288
-        param->max_qp_allowed       = avctx->qmax;
285
-        param->max_qp_allowed       = avctx->qmax;
289
-        param->min_qp_allowed       = avctx->qmin;
286
-        param->min_qp_allowed       = avctx->qmin;
290
-    }
287
-    }
291
-
288
-
292
-    param->intra_refresh_type       = 2; /* Real keyframes only */
289
-    /* 2 = IDR, closed GOP, 1 = CRA, open GOP */
290
-    param->intra_refresh_type = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ? 2 : 1;
293
-
291
-
294
-    if (svt_enc->la_depth >= 0)
292
-    if (svt_enc->la_depth >= 0)
295
-        param->look_ahead_distance  = svt_enc->la_depth;
293
-        param->look_ahead_distance  = svt_enc->la_depth;
Lines 300-306 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/fe100bc556d7 Link Here
300
     return 0;
298
     return 0;
301
 }
299
 }
302
 
300
 
303
@@ -350,6 +443,16 @@ static int eb_send_frame(AVCodecContext *avctx, const 
301
@@ -352,6 +443,16 @@ static int eb_send_frame(AVCodecContext *avctx, const 
304
     headerPtr->p_app_private = NULL;
302
     headerPtr->p_app_private = NULL;
305
     headerPtr->pts           = frame->pts;
303
     headerPtr->pts           = frame->pts;
306
 
304
 
Lines 317-323 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/fe100bc556d7 Link Here
317
     svt_av1_enc_send_picture(svt_enc->svt_handle, headerPtr);
315
     svt_av1_enc_send_picture(svt_enc->svt_handle, headerPtr);
318
 
316
 
319
     return 0;
317
     return 0;
320
@@ -472,21 +575,22 @@ static const AVOption options[] = {
318
@@ -474,21 +575,22 @@ static const AVOption options[] = {
321
 #define OFFSET(x) offsetof(SvtContext, x)
319
 #define OFFSET(x) offsetof(SvtContext, x)
322
 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
320
 #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
323
 static const AVOption options[] = {
321
 static const AVOption options[] = {
Lines 349-360 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/fe100bc556d7 Link Here
349
 
347
 
350
     FF_AV1_PROFILE_OPTS
348
     FF_AV1_PROFILE_OPTS
351
 
349
 
352
@@ -518,21 +622,20 @@ static const AVOption options[] = {
350
@@ -520,21 +622,20 @@ static const AVOption options[] = {
353
         { LEVEL("7.3", 73) },
351
         { LEVEL("7.3", 73) },
354
 #undef LEVEL
352
 #undef LEVEL
355
 
353
 
356
-    { "rc", "Bit rate control mode", OFFSET(rc_mode),
354
-    { "rc", "Bit rate control mode", OFFSET(rc_mode),
357
-      AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 3, VE , "rc"},
355
-      AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, VE , "rc"},
358
-        { "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 },  INT_MIN, INT_MAX, VE, "rc" },
356
-        { "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 },  INT_MIN, INT_MAX, VE, "rc" },
359
-        { "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" },
357
-        { "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" },
360
-        { "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" },
358
-        { "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 382-422 https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/fe100bc556d7 Link Here
382
     {NULL},
380
     {NULL},
383
 };
381
 };
384
 
382
 
385
@@ -544,9 +647,10 @@ static const AVCodecDefault eb_enc_defaults[] = {
383
@@ -546,10 +647,10 @@ static const AVCodecDefault eb_enc_defaults[] = {
386
 };
384
 };
387
 
385
 
388
 static const AVCodecDefault eb_enc_defaults[] = {
386
 static const AVCodecDefault eb_enc_defaults[] = {
389
-    { "b",         "7M"    },
387
-    { "b",         "7M"    },
390
+    { "b",         "0"    },
388
+    { "b",         "0"    },
391
+    { "flags",     "+cgop" },
389
     { "flags",     "+cgop" },
392
     { "g",         "-1"    },
390
     { "g",         "-1"    },
393
-    { "qmin",      "0"     },
391
-    { "qmin",      "0"     },
394
+    { "qmin",      "1"     },
392
+    { "qmin",      "1"     },
395
     { "qmax",      "63"    },
393
     { "qmax",      "63"    },
396
     { NULL },
394
     { NULL },
397
 };
395
 };
398
@@ -561,12 +665,11 @@ AVCodec ff_libsvtav1_encoder = {
396
--- libavcodec/version.h.orig	2022-01-14 18:45:40 UTC
399
     .receive_packet = eb_receive_packet,
400
     .close          = eb_enc_close,
401
     .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS,
402
-    .caps_internal  = FF_CODEC_CAP_AUTO_THREADS,
403
+    .caps_internal  = FF_CODEC_CAP_AUTO_THREADS | FF_CODEC_CAP_INIT_CLEANUP,
404
     .pix_fmts       = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P,
405
                                                     AV_PIX_FMT_YUV420P10,
406
                                                     AV_PIX_FMT_NONE },
407
     .priv_class     = &class,
408
     .defaults       = eb_enc_defaults,
409
-    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
410
     .wrapper_name   = "libsvtav1",
411
 };
412
--- libavcodec/version.h.orig	2021-10-24 20:47:07 UTC
413
+++ libavcodec/version.h
397
+++ libavcodec/version.h
414
@@ -168,5 +168,8 @@
398
@@ -63,5 +63,6 @@
415
 #ifndef FF_API_INIT_PACKET
399
 #define FF_API_MPEGVIDEO_OPTS      (LIBAVCODEC_VERSION_MAJOR < 60)
416
 #define FF_API_INIT_PACKET         (LIBAVCODEC_VERSION_MAJOR < 60)
400
 #define FF_API_FLAG_TRUNCATED      (LIBAVCODEC_VERSION_MAJOR < 60)
417
 #endif
401
 #define FF_API_SUB_TEXT_FORMAT     (LIBAVCODEC_VERSION_MAJOR < 60)
418
+#ifndef FF_API_SVTAV1_OPTS
419
+#define FF_API_SVTAV1_OPTS         (LIBAVCODEC_VERSION_MAJOR < 60)
402
+#define FF_API_SVTAV1_OPTS         (LIBAVCODEC_VERSION_MAJOR < 60)
420
+#endif
421
 
403
 
422
 #endif /* AVCODEC_VERSION_H */
404
 #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