webrtc/modules/audio_processing
Gustaf Ullberg 777cf26328 AEC3: Clockdrift detection
This change introduces a clockdrift detector operating on the estimated
delay of the echo path delay estimator. Each time the delay estimate
changes it is compared to previous estimates. If the estimates are
slowly increasing or decreasing, clockdrift is detected.

Four different patterns are considered clockdrift:
- k, k+1, k+2, k+3
- k, k+2, k+1, k+3
- k, k-1, k-2, k-3
- k, k-2, k-1, k-3

A delay estimate history matching the three last elements in one of the
patterns is considered probable clockdrift. Matching all four elements
is considered verified clockdrift.

If the delay is constant for some time after clockdrift is detected the
clockdrift detector will revert to no detected clockdrift.

The level of clockdrift is reported via an UMA histogram.

Bug: webrtc:10014
Change-Id: I1cce4d593e101a8b3fa99df6935e59b4243cb97a
Reviewed-on: https://webrtc-review.googlesource.com/c/111381
Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25758}
2018-11-22 16:02:44 +00:00
..
aec [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
aec3 AEC3: Clockdrift detection 2018-11-22 16:02:44 +00:00
aec_dump Reland "Isolating APM API build target: making :api an actual target." 2018-11-07 14:30:06 +00:00
aecm [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
agc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
agc2 AGC2: adding level estimation option (RMS or peak-based). 2018-11-13 14:32:13 +00:00
audio_generator Add stub draft of audio generator to APM 2018-03-05 09:28:52 +00:00
echo_detector [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
include AGC2 adaptive digital false by default 2018-11-21 14:20:15 +00:00
logging Add output directory option for audioproc_f data dump files. 2018-11-20 13:30:24 +00:00
ns Move fft4g to proper third_party directory 2018-07-25 15:44:53 +00:00
test Add output directory option for audioproc_f data dump files. 2018-11-20 13:30:24 +00:00
transient [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
utility [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
vad [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
audio_buffer.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
audio_buffer.h [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
audio_buffer_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
audio_frame_view_unittest.cc Add namespace 'webrtc' to AudioFrameView. 2018-05-14 12:33:49 +00:00
audio_processing_impl.cc Remove locks from AECM and move it into private_submodules_ 2018-11-05 16:25:09 +00:00
audio_processing_impl.h Remove deprecated AudioProcessing::GetStatistics function 2018-11-01 11:21:15 +00:00
audio_processing_impl_locking_unittest.cc Add default constructor for rtc::Event 2018-11-07 08:57:50 +00:00
audio_processing_impl_unittest.cc APM: render pre-processor moved before echo detector queuing. 2018-08-09 14:40:31 +00:00
audio_processing_performance_unittest.cc Add default constructor for rtc::Event 2018-11-07 08:57:50 +00:00
audio_processing_unittest.cc Reland "Remove the HighPassFilter interface" 2018-10-23 07:44:09 +00:00
BUILD.gn Add output directory option for audioproc_f data dump files. 2018-11-20 13:30:24 +00:00
common.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
config_unittest.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
debug.proto Reland "Remove APM-internal usage of EchoControlMobile" 2018-10-03 07:45:33 +00:00
DEPS Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
echo_cancellation_bit_exact_unittest.cc Remove locks from AEC2 and move it into private_submodules_ 2018-11-01 08:40:16 +00:00
echo_cancellation_impl.cc Remove locks from AEC2 and move it into private_submodules_ 2018-11-01 08:40:16 +00:00
echo_cancellation_impl.h Remove deprecated AudioProcessing::GetStatistics function 2018-11-01 11:21:15 +00:00
echo_cancellation_impl_unittest.cc Remove locks from AEC2 and move it into private_submodules_ 2018-11-01 08:40:16 +00:00
echo_control_mobile_bit_exact_unittest.cc Remove locks from AECM and move it into private_submodules_ 2018-11-05 16:25:09 +00:00
echo_control_mobile_impl.cc Remove locks from AECM and move it into private_submodules_ 2018-11-05 16:25:09 +00:00
echo_control_mobile_impl.h Remove locks from AECM and move it into private_submodules_ 2018-11-05 16:25:09 +00:00
echo_control_mobile_unittest.cc Remove locks from AECM and move it into private_submodules_ 2018-11-05 16:25:09 +00:00
gain_control_for_experimental_agc.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
gain_control_for_experimental_agc.h Reset Agc2 on analog gain changes. 2018-08-08 14:36:37 +00:00
gain_control_impl.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
gain_control_impl.h [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
gain_control_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
gain_controller2.cc AGC2 adaptive digital: remove unnecessary flag. 2018-11-21 15:01:28 +00:00
gain_controller2.h AGC2 adaptive digital: remove unnecessary flag. 2018-11-21 15:01:28 +00:00
gain_controller2_unittest.cc AGC2 adaptive digital false by default 2018-11-21 14:20:15 +00:00
level_estimator_impl.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
level_estimator_impl.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
level_estimator_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
low_cut_filter.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
low_cut_filter.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
low_cut_filter_unittest.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
noise_suppression_impl.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
noise_suppression_impl.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
noise_suppression_unittest.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
OWNERS Adding alessiob@ and minyue@ as owners of APM. 2018-07-02 07:45:31 +00:00
render_queue_item_verifier.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
residual_echo_detector.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
residual_echo_detector.h Add more parameters to the Initialize function of the echo detector. 2018-03-15 09:21:56 +00:00
residual_echo_detector_unittest.cc Change echo detector to scoped_refptr 2018-06-14 09:51:41 +00:00
rms_level.cc Replace rtc::Optional with absl::optional in modules/audio processing 2018-06-19 10:38:56 +00:00
rms_level.h [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
rms_level_unittest.cc Move some more numeric utility code from rtc_base/ to rtc_base/numerics/ 2017-11-22 12:39:39 +00:00
splitting_filter.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
splitting_filter.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
splitting_filter_unittest.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
three_band_filter_bank.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
three_band_filter_bank.h Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00
typing_detection.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
typing_detection.h Reland "Export symbols needed by the Chromium component build (part 1)." 2018-10-11 09:50:21 +00:00
voice_detection_impl.cc [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
voice_detection_impl.h [Cleanup] Add missing #include. Remove useless ones. 2018-10-23 11:32:56 +00:00
voice_detection_unittest.cc Fixing WebRTC after moving from src/webrtc to src/ 2017-09-15 05:02:56 +00:00