Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: webrtc/common_audio/signal_processing/resample_by_2.c

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 // Multiply a 32-bit value with a 16-bit value and accumulate to another input: 61 // Multiply a 32-bit value with a 16-bit value and accumulate to another input:
62 #define MUL_ACCUM_1(a, b, c) WEBRTC_SPL_SCALEDIFF32(a, b, c) 62 #define MUL_ACCUM_1(a, b, c) WEBRTC_SPL_SCALEDIFF32(a, b, c)
63 #define MUL_ACCUM_2(a, b, c) WEBRTC_SPL_SCALEDIFF32(a, b, c) 63 #define MUL_ACCUM_2(a, b, c) WEBRTC_SPL_SCALEDIFF32(a, b, c)
64 64
65 #endif // WEBRTC_ARCH_ARM_V7 65 #endif // WEBRTC_ARCH_ARM_V7
66 66
67 67
68 // decimator 68 // decimator
69 #if !defined(MIPS32_LE) 69 #if !defined(MIPS32_LE)
70 void WebRtcSpl_DownsampleBy2(const int16_t* in, int len, 70 void WebRtcSpl_DownsampleBy2(const int16_t* in, size_t len,
71 int16_t* out, int32_t* filtState) { 71 int16_t* out, int32_t* filtState) {
72 int32_t tmp1, tmp2, diff, in32, out32; 72 int32_t tmp1, tmp2, diff, in32, out32;
73 int i; 73 size_t i;
74 74
75 register int32_t state0 = filtState[0]; 75 register int32_t state0 = filtState[0];
76 register int32_t state1 = filtState[1]; 76 register int32_t state1 = filtState[1];
77 register int32_t state2 = filtState[2]; 77 register int32_t state2 = filtState[2];
78 register int32_t state3 = filtState[3]; 78 register int32_t state3 = filtState[3];
79 register int32_t state4 = filtState[4]; 79 register int32_t state4 = filtState[4];
80 register int32_t state5 = filtState[5]; 80 register int32_t state5 = filtState[5];
81 register int32_t state6 = filtState[6]; 81 register int32_t state6 = filtState[6];
82 register int32_t state7 = filtState[7]; 82 register int32_t state7 = filtState[7];
83 83
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 filtState[2] = state2; 118 filtState[2] = state2;
119 filtState[3] = state3; 119 filtState[3] = state3;
120 filtState[4] = state4; 120 filtState[4] = state4;
121 filtState[5] = state5; 121 filtState[5] = state5;
122 filtState[6] = state6; 122 filtState[6] = state6;
123 filtState[7] = state7; 123 filtState[7] = state7;
124 } 124 }
125 #endif // #if defined(MIPS32_LE) 125 #endif // #if defined(MIPS32_LE)
126 126
127 127
128 void WebRtcSpl_UpsampleBy2(const int16_t* in, int len, 128 void WebRtcSpl_UpsampleBy2(const int16_t* in, size_t len,
129 int16_t* out, int32_t* filtState) { 129 int16_t* out, int32_t* filtState) {
130 int32_t tmp1, tmp2, diff, in32, out32; 130 int32_t tmp1, tmp2, diff, in32, out32;
131 int i; 131 size_t i;
132 132
133 register int32_t state0 = filtState[0]; 133 register int32_t state0 = filtState[0];
134 register int32_t state1 = filtState[1]; 134 register int32_t state1 = filtState[1];
135 register int32_t state2 = filtState[2]; 135 register int32_t state2 = filtState[2];
136 register int32_t state3 = filtState[3]; 136 register int32_t state3 = filtState[3];
137 register int32_t state4 = filtState[4]; 137 register int32_t state4 = filtState[4];
138 register int32_t state5 = filtState[5]; 138 register int32_t state5 = filtState[5];
139 register int32_t state6 = filtState[6]; 139 register int32_t state6 = filtState[6];
140 register int32_t state7 = filtState[7]; 140 register int32_t state7 = filtState[7];
141 141
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 filtState[0] = state0; 175 filtState[0] = state0;
176 filtState[1] = state1; 176 filtState[1] = state1;
177 filtState[2] = state2; 177 filtState[2] = state2;
178 filtState[3] = state3; 178 filtState[3] = state3;
179 filtState[4] = state4; 179 filtState[4] = state4;
180 filtState[5] = state5; 180 filtState[5] = state5;
181 filtState[6] = state6; 181 filtState[6] = state6;
182 filtState[7] = state7; 182 filtState[7] = state7;
183 } 183 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698