| Index: media/base/vector_math.cc
|
| diff --git a/media/base/vector_math.cc b/media/base/vector_math.cc
|
| index 32584f5cf64ad2a1ecf400cbccd8f9341851cfa4..6152204ff39f3c223fe10c6901c417e0c288fe1c 100644
|
| --- a/media/base/vector_math.cc
|
| +++ b/media/base/vector_math.cc
|
| @@ -88,6 +88,13 @@ void FMUL_C(const float src[], float scale, int len, float dest[]) {
|
| dest[i] = src[i] * scale;
|
| }
|
|
|
| +void Crossfade(const float src[], int len, float dest[]) {
|
| + float cf_ratio = 0;
|
| + const float cf_increment = 1.0f / len;
|
| + for (int i = 0; i < len; ++i, cf_ratio += cf_increment)
|
| + dest[i] = (1.0f - cf_ratio) * src[i] + cf_ratio * dest[i];
|
| +}
|
| +
|
| std::pair<float, float> EWMAAndMaxPower(
|
| float initial_value, const float src[], int len, float smoothing_factor) {
|
| // Ensure |src| is 16-byte aligned.
|
|
|