Bump to WebRTC M131 release
Ongoing fixes and improvements, transient suppressor is gone. Also, dropping isac because it doesn't seem to be useful, and is just build system deadweight now. Upstream references: Version: 131.0.6778.200 WebRTC: 79aff54b0fa9238ce3518dd9eaf9610cd6f22e82 Chromium: 2a19506ad24af755f2a215a4c61f775393e0db42
This commit is contained in:
@ -131,11 +131,11 @@ class ClippingEventPredictor : public ClippingPredictor {
|
||||
// if at least `GetMinFramesProcessed()` frames have been processed since the
|
||||
// last reset and a clipping event is predicted. `level`, `min_mic_level`, and
|
||||
// `max_mic_level` are limited to [0, 255] and `default_step` to [1, 255].
|
||||
absl::optional<int> EstimateClippedLevelStep(int channel,
|
||||
int level,
|
||||
int default_step,
|
||||
int min_mic_level,
|
||||
int max_mic_level) const {
|
||||
std::optional<int> EstimateClippedLevelStep(int channel,
|
||||
int level,
|
||||
int default_step,
|
||||
int min_mic_level,
|
||||
int max_mic_level) const {
|
||||
RTC_CHECK_GE(channel, 0);
|
||||
RTC_CHECK_LT(channel, ch_buffers_.size());
|
||||
RTC_DCHECK_GE(level, 0);
|
||||
@ -147,7 +147,7 @@ class ClippingEventPredictor : public ClippingPredictor {
|
||||
RTC_DCHECK_GE(max_mic_level, 0);
|
||||
RTC_DCHECK_LE(max_mic_level, 255);
|
||||
if (level <= min_mic_level) {
|
||||
return absl::nullopt;
|
||||
return std::nullopt;
|
||||
}
|
||||
if (PredictClippingEvent(channel)) {
|
||||
const int new_level =
|
||||
@ -157,7 +157,7 @@ class ClippingEventPredictor : public ClippingPredictor {
|
||||
return step;
|
||||
}
|
||||
}
|
||||
return absl::nullopt;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
private:
|
||||
@ -271,11 +271,11 @@ class ClippingPeakPredictor : public ClippingPredictor {
|
||||
// least `GetMinFramesProcessed()` frames have been processed since the last
|
||||
// reset and a clipping event is predicted. `level`, `min_mic_level`, and
|
||||
// `max_mic_level` are limited to [0, 255] and `default_step` to [1, 255].
|
||||
absl::optional<int> EstimateClippedLevelStep(int channel,
|
||||
int level,
|
||||
int default_step,
|
||||
int min_mic_level,
|
||||
int max_mic_level) const {
|
||||
std::optional<int> EstimateClippedLevelStep(int channel,
|
||||
int level,
|
||||
int default_step,
|
||||
int min_mic_level,
|
||||
int max_mic_level) const {
|
||||
RTC_DCHECK_GE(channel, 0);
|
||||
RTC_DCHECK_LT(channel, ch_buffers_.size());
|
||||
RTC_DCHECK_GE(level, 0);
|
||||
@ -287,9 +287,9 @@ class ClippingPeakPredictor : public ClippingPredictor {
|
||||
RTC_DCHECK_GE(max_mic_level, 0);
|
||||
RTC_DCHECK_LE(max_mic_level, 255);
|
||||
if (level <= min_mic_level) {
|
||||
return absl::nullopt;
|
||||
return std::nullopt;
|
||||
}
|
||||
absl::optional<float> estimate_db = EstimatePeakValue(channel);
|
||||
std::optional<float> estimate_db = EstimatePeakValue(channel);
|
||||
if (estimate_db.has_value() && estimate_db.value() > clipping_threshold_) {
|
||||
int step = 0;
|
||||
if (!adaptive_step_estimation_) {
|
||||
@ -309,7 +309,7 @@ class ClippingPeakPredictor : public ClippingPredictor {
|
||||
return level - new_level;
|
||||
}
|
||||
}
|
||||
return absl::nullopt;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
private:
|
||||
@ -319,18 +319,18 @@ class ClippingPeakPredictor : public ClippingPredictor {
|
||||
|
||||
// Predicts clipping sample peaks based on the processed audio frames.
|
||||
// Returns the estimated peak value if clipping is predicted. Otherwise
|
||||
// returns absl::nullopt.
|
||||
absl::optional<float> EstimatePeakValue(int channel) const {
|
||||
// returns std::nullopt.
|
||||
std::optional<float> EstimatePeakValue(int channel) const {
|
||||
const auto reference_metrics = ch_buffers_[channel]->ComputePartialMetrics(
|
||||
reference_window_delay_, reference_window_length_);
|
||||
if (!reference_metrics.has_value()) {
|
||||
return absl::nullopt;
|
||||
return std::nullopt;
|
||||
}
|
||||
const auto metrics =
|
||||
ch_buffers_[channel]->ComputePartialMetrics(0, window_length_);
|
||||
if (!metrics.has_value() ||
|
||||
!(FloatS16ToDbfs(metrics.value().max) > clipping_threshold_)) {
|
||||
return absl::nullopt;
|
||||
return std::nullopt;
|
||||
}
|
||||
const float reference_crest_factor =
|
||||
ComputeCrestFactor(reference_metrics.value());
|
||||
|
Reference in New Issue
Block a user