AEC3: Simplify render buffering
This CL simplifies the buffering of render data. Instead of making assumptions about the worst possible platform, it leverages recent improvements in the delay estimator to quickly adapt when the conditions change. Pros: - No capture delay, delay is found ~200 ms faster. - Cleaner code that makes the concept of delay more clear. - Allows for removal of one matched filter because of the jitter headroom removal. Cons: - Delay estimator needs to re-adapt when the call jitter increases. The code can be deactivated by a kill switch. When the kill switch is pulled the CL is bit exact. Bug: webrtc:9726,chromium:895338 Change-Id: Ie2f9c8c5ce5b5a4510b4bdb95db2b970b57cd5d0 Reviewed-on: https://webrtc-review.googlesource.com/c/96920 Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org> Reviewed-by: Per Åhgren <peah@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25169}
This commit is contained in:
committed by
Commit Bot
parent
e07864ea6e
commit
11539f0b29
@ -23,19 +23,33 @@ namespace webrtc {
|
||||
// Class for performing echo cancellation on 64 sample blocks of audio data.
|
||||
class BlockProcessor {
|
||||
public:
|
||||
// Create a block processor with the legacy render buffering.
|
||||
static BlockProcessor* Create(const EchoCanceller3Config& config,
|
||||
int sample_rate_hz);
|
||||
// Create a block processor with the new render buffering.
|
||||
static BlockProcessor* Create2(const EchoCanceller3Config& config,
|
||||
int sample_rate_hz);
|
||||
// Only used for testing purposes.
|
||||
static BlockProcessor* Create(
|
||||
const EchoCanceller3Config& config,
|
||||
int sample_rate_hz,
|
||||
std::unique_ptr<RenderDelayBuffer> render_buffer);
|
||||
static BlockProcessor* Create2(
|
||||
const EchoCanceller3Config& config,
|
||||
int sample_rate_hz,
|
||||
std::unique_ptr<RenderDelayBuffer> render_buffer);
|
||||
static BlockProcessor* Create(
|
||||
const EchoCanceller3Config& config,
|
||||
int sample_rate_hz,
|
||||
std::unique_ptr<RenderDelayBuffer> render_buffer,
|
||||
std::unique_ptr<RenderDelayController> delay_controller,
|
||||
std::unique_ptr<EchoRemover> echo_remover);
|
||||
static BlockProcessor* Create2(
|
||||
const EchoCanceller3Config& config,
|
||||
int sample_rate_hz,
|
||||
std::unique_ptr<RenderDelayBuffer> render_buffer,
|
||||
std::unique_ptr<RenderDelayController> delay_controller,
|
||||
std::unique_ptr<EchoRemover> echo_remover);
|
||||
|
||||
virtual ~BlockProcessor() = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user