Upconvert various types to int.

Per comments from HL/kwiberg on https://webrtc-codereview.appspot.com/42569004 , when there is existing usage of mixed types (int16_t, int, etc.), we'd prefer to standardize on larger types like int and phase out use of int16_t.

Specifically, "Using int16 just because we're sure all reasonable values will fit in 16 bits isn't usually meaningful in C."

This converts some existing uses of int16_t (and, in a few cases, other types such as uint16_t) to int (or, in a few places, int32_t).  Other locations will be converted to size_t in a separate change.

BUG=none
R=andrew@webrtc.org, kwiberg@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9405}
diff --git a/webrtc/modules/audio_coding/codecs/cng/include/webrtc_cng.h b/webrtc/modules/audio_coding/codecs/cng/include/webrtc_cng.h
index b016f40..1ec5d67 100644
--- a/webrtc/modules/audio_coding/codecs/cng/include/webrtc_cng.h
+++ b/webrtc/modules/audio_coding/codecs/cng/include/webrtc_cng.h
@@ -68,8 +68,8 @@
  *                      -1 - Error
  */
 
-int16_t WebRtcCng_InitEnc(CNG_enc_inst* cng_inst, uint16_t fs, int16_t interval,
-                          int16_t quality);
+int WebRtcCng_InitEnc(CNG_enc_inst* cng_inst, int fs, int16_t interval,
+                      int16_t quality);
 int16_t WebRtcCng_InitDec(CNG_dec_inst* cng_inst);
 
 /****************************************************************************
@@ -103,9 +103,9 @@
  * Return value       :  0 - Ok
  *                      -1 - Error
  */
-int16_t WebRtcCng_Encode(CNG_enc_inst* cng_inst, int16_t* speech,
-                         int16_t nrOfSamples, uint8_t* SIDdata,
-                         int16_t* bytesOut, int16_t forceSID);
+int WebRtcCng_Encode(CNG_enc_inst* cng_inst, int16_t* speech,
+                     int16_t nrOfSamples, uint8_t* SIDdata,
+                     int16_t* bytesOut, int16_t forceSID);
 
 /****************************************************************************
  * WebRtcCng_UpdateSid(...)
diff --git a/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c b/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c
index 9862f12..32e2859 100644
--- a/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c
+++ b/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c
@@ -36,7 +36,7 @@
 
 typedef struct WebRtcCngEncoder_ {
   int16_t enc_nrOfCoefs;
-  uint16_t enc_sampfreq;
+  int enc_sampfreq;
   int16_t enc_interval;
   int16_t enc_msSinceSID;
   int32_t enc_Energy;
@@ -142,8 +142,8 @@
  * Return value       :  0 - Ok
  *                      -1 - Error
  */
-int16_t WebRtcCng_InitEnc(CNG_enc_inst* cng_inst, uint16_t fs, int16_t interval,
-                          int16_t quality) {
+int WebRtcCng_InitEnc(CNG_enc_inst* cng_inst, int fs, int16_t interval,
+                      int16_t quality) {
   int i;
   WebRtcCngEncoder* inst = (WebRtcCngEncoder*) cng_inst;
   memset(inst, 0, sizeof(WebRtcCngEncoder));
@@ -227,9 +227,9 @@
  * Return value       :  0 - Ok
  *                      -1 - Error
  */
-int16_t WebRtcCng_Encode(CNG_enc_inst* cng_inst, int16_t* speech,
-                         int16_t nrOfSamples, uint8_t* SIDdata,
-                         int16_t* bytesOut, int16_t forceSID) {
+int WebRtcCng_Encode(CNG_enc_inst* cng_inst, int16_t* speech,
+                     int16_t nrOfSamples, uint8_t* SIDdata,
+                     int16_t* bytesOut, int16_t forceSID) {
   WebRtcCngEncoder* inst = (WebRtcCngEncoder*) cng_inst;
 
   int16_t arCoefs[WEBRTC_CNG_MAX_LPC_ORDER + 1];
@@ -388,10 +388,12 @@
     inst->enc_msSinceSID = 0;
     *bytesOut = inst->enc_nrOfCoefs + 1;
 
-    inst->enc_msSinceSID += (1000 * nrOfSamples) / inst->enc_sampfreq;
+    inst->enc_msSinceSID +=
+        (int16_t)((1000 * nrOfSamples) / inst->enc_sampfreq);
     return inst->enc_nrOfCoefs + 1;
   } else {
-    inst->enc_msSinceSID += (1000 * nrOfSamples) / inst->enc_sampfreq;
+    inst->enc_msSinceSID +=
+        (int16_t)((1000 * nrOfSamples) / inst->enc_sampfreq);
     *bytesOut = 0;
     return 0;
   }
diff --git a/webrtc/modules/audio_coding/codecs/g722/g722_interface.c b/webrtc/modules/audio_coding/codecs/g722/g722_interface.c
index d06c588..6a669e2 100644
--- a/webrtc/modules/audio_coding/codecs/g722/g722_interface.c
+++ b/webrtc/modules/audio_coding/codecs/g722/g722_interface.c
@@ -39,7 +39,7 @@
     }
 }
 
-int16_t WebRtcG722_FreeEncoder(G722EncInst *G722enc_inst)
+int WebRtcG722_FreeEncoder(G722EncInst *G722enc_inst)
 {
     // Free encoder memory
     return WebRtc_g722_encode_release((G722EncoderState*) G722enc_inst);
@@ -79,7 +79,7 @@
     }
 }
 
-int16_t WebRtcG722_FreeDecoder(G722DecInst *G722dec_inst)
+int WebRtcG722_FreeDecoder(G722DecInst *G722dec_inst)
 {
     // Free encoder memory
     return WebRtc_g722_decode_release((G722DecoderState*) G722dec_inst);
diff --git a/webrtc/modules/audio_coding/codecs/g722/include/g722_interface.h b/webrtc/modules/audio_coding/codecs/g722/include/g722_interface.h
index 7fe11a7..a5ecbe7 100644
--- a/webrtc/modules/audio_coding/codecs/g722/include/g722_interface.h
+++ b/webrtc/modules/audio_coding/codecs/g722/include/g722_interface.h
@@ -73,7 +73,7 @@
  * Return value               :  0 - Ok
  *                              -1 - Error
  */
-int16_t WebRtcG722_FreeEncoder(G722EncInst *G722enc_inst);
+int WebRtcG722_FreeEncoder(G722EncInst *G722enc_inst);
 
 
 
@@ -142,7 +142,7 @@
  *                              -1 - Error
  */
 
-int16_t WebRtcG722_FreeDecoder(G722DecInst *G722dec_inst);
+int WebRtcG722_FreeDecoder(G722DecInst *G722dec_inst);
 
 
 /****************************************************************************
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.c b/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.c
index d8f8c93..c24b4a6 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.c
@@ -31,7 +31,7 @@
     int16_t low,    /* (i) Lag to start from (typically
                              20) */
     int16_t high,   /* (i) Lag to end at (typically 39) */
-    int16_t scale)   /* (i) Scale factor to use for
+    int scale)   /* (i) Scale factor to use for
                               the crossDot */
 {
   int lagcount;
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.h b/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.h
index 533d0a4..a0435c4 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.h
+++ b/webrtc/modules/audio_coding/codecs/ilbc/augmented_cb_corr.h
@@ -36,7 +36,6 @@
     int16_t low,    /* (i) Lag to start from (typically
                                                    20) */
     int16_t high,   /* (i) Lag to end at (typically 39 */
-    int16_t scale);   /* (i) Scale factor to use for
-                                                   the crossDot */
+    int scale);   /* (i) Scale factor to use for the crossDot */
 
 #endif
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.c b/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.c
index f8a0933..2b7e082 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.c
@@ -34,7 +34,7 @@
     int16_t lTarget,   /* (i) Length of the target vector */
     int16_t *energyW16,  /* (o) Energy in the CB vectors */
     int16_t *energyShifts, /* (o) Shift value of the energy */
