OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |