mirror of
https://github.com/xiph/opus.git
synced 2025-05-31 07:37:42 +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
|
@ -1,6 +1,7 @@
|
|||
/* Copyright (c) 2002-2008 Jean-Marc Valin
|
||||
Copyright (c) 2007-2008 CSIRO
|
||||
Copyright (c) 2007-2009 Xiph.Org Foundation
|
||||
Copyright (c) 2024 Arm Limited
|
||||
Written by Jean-Marc Valin, and Yunho Huh */
|
||||
/**
|
||||
@file mathops.h
|
||||
|
@ -38,6 +39,10 @@
|
|||
#include "entcode.h"
|
||||
#include "os_support.h"
|
||||
|
||||
#if defined(OPUS_ARM_MAY_HAVE_NEON_INTR)
|
||||
#include "arm/mathops_arm.h"
|
||||
#endif
|
||||
|
||||
#define PI 3.141592653f
|
||||
|
||||
/* Multiplies two 16-bit fractional values. Bit-exactness of this macro is important */
|
||||
|
@ -476,4 +481,15 @@ static OPUS_INLINE opus_val16 celt_atan2p(opus_val16 y, opus_val16 x)
|
|||
}
|
||||
|
||||
#endif /* FIXED_POINT */
|
||||
|
||||
#ifndef DISABLE_FLOAT_API
|
||||
|
||||
void celt_float2int16_c(const float * OPUS_RESTRICT in, short * OPUS_RESTRICT out, int cnt);
|
||||
|
||||
#ifndef OVERRIDE_FLOAT2INT16
|
||||
#define celt_float2int16(in, out, cnt, arch) ((void)(arch), celt_float2int16_c(in, out, cnt))
|
||||
#endif
|
||||
|
||||
#endif /* DISABLE_FLOAT_API */
|
||||
|
||||
#endif /* MATHOPS_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue