* update ffmpeg to 2:4.4-2
This commit is contained in:
parent
dd71eb2533
commit
97cd7446f0
@ -6,11 +6,11 @@
|
||||
# Contributor: Paul Mattal <paul@archlinux.org>
|
||||
|
||||
pkgname=ffmpeg
|
||||
pkgver=4.3.2
|
||||
pkgrel=3
|
||||
pkgver=4.4
|
||||
pkgrel=2
|
||||
epoch=2
|
||||
pkgdesc='Complete solution to record, convert and stream audio and video'
|
||||
arch=(x86_64 powerpc64le)
|
||||
arch=(x86_64 powerpc64le powerpc)
|
||||
url=https://ffmpeg.org/
|
||||
license=(GPL3)
|
||||
depends=(
|
||||
@ -35,6 +35,7 @@ depends=(
|
||||
libpulse
|
||||
librav1e.so
|
||||
libraw1394
|
||||
librsvg-2.so
|
||||
libsoxr
|
||||
libssh
|
||||
libtheora
|
||||
@ -72,17 +73,15 @@ makedepends=(
|
||||
ladspa
|
||||
)
|
||||
|
||||
|
||||
optdepends=(
|
||||
'ladspa: LADSPA filters'
|
||||
)
|
||||
if [ "${CFLAGS}" == 'x86_64' ]; then
|
||||
depends+=(libmfx vmaf)
|
||||
makedepends+=(nasm avisynthplus amf-headers ffnvcodec-headers)
|
||||
optdepends+=('avisynthplus: AviSynthPlus support'
|
||||
'intel-media-sdk: Intel QuickSync support'
|
||||
'nvidia-utils: Nvidia NVDEC/NVENC support')
|
||||
fi
|
||||
depends_powerpc=(libatomic_ops)
|
||||
depends_x86_64+=(libmfx vmaf)
|
||||
makedepends_x86_64=(nasm avisynthplus amf-headers ffnvcodec-headers)
|
||||
optdepends_x86_64=('avisynthplus: AviSynthPlus support'
|
||||
'intel-media-sdk: Intel QuickSync support'
|
||||
'nvidia-utils: Nvidia NVDEC/NVENC support')
|
||||
provides=(
|
||||
libavcodec.so
|
||||
libavdevice.so
|
||||
@ -93,14 +92,16 @@ provides=(
|
||||
libswresample.so
|
||||
libswscale.so
|
||||
)
|
||||
_tag=f719f869907764e6412a6af6e178c46e5f915d25
|
||||
_tag=dc91b913b6260e85e1304c74ff7bb3c22a8c9fb1
|
||||
source=(
|
||||
git+https://git.ffmpeg.org/ffmpeg.git#tag=${_tag}
|
||||
vmaf-model-path.patch
|
||||
powerpc-altivec.patch
|
||||
)
|
||||
sha256sums=(
|
||||
SKIP
|
||||
8dff51f84a5f7460f8893f0514812f5d2bd668c3276ef7ab7713c99b71d7bd8d
|
||||
116119f9a9f3207c20b848f7fcfad0f8c01961dc5a2a7b4e82909c9371c0470d
|
||||
)
|
||||
|
||||
pkgver() {
|
||||
@ -120,11 +121,25 @@ build() {
|
||||
cd ffmpeg
|
||||
|
||||
case "${CARCH}" in
|
||||
powerpc64le) EXTRA_CONFIGURE_FLAGS="--enable-vsx --enable-altivec --enable-power8" ;;
|
||||
powerpc) EXTRA_CONFIGURE_FLAGS="--disable-altivec" ;;
|
||||
x86_64) EXTRA_CONFIGURE_FLAGS="--enable-amf --enable-avisynth --enable-libmfx --enable-cuda-llvm --enable-libvmaf --enable-nvdec --enable-nvenc"
|
||||
powerpc64le)
|
||||
EXTRA_CONFIGURE_FLAGS=(
|
||||
--enable-vsx
|
||||
--enable-altivec
|
||||
--enable-power8
|
||||
)
|
||||
;;
|
||||
powerpc)
|
||||
EXTRA_CONFIGURE_FLAGS=(
|
||||
--disable-altivec
|
||||
--extra-libs="-latomic"
|
||||
)
|
||||
patch -Np1 -i ${srcdir}/powerpc-altivec.patch
|
||||
;;
|
||||
x86_64)
|
||||
EXTRA_CONFIGURE_FLAGS='--enable-amf --enable-avisynth --enable-libmfx --enable-cuda-llvm --enable-libvmaf --enable-nvdec --enable-nvenc'
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--disable-debug \
|
||||
@ -171,7 +186,7 @@ build() {
|
||||
--enable-libxvid \
|
||||
--enable-libzimg \
|
||||
--enable-shared \
|
||||
--enable-version3 ${EXTRA_CONFIGURE_FLAGS}
|
||||
--enable-version3 ${EXTRA_CONFIGURE_FLAGS[@]}
|
||||
|
||||
make
|
||||
make tools/qt-faststart
|
||||
|
41
ffmpeg/ffmpeg-9077-altivec.patch
Normal file
41
ffmpeg/ffmpeg-9077-altivec.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From 2687070d9b092d3a354a6963c65197054ddf7a75 Mon Sep 17 00:00:00 2001
|
||||
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
|
||||
Date: Sat, 23 Jan 2021 19:33:13 +0100
|
||||
Subject: [PATCH] lsws/ppc/yuv2rgb: Fix transparency converting from
|
||||
yuv->rgb32.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=utf8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Based on 68363b69 by Reimar Döffinger.
|
||||
|
||||
Fixes ticket #9077.
|
||||
---
|
||||
libswscale/ppc/yuv2rgb_altivec.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c
|
||||
index 58e480dd2c..4f5382e4c1 100644
|
||||
--- libswscale/ppc/yuv2rgb_altivec.c
|
||||
+++ libswscale/ppc/yuv2rgb_altivec.c
|
||||
@@ -425,13 +425,13 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in, \
|
||||
}
|
||||
|
||||
#define out_abgr(a, b, c, ptr) \
|
||||
- vec_mstrgb32(__typeof__(a), ((__typeof__(a)) { 255 }), c, b, a, ptr)
|
||||
+ vec_mstrgb32(__typeof__(a), ((__typeof__(a)) vec_splat((__typeof__(a)){ 255 }, 0)), c, b, a, ptr)
|
||||
#define out_bgra(a, b, c, ptr) \
|
||||
- vec_mstrgb32(__typeof__(a), c, b, a, ((__typeof__(a)) { 255 }), ptr)
|
||||
+ vec_mstrgb32(__typeof__(a), c, b, a, ((__typeof__(a)) vec_splat((__typeof__(a)){ 255 }, 0)), ptr)
|
||||
#define out_rgba(a, b, c, ptr) \
|
||||
- vec_mstrgb32(__typeof__(a), a, b, c, ((__typeof__(a)) { 255 }), ptr)
|
||||
+ vec_mstrgb32(__typeof__(a), a, b, c, ((__typeof__(a)) vec_splat((__typeof__(a)){ 255 }, 0)), ptr)
|
||||
#define out_argb(a, b, c, ptr) \
|
||||
- vec_mstrgb32(__typeof__(a), ((__typeof__(a)) { 255 }), a, b, c, ptr)
|
||||
+ vec_mstrgb32(__typeof__(a), ((__typeof__(a)) vec_splat((__typeof__(a)){ 255 }, 0)), a, b, c, ptr)
|
||||
#define out_rgb24(a, b, c, ptr) vec_mstrgb24(a, b, c, ptr)
|
||||
#define out_bgr24(a, b, c, ptr) vec_mstbgr24(a, b, c, ptr)
|
||||
|
||||
--
|
||||
2.20.1
|
||||
|
60
ffmpeg/powerpc-altivec.patch
Normal file
60
ffmpeg/powerpc-altivec.patch
Normal file
@ -0,0 +1,60 @@
|
||||
revert some altivec specific change on all ppc* except ppc64le*
|
||||
|
||||
q66: "We should also throw in a revert of FFmpeg/FFmpeg@3a557c5 but only
|
||||
conditionally, for ppc* but not ppc64le* (the new code is valid for
|
||||
POWER8 VSX which LE targets as a baseline but not BE)"
|
||||
|
||||
|
||||
This reverts commit 3a557c5d88b7b15b5954ba2743febb055549b536.
|
||||
---
|
||||
libswscale/ppc/yuv2rgb_altivec.c | 24 ++++++++++++++++++++----
|
||||
1 file changed, 20 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c
|
||||
index 536545293d..c1e2852adb 100644
|
||||
--- a/libswscale/ppc/yuv2rgb_altivec.c
|
||||
+++ b/libswscale/ppc/yuv2rgb_altivec.c
|
||||
@@ -305,6 +305,9 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in, \
|
||||
vector signed short R1, G1, B1; \
|
||||
vector unsigned char R, G, B; \
|
||||
\
|
||||
+ const vector unsigned char *y1ivP, *y2ivP, *uivP, *vivP; \
|
||||
+ vector unsigned char align_perm; \
|
||||
+ \
|
||||
vector signed short lCY = c->CY; \
|
||||
vector signed short lOY = c->OY; \
|
||||
vector signed short lCRV = c->CRV; \
|
||||
@@ -335,13 +338,26 @@ static int altivec_ ## name(SwsContext *c, const unsigned char **in, \
|
||||
vec_dstst(oute, (0x02000002 | (((w * 3 + 32) / 32) << 16)), 1); \
|
||||
\
|
||||
for (j = 0; j < w / 16; j++) { \
|
||||
- y0 = vec_xl(0, y1i); \
|
||||
+ y1ivP = (const vector unsigned char *) y1i; \
|
||||
+ y2ivP = (const vector unsigned char *) y2i; \
|
||||
+ uivP = (const vector unsigned char *) ui; \
|
||||
+ vivP = (const vector unsigned char *) vi; \
|
||||
+ \
|
||||
+ align_perm = vec_lvsl(0, y1i); \
|
||||
+ y0 = (vector unsigned char) \
|
||||
+ vec_perm(y1ivP[0], y1ivP[1], align_perm); \
|
||||
\
|
||||
- y1 = vec_xl(0, y2i); \
|
||||
+ align_perm = vec_lvsl(0, y2i); \
|
||||
+ y1 = (vector unsigned char) \
|
||||
+ vec_perm(y2ivP[0], y2ivP[1], align_perm); \
|
||||
\
|
||||
- u = (vector signed char) vec_xl(0, ui); \
|
||||
+ align_perm = vec_lvsl(0, ui); \
|
||||
+ u = (vector signed char) \
|
||||
+ vec_perm(uivP[0], uivP[1], align_perm); \
|
||||
\
|
||||
- v = (vector signed char) vec_xl(0, vi); \
|
||||
+ align_perm = vec_lvsl(0, vi); \
|
||||
+ v = (vector signed char) \
|
||||
+ vec_perm(vivP[0], vivP[1], align_perm); \
|
||||
\
|
||||
u = (vector signed char) \
|
||||
vec_sub(u, \
|
||||
--
|
||||
2.27.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user