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

Side by Side Diff: webrtc/common_audio/signal_processing/auto_correlation.c

Issue 2974613003: base->rtc_base: Update .c, .mm and .java files. (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | webrtc/common_audio/signal_processing/downsample_fast.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar y.h" 11 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar y.h"
12 12
13 #include "webrtc/base/checks.h" 13 #include "webrtc/rtc_base/checks.h"
14 14
15 size_t WebRtcSpl_AutoCorrelation(const int16_t* in_vector, 15 size_t WebRtcSpl_AutoCorrelation(const int16_t* in_vector,
16 size_t in_vector_length, 16 size_t in_vector_length,
17 size_t order, 17 size_t order,
18 int32_t* result, 18 int32_t* result,
19 int* scale) { 19 int* scale) {
20 int32_t sum = 0; 20 int32_t sum = 0;
21 size_t i = 0, j = 0; 21 size_t i = 0, j = 0;
22 int16_t smax = 0; 22 int16_t smax = 0;
23 int scaling = 0; 23 int scaling = 0;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 for (; j < in_vector_length - i; j++) { 57 for (; j < in_vector_length - i; j++) {
58 sum += (in_vector[j] * in_vector[i + j]) >> scaling; 58 sum += (in_vector[j] * in_vector[i + j]) >> scaling;
59 } 59 }
60 *result++ = sum; 60 *result++ = sum;
61 } 61 }
62 62
63 *scale = scaling; 63 *scale = scaling;
64 return order + 1; 64 return order + 1;
65 } 65 }
OLDNEW
« no previous file with comments | « no previous file | webrtc/common_audio/signal_processing/downsample_fast.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698