OSDN Git Service

stagefright amrnb: Properly negate all values
authorMartin Storsjo <martin@martin.st>
Wed, 18 May 2011 09:30:02 +0000 (12:30 +0300)
committerMartin Storsjo <martin@martin.st>
Wed, 18 May 2011 11:24:37 +0000 (14:24 +0300)
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

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

index dedf91a..d626de3 100644 (file)
@@ -552,10 +552,10 @@ void set_sign12k2(
         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;