mirror of
https://github.com/xiph/opus.git
synced 2025-05-29 22:57:41 +00:00
Arm: Speed up FLOAT2INT16 conversion with Neon
Using Neon for float to int conversion, and introducing platform- specific function for converting an array of float values to int16. Also adding appropriate unit test. Signed-off-by: Jean-Marc Valin <jeanmarcv@google.com>
This commit is contained in:
parent
edffe56b30
commit
d4494e6ed7
9 changed files with 277 additions and 4 deletions
|
@ -98,6 +98,13 @@ static OPUS_INLINE opus_int32 float2int(float x) {return _mm_cvt_ss2si(_mm_set_s
|
|||
|
||||
return intgr ;
|
||||
}
|
||||
#elif defined(__aarch64__)
|
||||
|
||||
#include <arm_neon.h>
|
||||
static OPUS_INLINE opus_int32 float2int(float flt)
|
||||
{
|
||||
return vcvtns_s32_f32(flt);
|
||||
}
|
||||
|
||||
#elif defined(HAVE_LRINTF) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue