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

Side by Side Diff: webrtc/common_audio/signal_processing/filter_ar.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
11 11
12 /* 12 /*
13 * This file contains the function WebRtcSpl_FilterAR(). 13 * This file contains the function WebRtcSpl_FilterAR().
14 * The description header can be found in signal_processing_library.h 14 * The description header can be found in signal_processing_library.h
15 * 15 *
16 */ 16 */
17 17
18 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar y.h" 18 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar y.h"
19 19
20 int WebRtcSpl_FilterAR(const int16_t* a, 20 size_t WebRtcSpl_FilterAR(const int16_t* a,
21 int a_length, 21 size_t a_length,
22 const int16_t* x, 22 const int16_t* x,
23 int x_length, 23 size_t x_length,
24 int16_t* state, 24 int16_t* state,
25 int state_length, 25 size_t state_length,
26 int16_t* state_low, 26 int16_t* state_low,
27 int state_low_length, 27 size_t state_low_length,
28 int16_t* filtered, 28 int16_t* filtered,
29 int16_t* filtered_low, 29 int16_t* filtered_low,
30 int filtered_low_length) 30 size_t filtered_low_length)
31 { 31 {
32 int32_t o; 32 int32_t o;
33 int32_t oLOW; 33 int32_t oLOW;
34 int i, j, stop; 34 size_t i, j, stop;
35 const int16_t* x_ptr = &x[0]; 35 const int16_t* x_ptr = &x[0];
36 int16_t* filteredFINAL_ptr = filtered; 36 int16_t* filteredFINAL_ptr = filtered;
37 int16_t* filteredFINAL_LOW_ptr = filtered_low; 37 int16_t* filteredFINAL_LOW_ptr = filtered_low;
38 38
39 for (i = 0; i < x_length; i++) 39 for (i = 0; i < x_length; i++)
40 { 40 {
41 // Calculate filtered[i] and filtered_low[i] 41 // Calculate filtered[i] and filtered_low[i]
42 const int16_t* a_ptr = &a[1]; 42 const int16_t* a_ptr = &a[1];
43 int16_t* filtered_ptr = &filtered[i - 1]; 43 int16_t* filtered_ptr = &filtered[i - 1];
44 int16_t* filtered_low_ptr = &filtered_low[i - 1]; 44 int16_t* filtered_low_ptr = &filtered_low[i - 1];
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 for (i = 0; i < x_length; i++) 81 for (i = 0; i < x_length; i++)
82 { 82 {
83 state[state_length - x_length + i] = filtered[i]; 83 state[state_length - x_length + i] = filtered[i];
84 state[state_length - x_length + i] = filtered_low[i]; 84 state[state_length - x_length + i] = filtered_low[i];
85 } 85 }
86 } 86 }
87 87
88 return x_length; 88 return x_length;
89 } 89 }
OLDNEW
« no previous file with comments | « webrtc/common_audio/signal_processing/energy.c ('k') | webrtc/common_audio/signal_processing/filter_ar_fast_q12.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698