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}
This commit is contained in:
Peter Kasting
2015-06-09 17:19:57 -07:00
parent 54b0ca553f
commit 83ad33a8ae
61 changed files with 314 additions and 314 deletions

View File

@ -101,14 +101,15 @@ int main(int argc, char* argv[])
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 @@ int main(int argc, char* argv[])
#else
declen = -1;
#endif
prevFrameSize = declen/240;
prevFrameSize = static_cast<int16_t>(declen / 240);
}
}

View File

@ -88,8 +88,8 @@ int main(int argc, char* argv[]) {
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 @@ int main(int argc, char* argv[]) {
double length_file;
int16_t stream_len = 0;
int16_t declen;
int declen;
int16_t shortdata[FRAMESAMPLES_10ms];
int16_t decoded[MAX_FRAMESAMPLES];