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
This commit is contained in:
Martin Storsjo
2011-05-18 12:30:22 +03:00
parent f247e545b5
commit 69c2edfaf7

View File

@@ -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);
}