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

Unified Diff: media/filters/wsola_internals.h

Issue 217553004: Handle near-colinear case in WSOLAS QuadraticInterpolation better. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify cases handled. Created 6 years, 9 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
« no previous file with comments | « media/filters/audio_renderer_algorithm_unittest.cc ('k') | media/filters/wsola_internals.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/wsola_internals.h
diff --git a/media/filters/wsola_internals.h b/media/filters/wsola_internals.h
index 55fff04d30bc463b3abed791e6d3a431bfdb09cc..13d2875cb3104655aeb4bd98a1ba1f04ca166dfe 100644
--- a/media/filters/wsola_internals.h
+++ b/media/filters/wsola_internals.h
@@ -38,19 +38,13 @@ MEDIA_EXPORT void MultiChannelMovingBlockEnergies(const AudioBus* input,
float* energy);
// Fit the curve f(x) = a * x^2 + b * x + c such that
-//
-// f(-1) = |y[0]|
-// f(0) = |y[1]|
-// f(1) = |y[2]|.
-//
-// Then compute the |extremum| point -b / (2*a) and |extremum_value|
-// b^2 / (4*a) - b^2 / (2*a) + c.
-//
-// It is not expected that this function is called with
-// y[0] == y[1] == y[2].
-MEDIA_EXPORT void CubicInterpolation(const float* y_values,
- float* extremum,
- float* extremum_value);
+// f(-1) = y[0]
+// f(0) = y[1]
+// f(1) = y[2]
+// and return the maximum, assuming that y[0] <= y[1] >= y[2].
+MEDIA_EXPORT void QuadraticInterpolation(const float* y_values,
+ float* extremum,
+ float* extremum_value);
// Search a subset of all candid blocks. The search is performed every
// |decimation| frames. This reduces complexity by a factor of about
« no previous file with comments | « media/filters/audio_renderer_algorithm_unittest.cc ('k') | media/filters/wsola_internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698