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