Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / audio_coding / codecs / isac / fix / source / entropy_coding.c
index 8b46d68..27d1c1f 100644 (file)
@@ -313,7 +313,7 @@ static void CalcRootInvArSpec(const int16_t *ARCoefQ12,
 
   for (k = 1; k < (AR_ORDER); k += 2) {
     for (n = 0; n < FRAMESAMPLES/8; n++)
-      summQ16[n] += WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_MUL_32_16(CorrQ11[k+1],WebRtcIsacfix_kCos[k][n]) + 2, 2);
+      summQ16[n] += ((CorrQ11[k + 1] * WebRtcIsacfix_kCos[k][n]) + 2) >> 2;
   }
 
   CS_ptrQ9 = WebRtcIsacfix_kCos[0];
@@ -350,11 +350,11 @@ static void CalcRootInvArSpec(const int16_t *ARCoefQ12,
     if(in_sqrt<0)
       in_sqrt=-in_sqrt;
 
-    newRes = WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_DIV(in_sqrt, res) + res, 1);
+    newRes = (in_sqrt / res + res) >> 1;
     do
     {
       res = newRes;
-      newRes = WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_DIV(in_sqrt, res) + res, 1);
+      newRes = (in_sqrt / res + res) >> 1;
     } while (newRes != res && i-- > 0);
 
     CurveQ8[k] = (int16_t)newRes;
@@ -368,11 +368,11 @@ static void CalcRootInvArSpec(const int16_t *ARCoefQ12,
     if(in_sqrt<0)
       in_sqrt=-in_sqrt;
 
-    newRes = WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_DIV(in_sqrt, res) + res, 1);
+    newRes = (in_sqrt / res + res) >> 1;
     do
     {
       res = newRes;
-      newRes = WEBRTC_SPL_RSHIFT_W32(WEBRTC_SPL_DIV(in_sqrt, res) + res, 1);
+      newRes = (in_sqrt / res + res) >> 1;
     } while (newRes != res && i-- > 0);
 
     CurveQ8[k] = (int16_t)newRes;