File arm.patch of Package x265 (Revision 79b9c710ad75e2b27580ce84933ea3c6)
Currently displaying revision 79b9c710ad75e2b27580ce84933ea3c6 , Show latest
66
1
diff -urN a/source/CMakeLists.txt b/source/CMakeLists.txt
2
--- a/source/CMakeLists.txt 2014-04-03 00:00:44.000000000 -0600
3
+++ b/source/CMakeLists.txt 2014-04-10 07:32:36.022010974 -0600
4
5
set(X64 1)
6
add_definitions(-DX86_64=1)
7
endif()
8
+elseif(${SYSPROC} MATCHES "armv5.*")
9
+ message(STATUS "Detected ARMV5 system processor")
10
+ set(ARMV5 1)
11
+ add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=0 -DHAVE_NEON=0)
12
elseif(${SYSPROC} STREQUAL "armv6l")
13
- message(STATUS "Detected ARM system processor")
14
- set(ARM 1)
15
- add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1)
16
+ message(STATUS "Detected ARMV6 system processor")
17
+ set(ARMV6 1)
18
+ add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1 -DHAVE_NEON=0)
19
+elseif(${SYSPROC} STREQUAL "armv7l")
20
+ message(STATUS "Detected ARMV7 system processor")
21
+ set(ARMV7 1)
22
+ add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1 -DHAVE_NEON=0)
23
else()
24
message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown")
25
message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}")
26
27
if(X86 AND NOT X64)
28
add_definitions(-march=i686)
29
endif()
30
- if(ARM)
31
- add_definitions(-march=armv6 -mfloat-abi=hard -mfpu=vfp)
32
+ if(ARMV7)
33
+ add_definitions(-fPIC)
34
endif()
35
endif(GCC)
36
37
diff -urN a/source/common/cpu.cpp b/source/common/cpu.cpp
38
--- a/source/common/cpu.cpp 2014-04-03 00:00:44.000000000 -0600
39
+++ b/source/common/cpu.cpp 2014-04-10 07:28:51.937129997 -0600
40
41
#include <machine/cpu.h>
42
#endif
43
44
-#if X265_ARCH_ARM && !defined(HAVE_NEON)
45
+#if X265_ARCH_ARM && (!defined(HAVE_NEON) || HAVE_NEON==0)
46
#include <signal.h>
47
#include <setjmp.h>
48
static sigjmp_buf jmpbuf;
49
50
}
51
52
canjump = 1;
53
- x265_cpu_neon_test();
54
canjump = 0;
55
signal(SIGILL, oldsig);
56
#endif // if !HAVE_NEON
57
58
// which may result in incorrect detection and the counters stuck enabled.
59
// right now Apple does not seem to support performance counters for this test
60
#ifndef __MACH__
61
- flags |= x265_cpu_fast_neon_mrc_test() ? X265_CPU_FAST_NEON_MRC : 0;
62
+ //flags |= x265_cpu_fast_neon_mrc_test() ? X265_CPU_FAST_NEON_MRC : 0;
63
#endif
64
// TODO: write dual issue test? currently it's A8 (dual issue) vs. A9 (fast mrc)
65
#endif // if HAVE_ARMV6
66