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

Unified Diff: media/base/moving_average.h

Issue 1459923003: Fix Bug: Video with Variable Frame Rate plays at incorrect speed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: VideoRendererAlgorithm Test Case Created 5 years 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
« no previous file with comments | « no previous file | media/base/moving_average.cc » ('j') | media/base/moving_average.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/moving_average.h
diff --git a/media/base/moving_average.h b/media/base/moving_average.h
index 18a934e2998cb919a0dc39a21efff43562ccf3e1..948fe317c822f8c45c517edbdd97f7e9f9186555 100644
--- a/media/base/moving_average.h
+++ b/media/base/moving_average.h
@@ -26,6 +26,9 @@ class MEDIA_EXPORT MovingAverage {
// Returns the current average of all held samples.
base::TimeDelta Average() const;
+ // Returns the standard deviation of all held samples.
+ base::TimeDelta Deviation() const;
+
// Resets the state of the class to its initial post-construction state.
void Reset();
@@ -40,6 +43,7 @@ class MEDIA_EXPORT MovingAverage {
std::vector<base::TimeDelta> samples_;
base::TimeDelta total_;
+ uint64_t square_sum_us_;
DISALLOW_COPY_AND_ASSIGN(MovingAverage);
};
« no previous file with comments | « no previous file | media/base/moving_average.cc » ('j') | media/base/moving_average.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698