mirror of
https://github.com/xiph/opus.git
synced 2025-05-27 13:49:13 +00:00
fixes overflows in celt_iir() by doing proper saturation
This commit is contained in:
parent
184a4767aa
commit
a0bd7d3b84
4 changed files with 12 additions and 6 deletions
|
@ -104,6 +104,9 @@
|
|||
|
||||
/** Shift by a and round-to-neareast 32-bit value. Result is a 16-bit value */
|
||||
#define ROUND16(x,a) (EXTRACT16(PSHR32((x),(a))))
|
||||
/** Shift by a and round-to-neareast 32-bit value. Result is a saturated 16-bit value */
|
||||
#define SROUND16(x,a) EXTRACT16(SATURATE(PSHR32(x,a), 32767));
|
||||
|
||||
/** Divide by two */
|
||||
#define HALF16(x) (SHR16(x,1))
|
||||
#define HALF32(x) (SHR32(x,1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue