summaryrefslogtreecommitdiff
path: root/thirdparty/opus/silk/MacroCount.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/opus/silk/MacroCount.h')
-rw-r--r--thirdparty/opus/silk/MacroCount.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/thirdparty/opus/silk/MacroCount.h b/thirdparty/opus/silk/MacroCount.h
index 78100ffede..834817d058 100644
--- a/thirdparty/opus/silk/MacroCount.h
+++ b/thirdparty/opus/silk/MacroCount.h
@@ -319,6 +319,14 @@ static OPUS_INLINE opus_int32 silk_ADD_POS_SAT32(opus_int64 a, opus_int64 b){
return(tmp);
}
+#undef silk_ADD_POS_SAT64
+static OPUS_INLINE opus_int64 silk_ADD_POS_SAT64(opus_int64 a, opus_int64 b){
+ opus_int64 tmp;
+ ops_count += 1;
+ tmp = ((((a)+(b)) & 0x8000000000000000LL) ? silk_int64_MAX : ((a)+(b)));
+ return(tmp);
+}
+
#undef silk_LSHIFT8
static OPUS_INLINE opus_int8 silk_LSHIFT8(opus_int8 a, opus_int32 shift){
opus_int8 ret;
@@ -691,7 +699,7 @@ return(ret);
#undef silk_LIMIT_32
-static OPUS_INLINE opus_int32 silk_LIMIT_32(opus_int32 a, opus_int32 limit1, opus_int32 limit2)
+static OPUS_INLINE opus_int silk_LIMIT_32(opus_int32 a, opus_int32 limit1, opus_int32 limit2)
{
opus_int32 ret;
ops_count += 6;