mirror of
https://github.com/xiph/opus.git
synced 2025-05-27 13:49:13 +00:00
Using SSAT in SIG2WORD16() on ARMv6
This commit is contained in:
parent
9b3a3ad7ff
commit
2e6876c07a
4 changed files with 29 additions and 11 deletions
|
@ -135,4 +135,13 @@
|
|||
/** Divide a 32-bit value by a 32-bit value. Result fits in 32 bits */
|
||||
#define DIV32(a,b) (((opus_val32)(a))/((opus_val32)(b)))
|
||||
|
||||
static OPUS_INLINE opus_val16 SIG2WORD16_generic(celt_sig x)
|
||||
{
|
||||
x = PSHR32(x, SIG_SHIFT);
|
||||
x = MAX32(x, -32768);
|
||||
x = MIN32(x, 32767);
|
||||
return EXTRACT16(x);
|
||||
}
|
||||
#define SIG2WORD16(x) (SIG2WORD16_generic(x))
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue