Enables robust delay validation in AEC delay logging.
* Explicitly disabled robust validation in AECM. * Updated audio_processing_unittests for using robust delay validation in AEC. * Updated output_data_float.pb (not needed for Android nor fixed point, since AECM is untouched). BUG=None TESTED=modules_unittests, trybots R=aluebs@webrtc.org, andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/6879004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5368 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
Binary file not shown.
@@ -475,6 +475,17 @@ int WebRtcAec_InitAec(AecCore* aec, int sampFreq) {
|
|||||||
aec->extended_filter_enabled = 0;
|
aec->extended_filter_enabled = 0;
|
||||||
aec->num_partitions = kNormalNumPartitions;
|
aec->num_partitions = kNormalNumPartitions;
|
||||||
|
|
||||||
|
// Update the delay estimator with filter length. We use half the
|
||||||
|
// |num_partitions| to take the echo path into account. In practice we say
|
||||||
|
// that the echo has a duration of maximum half |num_partitions|, which is not
|
||||||
|
// true, but serves as a crude measure.
|
||||||
|
WebRtc_set_allowed_offset(aec->delay_estimator, aec->num_partitions / 2);
|
||||||
|
// TODO(bjornv): I currently hard coded the enable. Once we've established
|
||||||
|
// that AECM has no performance regression, robust_validation will be enabled
|
||||||
|
// all the time and the APIs to turn it on/off will be removed. Hence, remove
|
||||||
|
// this line then.
|
||||||
|
WebRtc_enable_robust_validation(aec->delay_estimator, 1);
|
||||||
|
|
||||||
// Default target suppression mode.
|
// Default target suppression mode.
|
||||||
aec->nlp_mode = 1;
|
aec->nlp_mode = 1;
|
||||||
|
|
||||||
@@ -771,6 +782,8 @@ void WebRtcAec_SetConfigCore(AecCore* self,
|
|||||||
void WebRtcAec_enable_delay_correction(AecCore* self, int enable) {
|
void WebRtcAec_enable_delay_correction(AecCore* self, int enable) {
|
||||||
self->extended_filter_enabled = enable;
|
self->extended_filter_enabled = enable;
|
||||||
self->num_partitions = enable ? kExtendedNumPartitions : kNormalNumPartitions;
|
self->num_partitions = enable ? kExtendedNumPartitions : kNormalNumPartitions;
|
||||||
|
// Update the delay estimator with filter length. See InitAEC() for details.
|
||||||
|
WebRtc_set_allowed_offset(self->delay_estimator, self->num_partitions / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int WebRtcAec_delay_correction_enabled(AecCore* self) {
|
int WebRtcAec_delay_correction_enabled(AecCore* self) {
|
||||||
|
@@ -266,6 +266,9 @@ int WebRtcAecm_CreateCore(AecmCore_t **aecmInst)
|
|||||||
aecm = NULL;
|
aecm = NULL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
// TODO(bjornv): Explicitly disable robust delay validation until no
|
||||||
|
// performance regression has been established. Then remove the line.
|
||||||
|
WebRtc_enable_robust_validation(aecm->delay_estimator, 0);
|
||||||
|
|
||||||
aecm->real_fft = WebRtcSpl_CreateRealFFT(PART_LEN_SHIFT);
|
aecm->real_fft = WebRtcSpl_CreateRealFFT(PART_LEN_SHIFT);
|
||||||
if (aecm->real_fft == NULL) {
|
if (aecm->real_fft == NULL) {
|
||||||
|
@@ -50,6 +50,8 @@ using webrtc::EchoControlMobile;
|
|||||||
using webrtc::VoiceDetection;
|
using webrtc::VoiceDetection;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
// TODO(bjornv): This is not feasible until the functionality has been
|
||||||
|
// re-implemented; see comment at the bottom of this file.
|
||||||
// When false, this will compare the output data with the results stored to
|
// When false, this will compare the output data with the results stored to
|
||||||
// file. This is the typical case. When the file should be updated, it can
|
// file. This is the typical case. When the file should be updated, it can
|
||||||
// be set to true with the command-line switch --write_ref_data.
|
// be set to true with the command-line switch --write_ref_data.
|
||||||
@@ -469,10 +471,10 @@ void ApmTest::ProcessDelayVerificationTest(int delay_ms, int system_delay_ms,
|
|||||||
frame_queue.push(frame);
|
frame_queue.push(frame);
|
||||||
frame_delay--;
|
frame_delay--;
|
||||||
}
|
}
|
||||||
// Run for 4.5 seconds, skipping statistics from the first second. We need
|
// Run for 4.5 seconds, skipping statistics from the first 2.5 seconds. We
|
||||||
// enough frames with audio to have reliable estimates, but as few as possible
|
// need enough frames with audio to have reliable estimates, but as few as
|
||||||
// to keep processing time down. 4.5 seconds seemed to be a good compromise
|
// possible to keep processing time down. 4.5 seconds seemed to be a good
|
||||||
// for this recording.
|
// compromise for this recording.
|
||||||
for (int frame_count = 0; frame_count < 450; ++frame_count) {
|
for (int frame_count = 0; frame_count < 450; ++frame_count) {
|
||||||
webrtc::AudioFrame* frame = new AudioFrame();
|
webrtc::AudioFrame* frame = new AudioFrame();
|
||||||
frame->CopyFrom(tmp_frame);
|
frame->CopyFrom(tmp_frame);
|
||||||
@@ -496,7 +498,7 @@ void ApmTest::ProcessDelayVerificationTest(int delay_ms, int system_delay_ms,
|
|||||||
frame_queue.pop();
|
frame_queue.pop();
|
||||||
delete frame;
|
delete frame;
|
||||||
|
|
||||||
if (frame_count == 100) {
|
if (frame_count == 250) {
|
||||||
int median;
|
int median;
|
||||||
int std;
|
int std;
|
||||||
// Discard the first delay metrics to avoid convergence effects.
|
// Discard the first delay metrics to avoid convergence effects.
|
||||||
|
Reference in New Issue
Block a user