Merge pull request #8003 from lazka/ffmpeg-4.3.2

ffmpeg: Update to 4.3.2
This commit is contained in:
Christoph Reiter
2021-02-21 13:37:44 +01:00
committed by GitHub
7 changed files with 23 additions and 363 deletions

View File

@@ -6,15 +6,15 @@ set -e
# Author: Renato Silva <br.renatosilva@gmail.com>
# Author: Qian Hong <fracting@gmail.com>
DIR="$( cd "$( dirname "$0" )" && pwd )"
# Configure
source "$(dirname "$0")/ci-library.sh"
source "$DIR/ci-library.sh"
mkdir artifacts
git_config user.email 'ci@msys2.org'
git_config user.name 'MSYS2 Continuous Integration'
git remote add upstream 'https://github.com/MSYS2/MINGW-packages'
git fetch --quiet upstream
# So that makepkg auto-fetches keys from validpgpkeys
mkdir -p ~/.gnupg && echo -e "keyserver hkp://keys.gnupg.net\nkeyserver-options auto-key-retrieve" > ~/.gnupg/gpg.conf
# reduce time required to install packages by disabling pacman's disk space checking
sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf
@@ -34,6 +34,7 @@ execute 'Approving recipe quality' check_recipe_quality
message 'Building packages'
for package in "${packages[@]}"; do
echo "::group::[build] ${package}"
execute 'Fetch keys' "$DIR/fetch-validpgpkeys.sh"
execute 'Building binary' makepkg-mingw --noconfirm --noprogressbar --nocheck --syncdeps --rmdeps --cleanbuild
execute 'Building source' makepkg --noconfirm --noprogressbar --allsource --config '/etc/makepkg_mingw64.conf'
echo "::endgroup::"

15
.ci/fetch-validpgpkeys.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -e
. PKGBUILD
_keyserver=(
"keyserver.ubuntu.com"
"keys.gnupg.net"
"pgp.mit.edu"
"keys.openpgp.org"
)
for key in "${validpgpkeys[@]}"; do
for server in "${_keyserver[@]}"; do
timeout 20 /usr/bin/gpg --keyserver "${server}" --recv "${key}" && break || true
done
done

View File

