Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f214d693 authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Clean up USE_NEON to make it easier to disable NEON for benchmarking" into nyc-dev

parents fcf5720d 4699a6a4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -127,6 +127,9 @@ LOCAL_SHARED_LIBRARIES := \

LOCAL_MODULE := libaudioresampler

# uncomment to disable NEON on architectures that actually do support NEON, for benchmarking
#LOCAL_CFLAGS += -DUSE_NEON=false

include $(BUILD_SHARED_LIBRARY)

include $(call all-makefiles-under,$(LOCAL_PATH))
+5 −1
Original line number Diff line number Diff line
@@ -26,11 +26,15 @@ namespace android {
#endif

#if defined(__aarch64__) || defined(__ARM_NEON__)
#ifndef USE_NEON
#define USE_NEON (true)
#include <arm_neon.h>
#endif
#else
#define USE_NEON (false)
#endif
#if USE_NEON
#include <arm_neon.h>
#endif

template<typename T, typename U>
struct is_same
+8 −4
Original line number Diff line number Diff line
@@ -43,10 +43,14 @@
#endif

#if defined(__aarch64__) || defined(__ARM_NEON__)
#include <arm_neon.h>
#define USE_NEON
#ifndef USE_NEON
#define USE_NEON (true)
#endif
#else
#undef USE_NEON
#define USE_NEON (false)
#endif
#if USE_NEON
#include <arm_neon.h>
#endif

#define UNUSED(x) ((void)(x))
@@ -417,7 +421,7 @@ void AudioResamplerSinc::filterCoefficient(int32_t* out, uint32_t phase,

    size_t count = offset;

#ifndef USE_NEON
#if !USE_NEON
    int32_t l = 0;
    int32_t r = 0;
    for (size_t i=0 ; i<count ; i++) {