Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: webrtc/modules/audio_processing/aec/echo_cancellation.cc

Issue 2311833002: Refactoring of the buffering of the nearend signal done inside the AEC (Closed)
Patch Set: Rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/audio_processing/aec/aec_core.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 676
677 static void ProcessExtended(Aec* self, 677 static void ProcessExtended(Aec* self,
678 const float* const* near, 678 const float* const* near,
679 size_t num_bands, 679 size_t num_bands,
680 float* const* out, 680 float* const* out,
681 size_t num_samples, 681 size_t num_samples,
682 int16_t reported_delay_ms, 682 int16_t reported_delay_ms,
683 int32_t skew) { 683 int32_t skew) {
684 size_t i; 684 size_t i;
685 const int delay_diff_offset = kDelayDiffOffsetSamples; 685 const int delay_diff_offset = kDelayDiffOffsetSamples;
686 RTC_DCHECK(num_samples == 80 || num_samples == 160);
686 #if defined(WEBRTC_UNTRUSTED_DELAY) 687 #if defined(WEBRTC_UNTRUSTED_DELAY)
687 reported_delay_ms = kFixedDelayMs; 688 reported_delay_ms = kFixedDelayMs;
688 #else 689 #else
689 // This is the usual mode where we trust the reported system delay values. 690 // This is the usual mode where we trust the reported system delay values.
690 // Due to the longer filter, we no longer add 10 ms to the reported delay 691 // Due to the longer filter, we no longer add 10 ms to the reported delay
691 // to reduce chance of non-causality. Instead we apply a minimum here to avoid 692 // to reduce chance of non-causality. Instead we apply a minimum here to avoid
692 // issues with the read pointer jumping around needlessly. 693 // issues with the read pointer jumping around needlessly.
693 reported_delay_ms = reported_delay_ms < kMinTrustedDelayMs 694 reported_delay_ms = reported_delay_ms < kMinTrustedDelayMs
694 ? kMinTrustedDelayMs 695 ? kMinTrustedDelayMs
695 : reported_delay_ms; 696 : reported_delay_ms;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
849 } else { 850 } else {
850 self->timeForDelayChange = 0; 851 self->timeForDelayChange = 0;
851 } 852 }
852 self->lastDelayDiff = delay_difference; 853 self->lastDelayDiff = delay_difference;
853 854
854 if (self->timeForDelayChange > 25) { 855 if (self->timeForDelayChange > 25) {
855 self->knownDelay = WEBRTC_SPL_MAX((int)self->filtDelay - 256, 0); 856 self->knownDelay = WEBRTC_SPL_MAX((int)self->filtDelay - 256, 0);
856 } 857 }
857 } 858 }
858 } // namespace webrtc 859 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/aec/aec_core.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698