From ecd3ca842097eb224ef89aba45f898521bbe0a86 Mon Sep 17 00:00:00 2001 From: WeebDataHoarder <57538841+WeebDataHoarder@users.noreply.github.com> Date: Wed, 13 Jul 2022 17:42:24 +0200 Subject: [PATCH] Update pffft, add MIPP SIMD library --- .gitmodules | 3 +++ CMakeLists.txt | 2 ++ cgaborator.cpp | 2 +- include/cgaborator.h | 2 +- lib/MIPP | 1 + lib/pffft | 2 +- 6 files changed, 9 insertions(+), 3 deletions(-) create mode 160000 lib/MIPP diff --git a/.gitmodules b/.gitmodules index b4ae01d..f604849 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "lib/pffft"] path = lib/pffft url = https://github.com/marton78/pffft.git +[submodule "lib/MIPP"] + path = lib/MIPP + url = https://github.com/hayguen/MIPP.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 00f4042..2767ba3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,9 @@ add_definitions(-DGABORATOR_USE_PFFFT) include_directories(include) include_directories(lib/gaborator) include_directories(lib/pffft) +include_directories(lib/MIPP/src) +set(MIPP_ROOT "lib/MIPP/src") add_subdirectory(lib/pffft EXCLUDE_FROM_ALL) add_executable(test test.cpp) diff --git a/cgaborator.cpp b/cgaborator.cpp index b0fc858..f3830c7 100644 --- a/cgaborator.cpp +++ b/cgaborator.cpp @@ -184,7 +184,7 @@ uintptr_t gaborator_initialize(int blockSize, double sampleRate, int bandsPerOct maximumFrequency, stepSize)); } -long gaborator_analysis_support(uintptr_t ptr) { +int64_t gaborator_analysis_support(uintptr_t ptr) { return reinterpret_cast(ptr)->analysis_support(); } diff --git a/include/cgaborator.h b/include/cgaborator.h index 7c776f0..6fab5c3 100644 --- a/include/cgaborator.h +++ b/include/cgaborator.h @@ -14,7 +14,7 @@ typedef void (*gaborator_transform_callback)(uintptr_t callback_data, float* dat uintptr_t gaborator_initialize(int blockSize, double sampleRate, int bandsPerOctave, double minimumFrequency, double referenceFrequency, double maximumFrequency, int stepSize); void gaborator_release(uintptr_t ptr); -long gaborator_analysis_support(uintptr_t ptr); +int64_t gaborator_analysis_support(uintptr_t ptr); int gaborator_number_of_bands(uintptr_t ptr); void gaborator_transform(uintptr_t ptr, float* audio_block, int audio_block_length, gaborator_transform_callback callback, uintptr_t callback_data); diff --git a/lib/MIPP b/lib/MIPP new file mode 160000 index 0000000..ec2fa3a --- /dev/null +++ b/lib/MIPP @@ -0,0 +1 @@ +Subproject commit ec2fa3a22cd1ac08e4725ff69bd546dd6f5d75cc diff --git a/lib/pffft b/lib/pffft index 9603871..08f5ed2 160000 --- a/lib/pffft +++ b/lib/pffft @@ -1 +1 @@ -Subproject commit 9603871ac44b6f782e9666a968d25977f7124e39 +Subproject commit 08f5ed2618ac06d7dcc83d209d7253dc215274d5