| 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 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 #ifdef WEBRTC_ANDROID | 1493 #ifdef WEBRTC_ANDROID |
| 1494 aec->delay_agnostic_enabled = 1; // DA-AEC enabled by default. | 1494 aec->delay_agnostic_enabled = 1; // DA-AEC enabled by default. |
| 1495 // DA-AEC assumes the system is causal from the beginning and will self adjust | 1495 // DA-AEC assumes the system is causal from the beginning and will self adjust |
| 1496 // the lookahead when shifting is required. | 1496 // the lookahead when shifting is required. |
| 1497 WebRtc_set_lookahead(aec->delay_estimator, 0); | 1497 WebRtc_set_lookahead(aec->delay_estimator, 0); |
| 1498 #else | 1498 #else |
| 1499 aec->delay_agnostic_enabled = 0; | 1499 aec->delay_agnostic_enabled = 0; |
| 1500 WebRtc_set_lookahead(aec->delay_estimator, kLookaheadBlocks); | 1500 WebRtc_set_lookahead(aec->delay_estimator, kLookaheadBlocks); |
| 1501 #endif | 1501 #endif |
| 1502 aec->extended_filter_enabled = 0; | 1502 aec->extended_filter_enabled = 0; |
| 1503 aec->aec3_enabled = 0; | |
| 1504 aec->refined_adaptive_filter_enabled = false; | 1503 aec->refined_adaptive_filter_enabled = false; |
| 1505 | 1504 |
| 1506 // Assembly optimization | 1505 // Assembly optimization |
| 1507 WebRtcAec_FilterFar = FilterFar; | 1506 WebRtcAec_FilterFar = FilterFar; |
| 1508 WebRtcAec_ScaleErrorSignal = ScaleErrorSignal; | 1507 WebRtcAec_ScaleErrorSignal = ScaleErrorSignal; |
| 1509 WebRtcAec_FilterAdaptation = FilterAdaptation; | 1508 WebRtcAec_FilterAdaptation = FilterAdaptation; |
| 1510 WebRtcAec_Overdrive = Overdrive; | 1509 WebRtcAec_Overdrive = Overdrive; |
| 1511 WebRtcAec_Suppress = Suppress; | 1510 WebRtcAec_Suppress = Suppress; |
| 1512 WebRtcAec_ComputeCoherence = ComputeCoherence; | 1511 WebRtcAec_ComputeCoherence = ComputeCoherence; |
| 1513 WebRtcAec_UpdateCoherenceSpectra = UpdateCoherenceSpectra; | 1512 WebRtcAec_UpdateCoherenceSpectra = UpdateCoherenceSpectra; |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2007 } | 2006 } |
| 2008 | 2007 |
| 2009 void WebRtcAec_enable_delay_agnostic(AecCore* self, int enable) { | 2008 void WebRtcAec_enable_delay_agnostic(AecCore* self, int enable) { |
| 2010 self->delay_agnostic_enabled = enable; | 2009 self->delay_agnostic_enabled = enable; |
| 2011 } | 2010 } |
| 2012 | 2011 |
| 2013 int WebRtcAec_delay_agnostic_enabled(AecCore* self) { | 2012 int WebRtcAec_delay_agnostic_enabled(AecCore* self) { |
| 2014 return self->delay_agnostic_enabled; | 2013 return self->delay_agnostic_enabled; |
| 2015 } | 2014 } |
| 2016 | 2015 |
| 2017 void WebRtcAec_enable_aec3(AecCore* self, int enable) { | |
| 2018 self->aec3_enabled = (enable != 0); | |
| 2019 } | |
| 2020 | |
| 2021 int WebRtcAec_aec3_enabled(AecCore* self) { | |
| 2022 RTC_DCHECK(self->aec3_enabled == 0 || self->aec3_enabled == 1); | |
| 2023 return self->aec3_enabled; | |
| 2024 } | |
| 2025 | |
| 2026 void WebRtcAec_enable_refined_adaptive_filter(AecCore* self, bool enable) { | 2016 void WebRtcAec_enable_refined_adaptive_filter(AecCore* self, bool enable) { |
| 2027 self->refined_adaptive_filter_enabled = enable; | 2017 self->refined_adaptive_filter_enabled = enable; |
| 2028 SetAdaptiveFilterStepSize(self); | 2018 SetAdaptiveFilterStepSize(self); |
| 2029 SetErrorThreshold(self); | 2019 SetErrorThreshold(self); |
| 2030 } | 2020 } |
| 2031 | 2021 |
| 2032 bool WebRtcAec_refined_adaptive_filter_enabled(const AecCore* self) { | 2022 bool WebRtcAec_refined_adaptive_filter_enabled(const AecCore* self) { |
| 2033 return self->refined_adaptive_filter_enabled; | 2023 return self->refined_adaptive_filter_enabled; |
| 2034 } | 2024 } |
| 2035 | 2025 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2048 | 2038 |
| 2049 int WebRtcAec_system_delay(AecCore* self) { | 2039 int WebRtcAec_system_delay(AecCore* self) { |
| 2050 return self->system_delay; | 2040 return self->system_delay; |
| 2051 } | 2041 } |
| 2052 | 2042 |
| 2053 void WebRtcAec_SetSystemDelay(AecCore* self, int delay) { | 2043 void WebRtcAec_SetSystemDelay(AecCore* self, int delay) { |
| 2054 RTC_DCHECK_GE(delay, 0); | 2044 RTC_DCHECK_GE(delay, 0); |
| 2055 self->system_delay = delay; | 2045 self->system_delay = delay; |
| 2056 } | 2046 } |
| 2057 } // namespace webrtc | 2047 } // namespace webrtc |
| OLD | NEW |