mirror of
https://github.com/xiph/opus.git
synced 2025-06-05 23:10:54 +00:00
silencing overflows in MDCT and FFT
This commit is contained in:
parent
ae33218495
commit
273906404c
6 changed files with 59 additions and 44 deletions
|
@ -59,6 +59,12 @@ extern opus_int64 celt_mips;
|
|||
#define SHR(a,b) SHR32(a,b)
|
||||
#define PSHR(a,b) PSHR32(a,b)
|
||||
|
||||
/** Add two 32-bit values, ignore any overflows */
|
||||
#define ADD32_ovflw(a,b) (celt_mips+=2,(opus_val32)((opus_uint32)(a)+(opus_uint32)(b)))
|
||||
/** Subtract two 32-bit values, ignore any overflows */
|
||||
#define SUB32_ovflw(a,b) (celt_mips+=2,(opus_val32)((opus_uint32)(a)-(opus_uint32)(b)))
|
||||
#define NEG32_ovflw(a) (celt_mips+=2,(opus_val32)(-(opus_uint32)(a)))
|
||||
|
||||
static OPUS_INLINE short NEG16(int x)
|
||||
{
|
||||
int res;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue