Skip to content

Commit 69c2edf

Browse files
committed
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
1 parent f247e54 commit 69c2edf

File tree

1 file changed

+1
-1
lines changed
  • media/libstagefright/codecs/amrnb/common/src

1 file changed

+1
-1
lines changed

media/libstagefright/codecs/amrnb/common/src/az_lsp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ static Word16 Chebps(Word16 x,
299299
t0 += (Word32) * (p_f) << 13;
300300

301301

302-
if ((UWord32)(t0 - 0xfe000000L) < 0x01ffffffL - 0xfe000000L)
302+
if ((UWord32)(t0 - 0xfe000000L) < (UWord32)0x03ffffffL)
303303
{
304304
cheb = (Word16)(t0 >> 10);
305305
}

0 commit comments

Comments
 (0)