forked from PyAV-Org/pyav-ffmpeg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 767c280.
- Loading branch information
Showing
3 changed files
with
270 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,268 @@ | ||
diff -urN x265_3.5.orig/source/CMakeLists.txt x265_3.5/source/CMakeLists.txt | ||
--- x265_3.5.orig/source/CMakeLists.txt 2021-03-16 13:53:00.000000000 +0100 | ||
+++ x265_3.5/source/CMakeLists.txt 2022-02-22 10:13:55.615384363 +0100 | ||
@@ -40,7 +40,7 @@ | ||
# System architecture detection | ||
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC) | ||
set(X86_ALIASES x86 i386 i686 x86_64 amd64) | ||
-set(ARM_ALIASES armv6l armv7l aarch64) | ||
+set(ARM_ALIASES armv6l armv7l aarch64 arm64) | ||
list(FIND X86_ALIASES "${SYSPROC}" X86MATCH) | ||
list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH) | ||
set(POWER_ALIASES ppc64 ppc64le) | ||
@@ -247,7 +247,11 @@ | ||
message(STATUS "cross compile arm") | ||
elseif(ARM) | ||
if(ARM64) | ||
- set(ARM_ARGS -fPIC) | ||
+ if(APPLE) | ||
+ set(ARM_ARGS -arch arm64 -fPIC) | ||
+ else() | ||
+ set(ARM_ARGS -fPIC) | ||
+ endif() | ||
add_definitions(-DHAVE_NEON) | ||
else() | ||
find_package(Neon) | ||
diff -urN x265_3.5.orig/source/common/aarch64/asm.S x265_3.5/source/common/aarch64/asm.S | ||
--- x265_3.5.orig/source/common/aarch64/asm.S 2021-03-16 13:53:00.000000000 +0100 | ||
+++ x265_3.5/source/common/aarch64/asm.S 2022-02-22 10:13:49.991449401 +0100 | ||
@@ -23,32 +23,56 @@ | ||
|
||
.arch armv8-a | ||
|
||
+#ifdef __APPLE__ | ||
+#define PREFIX 1 | ||
+#endif | ||
+ | ||
#ifdef PREFIX | ||
#define EXTERN_ASM _ | ||
+#define HAVE_AS_FUNC 0 | ||
#else | ||
#define EXTERN_ASM | ||
+#define HAVE_AS_FUNC 1 | ||
#endif | ||
|
||
#ifdef __ELF__ | ||
#define ELF | ||
#else | ||
+#ifdef PREFIX | ||
+#define ELF # | ||
+#else | ||
#define ELF @ | ||
#endif | ||
- | ||
-#define HAVE_AS_FUNC 1 | ||
+#endif | ||
|
||
#if HAVE_AS_FUNC | ||
#define FUNC | ||
#else | ||
+#ifdef PREFIX | ||
+#define FUNC # | ||
+#else | ||
#define FUNC @ | ||
#endif | ||
+#endif | ||
+ | ||
+#ifdef __APPLE__ | ||
+.macro endfunc | ||
+ELF .size \name, . - \name | ||
+FUNC .endfunc | ||
+.endm | ||
+#endif | ||
|
||
.macro function name, export=1 | ||
+#ifdef __APPLE__ | ||
+ .global \name | ||
+ endfunc | ||
+#else | ||
.macro endfunc | ||
ELF .size \name, . - \name | ||
FUNC .endfunc | ||
.purgem endfunc | ||
.endm | ||
+#endif | ||
.align 2 | ||
.if \export == 1 | ||
.global EXTERN_ASM\name | ||
diff -urN x265_3.5.orig/source/common/aarch64/ipfilter8.S x265_3.5/source/common/aarch64/ipfilter8.S | ||
--- x265_3.5.orig/source/common/aarch64/ipfilter8.S 2021-03-16 13:53:00.000000000 +0100 | ||
+++ x265_3.5/source/common/aarch64/ipfilter8.S 2022-02-22 10:13:49.991449401 +0100 | ||
@@ -23,7 +23,11 @@ | ||
|
||
#include "asm.S" | ||
|
||
+#ifdef __APPLE__ | ||
+.section __RODATA, __rodata | ||
+#else | ||
.section .rodata | ||
+#endif | ||
|
||
.align 4 | ||
|
||
@@ -197,10 +201,10 @@ | ||
b.eq 15f | ||
b 7f | ||
14: | ||
- HPS_FILTER_4 \a \b \filterhps | ||
+ HPS_FILTER_4 \a, \b, \filterhps | ||
b 10f | ||
15: | ||
- HPS_FILTER_12 \a \b \filterhps | ||
+ HPS_FILTER_12 \a, \b, \filterhps | ||
b 10f | ||
7: | ||
cmp w5, #0 | ||
@@ -371,44 +375,44 @@ | ||
cmp w4, #3 | ||
b.eq 3f | ||
0: | ||
- HPS_FILTER \w \h qpel_filter_0_32b | ||
+ HPS_FILTER \w, \h, qpel_filter_0_32b | ||
b 5f | ||
1: | ||
- HPS_FILTER \w \h qpel_filter_1_32b | ||
+ HPS_FILTER \w, \h, qpel_filter_1_32b | ||
b 5f | ||
2: | ||
- HPS_FILTER \w \h qpel_filter_2_32b | ||
+ HPS_FILTER \w, \h, qpel_filter_2_32b | ||
b 5f | ||
3: | ||
- HPS_FILTER \w \h qpel_filter_3_32b | ||
+ HPS_FILTER \w, \h, qpel_filter_3_32b | ||
b 5f | ||
5: | ||
ret | ||
endfunc | ||
.endm | ||
|
||
-LUMA_HPS 4 4 | ||
-LUMA_HPS 4 8 | ||
-LUMA_HPS 4 16 | ||
-LUMA_HPS 8 4 | ||
-LUMA_HPS 8 8 | ||
-LUMA_HPS 8 16 | ||
-LUMA_HPS 8 32 | ||
-LUMA_HPS 12 16 | ||
-LUMA_HPS 16 4 | ||
-LUMA_HPS 16 8 | ||
-LUMA_HPS 16 12 | ||
-LUMA_HPS 16 16 | ||
-LUMA_HPS 16 32 | ||
-LUMA_HPS 16 64 | ||
-LUMA_HPS 24 32 | ||
-LUMA_HPS 32 8 | ||
-LUMA_HPS 32 16 | ||
-LUMA_HPS 32 24 | ||
-LUMA_HPS 32 32 | ||
-LUMA_HPS 32 64 | ||
-LUMA_HPS 48 64 | ||
-LUMA_HPS 64 16 | ||
-LUMA_HPS 64 32 | ||
-LUMA_HPS 64 48 | ||
-LUMA_HPS 64 64 | ||
+LUMA_HPS 4,4 | ||
+LUMA_HPS 4,8 | ||
+LUMA_HPS 4,16 | ||
+LUMA_HPS 8,4 | ||
+LUMA_HPS 8,8 | ||
+LUMA_HPS 8,16 | ||
+LUMA_HPS 8,32 | ||
+LUMA_HPS 12,16 | ||
+LUMA_HPS 16,4 | ||
+LUMA_HPS 16,8 | ||
+LUMA_HPS 16,12 | ||
+LUMA_HPS 16,16 | ||
+LUMA_HPS 16,32 | ||
+LUMA_HPS 16,64 | ||
+LUMA_HPS 24,32 | ||
+LUMA_HPS 32,8 | ||
+LUMA_HPS 32,16 | ||
+LUMA_HPS 32,24 | ||
+LUMA_HPS 32,32 | ||
+LUMA_HPS 32,64 | ||
+LUMA_HPS 48,64 | ||
+LUMA_HPS 64,16 | ||
+LUMA_HPS 64,32 | ||
+LUMA_HPS 64,48 | ||
+LUMA_HPS 64,64 | ||
diff -urN x265_3.5.orig/source/common/aarch64/mc-a.S x265_3.5/source/common/aarch64/mc-a.S | ||
--- x265_3.5.orig/source/common/aarch64/mc-a.S 2021-03-16 13:53:00.000000000 +0100 | ||
+++ x265_3.5/source/common/aarch64/mc-a.S 2022-02-22 10:13:49.991449401 +0100 | ||
@@ -23,7 +23,11 @@ | ||
|
||
#include "asm.S" | ||
|
||
+#ifdef __APPLE__ | ||
+.section __RODATA,__rodata | ||
+#else | ||
.section .rodata | ||
+#endif | ||
|
||
.align 4 | ||
|
||
diff -urN x265_3.5.orig/source/common/aarch64/pixel-util.S x265_3.5/source/common/aarch64/pixel-util.S | ||
--- x265_3.5.orig/source/common/aarch64/pixel-util.S 2021-03-16 13:53:00.000000000 +0100 | ||
+++ x265_3.5/source/common/aarch64/pixel-util.S 2022-02-22 10:13:49.991449401 +0100 | ||
@@ -24,7 +24,11 @@ | ||
|
||
#include "asm.S" | ||
|
||
+#ifdef __APPLE__ | ||
+.section __RODATA,__rodata | ||
+#else | ||
.section .rodata | ||
+#endif | ||
|
||
.align 4 | ||
|
||
diff -urN x265_3.5.orig/source/common/aarch64/sad-a.S x265_3.5/source/common/aarch64/sad-a.S | ||
--- x265_3.5.orig/source/common/aarch64/sad-a.S 2021-03-16 13:53:00.000000000 +0100 | ||
+++ x265_3.5/source/common/aarch64/sad-a.S 2022-02-22 10:13:49.991449401 +0100 | ||
@@ -23,7 +23,11 @@ | ||
|
||
#include "asm.S" | ||
|
||
+#ifdef __APPLE__ | ||
+.section __RODATA,__rodata | ||
+#else | ||
.section .rodata | ||
+#endif | ||
|
||
.align 4 | ||
|
||
@@ -94,12 +98,12 @@ | ||
endfunc | ||
.endm | ||
|
||
-SAD_X_8xN 3 4 | ||
-SAD_X_8xN 3 8 | ||
-SAD_X_8xN 3 16 | ||
-SAD_X_8xN 3 32 | ||
- | ||
-SAD_X_8xN 4 4 | ||
-SAD_X_8xN 4 8 | ||
-SAD_X_8xN 4 16 | ||
-SAD_X_8xN 4 32 | ||
+SAD_X_8xN 3,4 | ||
+SAD_X_8xN 3,8 | ||
+SAD_X_8xN 3,16 | ||
+SAD_X_8xN 3,32 | ||
+ | ||
+SAD_X_8xN 4,4 | ||
+SAD_X_8xN 4,8 | ||
+SAD_X_8xN 4,16 | ||
+SAD_X_8xN 4,32 | ||
diff -urN x265_3.5.orig/source/test/testharness.h x265_3.5/source/test/testharness.h | ||
--- x265_3.5.orig/source/test/testharness.h 2021-03-16 13:53:00.000000000 +0100 | ||
+++ x265_3.5/source/test/testharness.h 2022-02-22 10:13:49.991449401 +0100 | ||
@@ -73,7 +73,7 @@ | ||
#include <x86intrin.h> | ||
#elif ( !defined(__APPLE__) && defined (__GNUC__) && defined(__ARM_NEON__)) | ||
#include <arm_neon.h> | ||
-#elif defined(__GNUC__) && (!defined(__clang__) || __clang_major__ < 4) | ||
+#else | ||
/* fallback for older GCC/MinGW */ | ||
static inline uint32_t __rdtsc(void) | ||
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters