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

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: Rebase 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 BlockProcessorImpl::BlockProcessorImpl( 54 BlockProcessorImpl::BlockProcessorImpl(
55 int sample_rate_hz, 55 int sample_rate_hz,
56 std::unique_ptr<RenderDelayBuffer> render_buffer, 56 std::unique_ptr<RenderDelayBuffer> render_buffer,
57 std::unique_ptr<RenderDelayController> delay_controller, 57 std::unique_ptr<RenderDelayController> delay_controller,
58 std::unique_ptr<EchoRemover> echo_remover) 58 std::unique_ptr<EchoRemover> echo_remover)
59 : data_dumper_( 59 : data_dumper_(
60 new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))), 60 new ApmDataDumper(rtc::AtomicOps::Increment(&instance_count_))),
61 sample_rate_hz_(sample_rate_hz), 61 sample_rate_hz_(sample_rate_hz),
62 render_buffer_(std::move(render_buffer)), 62 render_buffer_(std::move(render_buffer)),
63 delay_controller_(std::move(delay_controller)), 63 delay_controller_(std::move(delay_controller)),
64 echo_remover_(std::move(echo_remover)) {} 64 echo_remover_(std::move(echo_remover)) {
65 RTC_DCHECK(ValidFullBandRate(sample_rate_hz_));
66 }
65 67
66 BlockProcessorImpl::~BlockProcessorImpl() = default; 68 BlockProcessorImpl::~BlockProcessorImpl() = default;
67 69
68 void BlockProcessorImpl::ProcessCapture( 70 void BlockProcessorImpl::ProcessCapture(
69 bool echo_path_gain_change, 71 bool echo_path_gain_change,
70 bool capture_signal_saturation, 72 bool capture_signal_saturation,
71 std::vector<std::vector<float>>* capture_block) { 73 std::vector<std::vector<float>>* capture_block) {
72 RTC_DCHECK(capture_block); 74 RTC_DCHECK(capture_block);
73 RTC_DCHECK_EQ(NumBandsForRate(sample_rate_hz_), capture_block->size()); 75 RTC_DCHECK_EQ(NumBandsForRate(sample_rate_hz_), capture_block->size());
74 RTC_DCHECK_EQ(kBlockSize, (*capture_block)[0].size()); 76 RTC_DCHECK_EQ(kBlockSize, (*capture_block)[0].size());
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 int sample_rate_hz, 141 int sample_rate_hz,
140 std::unique_ptr<RenderDelayBuffer> render_buffer, 142 std::unique_ptr<RenderDelayBuffer> render_buffer,
141 std::unique_ptr<RenderDelayController> delay_controller, 143 std::unique_ptr<RenderDelayController> delay_controller,
142 std::unique_ptr<EchoRemover> echo_remover) { 144 std::unique_ptr<EchoRemover> echo_remover) {
143 return new BlockProcessorImpl(sample_rate_hz, std::move(render_buffer), 145 return new BlockProcessorImpl(sample_rate_hz, std::move(render_buffer),
144 std::move(delay_controller), 146 std::move(delay_controller),
145 std::move(echo_remover)); 147 std::move(echo_remover));
146 } 148 }
147 149
148 } // namespace webrtc 150 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698