Projects
Essentials
x265
arm.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File arm.patch of Package x265 (Revision 41)
Currently displaying revision
41
,
Show latest
Index: x265_3.4/source/CMakeLists.txt =================================================================== --- x265_3.4.orig/source/CMakeLists.txt +++ x265_3.4/source/CMakeLists.txt @@ -64,26 +64,26 @@ elseif(POWERMATCH GREATER "-1") add_definitions(-DPPC64=1) message(STATUS "Detected POWER PPC64 target processor") endif() -elseif(ARMMATCH GREATER "-1") - if(CROSS_COMPILE_ARM) - message(STATUS "Cross compiling for ARM arch") - else() - set(CROSS_COMPILE_ARM 0) - endif() - set(ARM 1) - if("${CMAKE_SIZEOF_VOID_P}" MATCHES 8) - message(STATUS "Detected ARM64 target processor") - set(ARM64 1) - add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=1 -DHAVE_ARMV6=0) - else() - message(STATUS "Detected ARM target processor") - add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=0 -DHAVE_ARMV6=1) - endif() +elseif(${SYSPROC} MATCHES "armv5.*") + message(STATUS "Detected ARMV5 system processor") + set(ARMV5 1) + add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=0 -DHAVE_ARMV6=0 -DHAVE_NEON=0) +elseif(${SYSPROC} STREQUAL "armv6l") + message(STATUS "Detected ARMV6 system processor") + set(ARMV6 1) + add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=0 -DHAVE_ARMV6=1 -DHAVE_NEON=0) +elseif(${SYSPROC} STREQUAL "armv7l") + message(STATUS "Detected ARMV7 system processor") + set(ARMV7 1) + add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=0 -DHAVE_ARMV6=1 -DHAVE_NEON=0) +elseif(${SYSPROC} STREQUAL "aarch64") + message(STATUS "Detected AArch64 system processor") + set(ARMV7 1) + add_definitions(-DX265_ARCH_ARM=1 -DX265_ARCH_ARM64=1 -DHAVE_ARMV6=0 -DHAVE_NEON=0) else() message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown") message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}") endif() - if(UNIX) list(APPEND PLATFORM_LIBS pthread) find_library(LIBRT rt) @@ -238,28 +238,9 @@ if(GCC) endif() endif() endif() - if(ARM AND CROSS_COMPILE_ARM) - if(ARM64) - set(ARM_ARGS -fPIC) - else() - set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC) - endif() - message(STATUS "cross compile arm") - elseif(ARM) - if(ARM64) - set(ARM_ARGS -fPIC) - add_definitions(-DHAVE_NEON) - else() - find_package(Neon) - if(CPU_HAS_NEON) - set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC) - add_definitions(-DHAVE_NEON) - else() - set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm) - endif() - endif() + if(ARMV7) + add_definitions(-fPIC) endif() - add_definitions(${ARM_ARGS}) if(FPROFILE_GENERATE) if(INTEL_CXX) add_definitions(-prof-gen -prof-dir="${CMAKE_CURRENT_BINARY_DIR}") Index: x265_3.4/source/common/cpu.cpp =================================================================== --- x265_3.4.orig/source/common/cpu.cpp +++ x265_3.4/source/common/cpu.cpp @@ -39,7 +39,7 @@ #include <machine/cpu.h> #endif -#if X265_ARCH_ARM && !defined(HAVE_NEON) +#if X265_ARCH_ARM && (!defined(HAVE_NEON) || HAVE_NEON==0) #include <signal.h> #include <setjmp.h> static sigjmp_buf jmpbuf; @@ -350,7 +350,6 @@ uint32_t cpu_detect(bool benableavx512) } canjump = 1; - PFX(cpu_neon_test)(); canjump = 0; signal(SIGILL, oldsig); #endif // if !HAVE_NEON @@ -366,7 +365,7 @@ uint32_t cpu_detect(bool benableavx512) // which may result in incorrect detection and the counters stuck enabled. // right now Apple does not seem to support performance counters for this test #ifndef __MACH__ - flags |= PFX(cpu_fast_neon_mrc_test)() ? X265_CPU_FAST_NEON_MRC : 0; + //flags |= PFX(cpu_fast_neon_mrc_test)() ? X265_CPU_FAST_NEON_MRC : 0; #endif // TODO: write dual issue test? currently it's A8 (dual issue) vs. A9 (fast mrc) #elif X265_ARCH_ARM64
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.