The level estimator (AdaptiveModeLevelEstimator) produces a biased estimate of the speech level. In our model, we use another module (the SaturationProtector) to compute the bias. This CL contains the estimator and a stub of the saturation protector. Bug: webrtc:7494 Change-Id: I0df736d0346063f544fa680b4cc84177ea548545 Reviewed-on: https://webrtc-review.googlesource.com/64820 Commit-Queue: Alex Loiko <aleloi@webrtc.org> Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22641}
30 lines
951 B
C++
30 lines
951 B
C++
/*
|
|
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#include "modules/audio_processing/agc2/saturation_protector.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include "modules/audio_processing/logging/apm_data_dumper.h"
|
|
#include "rtc_base/numerics/safe_minmax.h"
|
|
|
|
namespace webrtc {
|
|
|
|
SaturationProtector::SaturationProtector(ApmDataDumper* apm_data_dumper) {}
|
|
|
|
void SaturationProtector::UpdateMargin(
|
|
const VadWithLevel::LevelAndProbability& vad_data,
|
|
float last_speech_level_estimate) {}
|
|
|
|
float SaturationProtector::LastMargin() const {
|
|
return kInitialSaturationMarginDb;
|
|
}
|
|
} // namespace webrtc
|