Revert 3428
> Delay estimator wrapper API changes. This should finalize the changes to delay estimator making it work for multi-probe. > > The changes are summarized here: > > delay_estimator.* > ----------------- > Replaced assert() with correct error check. This is consistent with previous versions of the delay_estimator, i.e., to check for valid parameters where they are actually used and not high up in a wrapper layer. > > delay_estimator_internal.h > -------------------------- > Pulled out the far-end part of DelayEstimator struct and put it in DelayEstimatorFarend. The only common parameter is spectrum_size, which we store in both and thereby avoiding having a Farend pointer in DelayEstimator. > > delay_estimator_wrapper.* > ------------------------- > Added and updated descriptions. From Free(), Create(), Init() the far-end parts have been put in separate Farend versions. Same goes for the Process() which now has an AddFarSpectrum() version. > The flow of calls should be something like (in pseudo-code) > > far* = CreateFarend(history_size) > near* = Create(far, lookahead) > InitFarend(far) > Init(near) > while call ongoing > AddFarSpectrum(far, far_spectrum) > Process(near, near_spectrum) > end while > Free(near) > FreeFarend(far) > > delay_estimator_unittest.cc > --------------------------- > Added farend support setting up calls as mentioned above. > > aecm_core.* > ----------- > Cleaned up some lint warnings. > Added delay_estimator_farend pointer. Called Create(), Init() and Free() in above mentioned order. > If AddFarSpectrumFix() was not successfully done, we end and return -1. This is what we would have done for Process(). > > aec_core.* > ---------- > Cleaned up some lint warnings. > Added delay_estimator_farend pointer. Calls in proper order. Since we only use the delay estimator for logging there is no error handling. We only call Process() if AddFarSpectrum() was successful though. > > TEST=audioproc_unittest, trybots > BUG=None > > Review URL: https://webrtc-codereview.appspot.com/1076006 TBR=bjornv@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1062008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3429 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "webrtc/modules/audio_processing/utility/delay_estimator.h"
|
||||
#include "delay_estimator.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
@ -76,12 +76,9 @@ void WebRtc_FreeBinaryDelayEstimatorFarend(BinaryDelayEstimatorFarend* self) {
|
||||
|
||||
BinaryDelayEstimatorFarend* WebRtc_CreateBinaryDelayEstimatorFarend(
|
||||
int history_size) {
|
||||
BinaryDelayEstimatorFarend* self = NULL;
|
||||
BinaryDelayEstimatorFarend* self = malloc(sizeof(BinaryDelayEstimatorFarend));
|
||||
|
||||
if (history_size > 1) {
|
||||
// Sanity conditions fulfilled.
|
||||
self = malloc(sizeof(BinaryDelayEstimatorFarend));
|
||||
}
|
||||
assert(history_size > 1);
|
||||
if (self != NULL) {
|
||||
int malloc_fail = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user