mirror of https://github.com/mstorsjo/fdk-aac.git
Merge "Fix SATURATE_LEFT_SHIFT_ALT() since it returned 0x80000000 in certain cases"
am: 27894057af
Change-Id: I8b0c317c7eac2ad8590a4c640414c20de448153b
This commit is contained in:
commit
86d12efb92
|
@ -271,7 +271,7 @@ inline void scaleValueInPlace(FIXP_DBL *value, /*!< Value */
|
|||
#define SATURATE_LEFT_SHIFT_ALT(src, scale, dBits) \
|
||||
(((LONG)(src) > ((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
|
||||
? (LONG)(((1U) << ((dBits)-1)) - 1) \
|
||||
: ((LONG)(src) < ~((LONG)(((1U) << ((dBits)-1)) - 2) >> (scale))) \
|
||||
: ((LONG)(src) <= ~((LONG)(((1U) << ((dBits)-1)) - 1) >> (scale))) \
|
||||
? ~((LONG)(((1U) << ((dBits)-1)) - 2)) \
|
||||
: ((LONG)(src) << (scale)))
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue