forked from kiss-community/repo
ffmpeg: binutils 2.41 patch
This commit is contained in:
parent
af4be20895
commit
5284e0dc72
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
patch -p1 < add-av_stream_get_first_dts-for-chromium.patch
|
patch -p1 < add-av_stream_get_first_dts-for-chromium.patch
|
||||||
|
patch -p1 < binutils-2.41.patch
|
||||||
|
|
||||||
./configure \
|
./configure \
|
||||||
--cc="$CC" \
|
--cc="$CC" \
|
||||||
|
@ -29,7 +30,7 @@ patch -p1 < add-av_stream_get_first_dts-for-chromium.patch
|
||||||
--enable-openssl \
|
--enable-openssl \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
--enable-version3 \
|
--enable-version3 \
|
||||||
--x86asmexe=nasm \
|
--x86asmexe=nasm
|
||||||
|
|
||||||
make
|
make
|
||||||
make DESTDIR="$1" install
|
make DESTDIR="$1" install
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
4879074c357102f85932673044c57c144b0c188ae58edec2a115965536ee340f5e
|
4879074c357102f85932673044c57c144b0c188ae58edec2a115965536ee340f5e
|
||||||
4f16712641b400498753572c0f2d1e30f28fa0df0ea8d0bd2da9d2d74f6613b3ee
|
4f16712641b400498753572c0f2d1e30f28fa0df0ea8d0bd2da9d2d74f6613b3ee
|
||||||
|
4ce8f7ccc5b582575bcf16c399a3cccbd53c8347ae836951ea50c5045f1b8f3232
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
|
||||||
|
index 6298f5e..ca7e2df 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;
|
||||||
|
}
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
https://ffmpeg.org/releases/ffmpeg-6.0.tar.xz
|
https://ffmpeg.org/releases/ffmpeg-6.0.tar.xz
|
||||||
patches/add-av_stream_get_first_dts-for-chromium.patch
|
patches/add-av_stream_get_first_dts-for-chromium.patch
|
||||||
|
patches/binutils-2.41.patch
|
||||||
|
|
Loading…
Reference in New Issue