Pulling AEC divergent filter fraction.
BUG= Review URL: https://codereview.webrtc.org/1862393002 Cr-Commit-Position: refs/heads/master@{#12279}
This commit is contained in:
parent
9d7e8dd44e
commit
5045337133
@ -1887,13 +1887,16 @@ int WebRtcAec_echo_state(AecCore* self) {
|
||||
void WebRtcAec_GetEchoStats(AecCore* self,
|
||||
Stats* erl,
|
||||
Stats* erle,
|
||||
Stats* a_nlp) {
|
||||
Stats* a_nlp,
|
||||
float* divergent_filter_fraction) {
|
||||
assert(erl != NULL);
|
||||
assert(erle != NULL);
|
||||
assert(a_nlp != NULL);
|
||||
*erl = self->erl;
|
||||
*erle = self->erle;
|
||||
*a_nlp = self->aNlp;
|
||||
*divergent_filter_fraction =
|
||||
self->divergent_filter_fraction.GetLatestFraction();
|
||||
}
|
||||
|
||||
void WebRtcAec_SetConfigCore(AecCore* self,
|
||||
|
||||
@ -95,7 +95,8 @@ int WebRtcAec_echo_state(AecCore* self);
|
||||
void WebRtcAec_GetEchoStats(AecCore* self,
|
||||
Stats* erl,
|
||||
Stats* erle,
|
||||
Stats* a_nlp);
|
||||
Stats* a_nlp,
|
||||
float* divergent_filter_fraction);
|
||||
#ifdef WEBRTC_AEC_DEBUG_DUMP
|
||||
void* WebRtcAec_far_time_buf(AecCore* self);
|
||||
#endif
|
||||
|
||||
@ -452,7 +452,8 @@ int WebRtcAec_GetMetrics(void* handle, AecMetrics* metrics) {
|
||||
return AEC_UNINITIALIZED_ERROR;
|
||||
}
|
||||
|
||||
WebRtcAec_GetEchoStats(self->aec, &erl, &erle, &a_nlp);
|
||||
WebRtcAec_GetEchoStats(self->aec, &erl, &erle, &a_nlp,
|
||||
&metrics->divergent_filter_fraction);
|
||||
|
||||
// ERL
|
||||
metrics->erl.instant = static_cast<int>(erl.instant);
|
||||
|
||||
@ -51,6 +51,7 @@ typedef struct {
|
||||
AecLevel erl;
|
||||
AecLevel erle;
|
||||
AecLevel aNlp;
|
||||
float divergent_filter_fraction;
|
||||
} AecMetrics;
|
||||
|
||||
struct AecCore;
|
||||
|
||||
@ -381,6 +381,7 @@ int EchoCancellationImpl::GetMetrics(Metrics* metrics) {
|
||||
metrics->a_nlp.maximum = my_metrics.aNlp.max;
|
||||
metrics->a_nlp.minimum = my_metrics.aNlp.min;
|
||||
|
||||
metrics->divergent_filter_fraction = my_metrics.divergent_filter_fraction;
|
||||
return AudioProcessing::kNoError;
|
||||
}
|
||||
|
||||
|
||||
@ -672,6 +672,10 @@ class EchoCancellation {
|
||||
|
||||
// (Pre non-linear processing suppression) A_NLP = 10log_10(P_echo / P_a)
|
||||
AudioProcessing::Statistic a_nlp;
|
||||
|
||||
// Fraction of time that the AEC linear filter is divergent, in a 0.5-second
|
||||
// non-overlapped aggregation window.
|
||||
float divergent_filter_fraction;
|
||||
};
|
||||
|
||||
// TODO(ajm): discuss the metrics update period.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user