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

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: Resync 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 int size, 67 int size,
68 float skew, 68 float skew,
69 float* outspeech, 69 float* outspeech,
70 int* size_out) { 70 int* size_out) {
71 AecResampler* obj = (AecResampler*)resampInst; 71 AecResampler* obj = (AecResampler*)resampInst;
72 72
73 float* y; 73 float* y;
74 float be, tnew; 74 float be, tnew;
75 int tn, mm; 75 int tn, mm;
76 76
77 assert(!(size < 0 || size > 2 * FRAME_LEN)); 77 assert(size >= 0);
78 assert(size <= 2 * FRAME_LEN);
78 assert(resampInst != NULL); 79 assert(resampInst != NULL);
79 assert(inspeech != NULL); 80 assert(inspeech != NULL);
80 assert(outspeech != NULL); 81 assert(outspeech != NULL);
81 assert(size_out != NULL); 82 assert(size_out != NULL);
82 83
83 // Add new frame data in lookahead 84 // Add new frame data in lookahead
84 memcpy(&obj->buffer[FRAME_LEN + kResamplingDelay], 85 memcpy(&obj->buffer[FRAME_LEN + kResamplingDelay],
85 inspeech, 86 inspeech,
86 size * sizeof(inspeech[0])); 87 size * sizeof(inspeech[0]));
87 88
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 xAvg = x / n; 201 xAvg = x / n;
201 denom = x2 - xAvg * x; 202 denom = x2 - xAvg * x;
202 203
203 if (denom != 0) { 204 if (denom != 0) {
204 skew = (xy - xAvg * y) / denom; 205 skew = (xy - xAvg * y) / denom;
205 } 206 }
206 207
207 *skewEst = skew; 208 *skewEst = skew;
208 return 0; 209 return 0;
209 } 210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698