aboutsummaryrefslogtreecommitdiff
path: root/decoder/ixheaacd_basic_ops40.h
diff options
context:
space:
mode:
authorRamesh Katuri <ramesh.katuri@ittiam.com>2018-06-01 13:27:00 +0530
committerRay Essick <essick@google.com>2018-06-07 16:52:19 -0700
commitb3226ce6f80c78946aa3190cec158fb9852272ea (patch)
treef4e0df5cb15e791d60b23b54a710f3d4d608193a /decoder/ixheaacd_basic_ops40.h
parent8eb646f89b94cf6d0aa26e5bca39ba083a554965 (diff)
downloadlibxaac-b3226ce6f80c78946aa3190cec158fb9852272ea.tar.gz
Formatting changespie-dr1-devpie-dev
Formatting .c and .h files using clang-format Formatting .s files Bug: 80493357 Test: compare object sizes Change-Id: I38296083c9d2d566a6a2564db2e391e4b2bd43a9
Diffstat (limited to 'decoder/ixheaacd_basic_ops40.h')
-rw-r--r--decoder/ixheaacd_basic_ops40.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/decoder/ixheaacd_basic_ops40.h b/decoder/ixheaacd_basic_ops40.h
index d5d5ee8..f653505 100644
--- a/decoder/ixheaacd_basic_ops40.h
+++ b/decoder/ixheaacd_basic_ops40.h
@@ -327,21 +327,20 @@ static PLATFORM_INLINE WORD64 ixheaacd_mult64(WORD32 a, WORD32 b) {
static PLATFORM_INLINE WORD64 ixheaacd_mult64_sat(WORD64 a, WORD64 b) {
WORD64 result;
- if (a > 0 && b > 0 && a > MAX_64 / b) return MAX_64;
- if (a < 0 && b > 0 && a < MIN_64 / b) return MIN_64;
- if (a > 0 && b < 0 && b < MIN_64 / a) return MIN_64;
- if (a < 0 && b < 0 && a < MAX_64 / b) return MAX_64;
+ if (a > 0 && b > 0 && a > MAX_64 / b) return MAX_64;
+ if (a < 0 && b > 0 && a < MIN_64 / b) return MIN_64;
+ if (a > 0 && b < 0 && b < MIN_64 / a) return MIN_64;
+ if (a < 0 && b < 0 && a < MAX_64 / b) return MAX_64;
result = a * b;
return (result);
}
static PLATFORM_INLINE WORD64 ixheaacd_add64_sat(WORD64 a, WORD64 b) {
- WORD64 result , comp;
- result = (a < 0) ? MIN_64 : MAX_64;
+ WORD64 result, comp;
+ result = (a < 0) ? MIN_64 : MAX_64;
comp = result - a;
- if ((a < 0) == (b > comp))
- result = a + b;
+ if ((a < 0) == (b > comp)) result = a + b;
return (result);
}