WebRtc_Word32 => int32_t etc. in audio_coding/

BUG=314

Review URL: https://webrtc-codereview.appspot.com/1271006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3789 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/neteq/peak_detection.c b/webrtc/modules/audio_coding/neteq/peak_detection.c
index 678c7f9..8c85d2a 100644
--- a/webrtc/modules/audio_coding/neteq/peak_detection.c
+++ b/webrtc/modules/audio_coding/neteq/peak_detection.c
@@ -17,7 +17,7 @@
 #include "signal_processing_library.h"
 
 /* Table of constants used in parabolic fit function WebRtcNetEQ_PrblFit */
-const WebRtc_Word16 WebRtcNetEQ_kPrblCf[17][3] = { { 120, 32, 64 }, { 140, 44, 75 },
+const int16_t WebRtcNetEQ_kPrblCf[17][3] = { { 120, 32, 64 }, { 140, 44, 75 },
                                                     { 150, 50, 80 }, { 160, 57, 85 },
                                                     { 180, 72, 96 }, { 200, 89, 107 },
                                                     { 210, 98, 112 }, { 220, 108, 117 },
@@ -27,17 +27,17 @@
                                                     { 330, 242, 176 }, { 340, 257, 181 },
                                                     { 360, 288, 192 } };
 
-WebRtc_Word16 WebRtcNetEQ_PeakDetection(WebRtc_Word16 *pw16_data, WebRtc_Word16 w16_dataLen,
-                                        WebRtc_Word16 w16_nmbPeaks, WebRtc_Word16 fs_mult,
-                                        WebRtc_Word16 *pw16_winIndex,
-                                        WebRtc_Word16 *pw16_winValue)
+int16_t WebRtcNetEQ_PeakDetection(int16_t *pw16_data, int16_t w16_dataLen,
+                                  int16_t w16_nmbPeaks, int16_t fs_mult,
+                                  int16_t *pw16_winIndex,
+                                  int16_t *pw16_winValue)
 {
     /* Local variables */
     int i;
-    WebRtc_Word16 w16_tmp;
-    WebRtc_Word16 w16_tmp2;
-    WebRtc_Word16 indMin = 0;
-    WebRtc_Word16 indMax = 0;
+    int16_t w16_tmp;
+    int16_t w16_tmp2;
+    int16_t indMin = 0;
+    int16_t indMax = 0;
 
     /* Peak detection */
 
@@ -53,7 +53,7 @@
             w16_dataLen++;
         }
 
-        pw16_winIndex[i] = WebRtcSpl_MaxIndexW16(pw16_data, (WebRtc_Word16) (w16_dataLen - 1));
+        pw16_winIndex[i] = WebRtcSpl_MaxIndexW16(pw16_data, (int16_t) (w16_dataLen - 1));
 
         if (i != w16_nmbPeaks - 1)
         {
@@ -103,14 +103,14 @@
     return 0;
 }
 
-WebRtc_Word16 WebRtcNetEQ_PrblFit(WebRtc_Word16 *pw16_3pts, WebRtc_Word16 *pw16_Ind,
-                                  WebRtc_Word16 *pw16_outVal, WebRtc_Word16 fs_mult)
+int16_t WebRtcNetEQ_PrblFit(int16_t *pw16_3pts, int16_t *pw16_Ind,
+                            int16_t *pw16_outVal, int16_t fs_mult)
 {
     /* Variables */
-    WebRtc_Word32 Num, Den;
-    WebRtc_Word32 temp;
-    WebRtc_Word16 flag, stp, strt, lmt;
-    WebRtc_UWord16 PFind[13];
+    int32_t Num, Den;
+    int32_t temp;
+    int16_t flag, stp, strt, lmt;
+    uint16_t PFind[13];
 
     if (fs_mult == 1)
     {
@@ -162,24 +162,24 @@
 
     Den = pw16_3pts[0] + WEBRTC_SPL_MUL_16_16(pw16_3pts[1],-2) + pw16_3pts[2];
 
-    temp = (WebRtc_Word32) WEBRTC_SPL_MUL(Num, (WebRtc_Word32)120); /* need 32_16 really */
+    temp = (int32_t) WEBRTC_SPL_MUL(Num, (int32_t)120); /* need 32_16 really */
     flag = 1;
     stp = WebRtcNetEQ_kPrblCf[PFind[fs_mult]][0] - WebRtcNetEQ_kPrblCf[PFind[fs_mult - 1]][0];
     strt = (WebRtcNetEQ_kPrblCf[PFind[fs_mult]][0]
         + WebRtcNetEQ_kPrblCf[PFind[fs_mult - 1]][0]) >> 1;
 
-    if (temp < (WebRtc_Word32) WEBRTC_SPL_MUL(-Den,(WebRtc_Word32)strt))
+    if (temp < (int32_t) WEBRTC_SPL_MUL(-Den,(int32_t)strt))
     {
         lmt = strt - stp;
         while (flag)
         {
             if ((flag == fs_mult) || (temp
-                > (WebRtc_Word32) WEBRTC_SPL_MUL(-Den,(WebRtc_Word32)lmt)))
+                > (int32_t) WEBRTC_SPL_MUL(-Den,(int32_t)lmt)))
             {
                 *pw16_outVal
-                    = (WebRtc_Word16)
-                    (((WebRtc_Word32) ((WebRtc_Word32) WEBRTC_SPL_MUL(Den,(WebRtc_Word32)WebRtcNetEQ_kPrblCf[PFind[fs_mult-flag]][1])
-                        + (WebRtc_Word32) WEBRTC_SPL_MUL(Num,(WebRtc_Word32)WebRtcNetEQ_kPrblCf[PFind[fs_mult-flag]][2])
+                    = (int16_t)
+                    (((int32_t) ((int32_t) WEBRTC_SPL_MUL(Den,(int32_t)WebRtcNetEQ_kPrblCf[PFind[fs_mult-flag]][1])
+                        + (int32_t) WEBRTC_SPL_MUL(Num,(int32_t)WebRtcNetEQ_kPrblCf[PFind[fs_mult-flag]][2])
                         + WEBRTC_SPL_MUL_16_16(pw16_3pts[0],256))) >> 8);
                 *pw16_Ind = (*pw16_Ind) * (fs_mult << 1) - flag;
                 flag = 0;
@@ -191,24 +191,24 @@
             }
         }
     }
-    else if (temp > (WebRtc_Word32) WEBRTC_SPL_MUL(-Den,(WebRtc_Word32)(strt+stp)))
+    else if (temp > (int32_t) WEBRTC_SPL_MUL(-Den,(int32_t)(strt+stp)))
     {
         lmt = strt + (stp << 1);
         while (flag)
         {
             if ((flag == fs_mult) || (temp
-                < (WebRtc_Word32) WEBRTC_SPL_MUL(-Den,(WebRtc_Word32)lmt)))
+                < (int32_t) WEBRTC_SPL_MUL(-Den,(int32_t)lmt)))
             {
-                WebRtc_Word32 temp_term_1, temp_term_2, temp_term_3;
+                int32_t temp_term_1, temp_term_2, temp_term_3;
 
                 temp_term_1 = WEBRTC_SPL_MUL(Den,
-                    (WebRtc_Word32) WebRtcNetEQ_kPrblCf[PFind[fs_mult+flag]][1]);
+                    (int32_t) WebRtcNetEQ_kPrblCf[PFind[fs_mult+flag]][1]);
                 temp_term_2 = WEBRTC_SPL_MUL(Num,
-                    (WebRtc_Word32) WebRtcNetEQ_kPrblCf[PFind[fs_mult+flag]][2]);
+                    (int32_t) WebRtcNetEQ_kPrblCf[PFind[fs_mult+flag]][2]);
                 temp_term_3 = WEBRTC_SPL_MUL_16_16(pw16_3pts[0],256);
 
                 *pw16_outVal
-                    = (WebRtc_Word16) ((temp_term_1 + temp_term_2 + temp_term_3) >> 8);
+                    = (int16_t) ((temp_term_1 + temp_term_2 + temp_term_3) >> 8);
 
                 *pw16_Ind = (*pw16_Ind) * (fs_mult << 1) + flag;
                 flag = 0;