Reland "Upconvert various types to int.", common_audio portion.

This reverts portions of commit cb180976dd0e9672cde4523d87b5f4857478b5e9, which
reverted commit 83ad33a8aed1fb00e422b6abd33c3e8942821c24.  Specifically, the
files in webrtc/common_audio/ are relanded.

The original commit message is below:

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
TBR=andrew

Review URL: https://codereview.webrtc.org/1184613003

Cr-Commit-Position: refs/heads/master@{#9425}
This commit is contained in:
Peter Kasting
2015-06-11 19:40:49 -07:00
parent bba7807078
commit 15b58eea28
4 changed files with 14 additions and 14 deletions

View File

@ -16,8 +16,8 @@ void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation,
const int16_t* seq2,
int16_t dim_seq,
int16_t dim_cross_correlation,
int16_t right_shifts,
int16_t step_seq2) {
int right_shifts,
int step_seq2) {
int i = 0, j = 0;
for (i = 0; i < dim_cross_correlation; i++) {

View File

@ -15,8 +15,8 @@ void WebRtcSpl_CrossCorrelation_mips(int32_t* cross_correlation,
const int16_t* seq2,
int16_t dim_seq,
int16_t dim_cross_correlation,
int16_t right_shifts,
int16_t step_seq2) {
int right_shifts,
int step_seq2) {
int32_t t0 = 0, t1 = 0, t2 = 0, t3 = 0, sum = 0;
int16_t *pseq2 = NULL;

View File

@ -74,8 +74,8 @@ void WebRtcSpl_CrossCorrelationNeon(int32_t* cross_correlation,
const int16_t* seq2,
int16_t dim_seq,
int16_t dim_cross_correlation,
int16_t right_shifts,
int16_t step_seq2) {
int right_shifts,
int step_seq2) {
int i = 0;
for (i = 0; i < dim_cross_correlation; i++) {

View File

@ -542,24 +542,24 @@ typedef void (*CrossCorrelation)(int32_t* cross_correlation,
const int16_t* seq2,
int16_t dim_seq,
int16_t dim_cross_correlation,
int16_t right_shifts,
int16_t step_seq2);
int right_shifts,
int step_seq2);
extern CrossCorrelation WebRtcSpl_CrossCorrelation;
void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation,
const int16_t* seq1,
const int16_t* seq2,
int16_t dim_seq,
int16_t dim_cross_correlation,
int16_t right_shifts,
int16_t step_seq2);
int right_shifts,
int step_seq2);
#if (defined WEBRTC_DETECT_NEON) || (defined WEBRTC_HAS_NEON)
void WebRtcSpl_CrossCorrelationNeon(int32_t* cross_correlation,
const int16_t* seq1,
const int16_t* seq2,
int16_t dim_seq,
int16_t dim_cross_correlation,
int16_t right_shifts,
int16_t step_seq2);
int right_shifts,
int step_seq2);
#endif
#if defined(MIPS32_LE)
void WebRtcSpl_CrossCorrelation_mips(int32_t* cross_correlation,
@ -567,8 +567,8 @@ void WebRtcSpl_CrossCorrelation_mips(int32_t* cross_correlation,
const int16_t* seq2,
int16_t dim_seq,
int16_t dim_cross_correlation,
int16_t right_shifts,
int16_t step_seq2);
int right_shifts,
int step_seq2);
#endif
// Creates (the first half of) a Hanning window. Size must be at least 1 and