Skip to content

Commit

Permalink
Another try at using NEON
Browse files Browse the repository at this point in the history
  • Loading branch information
meneguzzi committed Jun 7, 2023
1 parent 7de0fa3 commit 406e61d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ if(NOT WIN32)
add_definitions(-fPIC)
endif()

if(APPLE)
add_definitions(-march=armv8-a+fp+simd+crypto+crc)
endif(APPLE)

### ORC is not used in any active code at the moment ###
# I tried it with 0.4.14
# 0.4.10 did not work (not all opcode implemented)
Expand Down
7 changes: 7 additions & 0 deletions src/motiondetect_opt.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
#define SSE2_CMP_SUM_ROWS 8
#endif

#ifdef __ARM_NEON__
#include "sse2neon.h"
#define USE_SSE2
#define USE_SSE2_CMP_HOR
#define SSE2_CMP_SUM_ROWS 8
#endif

#ifdef USE_SSE2
/**
\see contrastSubImg using SSE2 optimization, Planar (1 byte per channel) only
Expand Down

0 comments on commit 406e61d

Please sign in to comment.