1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2025-06-05 22:39:13 +02:00

Merge "Fix SATURATE_LEFT_SHIFT_ALT() since it returned 0x80000000 in certain cases" am: 27894057af am: 86d12efb92

am: 232d000173

Change-Id: I8164d1fc45f82e359087b99de3e76fc9687dae31
This commit is contained in:
Jean-Michel Trivi
2018-12-26 17:10:13 -08:00
committed by android-build-merger

View File

@@ -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