Allow extracting the linear AEC output

This CL enables extracting the linear AEC output,
allowing for more straightforward
testing/development.

Bug: b/140823178
Change-Id: I14f7934008d87066b35500466cb6e6d96f811688
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153672
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29789}
This commit is contained in:
Per Åhgren
2019-11-13 11:12:29 +01:00
committed by Commit Bot
parent 06a394e036
commit c20a19cc4b
26 changed files with 293 additions and 90 deletions

View File

@ -48,7 +48,7 @@ void RunBasicSetupAndApiCallTest(int sample_rate_hz, int num_iterations) {
std::vector<float>(kBlockSize, 1000.f)));
for (int k = 0; k < num_iterations; ++k) {
block_processor->BufferRender(block);
block_processor->ProcessCapture(false, false, &block);
block_processor->ProcessCapture(false, false, nullptr, &block);
block_processor->UpdateEchoLeakageStatus(false);
}
}
@ -81,7 +81,8 @@ void RunCaptureBlockSizeVerificationTest(int sample_rate_hz) {
std::vector<std::vector<float>>(kNumRenderChannels,
std::vector<float>(kBlockSize - 1, 0.f)));
EXPECT_DEATH(block_processor->ProcessCapture(false, false, &block), "");
EXPECT_DEATH(block_processor->ProcessCapture(false, false, nullptr, &block),
"");
}
void RunRenderNumBandsVerificationTest(int sample_rate_hz) {
@ -117,7 +118,8 @@ void RunCaptureNumBandsVerificationTest(int sample_rate_hz) {
std::vector<std::vector<float>>(kNumRenderChannels,
std::vector<float>(kBlockSize, 0.f)));
EXPECT_DEATH(block_processor->ProcessCapture(false, false, &block), "");
EXPECT_DEATH(block_processor->ProcessCapture(false, false, nullptr, &block),
"");
}
#endif
@ -172,7 +174,7 @@ TEST(BlockProcessor, DISABLED_DelayControllerIntegration) {
RandomizeSampleVector(&random_generator, render_block[0][0]);
signal_delay_buffer.Delay(render_block[0][0], capture_block[0][0]);
block_processor->BufferRender(render_block);
block_processor->ProcessCapture(false, false, &capture_block);
block_processor->ProcessCapture(false, false, nullptr, &capture_block);
}
}
}
@ -207,7 +209,7 @@ TEST(BlockProcessor, DISABLED_SubmoduleIntegration) {
.WillRepeatedly(Return(0));
EXPECT_CALL(*render_delay_controller_mock, GetDelay(_, _, _))
.Times(kNumBlocks);
EXPECT_CALL(*echo_remover_mock, ProcessCapture(_, _, _, _, _))
EXPECT_CALL(*echo_remover_mock, ProcessCapture(_, _, _, _, _, _))
.Times(kNumBlocks);
EXPECT_CALL(*echo_remover_mock, UpdateEchoLeakageStatus(_))
.Times(kNumBlocks);
@ -230,7 +232,7 @@ TEST(BlockProcessor, DISABLED_SubmoduleIntegration) {
RandomizeSampleVector(&random_generator, render_block[0][0]);
signal_delay_buffer.Delay(render_block[0][0], capture_block[0][0]);
block_processor->BufferRender(render_block);
block_processor->ProcessCapture(false, false, &capture_block);
block_processor->ProcessCapture(false, false, nullptr, &capture_block);
block_processor->UpdateEchoLeakageStatus(false);
}
}
@ -284,7 +286,7 @@ TEST(BlockProcessor, VerifyCaptureNumBandsCheck) {
TEST(BlockProcessor, NullProcessCaptureParameter) {
EXPECT_DEATH(std::unique_ptr<BlockProcessor>(
BlockProcessor::Create(EchoCanceller3Config(), 16000, 1, 1))
->ProcessCapture(false, false, nullptr),
->ProcessCapture(false, false, nullptr, nullptr),
"");
}