avidemux: update to 2.8.1

This commit is contained in:
zlice 2023-03-22 20:01:45 -04:00 committed by classabbyamp
parent d3845b26c0
commit 306cc76e2c
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
3 changed files with 117 additions and 7 deletions

View File

@ -0,0 +1,73 @@
From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?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 6298f5ed1983b..ca7e2dffc1076 100644
--- libavcodec/x86/mathops.h
+++ 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;
}

View File

@ -0,0 +1,26 @@
--- a/avidemux_plugins/ADM_muxers/muxerMp4/muxerMP4Config.cpp
+++ b/avidemux_plugins/ADM_muxers/muxerMp4/muxerMP4Config.cpp
@@ -34,17 +34,17 @@
bool force = muxerConfig.forceAspectRatio;
#ifndef MUXER_IS_MOV
- diaMenuEntry format[]={{MP4_MUXER_MP4,"MP4"},{MP4_MUXER_PSP,"PSP"},NULL};
+ diaMenuEntry format[]={{MP4_MUXER_MP4,"MP4"},{MP4_MUXER_PSP,"PSP"},0};
diaElemMenu menuFormat(&fmt,QT_TRANSLATE_NOOP("mp4muxer","Muxing Format"),2,format,"");
diaMenuEntry streamOpt[]={
- {MP4_MUXER_OPT_NONE,QT_TRANSLATE_NOOP("mp4muxer","No optimization"),NULL},
- {MP4_MUXER_OPT_FASTSTART,QT_TRANSLATE_NOOP("mp4muxer","Move index to the beginning of the file"),NULL},
- {MP4_MUXER_OPT_FRAGMENT,QT_TRANSLATE_NOOP("mp4muxer","Use fragmentation"),NULL}
+ {MP4_MUXER_OPT_NONE,QT_TRANSLATE_NOOP("mp4muxer","No optimization"),0},
+ {MP4_MUXER_OPT_FASTSTART,QT_TRANSLATE_NOOP("mp4muxer","Move index to the beginning of the file"),0},
+ {MP4_MUXER_OPT_FRAGMENT,QT_TRANSLATE_NOOP("mp4muxer","Use fragmentation"),0}
};
#else
diaMenuEntry streamOpt[]={
- {MP4_MUXER_OPT_NONE,QT_TRANSLATE_NOOP("mp4muxer","No optimization"),NULL},
- {MP4_MUXER_OPT_FASTSTART,QT_TRANSLATE_NOOP("mp4muxer","Move index to the beginning of the file"),NULL}
+ {MP4_MUXER_OPT_NONE,QT_TRANSLATE_NOOP("mp4muxer","No optimization"),0},
+ {MP4_MUXER_OPT_FASTSTART,QT_TRANSLATE_NOOP("mp4muxer","Move index to the beginning of the file"),0}
};
#endif

View File

@ -1,14 +1,14 @@
# Template file for 'avidemux' # Template file for 'avidemux'
pkgname=avidemux pkgname=avidemux
version=2.8.0 version=2.8.1
revision=2 revision=1
# Can't be compiled for aarch64, arm* or mips* # Can't be compiled for aarch64, arm* or mips*
archs="x86_64* i686*" archs="x86_64* i686*"
hostmakedepends="cmake pkg-config qt5-host-tools qt5-devel tar yasm" hostmakedepends="cmake pkg-config qt5-host-tools qt5-devel tar yasm"
makedepends="alsa-lib-devel faac-devel faad2-devel gettext-devel jack-devel glu-devel makedepends="alsa-lib-devel faac-devel faad2-devel gettext-devel jack-devel glu-devel
lame-devel libass-devel libdca-devel libvorbis-devel libXv-devel lame-devel libass-devel libdca-devel libvorbis-devel libXv-devel
vapoursynth-devel libmp4v2-devel sqlite-devel libva-devel libvdpau-devel vapoursynth-devel libmp4v2-devel sqlite-devel libva-devel libvdpau-devel
qt5-multimedia-devel qt5-script-devel qt5-tools-devel ffmpeg-devel qt5-multimedia-devel qt5-script-devel qt5-tools-devel ffmpeg6-devel
liba52-devel libmad-devel x264-devel x265-devel xvidcore-devel" liba52-devel libmad-devel x264-devel x265-devel xvidcore-devel"
short_desc="Video editing and processing application" short_desc="Video editing and processing application"
maintainer="Orphaned <orphan@voidlinux.org>" maintainer="Orphaned <orphan@voidlinux.org>"
@ -16,23 +16,34 @@ license="GPL-2.0-or-later"
homepage="http://avidemux.sourceforge.net/" homepage="http://avidemux.sourceforge.net/"
changelog="http://avidemux.sourceforge.net/news.html" changelog="http://avidemux.sourceforge.net/news.html"
distfiles="${SOURCEFORGE_SITE}/avidemux/avidemux/${version}/${pkgname}_${version}.tar.gz" distfiles="${SOURCEFORGE_SITE}/avidemux/avidemux/${version}/${pkgname}_${version}.tar.gz"
checksum=d1ec6f5277e51228ecf0ee1ca89fae24c591f520f87ce96fabec8818d04de33b checksum=77d9bdca8683ce57c192b69d207cfab7cf92a7759ce0f63fa37b5c8e42ad3da2
# On i686 the build fails with "error: 'asm' operand has impossible constraints" # On i686 the build fails with "error: 'asm' operand has impossible constraints"
# due to not enough available CPU registers. Using the -fno-PIC flag frees up # due to not enough available CPU registers. Using the -fno-PIC flag frees up
# one additional register for the compiler/assembler to use. # one additional register for the compiler/assembler to use.
case "${XBPS_TARGET_MACHINE}" in case "${XBPS_TARGET_MACHINE}" in
i686*) CFLAGS="-fno-PIC";; i686*) CFLAGS="-fno-PIC" ;;
esac esac
# uses parts of an internal ffmpeg4.4.2 tar
post_extract() {
cp ${FILESDIR}/*patch ${wrksrc}/avidemux_core/ffmpeg_package/patches/
}
# soundtouch fails to use 128bit xmm registers on i686
# deadbeef has a similar problem
do_configure() { do_configure() {
case "${XBPS_TARGET_MACHINE}" in
i686*)
vsed '1iADD_DEFINITIONS(-DSOUNDTOUCH_DISABLE_X86_OPTIMIZATIONS=1)' \
-i avidemux/common/ADM_audioFilter/src/CMakeLists.txt ;;
esac
MAKEFLAGS=${makejobs} \ MAKEFLAGS=${makejobs} \
bash bootStrap.bash \ bash bootStrap.bash \
--with-system-libass \ --with-system-libass \
--with-system-liba52 \ --with-system-liba52 \
--with-system-libmad \ --with-system-libmad \
--with-system-libmp4v2 \ --with-system-libmp4v2
${cross_compile}
} }
do_install() { do_install() {