AEC3: Improved anti-aliasing filter for DSF 4
This change contains a new anti-aliasing filter for the delay estimator for down-sampling factor 4. The new (elliptic) filter has a much wider main lobe allowing for faster convergence. Bug: webrtc:9288,chromium:846615 Change-Id: Id109974a59fe6f48c5e0ccc4f4e06c0d94c8bd03 Reviewed-on: https://webrtc-review.googlesource.com/81680 Reviewed-by: Per Åhgren <peah@webrtc.org> Commit-Queue: Gustaf Ullberg <gustaf@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23534}
This commit is contained in:
parent
7210af206c
commit
f469b63d44
@ -20,11 +20,11 @@ const std::vector<CascadedBiQuadFilter::BiQuadParam> kLowPassFilterDS2 = {
|
||||
{{-1.f, 0.f}, {0.13833231f, 0.40743176f}, 0.22711796393486466f},
|
||||
{{-1.f, 0.f}, {0.13833231f, 0.40743176f}, 0.22711796393486466f}};
|
||||
|
||||
// signal.butter(2, 750/8000.0, 'lowpass', analog=False)
|
||||
// signal.ellip(6, 1, 40, 1800/8000, btype='lowpass', analog=False)
|
||||
const std::vector<CascadedBiQuadFilter::BiQuadParam> kLowPassFilterDS4 = {
|
||||
{{-1.f, 0.f}, {0.79396855f, 0.17030506f}, 0.017863192751682862f},
|
||||
{{-1.f, 0.f}, {0.79396855f, 0.17030506f}, 0.017863192751682862f},
|
||||
{{-1.f, 0.f}, {0.79396855f, 0.17030506f}, 0.017863192751682862f}};
|
||||
{{-0.08873842f, 0.99605496f}, {0.75916227f, 0.23841065f}, 0.26250696827f},
|
||||
{{0.62273832f, 0.78243018f}, {0.74892112f, 0.5410152f}, 0.26250696827f},
|
||||
{{0.71107693f, 0.70311421f}, {0.74895534f, 0.63924616f}, 0.26250696827f}};
|
||||
|
||||
// signal.cheby1(1, 6, [1000/8000, 2000/8000], btype='bandpass', analog=False)
|
||||
const std::vector<CascadedBiQuadFilter::BiQuadParam> kBandPassFilterDS8 = {
|
||||
|
||||
@ -93,12 +93,14 @@ TEST(EchoPathDelayEstimator, DelayEstimation) {
|
||||
}
|
||||
|
||||
if (estimated_delay_samples) {
|
||||
// Due to the internal down-sampling done inside the delay estimator
|
||||
// the estimated delay cannot be expected to be exact to the true delay.
|
||||
EXPECT_NEAR(delay_samples,
|
||||
estimated_delay_samples->delay -
|
||||
(config.delay.api_call_jitter_blocks + 1) * 64,
|
||||
config.delay.down_sampling_factor);
|
||||
// Allow estimated delay to be off by one sample in the down-sampled
|
||||
// domain.
|
||||
size_t delay_ds = delay_samples / down_sampling_factor;
|
||||
size_t estimated_delay_ds =
|
||||
(estimated_delay_samples->delay -
|
||||
(config.delay.api_call_jitter_blocks + 1) * 64) /
|
||||
down_sampling_factor;
|
||||
EXPECT_NEAR(delay_ds, estimated_delay_ds, 1);
|
||||
} else {
|
||||
ADD_FAILURE();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user