diff --git a/celt/fixed_debug.h b/celt/fixed_debug.h index 3319d92ffffcd08d125b885502d32efedbdf3663..80bc94910fa3e51fe762847734d7bd60ab0cb5af 100644 --- a/celt/fixed_debug.h +++ b/celt/fixed_debug.h @@ -507,6 +507,16 @@ static OPUS_INLINE int SATURATE(int a, int b) return a; } +static OPUS_INLINE opus_int16 SATURATE16(opus_int32 a) +{ + celt_mips+=3; + if (a>32767) + return 32767; + else if (a<-32768) + return -32768; + else return a; +} + static OPUS_INLINE int MULT16_16_Q11_32(int a, int b) { opus_int64 res;