Skip to content

Commit ea22778

Browse files
Jean-Baptiste Queruandroid code review
authored andcommitted
Merge changes I903353c5,I822dcc74
* changes: stagefright amrnb: Properly negate all values stagefright amrnb: Fix a bug on architectures where long is 64 bit
2 parents bf45bbf + 3a8221c commit ea22778

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
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
}

media/libstagefright/codecs/amrnb/enc/src/set_sign.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,10 @@ void set_sign12k2(
552552
else
553553
{
554554
*(p_sign--) = -32767; /* sign = -1 */
555-
cor = - (cor);
555+
cor = negate(cor);
556556

557557
/* modify dn[] according to the fixed sign */
558-
dn[i] = - val;
558+
dn[i] = negate(val);
559559
}
560560

561561
*(p_en--) = cor;

0 commit comments

Comments
 (0)