Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(991)

Unified Diff: webrtc/modules/audio_coding/neteq/statistics_calculator.h

Issue 2859483005: NetEq: Fix a bug in expand_rate and speech_expand_rate calculation (Closed)
Patch Set: Changing to Minyue's suggestion Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/statistics_calculator.h
diff --git a/webrtc/modules/audio_coding/neteq/statistics_calculator.h b/webrtc/modules/audio_coding/neteq/statistics_calculator.h
index b2df865f632150cf9c227201867564fb5caa15c8..fb869ab025be5efa47c22aa2ac6f4a7bcb709655 100644
--- a/webrtc/modules/audio_coding/neteq/statistics_calculator.h
+++ b/webrtc/modules/audio_coding/neteq/statistics_calculator.h
@@ -45,6 +45,14 @@ class StatisticsCalculator {
// that the expansion produced only noise samples.
void ExpandedNoiseSamples(size_t num_samples);
+ // Corrects the statistics for number of samples produced through non-noise
+ // expansion by adding |num_samples| (negative or positive) to the current
+ // value. The result is capped to zero to avoid negative values.
+ void ExpandedVoiceSamplesCorrection(int num_samples);
+
+ // Same as ExpandedVoiceSamplesCorrection but for noise samples.
+ void ExpandedNoiseSamplesCorrection(int num_samples);
+
// Reports that |num_samples| samples were produced through preemptive
// expansion.
void PreemptiveExpandedSamples(size_t num_samples);

Powered by Google App Engine
This is Rietveld 408576698