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

Unified Diff: webrtc/modules/audio_processing/aec/aec_core.cc

Issue 2016143003: Added diagnostic AEC debug logpoints. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Changed acquisition of pointer to array Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/aec/aec_core.cc
diff --git a/webrtc/modules/audio_processing/aec/aec_core.cc b/webrtc/modules/audio_processing/aec/aec_core.cc
index 4c109d7d9ce50cfe1455c5ad7b317c6c14bac8a3..fb1a7a506a89551461109ca435c500ea174226c1 100644
--- a/webrtc/modules/audio_processing/aec/aec_core.cc
+++ b/webrtc/modules/audio_processing/aec/aec_core.cc
@@ -827,6 +827,7 @@ static int SignalBasedDelayCorrection(AecCore* self) {
// playout audio volume is low (or even muted) the delay estimation can return
// a very large delay, which will break the AEC if it is applied.
if (self->frame_count < kDelayCorrectionStart) {
+ self->data_dumper->DumpRaw("aec_da_reported_delay", 1, &last_delay);
return 0;
}
#endif
@@ -843,6 +844,7 @@ static int SignalBasedDelayCorrection(AecCore* self) {
// 4. Finally, verify that the proposed |delay_correction| is feasible by
// comparing with the size of the far-end buffer.
last_delay = WebRtc_last_delay(self->delay_estimator);
+ self->data_dumper->DumpRaw("aec_da_reported_delay", 1, &last_delay);
if ((last_delay >= 0) && (last_delay != self->previous_delay) &&
(WebRtc_last_delay_quality(self->delay_estimator) >
self->delay_quality_threshold)) {
@@ -888,6 +890,8 @@ static int SignalBasedDelayCorrection(AecCore* self) {
? delay_quality
: self->delay_quality_threshold);
}
+ self->data_dumper->DumpRaw("aec_da_delay_correction", 1, &delay_correction);
+
return delay_correction;
}
@@ -1154,6 +1158,8 @@ static void EchoSuppression(AecCore* aec,
aec->delayIdx = WebRtcAec_PartitionDelay(aec->num_partitions, aec->wfBuf);
}
+ aec->data_dumper->DumpRaw("aec_nlp_delay", 1, &aec->delayIdx);
+
// Use delayed far.
memcpy(xfw, aec->xfwBuf + aec->delayIdx * PART_LEN1,
sizeof(xfw[0][0]) * 2 * PART_LEN1);
@@ -1173,6 +1179,8 @@ static void EchoSuppression(AecCore* aec,
FormSuppressionGain(aec, cohde, cohxd, hNl);
+ aec->data_dumper->DumpRaw("aec_nlp_gain", PART_LEN1, hNl);
+
WebRtcAec_Suppress(hNl, efw);
// Add comfort noise.
@@ -1388,6 +1396,10 @@ static void ProcessBlock(AecCore* aec) {
aec->error_threshold, &x_fft[0][0], &aec->xfBufBlockPos,
aec->xfBuf, nearend_ptr, aec->xPow, aec->wfBuf,
echo_subtractor_output);
+ aec->data_dumper->DumpRaw("aec_h_fft", PART_LEN1 * aec->num_partitions,
+ &aec->wfBuf[0][0]);
+ aec->data_dumper->DumpRaw("aec_h_fft", PART_LEN1 * aec->num_partitions,
+ &aec->wfBuf[1][0]);
aec->data_dumper->DumpWav("aec_out_linear", PART_LEN, echo_subtractor_output,
std::min(aec->sampFreq, 16000), 1);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698