commit | ea227787253e29da2d688399b097e05708d3bf73 | [log] [tgz] |
---|---|---|
author | Jean-Baptiste Queru <jbq@google.com> | Fri Feb 24 10:07:47 2012 -0800 |
committer | android code review <noreply-gerritcodereview@google.com> | Fri Feb 24 10:07:49 2012 -0800 |
tree | 25ffedcdf5c4b066f50f9806e28dc3a1ffbd7127 | |
parent | bf45bbf3b4a54976b81234ffc8ac41520bc052fc [diff] | |
parent | 3a8221c0ffd4309a9179cc777b15b2558a07bc4e [diff] |
Merge changes I903353c5,I822dcc74 * changes: stagefright amrnb: Properly negate all values stagefright amrnb: Fix a bug on architectures where long is 64 bit
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 @@ t0 += (Word32) * (p_f) << 13; - if ((UWord32)(t0 - 0xfe000000L) < 0x01ffffffL - 0xfe000000L) + if ((UWord32)(t0 - 0xfe000000L) < (UWord32)0x03ffffffL) { cheb = (Word16)(t0 >> 10); }
diff --git a/media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp b/media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp index dedf91a..d626de3 100644 --- a/media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp +++ b/media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp
@@ -552,10 +552,10 @@ else { *(p_sign--) = -32767; /* sign = -1 */ - cor = - (cor); + cor = negate(cor); /* modify dn[] according to the fixed sign */ - dn[i] = - val; + dn[i] = negate(val); } *(p_en--) = cor;