@@ -1,117 +0,0 @@
From 0b2b03568f22fdb361d9a44c262bfb9269335f80 Mon Sep 17 00:00:00 2001
From: Henrik Gramner <gramner@twoorioles.com>
Date: Thu, 9 Jul 2020 11:47:35 -0300
Subject: [PATCH] avutil/x86inc: fix warnings when assembling with Nasm 2.15
Some new warnings regarding use of empty macro parameters has
been added, so adjust some x86inc code to silence those.
Fixes part of ticket #8771
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavutil/x86/x86inc.asm | 46 ++++++++++++++++++++++++++--------------
1 file changed, 30 insertions(+), 16 deletions(-)
diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
index 5044ee86f0..01c35e3a4b 100644
--- a/libavutil/x86/x86inc.asm
+++ b/libavutil/x86/x86inc.asm
@@ -411,16 +411,6 @@ DECLARE_REG_TMP_SIZE 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
%endif
%endmacro
-%macro DEFINE_ARGS_INTERNAL 3+
- %ifnum %2
- DEFINE_ARGS %3
- %elif %1 == 4
- DEFINE_ARGS %2
- %elif %1 > 4
- DEFINE_ARGS %2, %3
- %endif
-%endmacro
-
%if WIN64 ; Windows x64 ;=================================================
DECLARE_REG 0, rcx
@@ -439,7 +429,7 @@ DECLARE_REG 12, R15, 104
DECLARE_REG 13, R12, 112
DECLARE_REG 14, R13, 120
-%macro PROLOGUE 2-5+ 0 ; #args, #regs, #xmm_regs, [stack_size,] arg_names...
+%macro PROLOGUE 2-5+ 0, 0 ; #args, #regs, #xmm_regs, [stack_size,] arg_names...
%assign num_args %1
%assign regs_used %2
ASSERT regs_used >= num_args
@@ -451,7 +441,15 @@ DECLARE_REG 14, R13, 120
WIN64_SPILL_XMM %3
%endif
LOAD_IF_USED 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
- DEFINE_ARGS_INTERNAL %0, %4, %5
+ %if %0 > 4
+ %ifnum %4
+ DEFINE_ARGS %5
+ %else
+ DEFINE_ARGS %4, %5
+ %endif
+ %elifnnum %4
+ DEFINE_ARGS %4
+ %endif
%endmacro
%macro WIN64_PUSH_XMM 0
@@ -547,7 +545,7 @@ DECLARE_REG 12, R15, 56
DECLARE_REG 13, R12, 64
DECLARE_REG 14, R13, 72
-%macro PROLOGUE 2-5+ 0 ; #args, #regs, #xmm_regs, [stack_size,] arg_names...
+%macro PROLOGUE 2-5+ 0, 0 ; #args, #regs, #xmm_regs, [stack_size,] arg_names...
%assign num_args %1
%assign regs_used %2
%assign xmm_regs_used %3
@@ -557,7 +555,15 @@ DECLARE_REG 14, R13, 72
PUSH_IF_USED 9, 10, 11, 12, 13, 14
ALLOC_STACK %4
LOAD_IF_USED 6, 7, 8, 9, 10, 11, 12, 13, 14
- DEFINE_ARGS_INTERNAL %0, %4, %5
+ %if %0 > 4
+ %ifnum %4
+ DEFINE_ARGS %5
+ %else
+ DEFINE_ARGS %4, %5
+ %endif
+ %elifnnum %4
+ DEFINE_ARGS %4
+ %endif
%endmacro
%define has_epilogue regs_used > 9 || stack_size > 0 || vzeroupper_required
@@ -598,7 +604,7 @@ DECLARE_REG 6, ebp, 28
DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14
-%macro PROLOGUE 2-5+ ; #args, #regs, #xmm_regs, [stack_size,] arg_names...
+%macro PROLOGUE 2-5+ 0, 0 ; #args, #regs, #xmm_regs, [stack_size,] arg_names...
%assign num_args %1
%assign regs_used %2
ASSERT regs_used >= num_args
@@ -613,7 +619,15 @@ DECLARE_ARG 7, 8, 9, 10, 11, 12, 13, 14
PUSH_IF_USED 3, 4, 5, 6
ALLOC_STACK %4
LOAD_IF_USED 0, 1, 2, 3, 4, 5, 6
- DEFINE_ARGS_INTERNAL %0, %4, %5
+ %if %0 > 4
+ %ifnum %4
+ DEFINE_ARGS %5
+ %else
+ DEFINE_ARGS %4, %5
+ %endif
+ %elifnnum %4
+ DEFINE_ARGS %4
+ %endif
%endmacro
%define has_epilogue regs_used > 3 || stack_size > 0 || vzeroupper_required
--
2.20.1

View File

@@ -1,28 +0,0 @@
From 2c844c98285ca03d9cc44db920da645cf0376c40 Mon Sep 17 00:00:00 2001
From: James Almer <jamrial@gmail.com>
Date: Thu, 9 Jul 2020 11:48:12 -0300
Subject: [PATCH] x86/h264_deblock: fix warning about trailing empty parameter
Fixes part of ticket #8771
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavcodec/x86/h264_deblock.asm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/x86/h264_deblock.asm b/libavcodec/x86/h264_deblock.asm
index 6702ae98d4..a2e745cd8e 100644
--- a/libavcodec/x86/h264_deblock.asm
+++ b/libavcodec/x86/h264_deblock.asm
@@ -1185,7 +1185,7 @@ cglobal deblock_h_chroma_8, 5, 7, 8, 0-16, pix_, stride_, alpha_, beta_, tc0_
STORE_8_ROWS PASS8ROWS(pix_q - 2, r5 - 2, stride_q, r6)
RET
-cglobal deblock_h_chroma422_8, 5, 7, 8, 0-16, pix_, stride_, alpha_, beta_, tc0_,
+cglobal deblock_h_chroma422_8, 5, 7, 8, 0-16, pix_, stride_, alpha_, beta_, tc0_
CHROMA_H_START_XMM r5, r6
LOAD_8_ROWS PASS8ROWS(pix_q - 2, r5 - 2, stride_q, r6)
TRANSPOSE_8x4B_XMM
--
2.20.1

