Skip to content

Commit

Permalink
ffmpeg: update to 4.3.1 (#4033)
Browse files Browse the repository at this point in the history
* ffmpeg: Update from 4.2.3 to 4.3.1

* ffmpeg: description type in french

* intel-vaapi-driver: Update from v2.4 to v2.4.1

* libva: Update from 2.7.1 to version 2.8

* gmmlib: Update from 20.1.1 to version 20.2.2

* Intel Driver 2020Q2 finale update

* intel-media-sdk: Update to version 12.2.1

* libaom: Update from 2.0.0-rc1 to 2.0.0 final

* SVT-AV1: Update from 0.8.3 to 0.8.4

* SVT-HEVC: Update to version 1.5.0

* x264: Update to latest git hash and github mirror

* x265: Update from 3.3 to version 3.4

* libzmq: Add lib ZeroMQ support version 4.3.2

* ffmpeg 4.3: Enable ZeroMQ support
  • Loading branch information
th0ma7 authored Aug 13, 2020
1 parent 6050b8a commit 9fa5e91
Show file tree
Hide file tree
Showing 53 changed files with 539 additions and 968 deletions.
4 changes: 3 additions & 1 deletion cross/ffmpeg/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = ffmpeg
PKG_VERS = 4.2.4
PKG_VERS = 4.3.1
PKG_EXT = tar.bz2
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = http://www.ffmpeg.org/releases
Expand All @@ -11,6 +11,7 @@ DEPENDS += cross/libtheora
DEPENDS += cross/gnutls cross/opus
DEPENDS += cross/soxr cross/x264 cross/x265 cross/libvpx
DEPENDS += cross/opencore-amr
DEPENDS += cross/libzmq

OPTIONAL_DEPENDS = cross/libaom cross/svt-av1 native/nasm cross/ds.evansport cross/json-c
OPTIONAL_DEPENDS += cross/libva cross/libva-utils cross/intel-vaapi-driver cross/intel-media-driver cross/intel-media-sdk cross/svt-hevc
Expand All @@ -37,6 +38,7 @@ CONFIGURE_ARGS += --enable-libtheora --enable-libvorbis
CONFIGURE_ARGS += --enable-libspeex
CONFIGURE_ARGS += --enable-libvpx --enable-libx264 --enable-libx265 --enable-gnutls
CONFIGURE_ARGS += --enable-libopencore-amrnb --enable-libopencore-amrwb
CONFIGURE_ARGS += --enable-libzmq
CONFIGURE_ARGS += --disable-debug --disable-doc
CONFIGURE_ARGS += --disable-static
CONFIGURE_ARGS += --enable-debug=1
Expand Down
16 changes: 8 additions & 8 deletions cross/ffmpeg/PLIST
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ bin:bin/ffmpeg
bin:bin/ffprobe
lnk:lib/libavcodec.so
lnk:lib/libavcodec.so.58
lib:lib/libavcodec.so.58.54.100
lib:lib/libavcodec.so.58.91.100
lnk:lib/libavdevice.so
lnk:lib/libavdevice.so.58
lib:lib/libavdevice.so.58.8.100
lib:lib/libavdevice.so.58.10.100
lnk:lib/libavfilter.so
lnk:lib/libavfilter.so.7
lib:lib/libavfilter.so.7.57.100
lib:lib/libavfilter.so.7.85.100
lnk:lib/libavformat.so
lnk:lib/libavformat.so.58
lib:lib/libavformat.so.58.29.100
lib:lib/libavformat.so.58.45.100
lnk:lib/libavresample.so
lnk:lib/libavresample.so.4
lib:lib/libavresample.so.4.0.0
lnk:lib/libavutil.so
lnk:lib/libavutil.so.56
lib:lib/libavutil.so.56.31.100
lib:lib/libavutil.so.56.51.100
lnk:lib/libpostproc.so
lnk:lib/libpostproc.so.55
lib:lib/libpostproc.so.55.5.100
lib:lib/libpostproc.so.55.7.100
lnk:lib/libswresample.so
lnk:lib/libswresample.so.3
lib:lib/libswresample.so.3.5.100
lib:lib/libswresample.so.3.7.100
lnk:lib/libswscale.so
lnk:lib/libswscale.so.5
lib:lib/libswscale.so.5.5.100
lib:lib/libswscale.so.5.7.100
rsc:share/ffmpeg/ffprobe.xsd
rsc:share/ffmpeg/libvpx-1080p50_60.ffpreset
rsc:share/ffmpeg/libvpx-1080p.ffpreset
Expand Down
6 changes: 3 additions & 3 deletions cross/ffmpeg/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ffmpeg-4.2.4.tar.bz2 SHA1 b733a5b9d4586fb7c068f31796eef35680a4cee3
ffmpeg-4.2.4.tar.bz2 SHA256 9cb7774d97a899bb403fb2eaa5701e5f07329b885ff5102cb3e95604329878c4
ffmpeg-4.2.4.tar.bz2 MD5 b153d292786d641399a5125fbc9d1d4b
ffmpeg-4.3.1.tar.bz2 SHA1 d7bf601a6fc904333ab261e73c4b602ea471e942
ffmpeg-4.3.1.tar.bz2 SHA256 f4a4ac63946b6eee3bbdde523e298fca6019d048d6e1db0d1439a62cea65f0d9
ffmpeg-4.3.1.tar.bz2 MD5 804707549590e90880e8ecd4e5244fd8
19 changes: 11 additions & 8 deletions cross/ffmpeg/patches/001-replace-arch-env-by-ffmpeg_arch.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--- configure.orig
+++ configure
@@ -7266,7 +7266,7 @@ ifndef MAIN_MAKEFILE
diff -uprN ../ffmpeg-4.3/configure ./configure
--- ../ffmpeg-4.3/configure 2020-06-15 14:54:23.000000000 -0400
+++ ./configure 2020-06-16 17:31:32.432716874 -0400
@@ -7382,7 +7382,7 @@ ifndef MAIN_MAKEFILE
SRC_PATH:=\$(SRC_PATH:.%=..%)
endif
CC_IDENT=$cc_ident
Expand All @@ -9,8 +10,9 @@
INTRINSICS=$intrinsics
EXTERN_PREFIX=$extern_prefix
CC=$cc
--- ffbuild/common.mak.orig
+++ ffbuild/common.mak
diff -uprN ../ffmpeg-4.3/ffbuild/common.mak ./ffbuild/common.mak
--- ../ffmpeg-4.3/ffbuild/common.mak 2020-06-15 14:54:23.000000000 -0400
+++ ./ffbuild/common.mak 2020-06-16 17:31:32.433716941 -0400
@@ -136,8 +136,8 @@ DEP_LIBS := $(foreach lib,$(FFLIBS),$(ca
STATIC_DEP_LIBS := $(foreach lib,$(FFLIBS),$(call PATH_LIBNAME,$(lib)))

Expand All @@ -22,9 +24,10 @@
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
HOBJS = $(filter-out $(SKIPHEADERS:.h=.h.o),$(ALLHEADERS:.h=.h.o))
PTXOBJS = $(filter %.ptx.o,$(OBJS))
--- Makefile.orig
+++ Makefile
@@ -86,7 +86,7 @@ define DOSUBDIR
diff -uprN ../ffmpeg-4.3/Makefile ./Makefile
--- ../ffmpeg-4.3/Makefile 2020-06-15 14:54:23.000000000 -0400
+++ ./Makefile 2020-06-16 17:31:32.433716941 -0400
@@ -89,7 +89,7 @@ define DOSUBDIR
$(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V))))
SUBDIR := $(1)/
include $(SRC_PATH)/$(1)/Makefile
Expand Down
7 changes: 4 additions & 3 deletions cross/ffmpeg/patches/002-tvheadend-ffmpeg.libx264.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--- ./libavcodec/libx264.c.orig
+++ ./libavcodec/libx264.c
@@ -1026,6 +1026,7 @@ static const AVOption options[] = {
diff -uprN ../ffmpeg-4.3-001/libavcodec/libx264.c ./libavcodec/libx264.c
--- ../ffmpeg-4.3-001/libavcodec/libx264.c 2020-06-15 14:54:24.000000000 -0400
+++ ./libavcodec/libx264.c 2020-06-16 17:34:12.885426468 -0400
@@ -1043,6 +1043,7 @@ static const AVOption options[] = {
{ "preset", "Set the encoding preset (cf. x264 --fullhelp)", OFFSET(preset), AV_OPT_TYPE_STRING, { .str = "medium" }, 0, 0, VE},
{ "tune", "Tune the encoding params (cf. x264 --fullhelp)", OFFSET(tune), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE},
{ "profile", "Set profile restrictions (cf. x264 --fullhelp) ", OFFSET(profile), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE},
Expand Down
43 changes: 0 additions & 43 deletions cross/ffmpeg/patches/003-tvheadend-ffmpeg.libx265.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
--- ./libavcodec/vaapi_encode.c.orig
+++ ./libavcodec/vaapi_encode.c
@@ -26,6 +26,7 @@

Binary files ../ffmpeg-4.3/libavcodec/.libx265.c.swp and ./libavcodec/.libx265.c.swp differ
diff -uprN ../ffmpeg-4.3/libavcodec/vaapi_encode.c ./libavcodec/vaapi_encode.c
--- ../ffmpeg-4.3/libavcodec/vaapi_encode.c 2020-06-15 14:54:24.000000000 -0400
+++ ./libavcodec/vaapi_encode.c 2020-07-05 10:35:03.647873029 -0400
@@ -26,6 +26,8 @@

#include "vaapi_encode.h"
#include "avcodec.h"
+#include "internal.h"

static const char * const picture_type_name[] = { "IDR", "I", "P", "B" };

@@ -512,7 +513,7 @@ static int vaapi_encode_output(AVCodecCo
VAAPIEncodeContext *ctx = avctx->priv_data;
VACodedBufferSegment *buf_list, *buf;
VAStatus vas;
- int err;
+ int err, pict_type;

+#include "packet_internal.h"

const AVCodecHWConfigInternal *ff_vaapi_encode_hw_configs[] = {
HW_CONFIG_ENCODER_FRAMES(VAAPI, VAAPI),
@@ -587,6 +589,7 @@ static int vaapi_encode_output(AVCodecCo
int total_size = 0;
uint8_t *ptr;
int err;
+ int pict_type;
err = vaapi_encode_wait(avctx, pic);
if (err < 0)
@@ -544,6 +545,28 @@ static int vaapi_encode_output(AVCodecCo
@@ -624,6 +627,30 @@ static int vaapi_encode_output(AVCodecCo

pkt->pts = pic->pts;

Expand All @@ -33,14 +35,16 @@
+ pict_type = AV_PICTURE_TYPE_B;
+ break;
+ default:
+ pict_type = AV_PICTURE_TYPE_NONE;
+ break;
+ av_log(avctx, AV_LOG_ERROR, "Unknown picture type encountered.\n");
+ return AVERROR_EXTERNAL;
+ }
+
+#if FF_API_CODED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
+ avctx->coded_frame->pict_type = pict_type;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
+
+ ff_side_data_set_encoder_stats(pkt, -1, NULL, 0, pict_type);
+
vas = vaUnmapBuffer(ctx->hwctx->display, pic->output_buffer);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
diff -uprN ../ffmpeg-4.2.2-ORIG/configure ./configure
--- ../ffmpeg-4.2.2-ORIG/configure 2019-12-31 16:35:22.000000000 -0500
+++ ./configure 2020-04-21 20:04:52.735055129 -0400
@@ -264,6 +264,7 @@ External library support:
diff -uprN ../ffmpeg-4.3-003/configure ./configure
--- ../ffmpeg-4.3-003/configure 2020-06-16 17:34:08.000000000 -0400
+++ ./configure 2020-06-16 20:34:21.915744696 -0400
@@ -267,6 +267,7 @@ External library support:
--enable-libspeex enable Speex de/encoding via libspeex [no]
--enable-libsrt enable Haivision SRT protocol via libsrt [no]
--enable-libssh enable SFTP protocol via libssh [no]
+ --enable-libsvthevc enable HEVC encoding via svt [no]
--enable-libtensorflow enable TensorFlow as a DNN module backend
for DNN based filters like sr [no]
--enable-libtesseract enable Tesseract, needed for ocr filter [no]
@@ -1793,6 +1794,7 @@ EXTERNAL_LIBRARY_LIST="
@@ -1803,6 +1804,7 @@ EXTERNAL_LIBRARY_LIST="
libspeex
libsrt
libssh
+ libsvthevc
libtensorflow
libtesseract
libtheora
@@ -3191,6 +3193,7 @@ libshine_encoder_select="audio_frame_que
@@ -3240,6 +3242,7 @@ libshine_encoder_select="audio_frame_que
libspeex_decoder_deps="libspeex"
libspeex_encoder_deps="libspeex"
libspeex_encoder_select="audio_frame_queue"
+libsvt_hevc_encoder_deps="libsvthevc"
libtheora_encoder_deps="libtheora"
libtwolame_encoder_deps="libtwolame"
libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
@@ -6263,6 +6266,7 @@ enabled libsoxr && require lib
@@ -6369,6 +6372,7 @@ enabled libsoxr && require lib
enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
+enabled libsvthevc && require_pkg_config libsvthevc SvtHevcEnc EbApi.h EbInitHandle
enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
diff -uprN ../ffmpeg-4.2.2-ORIG/libavcodec/allcodecs.c ./libavcodec/allcodecs.c
--- ../ffmpeg-4.2.2-ORIG/libavcodec/allcodecs.c 2019-12-31 16:35:23.000000000 -0500
+++ ./libavcodec/allcodecs.c 2020-04-21 20:04:52.735055129 -0400
@@ -707,6 +707,7 @@ extern AVCodec ff_librsvg_decoder;
diff -uprN ../ffmpeg-4.3-003/libavcodec/allcodecs.c ./libavcodec/allcodecs.c
--- ../ffmpeg-4.3-003/libavcodec/allcodecs.c 2020-06-15 14:54:24.000000000 -0400
+++ ./libavcodec/allcodecs.c 2020-06-16 20:34:21.916744767 -0400
@@ -728,6 +728,7 @@ extern AVCodec ff_librsvg_decoder;
extern AVCodec ff_libshine_encoder;
extern AVCodec ff_libspeex_encoder;
extern AVCodec ff_libspeex_decoder;
+extern AVCodec ff_libsvt_hevc_encoder;
extern AVCodec ff_libtheora_encoder;
extern AVCodec ff_libtwolame_encoder;
extern AVCodec ff_libvo_amrwbenc_encoder;
diff -uprN ../ffmpeg-4.2.2-ORIG/libavcodec/libsvt_hevc.c ./libavcodec/libsvt_hevc.c
--- ../ffmpeg-4.2.2-ORIG/libavcodec/libsvt_hevc.c 1969-12-31 19:00:00.000000000 -0500
+++ ./libavcodec/libsvt_hevc.c 2020-04-21 20:04:52.735055129 -0400
diff -uprN ../ffmpeg-4.3-003/libavcodec/libsvt_hevc.c ./libavcodec/libsvt_hevc.c
--- ../ffmpeg-4.3-003/libavcodec/libsvt_hevc.c 1969-12-31 19:00:00.000000000 -0500
+++ ./libavcodec/libsvt_hevc.c 2020-06-16 20:34:21.916744767 -0400
@@ -0,0 +1,559 @@
+/*
+* Scalable Video Technology for HEVC encoder library plugin
Expand Down Expand Up @@ -607,10 +607,10 @@ diff -uprN ../ffmpeg-4.2.2-ORIG/libavcodec/libsvt_hevc.c ./libavcodec/libsvt_hev
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
+ .wrapper_name = "libsvt_hevc",
+};
diff -uprN ../ffmpeg-4.2.2-ORIG/libavcodec/Makefile ./libavcodec/Makefile
--- ../ffmpeg-4.2.2-ORIG/libavcodec/Makefile 2019-12-31 16:35:22.000000000 -0500
+++ ./libavcodec/Makefile 2020-04-21 20:04:52.735055129 -0400
@@ -991,6 +991,7 @@ OBJS-$(CONFIG_LIBOPUS_ENCODER)
diff -uprN ../ffmpeg-4.3-003/libavcodec/Makefile ./libavcodec/Makefile
--- ../ffmpeg-4.3-003/libavcodec/Makefile 2020-06-15 14:54:24.000000000 -0400
+++ ./libavcodec/Makefile 2020-06-16 20:34:21.915744696 -0400
@@ -1024,6 +1024,7 @@ OBJS-$(CONFIG_LIBRAV1E_ENCODER)
OBJS-$(CONFIG_LIBSHINE_ENCODER) += libshine.o
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o
Expand Down
Loading

0 comments on commit 9fa5e91

Please sign in to comment.