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

Side by Side Diff: webrtc/common_audio/signal_processing/resample_by_2_mips.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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 11 matching lines...) Expand all
22 // allpass filter coefficients. 22 // allpass filter coefficients.
23 static const uint16_t kResampleAllpass1[3] = {3284, 24441, 49528}; 23 static const uint16_t kResampleAllpass1[3] = {3284, 24441, 49528};
24 static const uint16_t kResampleAllpass2[3] = {12199, 37471, 60255}; 24 static const uint16_t kResampleAllpass2[3] = {12199, 37471, 60255};
25 25
26 // Multiply a 32-bit value with a 16-bit value and accumulate to another input: 26 // Multiply a 32-bit value with a 16-bit value and accumulate to another input:
27 #define MUL_ACCUM_1(a, b, c) WEBRTC_SPL_SCALEDIFF32(a, b, c) 27 #define MUL_ACCUM_1(a, b, c) WEBRTC_SPL_SCALEDIFF32(a, b, c)
28 #define MUL_ACCUM_2(a, b, c) WEBRTC_SPL_SCALEDIFF32(a, b, c) 28 #define MUL_ACCUM_2(a, b, c) WEBRTC_SPL_SCALEDIFF32(a, b, c)
29 29
30 // decimator 30 // decimator
31 void WebRtcSpl_DownsampleBy2(const int16_t* in, 31 void WebRtcSpl_DownsampleBy2(const int16_t* in,
32 int len, 32 size_t len,
33 int16_t* out, 33 int16_t* out,
34 int32_t* filtState) { 34 int32_t* filtState) {
35 int32_t out32; 35 int32_t out32;
36 int i, len1; 36 size_t i, len1;
37 37
38 register int32_t state0 = filtState[0]; 38 register int32_t state0 = filtState[0];
39 register int32_t state1 = filtState[1]; 39 register int32_t state1 = filtState[1];
40 register int32_t state2 = filtState[2]; 40 register int32_t state2 = filtState[2];
41 register int32_t state3 = filtState[3]; 41 register int32_t state3 = filtState[3];
42 register int32_t state4 = filtState[4]; 42 register int32_t state4 = filtState[4];
43 register int32_t state5 = filtState[5]; 43 register int32_t state5 = filtState[5];
44 register int32_t state6 = filtState[6]; 44 register int32_t state6 = filtState[6];
45 register int32_t state7 = filtState[7]; 45 register int32_t state7 = filtState[7];
46 46
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 "sw %[state7], 28(%[filtState]) \n\t" 281 "sw %[state7], 28(%[filtState]) \n\t"
282 : 282 :
283 : [state0] "r" (state0), [state1] "r" (state1), [state2] "r" (state2), 283 : [state0] "r" (state0), [state1] "r" (state1), [state2] "r" (state2),
284 [state3] "r" (state3), [state4] "r" (state4), [state5] "r" (state5), 284 [state3] "r" (state3), [state4] "r" (state4), [state5] "r" (state5),
285 [state6] "r" (state6), [state7] "r" (state7), [filtState] "r" (filtState) 285 [state6] "r" (state6), [state7] "r" (state7), [filtState] "r" (filtState)
286 : "memory" 286 : "memory"
287 ); 287 );
288 } 288 }
289 289
290 #endif // #if defined(MIPS32_LE) 290 #endif // #if defined(MIPS32_LE)
OLDNEW
« no previous file with comments | « webrtc/common_audio/signal_processing/resample_by_2.c ('k') | webrtc/common_audio/signal_processing/resample_fractional.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698