Merge "proper mask input stream in AMR-WB routine" into qt-dev am: 688019b3b0
am: d4d0ec2a09
Change-Id: I6dc26e1308d843d6fc06b9018ff940dbdd413a74
diff --git a/media/libstagefright/codecs/amrwb/src/deemphasis_32.cpp b/media/libstagefright/codecs/amrwb/src/deemphasis_32.cpp
index b80555b..c0e4c51 100644
--- a/media/libstagefright/codecs/amrwb/src/deemphasis_32.cpp
+++ b/media/libstagefright/codecs/amrwb/src/deemphasis_32.cpp
@@ -131,7 +131,7 @@
int16 lo, hi;
L_tmp = ((int32)x_hi[0]) << 16;
- L_tmp += ((int32)x_lo[0]) << 4;
+ L_tmp += (((int32)x_lo[0]) << 4) & 0xFFFF;
L_tmp = shl_int32(L_tmp, 3);
L_tmp = fxp_mac_16by16(*mem, mu, L_tmp),
@@ -144,7 +144,7 @@
for (i = 1; i < L - 1; i++)
{
L_tmp = ((int32)hi) << 16;
- L_tmp += ((int32)lo) << 4;
+ L_tmp += (((int32)lo) << 4) & 0xFFFF;
L_tmp = shl_int32(L_tmp, 3);
L_tmp = fxp_mac_16by16(y[i - 1], mu, L_tmp),
L_tmp = shl_int32(L_tmp, 1); /* saturation can occur here */
@@ -153,7 +153,7 @@
hi = x_hi[i+1];
}
L_tmp = ((int32)hi) << 16;
- L_tmp += ((int32)lo) << 4;
+ L_tmp += (((int32)lo) << 4) & 0xFFFF;
L_tmp = shl_int32(L_tmp, 3);
L_tmp = fxp_mac_16by16(y[i - 1], mu, L_tmp),
L_tmp = shl_int32(L_tmp, 1); /* saturation can occur here */