1 --- a/source/CMakeLists.txt
2 +++ b/source/CMakeLists.txt
3 @@ -49,9 +49,13 @@ if("${SYSPROC}" STREQUAL "" OR X86MATCH
4 message(STATUS "Detected x86 system processor")
6 elseif(${SYSPROC} STREQUAL "armv6l")
7 - message(STATUS "Detected ARM target processor")
9 + message(STATUS "Detected ARMV6 target processor")
11 add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1)
12 +elseif(${SYSPROC} STREQUAL "armv7l")
13 + message(STATUS "Detected ARMV7 target processor")
15 + add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1 -DHAVE_NEON=1)
17 message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown")
18 message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}")
19 @@ -65,11 +69,11 @@ if(UNIX)
23 -if(X64 AND NOT WIN32)
24 +if(X64 OR ARMV7 AND NOT WIN32)
25 option(ENABLE_PIC "Enable Position Independent Code" ON)
27 option(ENABLE_PIC "Enable Position Independent Code" OFF)
28 -endif(X64 AND NOT WIN32)
29 +endif(X64 OR ARMV7 AND NOT WIN32)
32 if(CMAKE_GENERATOR STREQUAL "Xcode")
33 @@ -135,9 +139,12 @@ if(GCC)
35 add_definitions(-march=i686)
39 add_definitions(-march=armv6 -mfloat-abi=hard -mfpu=vfp)
42 + add_definitions(-march=armv7 -mfloat-abi=hard -mfpu=neon)
44 check_cxx_compiler_flag(-Wno-narrowing CC_HAS_NO_NARROWING)
45 check_cxx_compiler_flag(-Wno-array-bounds CC_HAS_NO_ARRAY_BOUNDS)
46 if (CC_HAS_NO_ARRAY_BOUNDS)
47 --- a/source/common/cpu.cpp
48 +++ b/source/common/cpu.cpp
49 @@ -356,7 +356,7 @@ uint32_t cpu_detect(void)
50 // which may result in incorrect detection and the counters stuck enabled.
51 // right now Apple does not seem to support performance counters for this test
53 - flags |= x265_cpu_fast_neon_mrc_test() ? X265_CPU_FAST_NEON_MRC : 0;
54 + //flags |= x265_cpu_fast_neon_mrc_test() ? X265_CPU_FAST_NEON_MRC : 0;
56 // TODO: write dual issue test? currently it's A8 (dual issue) vs. A9 (fast mrc)
57 #endif // if HAVE_ARMV6