Skip to content

Commit

Permalink
Merge pull request georgmartius#126 from meneguzzi/sse2neon
Browse files Browse the repository at this point in the history
Added sse2neon for arm compilation.
  • Loading branch information
georgmartius authored Jan 7, 2024
2 parents 05829db + 406e61d commit cbe3d5c
Show file tree
Hide file tree
Showing 5 changed files with 9,219 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt

# Don't include the build directory and compiled Mac dynamic libraries.
build
*.dylib
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeModules/")

include (FindSSE)
include (GNUInstallDirs)
# include (ExternalProject) # There must be a nicer way to include this
# include (sse2neon)
find_package(OpenMP)

set(MAJOR_VERSION 1)
Expand All @@ -30,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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# VidStab

[![C/C++ CI](https://github.com/georgmartius/vid.stab/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/georgmartius/vid.stab/actions/workflows/c-cpp.yml)

Vidstab is a video stabilization library which can be plugged-in with Ffmpeg and Transcode.

**Why is it needed**
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
Loading

0 comments on commit cbe3d5c

Please sign in to comment.