View File

@@ -1,148 +0,0 @@
From 320694ff84a609c5b0438c1f10da355cb48a0be3 Mon Sep 17 00:00:00 2001
From: James Almer <jamrial@gmail.com>
Date: Sat, 11 Jul 2020 10:04:23 -0300
Subject: [PATCH] x86/vf_blend: fix warnings about trailing empty parameters
Finishes fixing ticket #8771
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavfilter/x86/vf_blend.asm | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/libavfilter/x86/vf_blend.asm b/libavfilter/x86/vf_blend.asm
index 251bbb5a12..766e5b7bc1 100644
--- a/libavfilter/x86/vf_blend.asm
+++ b/libavfilter/x86/vf_blend.asm
@@ -38,11 +38,11 @@ pb_255: times 16 db 255
SECTION .text
-%macro BLEND_INIT 2-3
+%macro BLEND_INIT 2-3 0
%if ARCH_X86_64
cglobal blend_%1, 6, 9, %2, top, top_linesize, bottom, bottom_linesize, dst, dst_linesize, width, end, x
mov widthd, dword widthm
- %if %0 == 3; is 16 bit
+ %if %3; is 16 bit
add widthq, widthq ; doesn't compile on x86_32
%endif
%else
@@ -66,7 +66,7 @@ cglobal blend_%1, 5, 7, %2, top, top_linesize, bottom, bottom_linesize, dst, end
REP_RET
%endmacro
-%macro BLEND_SIMPLE 2-3
+%macro BLEND_SIMPLE 2-3 0
BLEND_INIT %1, 2, %3
.nextrow:
mov xq, widthq
@@ -82,10 +82,10 @@ BLEND_END
%endmacro
; %1 name , %2 src (b or w), %3 inter (w or d), %4 (1 if 16bit, not set if 8 bit)
-%macro GRAINEXTRACT 3-4
+%macro GRAINEXTRACT 3-4 0
BLEND_INIT %1, 6, %4
pxor m4, m4
-%if %0 == 4 ; 16 bit
+%if %4 ; 16 bit
VBROADCASTI128 m5, [pd_32768]
%else
VBROADCASTI128 m5, [pw_128]
@@ -182,7 +182,7 @@ BLEND_END
%endmacro
;%1 name, %2 (b or w), %3 (set if 16 bit)
-%macro AVERAGE 2-3
+%macro AVERAGE 2-3 0
BLEND_INIT %1, 3, %3
pcmpeqb m2, m2
@@ -203,10 +203,10 @@ BLEND_END
%endmacro
; %1 name , %2 src (b or w), %3 inter (w or d), %4 (1 if 16bit, not set if 8 bit)
-%macro GRAINMERGE 3-4
+%macro GRAINMERGE 3-4 0
BLEND_INIT %1, 6, %4
pxor m4, m4
-%if %0 == 4 ; 16 bit
+%if %4 ; 16 bit
VBROADCASTI128 m5, [pd_32768]
%else
VBROADCASTI128 m5, [pw_128]
@@ -288,7 +288,7 @@ BLEND_INIT divide, 4
BLEND_END
%endmacro
-%macro PHOENIX 2-3
+%macro PHOENIX 2-3 0
; %1 name, %2 b or w, %3 (opt) 1 if 16 bit
BLEND_INIT %1, 4, %3
VBROADCASTI128 m3, [pb_255]
@@ -311,7 +311,7 @@ BLEND_END
%endmacro
; %1 name , %2 src (b or w), %3 inter (w or d), %4 (1 if 16bit, not set if 8 bit)
-%macro DIFFERENCE 3-4
+%macro DIFFERENCE 3-4 0
BLEND_INIT %1, 5, %4
pxor m2, m2
.nextrow:
@@ -326,7 +326,7 @@ BLEND_INIT %1, 5, %4
punpckl%2%3 m1, m2
psub%3 m0, m1
psub%3 m3, m4
-%if %0 == 4; 16 bit
+%if %4; 16 bit
pabsd m0, m0
pabsd m3, m3
%else
@@ -340,10 +340,10 @@ BLEND_END
%endmacro
; %1 name , %2 src (b or w), %3 inter (w or d), %4 (1 if 16bit, not set if 8 bit)
-%macro EXTREMITY 3-4
+%macro EXTREMITY 3-4 0
BLEND_INIT %1, 8, %4
pxor m2, m2
-%if %0 == 4; 16 bit
+%if %4; 16 bit
VBROADCASTI128 m4, [pd_65535]
%else
VBROADCASTI128 m4, [pw_255]
@@ -362,7 +362,7 @@ BLEND_INIT %1, 8, %4
psub%3 m7, m4, m5
psub%3 m3, m1
psub%3 m7, m6
-%if %0 == 4; 16 bit
+%if %4; 16 bit
pabsd m3, m3
pabsd m7, m7
%else
@@ -375,10 +375,10 @@ BLEND_INIT %1, 8, %4
BLEND_END
%endmacro
-%macro NEGATION 3-4
+%macro NEGATION 3-4 0
BLEND_INIT %1, 8, %4
pxor m2, m2
-%if %0 == 4; 16 bit
+%if %4; 16 bit
VBROADCASTI128 m4, [pd_65535]
%else
VBROADCASTI128 m4, [pw_255]
@@ -397,7 +397,7 @@ BLEND_INIT %1, 8, %4
psub%3 m7, m4, m5
psub%3 m3, m1
psub%3 m7, m6
-%if %0 == 4; 16 bit
+%if %4; 16 bit
pabsd m3, m3
pabsd m7, m7
%else
--
2.20.1

