summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/amrnb
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2011-05-18 12:30:22 +0300
committerMartin Storsjo <martin@martin.st>2011-05-18 14:24:37 +0300
commit773f457645786b139fa8fe180ef27e78ad7ab2f9 (patch)
tree601e910fd7f8369c2f4c387546478bae9c4bb391 /media/libstagefright/codecs/amrnb
parentac0aafc3bc0043b37d21e9063f8589e19327946a (diff)
downloadframeworks_av-773f457645786b139fa8fe180ef27e78ad7ab2f9.zip
frameworks_av-773f457645786b139fa8fe180ef27e78ad7ab2f9.tar.gz
frameworks_av-773f457645786b139fa8fe180ef27e78ad7ab2f9.tar.bz2
stagefright amrnb: Fix a bug on architectures where long is 64 bit
Initially, this code gave a warning "comparison is always false due to limited range of data type" if long was 64 bit. Additionally, the output from the AMR encoder was mostly noise. This was committed on the master branch of the opencore repository in commit f532d145194e474cb30d8644b8eee83873ad24cc, based on AOSP contribution 10904. Change-Id: I822dcc74beeae548d3032ffda759de9c8cd1fcfe
Diffstat (limited to 'media/libstagefright/codecs/amrnb')
-rw-r--r--media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp b/media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp
index bd99b30..4135f30 100644
--- a/media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp
+++ b/media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp
@@ -299,7 +299,7 @@ static Word16 Chebps(Word16 x,
t0 += (Word32) * (p_f) << 13;
- if ((UWord32)(t0 - 0xfe000000L) < 0x01ffffffL - 0xfe000000L)
+ if ((UWord32)(t0 - 0xfe000000L) < (UWord32)0x03ffffffL)
{
cheb = (Word16)(t0 >> 10);
}