Update to current webrtc library

This is from the upstream library commit id
3326535126e435f1ba647885ce43a8f0f3d317eb, corresponding to Chromium
88.0.4290.1.
This commit is contained in:
Arun Raghavan
2020-10-12 18:08:02 -04:00
parent b1b02581d3
commit bcec8b0b21
859 changed files with 76187 additions and 49580 deletions

View File

@ -11,13 +11,16 @@
// Modified from the Chromium original:
// src/media/base/simd/sinc_resampler_sse.cc
#include "webrtc/common_audio/resampler/sinc_resampler.h"
#include <stddef.h>
#include <stdint.h>
#include <xmmintrin.h>
#include "common_audio/resampler/sinc_resampler.h"
namespace webrtc {
float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1,
float SincResampler::Convolve_SSE(const float* input_ptr,
const float* k1,
const float* k2,
double kernel_interpolation_factor) {
__m128 m_input;
@ -41,17 +44,18 @@ float SincResampler::Convolve_SSE(const float* input_ptr, const float* k1,
}
// Linearly interpolate the two "convolutions".
m_sums1 = _mm_mul_ps(m_sums1, _mm_set_ps1(
static_cast<float>(1.0 - kernel_interpolation_factor)));
m_sums2 = _mm_mul_ps(m_sums2, _mm_set_ps1(
static_cast<float>(kernel_interpolation_factor)));
m_sums1 = _mm_mul_ps(
m_sums1,
_mm_set_ps1(static_cast<float>(1.0 - kernel_interpolation_factor)));
m_sums2 = _mm_mul_ps(
m_sums2, _mm_set_ps1(static_cast<float>(kernel_interpolation_factor)));
m_sums1 = _mm_add_ps(m_sums1, m_sums2);
// Sum components together.
float result;
m_sums2 = _mm_add_ps(_mm_movehl_ps(m_sums1, m_sums1), m_sums1);
_mm_store_ss(&result, _mm_add_ss(m_sums2, _mm_shuffle_ps(
m_sums2, m_sums2, 1)));
_mm_store_ss(&result,
_mm_add_ss(m_sums2, _mm_shuffle_ps(m_sums2, m_sums2, 1)));
return result;
}