| Index: media/filters/audio_renderer_algorithm_unittest.cc
|
| diff --git a/media/filters/audio_renderer_algorithm_unittest.cc b/media/filters/audio_renderer_algorithm_unittest.cc
|
| index 13fa28b2d0282ab09d8f3354395ad45482e80bf5..ed6b6ccddf8a0dffc5d445c5f411f172dd99937b 100644
|
| --- a/media/filters/audio_renderer_algorithm_unittest.cc
|
| +++ b/media/filters/audio_renderer_algorithm_unittest.cc
|
| @@ -597,7 +597,7 @@ TEST_F(AudioRendererAlgorithmTest, FullAndDecimatedSearch) {
|
| exclude_interval));
|
| }
|
|
|
| -TEST_F(AudioRendererAlgorithmTest, CubicInterpolation) {
|
| +TEST_F(AudioRendererAlgorithmTest, QuadraticInterpolation) {
|
| // Arbitrary coefficients.
|
| const float kA = 0.7f;
|
| const float kB = 1.2f;
|
| @@ -611,7 +611,7 @@ TEST_F(AudioRendererAlgorithmTest, CubicInterpolation) {
|
| float extremum;
|
| float extremum_value;
|
|
|
| - internal::CubicInterpolation(y_values, &extremum, &extremum_value);
|
| + internal::QuadraticInterpolation(y_values, &extremum, &extremum_value);
|
|
|
| float x_star = -kB / (2.f * kA);
|
| float y_star = kA * x_star * x_star + kB * x_star + kC;
|
| @@ -620,6 +620,21 @@ TEST_F(AudioRendererAlgorithmTest, CubicInterpolation) {
|
| EXPECT_FLOAT_EQ(y_star, extremum_value);
|
| }
|
|
|
| +TEST_F(AudioRendererAlgorithmTest, QuadraticInterpolation_Colinear) {
|
| + float y_values[3];
|
| + y_values[0] = 1.0;
|
| + y_values[1] = 1.0;
|
| + y_values[2] = 1.0;
|
| +
|
| + float extremum;
|
| + float extremum_value;
|
| +
|
| + internal::QuadraticInterpolation(y_values, &extremum, &extremum_value);
|
| +
|
| + EXPECT_FLOAT_EQ(extremum, 0.0);
|
| + EXPECT_FLOAT_EQ(extremum_value, 1.0);
|
| +}
|
| +
|
| TEST_F(AudioRendererAlgorithmTest, WsolaSlowdown) {
|
| WsolaTest(0.6f);
|
| }
|
|
|