View File

@@ -1,50 +0,0 @@
From 7c59e1b0f285cd7c7b35fcd71f49c5fd52cf9315 Mon Sep 17 00:00:00 2001
From: Jun Zhao <barryjzhao@tencent.com>
Date: Sun, 12 Jul 2020 13:48:48 +0800
Subject: [PATCH] lavf/srt: fix build fail when used the libsrt 1.4.1
libsrt changed the:
SRTO_SMOOTHER -> SRTO_CONGESTION
SRTO_STRICTENC -> SRTO_ENFORCEDENCRYPTION
and removed the front of deprecated options (SRTO_SMOOTHER/SRTO_STRICTENC)
in the header, it's lead to build fail
fix #8760
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
---
libavformat/libsrt.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index 4de575b37c..4719ce0d4b 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -313,8 +313,12 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
(s->pbkeylen >= 0 && libsrt_setsockopt(h, fd, SRTO_PBKEYLEN, "SRTO_PBKEYLEN", &s->pbkeylen, sizeof(s->pbkeylen)) < 0) ||
(s->passphrase && libsrt_setsockopt(h, fd, SRTO_PASSPHRASE, "SRTO_PASSPHRASE", s->passphrase, strlen(s->passphrase)) < 0) ||
#if SRT_VERSION_VALUE >= 0x010302
+#if SRT_VERSION_VALUE >= 0x010401
+ (s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_ENFORCEDENCRYPTION, "SRTO_ENFORCEDENCRYPTION", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
+#else
/* SRTO_STRICTENC == SRTO_ENFORCEDENCRYPTION (53), but for compatibility, we used SRTO_STRICTENC */
(s->enforced_encryption >= 0 && libsrt_setsockopt(h, fd, SRTO_STRICTENC, "SRTO_STRICTENC", &s->enforced_encryption, sizeof(s->enforced_encryption)) < 0) ||
+#endif
(s->kmrefreshrate >= 0 && libsrt_setsockopt(h, fd, SRTO_KMREFRESHRATE, "SRTO_KMREFRESHRATE", &s->kmrefreshrate, sizeof(s->kmrefreshrate)) < 0) ||
(s->kmpreannounce >= 0 && libsrt_setsockopt(h, fd, SRTO_KMPREANNOUNCE, "SRTO_KMPREANNOUNCE", &s->kmpreannounce, sizeof(s->kmpreannounce)) < 0) ||
#endif
@@ -333,7 +337,11 @@ static int libsrt_set_options_pre(URLContext *h, int fd)
(s->lossmaxttl >= 0 && libsrt_setsockopt(h, fd, SRTO_LOSSMAXTTL, "SRTO_LOSSMAXTTL", &s->lossmaxttl, sizeof(s->lossmaxttl)) < 0) ||
(s->minversion >= 0 && libsrt_setsockopt(h, fd, SRTO_MINVERSION, "SRTO_MINVERSION", &s->minversion, sizeof(s->minversion)) < 0) ||
(s->streamid && libsrt_setsockopt(h, fd, SRTO_STREAMID, "SRTO_STREAMID", s->streamid, strlen(s->streamid)) < 0) ||
+#if SRT_VERSION_VALUE >= 0x010401
+ (s->smoother && libsrt_setsockopt(h, fd, SRTO_CONGESTION, "SRTO_CONGESTION", s->smoother, strlen(s->smoother)) < 0) ||
+#else
(s->smoother && libsrt_setsockopt(h, fd, SRTO_SMOOTHER, "SRTO_SMOOTHER", s->smoother, strlen(s->smoother)) < 0) ||
+#endif
(s->messageapi >= 0 && libsrt_setsockopt(h, fd, SRTO_MESSAGEAPI, "SRTO_MESSAGEAPI", &s->messageapi, sizeof(s->messageapi)) < 0) ||
(s->payload_size >= 0 && libsrt_setsockopt(h, fd, SRTO_PAYLOADSIZE, "SRTO_PAYLOADSIZE", &s->payload_size, sizeof(s->payload_size)) < 0) ||
((h->flags & AVIO_FLAG_WRITE) && libsrt_setsockopt(h, fd, SRTO_SENDER, "SRTO_SENDER", &yes, sizeof(yes)) < 0)) {
--
2.20.1

View File

@@ -6,8 +6,8 @@
_realname=ffmpeg
pkgbase="mingw-w64-${_realname}"
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=4.3.1
pkgrel=8
pkgver=4.3.2
pkgrel=1
pkgdesc="Complete and free Internet live audio and video broadcasting solution (mingw-w64)"
arch=('any')
url="https://ffmpeg.org/"
@@ -53,29 +53,16 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-dlfcn"
"${MINGW_PACKAGE_PREFIX}-pkg-config"
"${MINGW_PACKAGE_PREFIX}-nasm")
source=(https://ffmpeg.org/releases/${_realname}-${pkgver}.tar.xz{,.asc}
# From upstream:
"0001-avutil-x86inc-fix-warnings-when-assembling-with-Nasm-2-15.patch"
"0002-x86-h264_deblock-fix-warning-about-trailing-empty-parameter.patch"
"0003-x86-vf_blend-fix-warnings-about-trailing-empty-parameters.patch"
# MSYS2 patches:
"0004-fix-srt.patch"
"0005-Win32-Add-path-relocation-to-frei0r-plugins-search.patch")
validpgpkeys=('FCF986EA15E6E293A5644F10B4322F04D67658D8')
sha256sums=('ad009240d46e307b4e03a213a0f49c11b650e445b1f8be0dda2a9212b34d2ffb'
sha256sums=('46e4e64f1dd0233cbc0934b9f1c0da676008cad34725113fb7f802cfa84ccddb'
'SKIP'
'0dd56f6d4b206e1a689d3d656b60365138e29408b6ad02f76500764f89dde1b1'
'6c20c2f7ab585e604efdaf2704bceb8a4f56a2722453ad818321b01f87293d99'
'e9300ea624e3c10801607a1bb57fe0e2126cb42b48770828bd4421b7b58d6b96'
'418a454c5d27f138bd8c56ca3c1991bdce1edee3a7fe5e1f8bc69a15abb99a89'
'b32cad81226d8a72d99fc9cb509acb6a0533378bd351da65391945d7e0e81746')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
rm -f libavfilter/pathtools.{c,h} || true
patch -p1 -i "${srcdir}/0001-avutil-x86inc-fix-warnings-when-assembling-with-Nasm-2-15.patch"
patch -p1 -i "${srcdir}/0002-x86-h264_deblock-fix-warning-about-trailing-empty-parameter.patch"
patch -p1 -i "${srcdir}/0003-x86-vf_blend-fix-warnings-about-trailing-empty-parameters.patch"
patch -p1 -i "${srcdir}/0004-fix-srt.patch"
patch -p1 -i "${srcdir}/0005-Win32-Add-path-relocation-to-frei0r-plugins-search.patch"
}