summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-25 01:29:46 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-25 01:29:46 +0000
commit08509e233e7507fcce263ea7a0f1e60340b3b2b8 (patch)
treee35e78991c601b8194f4a716ecd03e108dcc1941
parenta38b40af5ee9b88f90ac93e7f3da65dd0aa9d2f1 (diff)
parentb0db9e82d833002b597187760ebcafcdce0761d6 (diff)
downloadmedia-08509e233e7507fcce263ea7a0f1e60340b3b2b8.tar.gz
Snap for 8637453 from b0db9e82d833002b597187760ebcafcdce0761d6 to tm-qpr1-release
Change-Id: I68da02419e662c97a6f69590e059d913c90943d1
-rw-r--r--audio_utils/include/audio_utils/primitives.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/audio_utils/include/audio_utils/primitives.h b/audio_utils/include/audio_utils/primitives.h
index 41f7ced2..2935be5f 100644
--- a/audio_utils/include/audio_utils/primitives.h
+++ b/audio_utils/include/audio_utils/primitives.h
@@ -939,9 +939,9 @@ static inline int32_t clampq4_27_from_float(float f)
static const float limneg = -16.;
if (f <= limneg) {
- return -0x80000000; /* or 0x80000000 */
+ return INT32_MIN;
} else if (f >= limpos) {
- return 0x7fffffff;
+ return INT32_MAX;
}
f *= scale;
/* integer conversion is through truncation (though int to float is not).
@@ -965,9 +965,9 @@ static inline int32_t clamp32_from_float(float f)
static const float limneg = -1.;
if (f <= limneg) {
- return -0x80000000; /* or 0x80000000 */
+ return INT32_MIN;
} else if (f >= limpos) {
- return 0x7fffffff;
+ return INT32_MAX;
}
f *= scale;
/* integer conversion is through truncation (though int to float is not).