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 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1423 #ifdef WEBRTC_ANDROID | 1423 #ifdef WEBRTC_ANDROID |
1424 aec->delay_agnostic_enabled = 1; // DA-AEC enabled by default. | 1424 aec->delay_agnostic_enabled = 1; // DA-AEC enabled by default. |
1425 // DA-AEC assumes the system is causal from the beginning and will self adjust | 1425 // DA-AEC assumes the system is causal from the beginning and will self adjust |
1426 // the lookahead when shifting is required. | 1426 // the lookahead when shifting is required. |
1427 WebRtc_set_lookahead(aec->delay_estimator, 0); | 1427 WebRtc_set_lookahead(aec->delay_estimator, 0); |
1428 #else | 1428 #else |
1429 aec->delay_agnostic_enabled = 0; | 1429 aec->delay_agnostic_enabled = 0; |
1430 WebRtc_set_lookahead(aec->delay_estimator, kLookaheadBlocks); | 1430 WebRtc_set_lookahead(aec->delay_estimator, kLookaheadBlocks); |
1431 #endif | 1431 #endif |
1432 aec->extended_filter_enabled = 0; | 1432 aec->extended_filter_enabled = 0; |
| 1433 aec->next_generation_aec_enabled = 0; |
1433 | 1434 |
1434 // Assembly optimization | 1435 // Assembly optimization |
1435 WebRtcAec_FilterFar = FilterFar; | 1436 WebRtcAec_FilterFar = FilterFar; |
1436 WebRtcAec_ScaleErrorSignal = ScaleErrorSignal; | 1437 WebRtcAec_ScaleErrorSignal = ScaleErrorSignal; |
1437 WebRtcAec_FilterAdaptation = FilterAdaptation; | 1438 WebRtcAec_FilterAdaptation = FilterAdaptation; |
1438 WebRtcAec_OverdriveAndSuppress = OverdriveAndSuppress; | 1439 WebRtcAec_OverdriveAndSuppress = OverdriveAndSuppress; |
1439 WebRtcAec_ComfortNoise = ComfortNoise; | 1440 WebRtcAec_ComfortNoise = ComfortNoise; |
1440 WebRtcAec_SubbandCoherence = SubbandCoherence; | 1441 WebRtcAec_SubbandCoherence = SubbandCoherence; |
1441 WebRtcAec_StoreAsComplex = StoreAsComplex; | 1442 WebRtcAec_StoreAsComplex = StoreAsComplex; |
1442 WebRtcAec_PartitionDelay = PartitionDelay; | 1443 WebRtcAec_PartitionDelay = PartitionDelay; |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1856 } | 1857 } |
1857 | 1858 |
1858 void WebRtcAec_enable_delay_agnostic(AecCore* self, int enable) { | 1859 void WebRtcAec_enable_delay_agnostic(AecCore* self, int enable) { |
1859 self->delay_agnostic_enabled = enable; | 1860 self->delay_agnostic_enabled = enable; |
1860 } | 1861 } |
1861 | 1862 |
1862 int WebRtcAec_delay_agnostic_enabled(AecCore* self) { | 1863 int WebRtcAec_delay_agnostic_enabled(AecCore* self) { |
1863 return self->delay_agnostic_enabled; | 1864 return self->delay_agnostic_enabled; |
1864 } | 1865 } |
1865 | 1866 |
| 1867 void WebRtcAec_enable_next_generation_aec(AecCore* self, int enable) { |
| 1868 self->next_generation_aec_enabled = (enable != 0); |
| 1869 } |
| 1870 |
| 1871 int WebRtcAec_next_generation_aec_enabled(AecCore* self) { |
| 1872 assert(self->next_generation_aec_enabled == 0 || |
| 1873 self->next_generation_aec_enabled == 1); |
| 1874 return self->next_generation_aec_enabled; |
| 1875 } |
| 1876 |
| 1877 |
1866 void WebRtcAec_enable_extended_filter(AecCore* self, int enable) { | 1878 void WebRtcAec_enable_extended_filter(AecCore* self, int enable) { |
1867 self->extended_filter_enabled = enable; | 1879 self->extended_filter_enabled = enable; |
1868 self->num_partitions = enable ? kExtendedNumPartitions : kNormalNumPartitions; | 1880 self->num_partitions = enable ? kExtendedNumPartitions : kNormalNumPartitions; |
1869 // Update the delay estimator with filter length. See InitAEC() for details. | 1881 // Update the delay estimator with filter length. See InitAEC() for details. |
1870 WebRtc_set_allowed_offset(self->delay_estimator, self->num_partitions / 2); | 1882 WebRtc_set_allowed_offset(self->delay_estimator, self->num_partitions / 2); |
1871 } | 1883 } |
1872 | 1884 |
1873 int WebRtcAec_extended_filter_enabled(AecCore* self) { | 1885 int WebRtcAec_extended_filter_enabled(AecCore* self) { |
1874 return self->extended_filter_enabled; | 1886 return self->extended_filter_enabled; |
1875 } | 1887 } |
1876 | 1888 |
1877 int WebRtcAec_system_delay(AecCore* self) { | 1889 int WebRtcAec_system_delay(AecCore* self) { |
1878 return self->system_delay; | 1890 return self->system_delay; |
1879 } | 1891 } |
1880 | 1892 |
1881 void WebRtcAec_SetSystemDelay(AecCore* self, int delay) { | 1893 void WebRtcAec_SetSystemDelay(AecCore* self, int delay) { |
1882 assert(delay >= 0); | 1894 assert(delay >= 0); |
1883 self->system_delay = delay; | 1895 self->system_delay = delay; |
1884 } | 1896 } |
OLD | NEW |