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

Side by Side Diff: webrtc/modules/audio_coding/codecs/ilbc/hp_output.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, 4 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 12 matching lines...) Expand all
23 *---------------------------------------------------------------*/ 23 *---------------------------------------------------------------*/
24 24
25 void WebRtcIlbcfix_HpOutput( 25 void WebRtcIlbcfix_HpOutput(
26 int16_t *signal, /* (i/o) signal vector */ 26 int16_t *signal, /* (i/o) signal vector */
27 int16_t *ba, /* (i) B- and A-coefficients (2:nd order) 27 int16_t *ba, /* (i) B- and A-coefficients (2:nd order)
28 {b[0] b[1] b[ 2] -a[1] -a[2]} a[0] 28 {b[0] b[1] b[ 2] -a[1] -a[2]} a[0]
29 is assumed to be 1.0 */ 29 is assumed to be 1.0 */
30 int16_t *y, /* (i/o) Filter state yhi[n-1] ylow[n-1] 30 int16_t *y, /* (i/o) Filter state yhi[n-1] ylow[n-1]
31 yhi[n-2] ylow [n-2] */ 31 yhi[n-2] ylow [n-2] */
32 int16_t *x, /* (i/o) Filter state x[n-1] x[n-2] */ 32 int16_t *x, /* (i/o) Filter state x[n-1] x[n-2] */
33 int16_t len) /* (i) Number of samples to filter */ 33 size_t len) /* (i) Number of samples to filter */
34 { 34 {
35 int i; 35 size_t i;
36 int32_t tmpW32; 36 int32_t tmpW32;
37 int32_t tmpW32b; 37 int32_t tmpW32b;
38 38
39 for (i=0; i<len; i++) { 39 for (i=0; i<len; i++) {
40 40
41 /* 41 /*
42 y[i] = b[0]*x[i] + b[1]*x[i-1] + b[2]*x[i-2] 42 y[i] = b[0]*x[i] + b[1]*x[i-1] + b[2]*x[i-2]
43 + (-a[1])*y[i-1] + (-a[2])*y[i-2]; 43 + (-a[1])*y[i-1] + (-a[2])*y[i-2];
44 */ 44 */
45 45
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 tmpW32 <<= 3; 80 tmpW32 <<= 3;
81 } 81 }
82 82
83 y[0] = (int16_t)(tmpW32 >> 16); 83 y[0] = (int16_t)(tmpW32 >> 16);
84 y[1] = (int16_t)((tmpW32 - (y[0] << 16)) >> 1); 84 y[1] = (int16_t)((tmpW32 - (y[0] << 16)) >> 1);
85 85
86 } 86 }
87 87
88 return; 88 return;
89 } 89 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/codecs/ilbc/hp_output.h ('k') | webrtc/modules/audio_coding/codecs/ilbc/ilbc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698