Skip to content

Commit 3a8221c

Browse files
committed
stagefright amrnb: Properly negate all values
Initially, input values -32768 weren't negated properly. This was committed on the master branch of the opencore repository in commit f532d145194e474cb30d8644b8eee83873ad24cc, based on AOSP contribution 10906. Change-Id: I903353c5539a8fe94b7fc5f26b95eaeac57df5f4
1 parent 69c2edf commit 3a8221c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)