-    int16_t scale,   /* (i) The scaling of all energy values */
+    int scale,   /* (i) The scaling of all energy values */
     int16_t base_size  /* (i) Index to where the energy values should be stored */
                                ) {
   int16_t *ppi, *ppo, *pp;
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.h b/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.h
index 1b50c0b..68dd7da 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.h
+++ b/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy.h
@@ -27,7 +27,7 @@
     int16_t lTarget,   /* (i) Length of the target vector */
     int16_t *energyW16,  /* (o) Energy in the CB vectors */
     int16_t *energyShifts, /* (o) Shift value of the energy */
-    int16_t scale,   /* (i) The scaling of all energy values */
+    int scale,   /* (i) The scaling of all energy values */
     int16_t base_size  /* (i) Index to where the energy values should be stored */
                                );
 
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.c b/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.c
index 7e6daf9..39f18c2 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.c
@@ -22,7 +22,7 @@
 void WebRtcIlbcfix_CbMemEnergyAugmentation(
     int16_t *interpSamples, /* (i) The interpolated samples */
     int16_t *CBmem,   /* (i) The CB memory */
-    int16_t scale,   /* (i) The scaling of all energy values */
+    int scale,   /* (i) The scaling of all energy values */
     int16_t base_size,  /* (i) Index to where the energy values should be stored */
     int16_t *energyW16,  /* (o) Energy in the CB vectors */
     int16_t *energyShifts /* (o) Shift value of the energy */
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.h b/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.h
index 6c181bd..e73d414 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.h
+++ b/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_augmentation.h
@@ -22,7 +22,7 @@
 void WebRtcIlbcfix_CbMemEnergyAugmentation(
     int16_t *interpSamples, /* (i) The interpolated samples */
     int16_t *CBmem,   /* (i) The CB memory */
-    int16_t scale,   /* (i) The scaling of all energy values */
+    int scale,   /* (i) The scaling of all energy values */
     int16_t base_size,  /* (i) Index to where the energy values should be stored */
     int16_t *energyW16,  /* (o) Energy in the CB vectors */
     int16_t *energyShifts /* (o) Shift value of the energy */
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.c b/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.c
index e5d1424..b675441 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.c
@@ -28,7 +28,7 @@
     int16_t *ppo,   /* (i) input pointer 2 */
     int16_t *energyW16,  /* (o) Energy in the CB vectors */
     int16_t *energyShifts, /* (o) Shift value of the energy */
-    int16_t scale,   /* (i) The scaling of all energy values */
+    int scale,   /* (i) The scaling of all energy values */
     int16_t base_size  /* (i) Index to where the energy values should be stored */
                                    )
 {
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.h b/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.h
index c7e1e54..c7bf929 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.h
+++ b/webrtc/modules/audio_coding/codecs/ilbc/cb_mem_energy_calc.h
@@ -26,7 +26,7 @@
     int16_t *ppo,   /* (i) input pointer 2 */
     int16_t *energyW16,  /* (o) Energy in the CB vectors */
     int16_t *energyShifts, /* (o) Shift value of the energy */
-    int16_t scale,   /* (i) The scaling of all energy values */
+    int scale,   /* (i) The scaling of all energy values */
     int16_t base_size  /* (i) Index to where the energy values should be stored */
                                    );
 
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/cb_search.c b/webrtc/modules/audio_coding/codecs/ilbc/cb_search.c
index 4c6196b..2a77f4f 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/cb_search.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/cb_search.c
@@ -46,7 +46,9 @@
     int16_t block  /* (i) the subblock number */
                             ) {
   int16_t i, j, stage, range;
-  int16_t *pp, scale, tmp;
+  int16_t *pp;
+  int16_t tmp;
+  int scale;
   int16_t bits, temp1, temp2;
   int16_t base_size;
   int32_t codedEner, targetEner;
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c b/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c
index fde5414..db4b8d4 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/enhancer_interface.c
@@ -121,8 +121,8 @@
     shifts = WEBRTC_SPL_MAX(0, shifts);
 
     /* compute cross correlation */
-    WebRtcSpl_CrossCorrelation(corr32, target, regressor,
-                               ENH_BLOCKL_HALF, 50, (int16_t)shifts, -1);
+    WebRtcSpl_CrossCorrelation(corr32, target, regressor, ENH_BLOCKL_HALF, 50,
+                               shifts, -1);
 
     /* Find 3 highest correlations that should be compared for the
        highest (corr*corr)/ener */
@@ -207,8 +207,8 @@
       shifts=0;
 
     /* compute cross correlation */
-    WebRtcSpl_CrossCorrelation(corr32, target, regressor,
-                               plc_blockl, 3, (int16_t)shifts, 1);
+    WebRtcSpl_CrossCorrelation(corr32, target, regressor, plc_blockl, 3, shifts,
+                               1);
 
     /* find lag */
     lag=WebRtcSpl_MaxIndexW32(corr32, 3);
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/ilbc.c b/webrtc/modules/audio_coding/codecs/ilbc/ilbc.c
index 88ad33b..e41c095 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/ilbc.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/ilbc.c
@@ -88,10 +88,10 @@
   }
 }
 
