extra/ffmpeg4.4 to 4.4.4-2

This commit is contained in:
Kevin Mihelich 2023-10-06 17:50:09 +00:00
parent 6964d887bd
commit 639307ceab
3 changed files with 167 additions and 3 deletions

86
extra/ffmpeg4.4/.SRCINFO Normal file
View file

@ -0,0 +1,86 @@
pkgbase = ffmpeg4.4
pkgdesc = Complete solution to record, convert and stream audio and video
pkgver = 4.4.4
pkgrel = 2
url = https://ffmpeg.org/
arch = x86_64
license = GPL3
makedepends = amf-headers
makedepends = avisynthplus
makedepends = clang
makedepends = ffnvcodec-headers
makedepends = git
makedepends = ladspa
makedepends = nasm
depends = alsa-lib
depends = aom
depends = bzip2
depends = fontconfig
depends = fribidi
depends = gmp
depends = gnutls
depends = gsm
depends = jack
depends = lame
depends = libass.so
depends = libavc1394
depends = libbluray.so
depends = libdav1d.so
depends = libdrm
depends = libfreetype.so
depends = libiec61883
depends = libmfx
depends = libmodplug
depends = libpulse
depends = librav1e.so
depends = libraw1394
depends = librsvg-2.so
depends = libsoxr
depends = libssh
depends = libtheora
depends = libva.so
depends = libva-drm.so
depends = libva-x11.so
depends = libvdpau
depends = libvidstab.so
depends = libvorbisenc.so
depends = libvorbis.so
depends = libvpx.so
depends = libwebp
depends = libx11
depends = libx264.so
depends = libx265.so
depends = libxcb
depends = libxext
depends = libxml2
depends = libxv
depends = libxvidcore.so
depends = libzimg.so
depends = opencore-amr
depends = openjpeg2
depends = opus
depends = sdl2
depends = speex
depends = srt
depends = svt-av1
depends = v4l-utils
depends = xz
depends = zlib
optdepends = avisynthplus: AviSynthPlus support
optdepends = intel-media-sdk: Intel QuickSync support
optdepends = ladspa: LADSPA filters
optdepends = nvidia-utils: Nvidia NVDEC/NVENC support
provides = libavcodec.so
provides = libavdevice.so
provides = libavfilter.so
provides = libavformat.so
provides = libavutil.so
provides = libpostproc.so
provides = libswresample.so
provides = libswscale.so
source = git+https://git.ffmpeg.org/ffmpeg.git#tag=71fb6132637a2a430375c24afc381fff8b854fe7
source = binutils-2.41.patch
b2sums = SKIP
b2sums = b656a17dd3996c6871d322ba1fcf25410ed580d9600348cda087d705660601d06070492300d31c12d54b0e9914cb92bb9d997e51462c0577e1a90539bf0b76ee
pkgname = ffmpeg4.4

View file

@ -16,7 +16,7 @@
pkgname=ffmpeg4.4 pkgname=ffmpeg4.4
pkgver=4.4.4 pkgver=4.4.4
pkgrel=1 pkgrel=2
pkgdesc='Complete solution to record, convert and stream audio and video' pkgdesc='Complete solution to record, convert and stream audio and video'
arch=(x86_64) arch=(x86_64)
url=https://ffmpeg.org/ url=https://ffmpeg.org/
@ -96,8 +96,10 @@ provides=(
libswscale.so libswscale.so
) )
_tag=71fb6132637a2a430375c24afc381fff8b854fe7 _tag=71fb6132637a2a430375c24afc381fff8b854fe7
source=(git+https://git.ffmpeg.org/ffmpeg.git#tag=${_tag}) source=(git+https://git.ffmpeg.org/ffmpeg.git#tag=${_tag}
b2sums=('SKIP') binutils-2.41.patch)
b2sums=('SKIP'
'b656a17dd3996c6871d322ba1fcf25410ed580d9600348cda087d705660601d06070492300d31c12d54b0e9914cb92bb9d997e51462c0577e1a90539bf0b76ee')
pkgver() { pkgver() {
cd ffmpeg cd ffmpeg
@ -108,6 +110,7 @@ prepare() {
cd ffmpeg cd ffmpeg
git cherry-pick -n 988f2e9eb063db7c1a678729f58aab6eba59a55b # fix nvenc on older gpus git cherry-pick -n 988f2e9eb063db7c1a678729f58aab6eba59a55b # fix nvenc on older gpus
git cherry-pick -n 031f1561cd286596cdb374da32f8aa816ce3b135 # remove compressed_ten_bit_format git cherry-pick -n 031f1561cd286596cdb374da32f8aa816ce3b135 # remove compressed_ten_bit_format
patch -p1 -i ../binutils-2.41.patch # Fix build with binutils 2.41
} }
build() { build() {

View file

@ -0,0 +1,75 @@
From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
Date: Sun, 16 Jul 2023 18:18:02 +0300
Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
instructions within inline assembly
Fixes assembling with binutil as >= 2.41
Signed-off-by: James Almer <jamrial@gmail.com>
---
libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
index 6298f5ed19..ca7e2dffc1 100644
--- a/libavcodec/x86/mathops.h
+++ b/libavcodec/x86/mathops.h
@@ -35,12 +35,20 @@
static av_always_inline av_const int MULL(int a, int b, unsigned shift)
{
int rt, dummy;
+ if (__builtin_constant_p(shift))
__asm__ (
"imull %3 \n\t"
"shrdl %4, %%edx, %%eax \n\t"
:"=a"(rt), "=d"(dummy)
- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
+ :"a"(a), "rm"(b), "i"(shift & 0x1F)
);
+ else
+ __asm__ (
+ "imull %3 \n\t"
+ "shrdl %4, %%edx, %%eax \n\t"
+ :"=a"(rt), "=d"(dummy)
+ :"a"(a), "rm"(b), "c"((uint8_t)shift)
+ );
return rt;
}
@@ -113,19 +121,31 @@ __asm__ volatile(\
// avoid +32 for shift optimization (gcc should do that ...)
#define NEG_SSR32 NEG_SSR32
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
+ if (__builtin_constant_p(s))
__asm__ ("sarl %1, %0\n\t"
: "+r" (a)
- : "ic" ((uint8_t)(-s))
+ : "i" (-s & 0x1F)
);
+ else
+ __asm__ ("sarl %1, %0\n\t"
+ : "+r" (a)
+ : "c" ((uint8_t)(-s))
+ );
return a;
}
#define NEG_USR32 NEG_USR32
static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
+ if (__builtin_constant_p(s))
__asm__ ("shrl %1, %0\n\t"
: "+r" (a)
- : "ic" ((uint8_t)(-s))
+ : "i" (-s & 0x1F)
);
+ else
+ __asm__ ("shrl %1, %0\n\t"
+ : "+r" (a)
+ : "c" ((uint8_t)(-s))
+ );
return a;
}
--
2.30.2