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

Side by Side Diff: webrtc/modules/audio_processing/aec3/block_processor.cc

Issue 2644123002: Adding full initial version of delay estimation functionality in echo canceller 3 (Closed)
Patch Set: Changes in response to reviewer comments Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 #include "webrtc/modules/audio_processing/aec3/block_processor.h" 10 #include "webrtc/modules/audio_processing/aec3/block_processor.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 BlockProcessorImpl::BlockProcessorImpl( 57 BlockProcessorImpl::BlockProcessorImpl(
58 int sample_rate_hz, 58 int sample_rate_hz,
59 std::unique_ptr<RenderDelayBuffer> render_buffer, 59 std::unique_ptr<RenderDelayBuffer> render_buffer,
60 std::unique_ptr<RenderDelayController> delay_controller, 60 std::unique_ptr<RenderDelayController> delay_controller,
61 std::unique_ptr<EchoRemover> echo_remover) 61 std::unique_ptr<EchoRemover> echo_remover)
62 : data_dumper_( 62 : data_dumper_(
63 new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))), 63 new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))),
64 sample_rate_hz_(sample_rate_hz), 64 sample_rate_hz_(sample_rate_hz),
65 render_buffer_(std::move(render_buffer)), 65 render_buffer_(std::move(render_buffer)),
66 delay_controller_(std::move(delay_controller)), 66 delay_controller_(std::move(delay_controller)),
67 echo_remover_(std::move(echo_remover)) {} 67 echo_remover_(std::move(echo_remover)) {
68 RTC_DCHECK(ValidFullBandRate(sample_rate_hz_));
69 }
68 70
69 BlockProcessorImpl::~BlockProcessorImpl() = default; 71 BlockProcessorImpl::~BlockProcessorImpl() = default;
70 72
71 void BlockProcessorImpl::ProcessCapture( 73 void BlockProcessorImpl::ProcessCapture(
72 bool echo_path_gain_change, 74 bool echo_path_gain_change,
73 bool capture_signal_saturation, 75 bool capture_signal_saturation,
74 std::vector<std::vector<float>>* capture_block) { 76 std::vector<std::vector<float>>* capture_block) {
75 RTC_DCHECK(capture_block); 77 RTC_DCHECK(capture_block);
76 RTC_DCHECK_EQ(NumBandsForRate(sample_rate_hz_), capture_block->size()); 78 RTC_DCHECK_EQ(NumBandsForRate(sample_rate_hz_), capture_block->size());
77 RTC_DCHECK_EQ(kBlockSize, (*capture_block)[0].size()); 79 RTC_DCHECK_EQ(kBlockSize, (*capture_block)[0].size());
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 int sample_rate_hz, 146 int sample_rate_hz,
145 std::unique_ptr<RenderDelayBuffer> render_buffer, 147 std::unique_ptr<RenderDelayBuffer> render_buffer,
146 std::unique_ptr<RenderDelayController> delay_controller, 148 std::unique_ptr<RenderDelayController> delay_controller,
147 std::unique_ptr<EchoRemover> echo_remover) { 149 std::unique_ptr<EchoRemover> echo_remover) {
148 return new BlockProcessorImpl(sample_rate_hz, std::move(render_buffer), 150 return new BlockProcessorImpl(sample_rate_hz, std::move(render_buffer),
149 std::move(delay_controller), 151 std::move(delay_controller),
150 std::move(echo_remover)); 152 std::move(echo_remover));
151 } 153 }
152 154
153 } // namespace webrtc 155 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698