-int16_t WebRtcIlbcfix_Encode(IlbcEncoderInstance* iLBCenc_inst,
-                             const int16_t* speechIn,
-                             int16_t len,
-                             uint8_t* encoded) {
+int WebRtcIlbcfix_Encode(IlbcEncoderInstance* iLBCenc_inst,
+                         const int16_t* speechIn,
+                         int16_t len,
+                         uint8_t* encoded) {
   int16_t pos = 0;
   int16_t encpos = 0;
 
@@ -141,11 +141,11 @@
 }
 
 
-int16_t WebRtcIlbcfix_Decode(IlbcDecoderInstance* iLBCdec_inst,
-                             const uint8_t* encoded,
-                             int16_t len,
-                             int16_t* decoded,
-                             int16_t* speechType)
+int WebRtcIlbcfix_Decode(IlbcDecoderInstance* iLBCdec_inst,
+                         const uint8_t* encoded,
+                         int16_t len,
+                         int16_t* decoded,
+                         int16_t* speechType)
 {
   int i=0;
   /* Allow for automatic switching between the frame sizes
@@ -194,11 +194,11 @@
   return(i*((IlbcDecoder*)iLBCdec_inst)->blockl);
 }
 
-int16_t WebRtcIlbcfix_Decode20Ms(IlbcDecoderInstance* iLBCdec_inst,
-                                 const uint8_t* encoded,
-                                 int16_t len,
-                                 int16_t* decoded,
-                                 int16_t* speechType)
+int WebRtcIlbcfix_Decode20Ms(IlbcDecoderInstance* iLBCdec_inst,
+                             const uint8_t* encoded,
+                             int16_t len,
+                             int16_t* decoded,
+                             int16_t* speechType)
 {
   int i=0;
   if ((len==((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)||
@@ -222,11 +222,11 @@
   return(i*((IlbcDecoder*)iLBCdec_inst)->blockl);
 }
 
-int16_t WebRtcIlbcfix_Decode30Ms(IlbcDecoderInstance* iLBCdec_inst,
-                                 const uint8_t* encoded,
-                                 int16_t len,
-                                 int16_t* decoded,
-                                 int16_t* speechType)
+int WebRtcIlbcfix_Decode30Ms(IlbcDecoderInstance* iLBCdec_inst,
+                             const uint8_t* encoded,
+                             int16_t len,
+                             int16_t* decoded,
+                             int16_t* speechType)
 {
   int i=0;
   if ((len==((IlbcDecoder*)iLBCdec_inst)->no_of_bytes)||
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/init_decode.c b/webrtc/modules/audio_coding/codecs/ilbc/init_decode.c
index d903ac7..0659e50 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/init_decode.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/init_decode.c
@@ -23,7 +23,7 @@
  *  Initiation of decoder instance.
  *---------------------------------------------------------------*/
 
-int16_t WebRtcIlbcfix_InitDecode(  /* (o) Number of decoded samples */
+int WebRtcIlbcfix_InitDecode(  /* (o) Number of decoded samples */
     IlbcDecoder *iLBCdec_inst,  /* (i/o) Decoder instance */
     int16_t mode,  /* (i) frame size mode */
     int use_enhancer) {  /* (i) 1: use enhancer, 0: no enhancer */
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h b/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h
index 4871b5c..cdd2192 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h
+++ b/webrtc/modules/audio_coding/codecs/ilbc/init_decode.h
@@ -25,7 +25,7 @@
  *  Initiation of decoder instance.
  *---------------------------------------------------------------*/
 
-int16_t WebRtcIlbcfix_InitDecode(  /* (o) Number of decoded samples */
+int WebRtcIlbcfix_InitDecode(  /* (o) Number of decoded samples */
     IlbcDecoder *iLBCdec_inst, /* (i/o) Decoder instance */
     int16_t mode,     /* (i) frame size mode */
     int use_enhancer           /* (i) 1 to use enhancer
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/init_encode.c b/webrtc/modules/audio_coding/codecs/ilbc/init_encode.c
index 1a2fa08..9c562db 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/init_encode.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/init_encode.c
@@ -23,7 +23,7 @@
  *  Initiation of encoder instance.
  *---------------------------------------------------------------*/
 
-int16_t WebRtcIlbcfix_InitEncode(  /* (o) Number of bytes encoded */
+int WebRtcIlbcfix_InitEncode(  /* (o) Number of bytes encoded */
     IlbcEncoder *iLBCenc_inst,  /* (i/o) Encoder instance */
     int16_t mode) {  /* (i) frame size mode */
   iLBCenc_inst->mode = mode;
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h b/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h
index 2eea27c..7154661 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h
+++ b/webrtc/modules/audio_coding/codecs/ilbc/init_encode.h
@@ -25,7 +25,7 @@
  *  Initiation of encoder instance.
  *---------------------------------------------------------------*/
 
-int16_t WebRtcIlbcfix_InitEncode(  /* (o) Number of bytes encoded */
+int WebRtcIlbcfix_InitEncode(  /* (o) Number of bytes encoded */
     IlbcEncoder *iLBCenc_inst, /* (i/o) Encoder instance */
     int16_t mode     /* (i) frame size mode */
                                          );
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/interface/ilbc.h b/webrtc/modules/audio_coding/codecs/ilbc/interface/ilbc.h
index b7e1735..4934968 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/interface/ilbc.h
+++ b/webrtc/modules/audio_coding/codecs/ilbc/interface/ilbc.h
@@ -135,10 +135,10 @@
    *                            -1 - Error
    */
 
-  int16_t WebRtcIlbcfix_Encode(IlbcEncoderInstance *iLBCenc_inst,
-                               const int16_t *speechIn,
-                               int16_t len,
-                               uint8_t* encoded);
+  int WebRtcIlbcfix_Encode(IlbcEncoderInstance *iLBCenc_inst,
+                           const int16_t *speechIn,
+                           int16_t len,
+                           uint8_t* encoded);
 
   /****************************************************************************
    * WebRtcIlbcfix_DecoderInit(...)
@@ -180,21 +180,21 @@
    *                            -1 - Error
    */
 
-  int16_t WebRtcIlbcfix_Decode(IlbcDecoderInstance* iLBCdec_inst,
+  int WebRtcIlbcfix_Decode(IlbcDecoderInstance* iLBCdec_inst,
+                           const uint8_t* encoded,
+                           int16_t len,
+                           int16_t* decoded,
+                           int16_t* speechType);
+  int WebRtcIlbcfix_Decode20Ms(IlbcDecoderInstance* iLBCdec_inst,
                                const uint8_t* encoded,
                                int16_t len,
                                int16_t* decoded,
                                int16_t* speechType);
-  int16_t WebRtcIlbcfix_Decode20Ms(IlbcDecoderInstance* iLBCdec_inst,
-                                   const uint8_t* encoded,
-                                   int16_t len,
-                                   int16_t* decoded,
-                                   int16_t* speechType);
-  int16_t WebRtcIlbcfix_Decode30Ms(IlbcDecoderInstance* iLBCdec_inst,
-                                   const uint8_t* encoded,
-                                   int16_t len,
-                                   int16_t* decoded,
-                                   int16_t* speechType);
+  int WebRtcIlbcfix_Decode30Ms(IlbcDecoderInstance* iLBCdec_inst,
+                               const uint8_t* encoded,
+                               int16_t len,
+                               int16_t* decoded,
+                               int16_t* speechType);
 
   /****************************************************************************
    * WebRtcIlbcfix_DecodePlc(...)
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c b/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c
index 048745a..0da6d54 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/my_corr.c
@@ -29,7 +29,8 @@
     const int16_t *seq2, /* (i) second sequence */
     int16_t dim2   /* (i) dimension seq2 */
                           ){
-  int16_t max, scale, loops;
+  int16_t max, loops;
+  int scale;
 
   /* Calculate correlation between the two sequences. Scale the
      result of the multiplcication to maximum 26 bits in order
@@ -37,7 +38,7 @@
   max=WebRtcSpl_MaxAbsValueW16(seq1, dim1);
   scale=WebRtcSpl_GetSizeInBits(max);
 
-  scale = (int16_t)(2 * scale - 26);
+  scale = 2 * scale - 26;
   if (scale<0) {
     scale=0;
   }
diff --git a/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testLib.c b/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testLib.c
index 370bf9d..1e966a7 100644
--- a/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testLib.c
+++ b/webrtc/modules/audio_coding/codecs/ilbc/test/iLBC_testLib.c
@@ -41,7 +41,8 @@
 {
   FILE *ifileid,*efileid,*ofileid, *chfileid;
   short encoded_data[55], data[240], speechType;
-  short len, mode, pli;
+  int len;
+  short mode, pli;
   int blockcount = 0;
 
   IlbcEncoderInstance *Enc_Inst;
@@ -173,7 +174,8 @@
       /* decoding */
       fprintf(stderr, "--- Decoding block %i --- ",blockcount);
       if (pli==1) {
-        len=WebRtcIlbcfix_Decode(Dec_Inst, encoded_data, len, data, &speechType);
+        len=WebRtcIlbcfix_Decode(Dec_Inst, encoded_data, (int16_t)len, data,
+                                 &speechType);
       } else {
         len=WebRtcIlbcfix_DecodePlc(Dec_Inst, data, 1);
       }
diff --git a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h
index 65c5b90..befb355 100644
--- a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h
+++ b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h
@@ -184,7 +184,7 @@
     decoder_sample_rate_hz_ = sample_rate_hz;
   }
   int16_t temp_type = 1;  // Default is speech.
-  int16_t ret =
+  int ret =
       T::DecodeInternal(isac_state_, encoded, static_cast<int16_t>(encoded_len),
                         decoded, &temp_type);
   *speech_type = ConvertSpeechType(temp_type);
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_encoder_isacfix.h b/webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_encoder_isacfix.h
index bf9f875..a1eb271 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_encoder_isacfix.h
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_encoder_isacfix.h
@@ -25,12 +25,12 @@
   static const uint16_t kFixSampleRate = 16000;
   static inline int16_t Control(instance_type* inst,
                                 int32_t rate,
-                                int16_t framesize) {
+                                int framesize) {
     return WebRtcIsacfix_Control(inst, rate, framesize);
   }
   static inline int16_t ControlBwe(instance_type* inst,
                                    int32_t rate_bps,
-                                   int16_t frame_size_ms,
+                                   int frame_size_ms,
                                    int16_t enforce_frame_size) {
     return WebRtcIsacfix_ControlBwe(inst, rate_bps, frame_size_ms,
                                     enforce_frame_size);
@@ -38,11 +38,11 @@
   static inline int16_t Create(instance_type** inst) {
     return WebRtcIsacfix_Create(inst);
   }
-  static inline int16_t DecodeInternal(instance_type* inst,
-                                       const uint8_t* encoded,
-                                       int16_t len,
-                                       int16_t* decoded,
-                                       int16_t* speech_type) {
+  static inline int DecodeInternal(instance_type* inst,
+                                   const uint8_t* encoded,
+                                   int16_t len,
+                                   int16_t* decoded,
+                                   int16_t* speech_type) {
     return WebRtcIsacfix_Decode(inst, encoded, len, decoded, speech_type);
   }
   static inline int16_t DecodePlc(instance_type* inst,
@@ -53,9 +53,9 @@
   static inline int16_t DecoderInit(instance_type* inst) {
     return WebRtcIsacfix_DecoderInit(inst);
   }
-  static inline int16_t Encode(instance_type* inst,
-                               const int16_t* speech_in,
-                               uint8_t* encoded) {
+  static inline int Encode(instance_type* inst,
+                           const int16_t* speech_in,
+                           uint8_t* encoded) {
     return WebRtcIsacfix_Encode(inst, speech_in, encoded);
   }
   static inline int16_t EncoderInit(instance_type* inst, int16_t coding_mode) {
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/interface/isacfix.h b/webrtc/modules/audio_coding/codecs/isac/fix/interface/isacfix.h
index 961fd3f..92dcf51 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/interface/isacfix.h
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/interface/isacfix.h
@@ -128,9 +128,9 @@
    *                            -1 - Error
    */
 
-  int16_t WebRtcIsacfix_Encode(ISACFIX_MainStruct *ISAC_main_inst,
-                               const int16_t *speechIn,
-                               uint8_t* encoded);
+  int WebRtcIsacfix_Encode(ISACFIX_MainStruct *ISAC_main_inst,
+                           const int16_t *speechIn,
+                           uint8_t* encoded);
 
 
 
@@ -251,11 +251,11 @@
    *                            -1 - Error
    */
 
-  int16_t WebRtcIsacfix_Decode(ISACFIX_MainStruct *ISAC_main_inst,
-                               const uint8_t* encoded,
-                               int16_t len,
-                               int16_t *decoded,
-                               int16_t *speechType);
+  int WebRtcIsacfix_Decode(ISACFIX_MainStruct *ISAC_main_inst,
+                           const uint8_t* encoded,
+                           int16_t len,
+                           int16_t *decoded,
+                           int16_t *speechType);
 
 
   /****************************************************************************
@@ -280,11 +280,11 @@
    */
 
 #ifdef WEBRTC_ISAC_FIX_NB_CALLS_ENABLED
-  int16_t WebRtcIsacfix_DecodeNb(ISACFIX_MainStruct *ISAC_main_inst,
-                                 const uint16_t *encoded,
-                                 int16_t len,
-                                 int16_t *decoded,
-                                 int16_t *speechType);
+  int WebRtcIsacfix_DecodeNb(ISACFIX_MainStruct *ISAC_main_inst,
+                             const uint16_t *encoded,
+                             int16_t len,
+                             int16_t *decoded,
+                             int16_t *speechType);
 #endif //  WEBRTC_ISAC_FIX_NB_CALLS_ENABLED
 
 
@@ -378,8 +378,8 @@
    */
 
   int16_t WebRtcIsacfix_Control(ISACFIX_MainStruct *ISAC_main_inst,
-                                int16_t          rate,
-                                int16_t          framesize);
+                                int16_t rate,
+                                int framesize);
 
 
 
@@ -407,7 +407,7 @@
 
   int16_t WebRtcIsacfix_ControlBwe(ISACFIX_MainStruct *ISAC_main_inst,
                                    int16_t rateBPS,
-                                   int16_t frameSizeMs,
+                                   int frameSizeMs,
                                    int16_t enforceFrameSize);
 
 
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c
index 23048a5..808aeb7 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routines_logist.c
@@ -226,10 +226,10 @@
  * Return value             : number of bytes in the stream so far
  *                            -1 if error detected
  */
-int16_t WebRtcIsacfix_DecLogisticMulti2(int16_t *dataQ7,
-                                        Bitstr_dec *streamData,
-                                        const int32_t *envQ8,
-                                        const int16_t lenData)
+int WebRtcIsacfix_DecLogisticMulti2(int16_t *dataQ7,
+                                    Bitstr_dec *streamData,
+                                    const int32_t *envQ8,
+                                    const int16_t lenData)
 {
   uint32_t    W_lower;
   uint32_t    W_upper;
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h b/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h
index 584bc47..40bbb4c 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/arith_routins.h
@@ -74,7 +74,7 @@
  * Return value             : number of bytes in the stream so far
  *                            <0 if error detected
  */
-int16_t WebRtcIsacfix_DecLogisticMulti2(
+int WebRtcIsacfix_DecLogisticMulti2(
     int16_t *data,
     Bitstr_dec *streamData,
     const int32_t *env,
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h b/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h
index 8ecbd14..3d003e4 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h
@@ -32,9 +32,9 @@
                                     uint32_t send_ts,
                                     uint32_t arr_ts);
 
-int16_t WebRtcIsacfix_DecodeImpl(int16_t* signal_out16,
-                                       IsacFixDecoderInstance* ISACdec_obj,
-                                       int16_t* current_framesamples);
+int WebRtcIsacfix_DecodeImpl(int16_t* signal_out16,
+                             IsacFixDecoderInstance* ISACdec_obj,
+                             int16_t* current_framesamples);
 
 int16_t WebRtcIsacfix_DecodePlcImpl(int16_t* decoded,
                                           IsacFixDecoderInstance* ISACdec_obj,
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c
index 5e095da..f0ae07e 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/decode.c
@@ -27,14 +27,14 @@
 
 
 
-int16_t WebRtcIsacfix_DecodeImpl(int16_t       *signal_out16,
-                                 IsacFixDecoderInstance *ISACdec_obj,
-                                 int16_t       *current_framesamples)
+int WebRtcIsacfix_DecodeImpl(int16_t       *signal_out16,
+                             IsacFixDecoderInstance *ISACdec_obj,
+                             int16_t       *current_framesamples)
 {
   int k;
   int err;
   int16_t BWno;
-  int16_t len = 0;
+  int len = 0;
 
   int16_t model;
 
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c
index 3965378..aab8f43 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.c
@@ -450,10 +450,10 @@
  * function to decode the complex spectrum from the bitstream
  * returns the total number of bytes in the stream
  */
-int16_t WebRtcIsacfix_DecodeSpec(Bitstr_dec *streamdata,
-                                 int16_t *frQ7,
-                                 int16_t *fiQ7,
-                                 int16_t AvgPitchGain_Q12)
+int WebRtcIsacfix_DecodeSpec(Bitstr_dec *streamdata,
+                             int16_t *frQ7,
+                             int16_t *fiQ7,
+                             int16_t AvgPitchGain_Q12)
 {
   int16_t  data[FRAMESAMPLES];
   int32_t  invARSpec2_Q16[FRAMESAMPLES/4];
@@ -461,7 +461,7 @@
   int16_t  RCQ15[AR_ORDER];
   int16_t  gainQ10;
   int32_t  gain2_Q10;
-  int16_t  len;
+  int len;
   int          k;
 
   /* create dither signal */
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h
index ec20c71..e4489df 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h
@@ -22,10 +22,10 @@
 #include "structs.h"
 
 /* decode complex spectrum (return number of bytes in stream) */
-int16_t WebRtcIsacfix_DecodeSpec(Bitstr_dec  *streamdata,
-                                 int16_t *frQ7,
-                                 int16_t *fiQ7,
-                                 int16_t AvgPitchGain_Q12);
+int WebRtcIsacfix_DecodeSpec(Bitstr_dec  *streamdata,
+                             int16_t *frQ7,
+                             int16_t *fiQ7,
+                             int16_t AvgPitchGain_Q12);
 
 /* encode complex spectrum */
 int WebRtcIsacfix_EncodeSpec(const int16_t *fr,
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c
index f8abc8a..f1e5cd0 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c
@@ -399,12 +399,12 @@
  *                          : -1 - Error
  */
 
-int16_t WebRtcIsacfix_Encode(ISACFIX_MainStruct *ISAC_main_inst,
-                             const int16_t    *speechIn,
-                             uint8_t* encoded)
+int WebRtcIsacfix_Encode(ISACFIX_MainStruct *ISAC_main_inst,
+                         const int16_t    *speechIn,
+                         uint8_t* encoded)
 {
   ISACFIX_SubStruct *ISAC_inst;
-  int16_t stream_len;
+  int stream_len;
 
   /* typecast pointer to rela structure */
   ISAC_inst = (ISACFIX_SubStruct *)ISAC_main_inst;
@@ -421,7 +421,7 @@
                                         &ISAC_inst->bwestimator_obj,
                                         ISAC_inst->CodingMode);
   if (stream_len<0) {
-    ISAC_inst->errorcode = - stream_len;
+    ISAC_inst->errorcode = -(int16_t)stream_len;
     return -1;
   }
 
@@ -766,17 +766,17 @@
  */
 
 
-int16_t WebRtcIsacfix_Decode(ISACFIX_MainStruct *ISAC_main_inst,
-                             const uint8_t* encoded,
-                             int16_t          len,
-                             int16_t          *decoded,
-                             int16_t     *speechType)
+int WebRtcIsacfix_Decode(ISACFIX_MainStruct *ISAC_main_inst,
+                         const uint8_t* encoded,
+                         int16_t          len,
+                         int16_t          *decoded,
+                         int16_t     *speechType)
 {
   ISACFIX_SubStruct *ISAC_inst;
   /* number of samples (480 or 960), output from decoder */
   /* that were actually used in the encoder/decoder (determined on the fly) */
   int16_t     number_of_samples;
-  int16_t declen = 0;
+  int declen = 0;
 
   /* typecast pointer to real structure */
   ISAC_inst = (ISACFIX_SubStruct *)ISAC_main_inst;
@@ -809,7 +809,7 @@
 
   if (declen < 0) {
     /* Some error inside the decoder */
-    ISAC_inst->errorcode = -declen;
+    ISAC_inst->errorcode = -(int16_t)declen;
     memset(decoded, 0, sizeof(int16_t) * MAX_FRAMESAMPLES);
     return -1;
   }
@@ -859,17 +859,17 @@
  */
 
 #ifdef WEBRTC_ISAC_FIX_NB_CALLS_ENABLED
-int16_t WebRtcIsacfix_DecodeNb(ISACFIX_MainStruct *ISAC_main_inst,
-                               const uint16_t   *encoded,
-                               int16_t          len,
-                               int16_t          *decoded,
-                               int16_t    *speechType)
+int WebRtcIsacfix_DecodeNb(ISACFIX_MainStruct *ISAC_main_inst,
+                           const uint16_t   *encoded,
+                           int16_t          len,
+                           int16_t          *decoded,
+                           int16_t    *speechType)
 {
   ISACFIX_SubStruct *ISAC_inst;
   /* twice the number of samples (480 or 960), output from decoder */
   /* that were actually used in the encoder/decoder (determined on the fly) */
   int16_t     number_of_samples;
-  int16_t declen = 0;
+  int declen = 0;
   int16_t dummy[FRAMESAMPLES/2];
 
 
@@ -903,7 +903,7 @@
 
   if (declen < 0) {
     /* Some error inside the decoder */
-    ISAC_inst->errorcode = -declen;
+    ISAC_inst->errorcode = -(int16_t)declen;
     memset(decoded, 0, sizeof(int16_t) * FRAMESAMPLES);
     return -1;
   }
@@ -1076,8 +1076,8 @@
  */
 
 int16_t WebRtcIsacfix_Control(ISACFIX_MainStruct *ISAC_main_inst,
-                              int16_t          rate,
-                              int16_t          framesize)
+                              int16_t rate,
+                              int framesize)
 {
   ISACFIX_SubStruct *ISAC_inst;
   /* typecast pointer to real structure */
@@ -1101,7 +1101,7 @@
 
 
   if (framesize  == 30 || framesize == 60)
-    ISAC_inst->ISACenc_obj.new_framelength = (FS/1000) * framesize;
+    ISAC_inst->ISACenc_obj.new_framelength = (int16_t)((FS/1000) * framesize);
   else {
     ISAC_inst->errorcode = ISAC_DISALLOWED_FRAME_LENGTH;
     return -1;
@@ -1136,7 +1136,7 @@
 
 int16_t WebRtcIsacfix_ControlBwe(ISACFIX_MainStruct *ISAC_main_inst,
                                  int16_t rateBPS,
-                                 int16_t frameSizeMs,
+                                 int frameSizeMs,
                                  int16_t enforceFrameSize)
 {
   ISACFIX_SubStruct *ISAC_inst;
@@ -1170,7 +1170,7 @@
 
   /* Set initial framesize. If enforceFrameSize is set the frame size will not change */
   if ((frameSizeMs  == 30) || (frameSizeMs == 60)) {
-    ISAC_inst->ISACenc_obj.new_framelength = (FS/1000) * frameSizeMs;
+    ISAC_inst->ISACenc_obj.new_framelength = (int16_t)((FS/1000) * frameSizeMs);
   } else {
     ISAC_inst->errorcode = ISAC_DISALLOWED_FRAME_LENGTH;
     return -1;
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/test/kenny.cc b/webrtc/modules/audio_coding/codecs/isac/fix/test/kenny.cc
index ba50b0c..bc1a194 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/test/kenny.cc
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/test/kenny.cc
@@ -101,14 +101,15 @@
   int i, errtype, h = 0, k, packetLossPercent = 0;
   int16_t CodingMode;
   int16_t bottleneck;
-  int16_t framesize = 30;           /* ms */
+  int framesize = 30;           /* ms */
   int cur_framesmpls, err = 0, lostPackets = 0;
 
   /* Runtime statistics */
   double starttime, runtime, length_file;
 
   int16_t stream_len = 0;
-  int16_t framecnt, declen = 0;
+  int16_t framecnt;
+  int declen = 0;
   int16_t shortdata[FRAMESAMPLES_10ms];
   int16_t decoded[MAX_FRAMESAMPLES];
   uint16_t streamdata[500];
@@ -766,7 +767,7 @@
 #else
           declen = -1;
 #endif
-          prevFrameSize = declen/240;
+          prevFrameSize = static_cast<int16_t>(declen / 240);
         }
       }
 
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/test/test_iSACfixfloat.c b/webrtc/modules/audio_coding/codecs/isac/fix/test/test_iSACfixfloat.c
index 9aabd04..218b97b 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/test/test_iSACfixfloat.c
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/test/test_iSACfixfloat.c
@@ -88,8 +88,8 @@
   int16_t CodingMode;
   int16_t bottleneck;
 
-  int16_t framesize = 30; /* ms */
-  // int16_t framesize = 60; /* To invoke cisco complexity case at frame 2252 */
+  int framesize = 30; /* ms */
+  // int framesize = 60; /* To invoke cisco complexity case at frame 2252 */
 
   int cur_framesmpls, err;
 
@@ -99,7 +99,7 @@
   double length_file;
 
   int16_t stream_len = 0;
-  int16_t declen;
+  int declen;
 
   int16_t shortdata[FRAMESAMPLES_10ms];
   int16_t decoded[MAX_FRAMESAMPLES];
diff --git a/webrtc/modules/audio_coding/codecs/isac/main/interface/audio_encoder_isac.h b/webrtc/modules/audio_coding/codecs/isac/main/interface/audio_encoder_isac.h
index 5a75807..8c70533 100644
--- a/webrtc/modules/audio_coding/codecs/isac/main/interface/audio_encoder_isac.h
+++ b/webrtc/modules/audio_coding/codecs/isac/main/interface/audio_encoder_isac.h
@@ -24,12 +24,12 @@
   static const bool has_swb = true;
   static inline int16_t Control(instance_type* inst,
                                 int32_t rate,
-                                int16_t framesize) {
+                                int framesize) {
     return WebRtcIsac_Control(inst, rate, framesize);
   }
   static inline int16_t ControlBwe(instance_type* inst,
                                    int32_t rate_bps,
-                                   int16_t frame_size_ms,
+                                   int frame_size_ms,
                                    int16_t enforce_frame_size) {
     return WebRtcIsac_ControlBwe(inst, rate_bps, frame_size_ms,
                                  enforce_frame_size);
@@ -37,11 +37,11 @@
   static inline int16_t Create(instance_type** inst) {
     return WebRtcIsac_Create(inst);
   }
-  static inline int16_t DecodeInternal(instance_type* inst,
-                                       const uint8_t* encoded,
-                                       int16_t len,
-                                       int16_t* decoded,
-                                       int16_t* speech_type) {
+  static inline int DecodeInternal(instance_type* inst,
+                                   const uint8_t* encoded,
+                                   int16_t len,
+                                   int16_t* decoded,
+                                   int16_t* speech_type) {
     return WebRtcIsac_Decode(inst, encoded, len, decoded, speech_type);
   }
   static inline int16_t DecodePlc(instance_type* inst,
@@ -53,9 +53,9 @@
   static inline int16_t DecoderInit(instance_type* inst) {
     return WebRtcIsac_DecoderInit(inst);
   }
-  static inline int16_t Encode(instance_type* inst,
-                               const int16_t* speech_in,
-                               uint8_t* encoded) {
+  static inline int Encode(instance_type* inst,
+                           const int16_t* speech_in,
+                           uint8_t* encoded) {
     return WebRtcIsac_Encode(inst, speech_in, encoded);
   }
   static inline int16_t EncoderInit(instance_type* inst, int16_t coding_mode) {
diff --git a/webrtc/modules/audio_coding/codecs/isac/main/interface/isac.h b/webrtc/modules/audio_coding/codecs/isac/main/interface/isac.h
index 6d0c32d..1a83d72 100644
--- a/webrtc/modules/audio_coding/codecs/isac/main/interface/isac.h
+++ b/webrtc/modules/audio_coding/codecs/isac/main/interface/isac.h
@@ -144,7 +144,7 @@
    *                            : -1 - Error
    */
 
-  int16_t WebRtcIsac_Encode(
+  int WebRtcIsac_Encode(
       ISACStruct*        ISAC_main_inst,
       const int16_t* speechIn,
       uint8_t* encoded);
@@ -214,7 +214,7 @@
    *                              -1 - Error.
    */
 
-  int16_t WebRtcIsac_Decode(
+  int WebRtcIsac_Decode(
       ISACStruct*           ISAC_main_inst,
       const uint8_t* encoded,
       int16_t         len,
@@ -269,7 +269,7 @@
   int16_t WebRtcIsac_Control(
       ISACStruct*   ISAC_main_inst,
       int32_t rate,
-      int16_t framesize);
+      int framesize);
 
 
   /******************************************************************************
@@ -300,7 +300,7 @@
   int16_t WebRtcIsac_ControlBwe(
       ISACStruct* ISAC_main_inst,
       int32_t rateBPS,
-      int16_t frameSizeMs,
+      int frameSizeMs,
       int16_t enforceFrameSize);
 
 
@@ -701,7 +701,7 @@
    * Return value              : >0 - number of samples in decoded vector
    *                             -1 - Error
    */
-  int16_t WebRtcIsac_DecodeRcu(
+  int WebRtcIsac_DecodeRcu(
       ISACStruct*           ISAC_main_inst,
       const uint8_t* encoded,
       int16_t         len,
diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/crc.c b/webrtc/modules/audio_coding/codecs/isac/main/source/crc.c
index 06c15cb..2419e24 100644
--- a/webrtc/modules/audio_coding/codecs/isac/main/source/crc.c
+++ b/webrtc/modules/audio_coding/codecs/isac/main/source/crc.c
@@ -80,9 +80,9 @@
  *                             -1 - Error
  */
 
-int16_t WebRtcIsac_GetCrc(const int16_t* bitstream,
-                          int16_t        len_bitstream_in_bytes,
-                          uint32_t*      crc)
+int WebRtcIsac_GetCrc(const int16_t* bitstream,
+                      int len_bitstream_in_bytes,
+                      uint32_t* crc)
 {
   uint8_t* bitstream_ptr_uw8;
   uint32_t crc_state;
diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/crc.h b/webrtc/modules/audio_coding/codecs/isac/main/source/crc.h
index 19d1bf3..09583df 100644
--- a/webrtc/modules/audio_coding/codecs/isac/main/source/crc.h
+++ b/webrtc/modules/audio_coding/codecs/isac/main/source/crc.h
@@ -36,10 +36,10 @@
  *                   -1 - Error
  */
 
-int16_t WebRtcIsac_GetCrc(
+int WebRtcIsac_GetCrc(
     const int16_t* encoded,
-    int16_t        no_of_word8s,
-    uint32_t*      crc);
+    int no_of_word8s,
+    uint32_t* crc);
 
 
 
diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c b/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c
index db78e6d..3ed776b 100644
--- a/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c
+++ b/webrtc/modules/audio_coding/codecs/isac/main/source/isac.c
@@ -494,15 +494,15 @@
  *                                 samples.
  *                            : -1 - Error
  */
-int16_t WebRtcIsac_Encode(ISACStruct* ISAC_main_inst,
-                          const int16_t* speechIn,
-                          uint8_t* encoded) {
+int WebRtcIsac_Encode(ISACStruct* ISAC_main_inst,
+                      const int16_t* speechIn,
+                      uint8_t* encoded) {
   float inFrame[FRAMESAMPLES_10ms];
   int16_t speechInLB[FRAMESAMPLES_10ms];
   int16_t speechInUB[FRAMESAMPLES_10ms];
-  int16_t streamLenLB = 0;
-  int16_t streamLenUB = 0;
-  int16_t streamLen = 0;
+  int streamLenLB = 0;
+  int streamLenUB = 0;
+  int streamLen = 0;
   int16_t k = 0;
   int garbageLen = 0;
   int32_t bottleneck = 0;
@@ -601,8 +601,8 @@
 
     /* Tell to upper-band the number of bytes used so far.
      * This is for payload limitation. */
-    instUB->ISACencUB_obj.numBytesUsed = streamLenLB + 1 +
-                                         LEN_CHECK_SUM_WORD8;
+    instUB->ISACencUB_obj.numBytesUsed =
+        (int16_t)(streamLenLB + 1 + LEN_CHECK_SUM_WORD8);
     /* Encode upper-band. */
     switch (instISAC->bandwidthKHz) {
       case isac12kHz: {
@@ -1045,12 +1045,12 @@
   return 0;
 }
 
-static int16_t Decode(ISACStruct* ISAC_main_inst,
-                      const uint8_t* encoded,
-                      int16_t lenEncodedBytes,
-                      int16_t* decoded,
-                      int16_t* speechType,
-                      int16_t isRCUPayload) {
+static int Decode(ISACStruct* ISAC_main_inst,
+                  const uint8_t* encoded,
+                  int16_t lenEncodedBytes,
+                  int16_t* decoded,
+                  int16_t* speechType,
+                  int16_t isRCUPayload) {
   /* Number of samples (480 or 960), output from decoder
      that were actually used in the encoder/decoder
      (determined on the fly). */
@@ -1060,8 +1060,8 @@
   float outFrame[MAX_FRAMESAMPLES];
   int16_t outFrameLB[MAX_FRAMESAMPLES];
   int16_t outFrameUB[MAX_FRAMESAMPLES];
-  int16_t numDecodedBytesLB;
-  int16_t numDecodedBytesUB;
+  int numDecodedBytesLB;
+  int numDecodedBytesUB;
   int16_t lenEncodedLBBytes;
   int16_t validChecksum = 1;
   int16_t k;
@@ -1350,11 +1350,11 @@
  *                              -1 - Error
  */
 
-int16_t WebRtcIsac_Decode(ISACStruct* ISAC_main_inst,
-                          const uint8_t* encoded,
-                          int16_t lenEncodedBytes,
-                          int16_t* decoded,
-                          int16_t* speechType) {
+int WebRtcIsac_Decode(ISACStruct* ISAC_main_inst,
+                      const uint8_t* encoded,
+                      int16_t lenEncodedBytes,
+                      int16_t* decoded,
+                      int16_t* speechType) {
   int16_t isRCUPayload = 0;
   return Decode(ISAC_main_inst, encoded, lenEncodedBytes, decoded,
                 speechType, isRCUPayload);
@@ -1382,11 +1382,11 @@
 
 
 
-int16_t WebRtcIsac_DecodeRcu(ISACStruct* ISAC_main_inst,
-                             const uint8_t* encoded,
-                             int16_t lenEncodedBytes,
-                             int16_t* decoded,
-                             int16_t* speechType) {
+int WebRtcIsac_DecodeRcu(ISACStruct* ISAC_main_inst,
+                         const uint8_t* encoded,
+                         int16_t lenEncodedBytes,
+                         int16_t* decoded,
+                         int16_t* speechType) {
   int16_t isRCUPayload = 1;
   return Decode(ISAC_main_inst, encoded, lenEncodedBytes, decoded,
                 speechType, isRCUPayload);
@@ -1485,7 +1485,7 @@
 
 int16_t WebRtcIsac_Control(ISACStruct* ISAC_main_inst,
                            int32_t bottleneckBPS,
-                           int16_t frameSize) {
+                           int frameSize) {
   ISACMainStruct* instISAC = (ISACMainStruct*)ISAC_main_inst;
   int16_t status;
   double rateLB;
@@ -1526,7 +1526,7 @@
     return -1;
   }
 
-  status = ControlLb(&instISAC->instLB, rateLB, frameSize);
+  status = ControlLb(&instISAC->instLB, rateLB, (int16_t)frameSize);
   if (status < 0) {
     instISAC->errorCode = -status;
     return -1;
@@ -1594,7 +1594,7 @@
  */
 int16_t WebRtcIsac_ControlBwe(ISACStruct* ISAC_main_inst,
                               int32_t bottleneckBPS,
-                              int16_t frameSizeMs,
+                              int frameSizeMs,
                               int16_t enforceFrameSize) {
   ISACMainStruct* instISAC = (ISACMainStruct*)ISAC_main_inst;
   enum ISACBandwidth bandwidth;
@@ -1641,8 +1641,8 @@
    *  will not change */
   if (frameSizeMs != 0) {
     if ((frameSizeMs  == 30) || (frameSizeMs == 60)) {
-      instISAC->instLB.ISACencLB_obj.new_framelength = (FS / 1000) *
-          frameSizeMs;
+      instISAC->instLB.ISACencLB_obj.new_framelength =
+          (int16_t)((FS / 1000) * frameSizeMs);
     } else {
       instISAC->errorCode = ISAC_DISALLOWED_FRAME_LENGTH;
       return -1;
diff --git a/webrtc/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc b/webrtc/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc
index 8b93e65..a751c24 100644
--- a/webrtc/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc
+++ b/webrtc/modules/audio_coding/codecs/isac/main/source/isac_unittest.cc
@@ -79,7 +79,7 @@
   WebRtcIsac_EncoderInit(isac_codec_, 0);
   WebRtcIsac_DecoderInit(isac_codec_);
 
-  int16_t encoded_bytes;
+  int encoded_bytes;
 
   // Test with call with a small packet (sync packet).
   EXPECT_EQ(-1, WebRtcIsac_UpdateBwEstimate(isac_codec_, bitstream_small_, 7, 1,
diff --git a/webrtc/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc b/webrtc/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
index 717da09..1a20ca5 100644
--- a/webrtc/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
+++ b/webrtc/modules/audio_coding/codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc
@@ -47,14 +47,15 @@
   int i, errtype, VADusage = 0, packetLossPercent = 0;
   int16_t CodingMode;
   int32_t bottleneck = 0;
-  int16_t framesize = 30; /* ms */
+  int framesize = 30; /* ms */
   int cur_framesmpls, err;
 
   /* Runtime statistics */
   double starttime, runtime, length_file;
 
   int16_t stream_len = 0;
-  int16_t declen = 0, lostFrame = 0, declenTC = 0;
+  int declen = 0, declenTC = 0;
+  int16_t lostFrame = 0;
 
   int16_t shortdata[SWBFRAMESAMPLES_10ms];
   int16_t vaddata[SWBFRAMESAMPLES_10ms * 3];
diff --git a/webrtc/modules/audio_coding/codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc b/webrtc/modules/audio_coding/codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc
index 6ec818e..a11e408 100644
--- a/webrtc/modules/audio_coding/codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc
+++ b/webrtc/modules/audio_coding/codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc
@@ -191,7 +191,7 @@
 
   short streamLen;
   short numSamplesRead;
-  short lenDecodedAudio;
+  int lenDecodedAudio;
   short senderIdx;
   short receiverIdx;
 
diff --git a/webrtc/modules/audio_coding/codecs/isac/main/test/simpleKenny.c b/webrtc/modules/audio_coding/codecs/isac/main/test/simpleKenny.c
index 959be7d..b1d8a24 100644
--- a/webrtc/modules/audio_coding/codecs/isac/main/test/simpleKenny.c
+++ b/webrtc/modules/audio_coding/codecs/isac/main/test/simpleKenny.c
@@ -62,7 +62,7 @@
   unsigned long totalsmpls = 0;
 
   int32_t bottleneck = 39;
-  int16_t frameSize = 30; /* ms */
+  int frameSize = 30; /* ms */
   int16_t codingMode = 1;
   int16_t shortdata[FRAMESAMPLES_SWB_10ms];
   int16_t decoded[MAX_FRAMESAMPLES_SWB];
@@ -73,9 +73,9 @@
   ISACStruct* ISAC_main_inst;
 
   int16_t stream_len = 0;
-  int16_t declen = 0;
+  int declen = 0;
   int16_t err;
-  int16_t cur_framesmpls;
+  int cur_framesmpls;
   int endfile;
 #ifdef WIN32
   double length_file;
diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
index c05d773..1eeb5ca 100644
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc
@@ -198,7 +198,7 @@
   CHECK_EQ(input_buffer_.size(),
            static_cast<size_t>(num_10ms_frames_per_packet_) *
            samples_per_10ms_frame_);
-  int16_t status = WebRtcOpus_Encode(
+  int status = WebRtcOpus_Encode(
       inst_, &input_buffer_[0],
       rtc::CheckedDivExact(CastInt16(input_buffer_.size()),
                            static_cast<int16_t>(num_channels_)),
diff --git a/webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h b/webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h
index dccc7ca..925cd85 100644
--- a/webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h
+++ b/webrtc/modules/audio_coding/codecs/opus/interface/opus_interface.h
@@ -64,11 +64,11 @@
  * Return value                 : >=0 - Length (in bytes) of coded data
  *                                -1 - Error
  */
-int16_t WebRtcOpus_Encode(OpusEncInst* inst,
-                          const int16_t* audio_in,
-                          int16_t samples,
-                          int16_t length_encoded_buffer,
-                          uint8_t* encoded);
+int WebRtcOpus_Encode(OpusEncInst* inst,
+                      const int16_t* audio_in,
+                      int16_t samples,
+                      int16_t length_encoded_buffer,
+                      uint8_t* encoded);
 
 /****************************************************************************
  * WebRtcOpus_SetBitRate(...)
@@ -236,9 +236,9 @@
  * Return value              : >0 - Samples per channel in decoded vector
  *                             -1 - Error
  */
-int16_t WebRtcOpus_Decode(OpusDecInst* inst, const uint8_t* encoded,
-                          int16_t encoded_bytes, int16_t* decoded,
-                          int16_t* audio_type);
+int WebRtcOpus_Decode(OpusDecInst* inst, const uint8_t* encoded,
+                      int16_t encoded_bytes, int16_t* decoded,
+                      int16_t* audio_type);
 
 /****************************************************************************
  * WebRtcOpus_DecodePlc(...)
@@ -254,8 +254,8 @@
  * Return value                   : >0 - number of samples in decoded PLC vector
  *                                  -1 - Error
  */
-int16_t WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded,
-                             int16_t number_of_lost_frames);
+int WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded,
+                         int number_of_lost_frames);
 
 /****************************************************************************
  * WebRtcOpus_DecodeFec(...)
@@ -275,9 +275,9 @@
  *                              0 - No FEC data in the packet
  *                             -1 - Error
  */
-int16_t WebRtcOpus_DecodeFec(OpusDecInst* inst, const uint8_t* encoded,
-                             int16_t encoded_bytes, int16_t* decoded,
-                             int16_t* audio_type);
+int WebRtcOpus_DecodeFec(OpusDecInst* inst, const uint8_t* encoded,
+                         int16_t encoded_bytes, int16_t* decoded,
+                         int16_t* audio_type);
 
 /****************************************************************************
  * WebRtcOpus_DurationEst(...)
diff --git a/webrtc/modules/audio_coding/codecs/opus/opus_fec_test.cc b/webrtc/modules/audio_coding/codecs/opus/opus_fec_test.cc
index a30b1cb..328fc48 100644
--- a/webrtc/modules/audio_coding/codecs/opus/opus_fec_test.cc
+++ b/webrtc/modules/audio_coding/codecs/opus/opus_fec_test.cc
@@ -131,10 +131,10 @@
 }
 
 void OpusFecTest::EncodeABlock() {
-  int16_t value = WebRtcOpus_Encode(opus_encoder_,
-                                    &in_data_[data_pointer_],
-                                    block_length_sample_,
-                                    max_bytes_, &bit_stream_[0]);
+  int value = WebRtcOpus_Encode(opus_encoder_,
+                                &in_data_[data_pointer_],
+                                block_length_sample_,
+                                max_bytes_, &bit_stream_[0]);
   EXPECT_GT(value, 0);
 
   encoded_bytes_ = value;
@@ -142,7 +142,7 @@
 
 void OpusFecTest::DecodeABlock(bool lost_previous, bool lost_current) {
   int16_t audio_type;
-  int16_t value_1 = 0, value_2 = 0;
+  int value_1 = 0, value_2 = 0;
 
   if (lost_previous) {
     // Decode previous frame.
diff --git a/webrtc/modules/audio_coding/codecs/opus/opus_interface.c b/webrtc/modules/audio_coding/codecs/opus/opus_interface.c
index 527de10..e250616 100644
--- a/webrtc/modules/audio_coding/codecs/opus/opus_interface.c
+++ b/webrtc/modules/audio_coding/codecs/opus/opus_interface.c
@@ -78,11 +78,11 @@
   }
 }
 
-int16_t WebRtcOpus_Encode(OpusEncInst* inst,
-                          const int16_t* audio_in,
-                          int16_t samples,
-                          int16_t length_encoded_buffer,
-                          uint8_t* encoded) {
+int WebRtcOpus_Encode(OpusEncInst* inst,
+                      const int16_t* audio_in,
+                      int16_t samples,
+                      int16_t length_encoded_buffer,
+                      uint8_t* encoded) {
   int res;
 
   if (samples > 48 * kWebRtcOpusMaxEncodeFrameSizeMs) {
@@ -291,9 +291,9 @@
   return res;
 }
 
-int16_t WebRtcOpus_Decode(OpusDecInst* inst, const uint8_t* encoded,
-                          int16_t encoded_bytes, int16_t* decoded,
-                          int16_t* audio_type) {
+int WebRtcOpus_Decode(OpusDecInst* inst, const uint8_t* encoded,
+                      int16_t encoded_bytes, int16_t* decoded,
+                      int16_t* audio_type) {
   int decoded_samples;
 
   if (encoded_bytes == 0) {
@@ -318,8 +318,8 @@
   return decoded_samples;
 }
 
-int16_t WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded,
-                             int16_t number_of_lost_frames) {
+int WebRtcOpus_DecodePlc(OpusDecInst* inst, int16_t* decoded,
+                         int number_of_lost_frames) {
   int16_t audio_type = 0;
   int decoded_samples;
   int plc_samples;
@@ -339,9 +339,9 @@
   return decoded_samples;
 }
 
-int16_t WebRtcOpus_DecodeFec(OpusDecInst* inst, const uint8_t* encoded,
-                             int16_t encoded_bytes, int16_t* decoded,
-                             int16_t* audio_type) {
+int WebRtcOpus_DecodeFec(OpusDecInst* inst, const uint8_t* encoded,
+                         int16_t encoded_bytes, int16_t* decoded,
+                         int16_t* audio_type) {
   int decoded_samples;
   int fec_samples;