diff options
author | Angelo Geulin | 2023-12-25 16:06:16 +0800 |
---|---|---|
committer | Angelo Geulin | 2023-12-25 16:06:16 +0800 |
commit | d734c4a7d5d433535dcde7cb5a980d8a9cdce25c (patch) | |
tree | db6d4dedf908af872d2e4e58bbc5293312139beb | |
parent | 716330a9d6252b2b17b1ca8729f455366c040344 (diff) | |
download | aur-mplayer-vaapi.tar.gz |
fix: assembling with binutil >= v2.41
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | ffmpeg-clip-constants-used-with-shift-instructions-within-inline-assembly.patch | 76 |
3 files changed, 87 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = mplayer-vaapi pkgdesc = A movie player, compiled with vaapi support pkgver = 36265 - pkgrel = 19 + pkgrel = 20 url = http://gitorious.org/vaapi/mplayer install = mplayer-vaapi.install arch = i686 @@ -68,6 +68,7 @@ pkgbase = mplayer-vaapi source = include-samba-4.0.patch source = ffmpeg-2.8.1-libvpxenc-remove-some-unused-ctrl-id-mappings.patch source = ffmpeg-?-libx264-fix-compilation-with-x264-builds-ge-153.patch + source = ffmpeg-clip-constants-used-with-shift-instructions-within-inline-assembly.patch validpgpkeys = 86CFFCA918CF3AF47147588051E8B148A9999C34 sha256sums = 5747c28c30c15d1000fb655a8abaa4b22483746d0e82775b27466948ae0c549a sha256sums = SKIP @@ -77,6 +78,6 @@ pkgbase = mplayer-vaapi sha256sums = 7a91109a107ac45c585653bc76459ca3ddc56329fb16260d14e7571d6c94eb08 sha256sums = 277994aca5a6e40c1a90750859828817e0646bfb28142fdb34d5f9d3196c3f7a sha256sums = ab52cbbf93ec33beeed345d69540e24d5aa4db129d97cbe1926dc77bea786d1e + sha256sums = fec03e133521486ca258ae34ddf093eb6aab23f848c4332c367aadbfeaefda04 pkgname = mplayer-vaapi - @@ -6,7 +6,7 @@ pkgname=mplayer-vaapi pkgver=36265 -pkgrel=19 +pkgrel=20 pkgdesc="A movie player, compiled with vaapi support" arch=('i686' 'x86_64') url="http://gitorious.org/vaapi/mplayer" @@ -29,7 +29,8 @@ source=(https://github.com/ryshglene/mplayer-vaapi/releases/download/$pkgver/$pk subreader-fix-srt-parsing.patch include-samba-4.0.patch ffmpeg-2.8.1-libvpxenc-remove-some-unused-ctrl-id-mappings.patch - ffmpeg-?-libx264-fix-compilation-with-x264-builds-ge-153.patch) + ffmpeg-?-libx264-fix-compilation-with-x264-builds-ge-153.patch + ffmpeg-clip-constants-used-with-shift-instructions-within-inline-assembly.patch) options=('!buildflags' '!emptydirs') install=mplayer-vaapi.install sha256sums=('5747c28c30c15d1000fb655a8abaa4b22483746d0e82775b27466948ae0c549a' @@ -39,7 +40,8 @@ sha256sums=('5747c28c30c15d1000fb655a8abaa4b22483746d0e82775b27466948ae0c549a' '8b6cd325d89ff8bce3662c6aaa9b61b8e6163c6574e09b575426a1eed02b8ad3' '7a91109a107ac45c585653bc76459ca3ddc56329fb16260d14e7571d6c94eb08' '277994aca5a6e40c1a90750859828817e0646bfb28142fdb34d5f9d3196c3f7a' - 'ab52cbbf93ec33beeed345d69540e24d5aa4db129d97cbe1926dc77bea786d1e') + 'ab52cbbf93ec33beeed345d69540e24d5aa4db129d97cbe1926dc77bea786d1e' + 'fec03e133521486ca258ae34ddf093eb6aab23f848c4332c367aadbfeaefda04') validpgpkeys=('86CFFCA918CF3AF47147588051E8B148A9999C34') @@ -60,6 +62,9 @@ prepare() { # https://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=2a111c99a60fdf4fe5eea2b073901630190c6c93 patch -d ffmpeg -Np0 -i "$srcdir/ffmpeg-?-libx264-fix-compilation-with-x264-builds-ge-153.patch" + + # https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/effadce6c756247ea8bae32dc13bb3e6f464f0eb + patch -d ffmpeg -Np1 -i "$srcdir/ffmpeg-clip-constants-used-with-shift-instructions-within-inline-assembly.patch" } build() { diff --git a/ffmpeg-clip-constants-used-with-shift-instructions-within-inline-assembly.patch b/ffmpeg-clip-constants-used-with-shift-instructions-within-inline-assembly.patch new file mode 100644 index 000000000000..52a93100299c --- /dev/null +++ b/ffmpeg-clip-constants-used-with-shift-instructions-within-inline-assembly.patch @@ -0,0 +1,76 @@ +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.25.1 + |