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

Side by Side Diff: webrtc/modules/audio_processing/aec/aec_resampler.c

Issue 1172163004: Reformat existing code. There should be no functional effects. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 6 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 int size, 73 int size,
74 float skew, 74 float skew,
75 float* outspeech, 75 float* outspeech,
76 int* size_out) { 76 int* size_out) {
77 AecResampler* obj = (AecResampler*)resampInst; 77 AecResampler* obj = (AecResampler*)resampInst;
78 78
79 float* y; 79 float* y;
80 float be, tnew; 80 float be, tnew;
81 int tn, mm; 81 int tn, mm;
82 82
83 assert(!(size < 0 || size > 2 * FRAME_LEN)); 83 assert(size >= 0);
84 assert(size <= 2 * FRAME_LEN);
84 assert(resampInst != NULL); 85 assert(resampInst != NULL);
85 assert(inspeech != NULL); 86 assert(inspeech != NULL);
86 assert(outspeech != NULL); 87 assert(outspeech != NULL);
87 assert(size_out != NULL); 88 assert(size_out != NULL);
88 89
89 // Add new frame data in lookahead 90 // Add new frame data in lookahead
90 memcpy(&obj->buffer[FRAME_LEN + kResamplingDelay], 91 memcpy(&obj->buffer[FRAME_LEN + kResamplingDelay],
91 inspeech, 92 inspeech,
92 size * sizeof(inspeech[0])); 93 size * sizeof(inspeech[0]));
93 94
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 xAvg = x / n; 207 xAvg = x / n;
207 denom = x2 - xAvg * x; 208 denom = x2 - xAvg * x;
208 209
209 if (denom != 0) { 210 if (denom != 0) {
210 skew = (xy - xAvg * y) / denom; 211 skew = (xy - xAvg * y) / denom;
211 } 212 }
212 213
213 *skewEst = skew; 214 *skewEst = skew;
214 return 0; 215 return 0;
215 } 216 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698