| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 static const size_t kBufSizePartitions = 250; // 1 second of audio in 16 kHz. | 45 static const size_t kBufSizePartitions = 250; // 1 second of audio in 16 kHz. |
| 46 | 46 |
| 47 // Metrics | 47 // Metrics |
| 48 static const size_t kSubCountLen = 4; | 48 static const size_t kSubCountLen = 4; |
| 49 static const size_t kCountLen = 50; | 49 static const size_t kCountLen = 50; |
| 50 static const int kDelayMetricsAggregationWindow = 1250; // 5 seconds at 16 kHz. | 50 static const int kDelayMetricsAggregationWindow = 1250; // 5 seconds at 16 kHz. |
| 51 | 51 |
| 52 // Divergence metric is based on audio level, which gets updated every | 52 // Divergence metric is based on audio level, which gets updated every |
| 53 // |kCountLen + 1| * 10 milliseconds. Divergence metric takes the statistics of | 53 // |kCountLen + 1| * 10 milliseconds. Divergence metric takes the statistics of |
| 54 // |kDivergentFilterFractionAggregationWindowSize| samples. Current value | 54 // |kDivergentFilterFractionAggregationWindowSize| samples. Current value |
| 55 // corresponds to 0.5 seconds at 16 kHz. | 55 // corresponds to 1 second at 16 kHz. |
| 56 static const int kDivergentFilterFractionAggregationWindowSize = 25; | 56 static const int kDivergentFilterFractionAggregationWindowSize = 50; |
| 57 | 57 |
| 58 // Quantities to control H band scaling for SWB input | 58 // Quantities to control H band scaling for SWB input |
| 59 static const float cnScaleHband = 0.4f; // scale for comfort noise in H band. | 59 static const float cnScaleHband = 0.4f; // scale for comfort noise in H band. |
| 60 // Initial bin for averaging nlp gain in low band | 60 // Initial bin for averaging nlp gain in low band |
| 61 static const int freqAvgIc = PART_LEN / 2; | 61 static const int freqAvgIc = PART_LEN / 2; |
| 62 | 62 |
| 63 // Matlab code to produce table: | 63 // Matlab code to produce table: |
| 64 // win = sqrt(hanning(63)); win = [0 ; win(1:32)]; | 64 // win = sqrt(hanning(63)); win = [0 ; win(1:32)]; |
| 65 // fprintf(1, '\t%.14f, %.14f, %.14f,\n', win); | 65 // fprintf(1, '\t%.14f, %.14f, %.14f,\n', win); |
| 66 ALIGN16_BEG const float ALIGN16_END WebRtcAec_sqrtHanning[65] = { | 66 ALIGN16_BEG const float ALIGN16_END WebRtcAec_sqrtHanning[65] = { |
| (...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1985 | 1985 |
| 1986 int WebRtcAec_system_delay(AecCore* self) { | 1986 int WebRtcAec_system_delay(AecCore* self) { |
| 1987 return self->system_delay; | 1987 return self->system_delay; |
| 1988 } | 1988 } |
| 1989 | 1989 |
| 1990 void WebRtcAec_SetSystemDelay(AecCore* self, int delay) { | 1990 void WebRtcAec_SetSystemDelay(AecCore* self, int delay) { |
| 1991 assert(delay >= 0); | 1991 assert(delay >= 0); |
| 1992 self->system_delay = delay; | 1992 self->system_delay = delay; |
| 1993 } | 1993 } |
| 1994 } // namespace webrtc | 1994 } // namespace webrtc |
| OLD | NEW |