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

Side by Side Diff: webrtc/modules/audio_processing/aec/aec_core.cc

Issue 2102603002: Fixing a comment on AEC divergence metric. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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 | no next file » | 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
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 // Buffer size (samples) 68 // Buffer size (samples)
69 static const size_t kBufSizePartitions = 250; // 1 second of audio in 16 kHz. 69 static const size_t kBufSizePartitions = 250; // 1 second of audio in 16 kHz.
70 70
71 // Metrics 71 // Metrics
72 static const size_t kSubCountLen = 4; 72 static const size_t kSubCountLen = 4;
73 static const size_t kCountLen = 50; 73 static const size_t kCountLen = 50;
74 static const int kDelayMetricsAggregationWindow = 1250; // 5 seconds at 16 kHz. 74 static const int kDelayMetricsAggregationWindow = 1250; // 5 seconds at 16 kHz.
75 75
76 // Divergence metric is based on audio level, which gets updated every 76 // Divergence metric is based on audio level, which gets updated every
77 // |kCountLen + 1| * 10 milliseconds. Divergence metric takes the statistics of 77 // |kSubCountLen + 1| * PART_LEN samples. Divergence metric takes the statistics
78 // |kDivergentFilterFractionAggregationWindowSize| samples. Current value 78 // of |kDivergentFilterFractionAggregationWindowSize| audio levels. The
79 // corresponds to 1 second at 16 kHz. 79 // following value corresponds to 1 second at 16 kHz.
80 static const int kDivergentFilterFractionAggregationWindowSize = 50; 80 static const int kDivergentFilterFractionAggregationWindowSize = 50;
81 81
82 // Quantities to control H band scaling for SWB input 82 // Quantities to control H band scaling for SWB input
83 static const float cnScaleHband = 0.4f; // scale for comfort noise in H band. 83 static const float cnScaleHband = 0.4f; // scale for comfort noise in H band.
84 // Initial bin for averaging nlp gain in low band 84 // Initial bin for averaging nlp gain in low band
85 static const int freqAvgIc = PART_LEN / 2; 85 static const int freqAvgIc = PART_LEN / 2;
86 86
87 // Matlab code to produce table: 87 // Matlab code to produce table:
88 // win = sqrt(hanning(63)); win = [0 ; win(1:32)]; 88 // win = sqrt(hanning(63)); win = [0 ; win(1:32)];
89 // fprintf(1, '\t%.14f, %.14f, %.14f,\n', win); 89 // fprintf(1, '\t%.14f, %.14f, %.14f,\n', win);
(...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after
1981 1981
1982 int WebRtcAec_system_delay(AecCore* self) { 1982 int WebRtcAec_system_delay(AecCore* self) {
1983 return self->system_delay; 1983 return self->system_delay;
1984 } 1984 }
1985 1985
1986 void WebRtcAec_SetSystemDelay(AecCore* self, int delay) { 1986 void WebRtcAec_SetSystemDelay(AecCore* self, int delay) {
1987 assert(delay >= 0); 1987 assert(delay >= 0);
1988 self->system_delay = delay; 1988 self->system_delay = delay;
1989 } 1989 }
1990 } // namespace webrtc 1990 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698