2009-02-15 05:15:39 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///
|
2013-04-17 10:46:57 +00:00
|
|
|
/// SSE optimized routines for Pentium-III, Athlon-XP and later CPUs. All SSE
|
|
|
|
/// optimized functions have been gathered into this single source
|
|
|
|
/// code file, regardless to their class or original source code file, in order
|
2009-02-15 05:15:39 +00:00
|
|
|
/// to ease porting the library to other compiler and processor platforms.
|
|
|
|
///
|
|
|
|
/// The SSE-optimizations are programmed using SSE compiler intrinsics that
|
|
|
|
/// are supported both by Microsoft Visual C++ and GCC compilers, so this file
|
|
|
|
/// should compile with both toolsets.
|
|
|
|
///
|
2013-04-17 10:46:57 +00:00
|
|
|
/// NOTICE: If using Visual Studio 6.0, you'll need to install the "Visual C++
|
|
|
|
/// 6.0 processor pack" update to support SSE instruction set. The update is
|
2009-02-15 05:15:39 +00:00
|
|
|
/// available for download at Microsoft Developers Network, see here:
|
2010-03-18 20:04:51 +00:00
|
|
|
/// http://msdn.microsoft.com/en-us/vstudio/aa718349.aspx
|
2009-02-15 05:15:39 +00:00
|
|
|
///
|
2013-04-17 10:46:57 +00:00
|
|
|
/// If the above URL is expired or removed, go to "http://msdn.microsoft.com" and
|
2009-02-15 05:15:39 +00:00
|
|
|
/// perform a search with keywords "processor pack".
|
|
|
|
///
|
|
|
|
/// Author : Copyright (c) Olli Parviainen
|
|
|
|
/// Author e-mail : oparviai 'at' iki.fi
|
|
|
|
/// SoundTouch WWW: http://www.surina.net/soundtouch
|
|
|
|
///
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2017-09-26 23:34:13 +00:00
|
|
|
// Last changed : $Date: 2015-08-09 00:00:15 +0300 (su, 09 elo 2015) $
|
2010-03-18 20:04:51 +00:00
|
|
|
// File revision : $Revision: 4 $
|
2009-02-15 05:15:39 +00:00
|
|
|
//
|
2015-10-08 00:17:50 +00:00
|
|
|
// $Id: sse_optimized.cpp 226 2015-08-08 21:00:15Z oparviai $
|
2009-02-15 05:15:39 +00:00
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// License :
|
|
|
|
//
|
|
|
|
// SoundTouch audio processing library
|
|
|
|
// Copyright (c) Olli Parviainen
|
|
|
|
//
|
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2.1 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "cpu_detect.h"
|
|
|
|
#include "STTypes.h"
|
|
|
|
|
|
|
|
using namespace soundtouch;
|
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
#ifdef SOUNDTOUCH_ALLOW_SSE
|
2009-02-15 05:15:39 +00:00
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
// SSE routines available only with float sample type
|
2009-02-15 05:15:39 +00:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// implementation of SSE optimized functions of class 'TDStretchSSE'
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "TDStretch.h"
|
|
|
|
#include <xmmintrin.h>
|
2010-03-18 20:04:51 +00:00
|
|
|
#include <math.h>
|
2009-02-15 05:15:39 +00:00
|
|
|
|
|
|
|
// Calculates cross correlation of two buffers
|
2015-10-08 00:17:50 +00:00
|
|
|
double TDStretchSSE::calcCrossCorr(const float *pV1, const float *pV2, double &anorm)
|
2009-02-15 05:15:39 +00:00
|
|
|
{
|
2010-03-18 20:04:51 +00:00
|
|
|
int i;
|
|
|
|
const float *pVec1;
|
|
|
|
const __m128 *pVec2;
|
|
|
|
__m128 vSum, vNorm;
|
2009-02-15 05:15:39 +00:00
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
// Note. It means a major slow-down if the routine needs to tolerate
|
|
|
|
// unaligned __m128 memory accesses. It's way faster if we can skip
|
2009-02-15 05:15:39 +00:00
|
|
|
// unaligned slots and use _mm_load_ps instruction instead of _mm_loadu_ps.
|
|
|
|
// This can mean up to ~ 10-fold difference (incl. part of which is
|
|
|
|
// due to skipping every second round for stereo sound though).
|
|
|
|
//
|
2013-04-17 10:46:57 +00:00
|
|
|
// Compile-time define SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION is provided
|
2009-02-15 05:15:39 +00:00
|
|
|
// for choosing if this little cheating is allowed.
|
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
#ifdef SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION
|
|
|
|
// Little cheating allowed, return valid correlation only for
|
2009-02-15 05:15:39 +00:00
|
|
|
// aligned locations, meaning every second round for stereo sound.
|
|
|
|
|
|
|
|
#define _MM_LOAD _mm_load_ps
|
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
if (((ulongptr)pV1) & 15) return -1e50; // skip unaligned locations
|
2009-02-15 05:15:39 +00:00
|
|
|
|
|
|
|
#else
|
|
|
|
// No cheating allowed, use unaligned load & take the resulting
|
|
|
|
// performance hit.
|
|
|
|
#define _MM_LOAD _mm_loadu_ps
|
2013-04-17 10:46:57 +00:00
|
|
|
#endif
|
2009-02-15 05:15:39 +00:00
|
|
|
|
|
|
|
// ensure overlapLength is divisible by 8
|
|
|
|
assert((overlapLength % 8) == 0);
|
|
|
|
|
|
|
|
// Calculates the cross-correlation value between 'pV1' and 'pV2' vectors
|
|
|
|
// Note: pV2 _must_ be aligned to 16-bit boundary, pV1 need not.
|
2010-03-18 20:04:51 +00:00
|
|
|
pVec1 = (const float*)pV1;
|
|
|
|
pVec2 = (const __m128*)pV2;
|
|
|
|
vSum = vNorm = _mm_setzero_ps();
|
2009-02-15 05:15:39 +00:00
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
// Unroll the loop by factor of 4 * 4 operations. Use same routine for
|
|
|
|
// stereo & mono, for mono it just means twice the amount of unrolling.
|
|
|
|
for (i = 0; i < channels * overlapLength / 16; i ++)
|
2009-02-15 05:15:39 +00:00
|
|
|
{
|
2010-03-18 20:04:51 +00:00
|
|
|
__m128 vTemp;
|
2009-02-15 05:15:39 +00:00
|
|
|
// vSum += pV1[0..3] * pV2[0..3]
|
2010-03-18 20:04:51 +00:00
|
|
|
vTemp = _MM_LOAD(pVec1);
|
|
|
|
vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp ,pVec2[0]));
|
|
|
|
vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
|
2009-02-15 05:15:39 +00:00
|
|
|
|
|
|
|
// vSum += pV1[4..7] * pV2[4..7]
|
2010-03-18 20:04:51 +00:00
|
|
|
vTemp = _MM_LOAD(pVec1 + 4);
|
|
|
|
vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[1]));
|
|
|
|
vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
|
2009-02-15 05:15:39 +00:00
|
|
|
|
|
|
|
// vSum += pV1[8..11] * pV2[8..11]
|
2010-03-18 20:04:51 +00:00
|
|
|
vTemp = _MM_LOAD(pVec1 + 8);
|
|
|
|
vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[2]));
|
|
|
|
vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
|
2009-02-15 05:15:39 +00:00
|
|
|
|
|
|
|
// vSum += pV1[12..15] * pV2[12..15]
|
2010-03-18 20:04:51 +00:00
|
|
|
vTemp = _MM_LOAD(pVec1 + 12);
|
|
|
|
vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[3]));
|
|
|
|
vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
|
2009-02-15 05:15:39 +00:00
|
|
|
|
2010-03-18 20:04:51 +00:00
|
|
|
pVec1 += 16;
|
2009-02-15 05:15:39 +00:00
|
|
|
pVec2 += 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
// return value = vSum[0] + vSum[1] + vSum[2] + vSum[3]
|
2010-03-18 20:04:51 +00:00
|
|
|
float *pvNorm = (float*)&vNorm;
|
2015-08-22 14:16:27 +00:00
|
|
|
float norm = (pvNorm[0] + pvNorm[1] + pvNorm[2] + pvNorm[3]);
|
|
|
|
anorm = norm;
|
2010-03-18 20:04:51 +00:00
|
|
|
|
2009-02-15 05:15:39 +00:00
|
|
|
float *pvSum = (float*)&vSum;
|
2015-08-22 14:16:27 +00:00
|
|
|
return (double)(pvSum[0] + pvSum[1] + pvSum[2] + pvSum[3]) / sqrt(norm < 1e-9 ? 1.0 : norm);
|
2009-02-15 05:15:39 +00:00
|
|
|
|
2010-03-18 20:04:51 +00:00
|
|
|
/* This is approximately corresponding routine in C-language yet without normalization:
|
|
|
|
double corr, norm;
|
2009-02-15 05:15:39 +00:00
|
|
|
uint i;
|
|
|
|
|
|
|
|
// Calculates the cross-correlation value between 'pV1' and 'pV2' vectors
|
2010-03-18 20:04:51 +00:00
|
|
|
corr = norm = 0.0;
|
2013-04-17 10:46:57 +00:00
|
|
|
for (i = 0; i < channels * overlapLength / 16; i ++)
|
2009-02-15 05:15:39 +00:00
|
|
|
{
|
|
|
|
corr += pV1[0] * pV2[0] +
|
|
|
|
pV1[1] * pV2[1] +
|
|
|
|
pV1[2] * pV2[2] +
|
|
|
|
pV1[3] * pV2[3] +
|
|
|
|
pV1[4] * pV2[4] +
|
|
|
|
pV1[5] * pV2[5] +
|
|
|
|
pV1[6] * pV2[6] +
|
|
|
|
pV1[7] * pV2[7] +
|
|
|
|
pV1[8] * pV2[8] +
|
|
|
|
pV1[9] * pV2[9] +
|
|
|
|
pV1[10] * pV2[10] +
|
|
|
|
pV1[11] * pV2[11] +
|
|
|
|
pV1[12] * pV2[12] +
|
|
|
|
pV1[13] * pV2[13] +
|
|
|
|
pV1[14] * pV2[14] +
|
|
|
|
pV1[15] * pV2[15];
|
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
for (j = 0; j < 15; j ++) norm += pV1[j] * pV1[j];
|
2010-03-18 20:04:51 +00:00
|
|
|
|
2009-02-15 05:15:39 +00:00
|
|
|
pV1 += 16;
|
|
|
|
pV2 += 16;
|
|
|
|
}
|
2010-03-18 20:04:51 +00:00
|
|
|
return corr / sqrt(norm);
|
2009-02-15 05:15:39 +00:00
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-08-22 14:16:27 +00:00
|
|
|
|
2015-10-08 00:17:50 +00:00
|
|
|
double TDStretchSSE::calcCrossCorrAccumulate(const float *pV1, const float *pV2, double &norm)
|
2015-08-22 14:16:27 +00:00
|
|
|
{
|
|
|
|
// call usual calcCrossCorr function because SSE does not show big benefit of
|
|
|
|
// accumulating "norm" value, and also the "norm" rolling algorithm would get
|
|
|
|
// complicated due to SSE-specific alignment-vs-nonexact correlation rules.
|
|
|
|
return calcCrossCorr(pV1, pV2, norm);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-02-15 05:15:39 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// implementation of SSE optimized functions of class 'FIRFilter'
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "FIRFilter.h"
|
|
|
|
|
|
|
|
FIRFilterSSE::FIRFilterSSE() : FIRFilter()
|
|
|
|
{
|
2010-03-18 20:04:51 +00:00
|
|
|
filterCoeffsAlign = NULL;
|
2009-02-15 05:15:39 +00:00
|
|
|
filterCoeffsUnalign = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FIRFilterSSE::~FIRFilterSSE()
|
|
|
|
{
|
|
|
|
delete[] filterCoeffsUnalign;
|
2010-03-18 20:04:51 +00:00
|
|
|
filterCoeffsAlign = NULL;
|
|
|
|
filterCoeffsUnalign = NULL;
|
2009-02-15 05:15:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// (overloaded) Calculates filter coefficients for SSE routine
|
|
|
|
void FIRFilterSSE::setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor)
|
|
|
|
{
|
|
|
|
uint i;
|
|
|
|
float fDivider;
|
|
|
|
|
|
|
|
FIRFilter::setCoefficients(coeffs, newLength, uResultDivFactor);
|
|
|
|
|
|
|
|
// Scale the filter coefficients so that it won't be necessary to scale the filtering result
|
2013-04-17 10:46:57 +00:00
|
|
|
// also rearrange coefficients suitably for SSE
|
2009-02-15 05:15:39 +00:00
|
|
|
// Ensure that filter coeffs array is aligned to 16-byte boundary
|
|
|
|
delete[] filterCoeffsUnalign;
|
|
|
|
filterCoeffsUnalign = new float[2 * newLength + 4];
|
2013-04-17 10:46:57 +00:00
|
|
|
filterCoeffsAlign = (float *)SOUNDTOUCH_ALIGN_POINTER_16(filterCoeffsUnalign);
|
2009-02-15 05:15:39 +00:00
|
|
|
|
|
|
|
fDivider = (float)resultDivider;
|
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
// rearrange the filter coefficients for mmx routines
|
2009-02-15 05:15:39 +00:00
|
|
|
for (i = 0; i < newLength; i ++)
|
|
|
|
{
|
|
|
|
filterCoeffsAlign[2 * i + 0] =
|
|
|
|
filterCoeffsAlign[2 * i + 1] = coeffs[i + 0] / fDivider;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// SSE-optimized version of the filter routine for stereo sound
|
|
|
|
uint FIRFilterSSE::evaluateFilterStereo(float *dest, const float *source, uint numSamples) const
|
|
|
|
{
|
2010-03-18 20:04:51 +00:00
|
|
|
int count = (int)((numSamples - length) & (uint)-2);
|
2009-02-15 05:15:39 +00:00
|
|
|
int j;
|
|
|
|
|
|
|
|
assert(count % 2 == 0);
|
|
|
|
|
|
|
|
if (count < 2) return 0;
|
|
|
|
|
2010-03-18 20:04:51 +00:00
|
|
|
assert(source != NULL);
|
|
|
|
assert(dest != NULL);
|
2009-02-15 05:15:39 +00:00
|
|
|
assert((length % 8) == 0);
|
2010-03-18 20:04:51 +00:00
|
|
|
assert(filterCoeffsAlign != NULL);
|
2013-04-17 10:46:57 +00:00
|
|
|
assert(((ulongptr)filterCoeffsAlign) % 16 == 0);
|
2009-02-15 05:15:39 +00:00
|
|
|
|
|
|
|
// filter is evaluated for two stereo samples with each iteration, thus use of 'j += 2'
|
2015-08-22 14:16:27 +00:00
|
|
|
#pragma omp parallel for
|
2009-02-15 05:15:39 +00:00
|
|
|
for (j = 0; j < count; j += 2)
|
|
|
|
{
|
|
|
|
const float *pSrc;
|
2015-08-22 14:16:27 +00:00
|
|
|
float *pDest;
|
2009-02-15 05:15:39 +00:00
|
|
|
const __m128 *pFil;
|
|
|
|
__m128 sum1, sum2;
|
|
|
|
uint i;
|
|
|
|
|
2015-08-22 14:16:27 +00:00
|
|
|
pSrc = (const float*)source + j * 2; // source audio data
|
|
|
|
pDest = dest + j * 2; // destination audio data
|
2013-04-17 10:46:57 +00:00
|
|
|
pFil = (const __m128*)filterCoeffsAlign; // filter coefficients. NOTE: Assumes coefficients
|
2010-03-18 20:04:51 +00:00
|
|
|
// are aligned to 16-byte boundary
|
2009-02-15 05:15:39 +00:00
|
|
|
sum1 = sum2 = _mm_setzero_ps();
|
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
for (i = 0; i < length / 8; i ++)
|
2009-02-15 05:15:39 +00:00
|
|
|
{
|
2013-04-17 10:46:57 +00:00
|
|
|
// Unroll loop for efficiency & calculate filter for 2*2 stereo samples
|
2009-02-15 05:15:39 +00:00
|
|
|
// at each pass
|
|
|
|
|
|
|
|
// sum1 is accu for 2*2 filtered stereo sound data at the primary sound data offset
|
|
|
|
// sum2 is accu for 2*2 filtered stereo sound data for the next sound sample offset.
|
|
|
|
|
|
|
|
sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc) , pFil[0]));
|
|
|
|
sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 2), pFil[0]));
|
|
|
|
|
|
|
|
sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 4), pFil[1]));
|
|
|
|
sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 6), pFil[1]));
|
|
|
|
|
|
|
|
sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 8) , pFil[2]));
|
|
|
|
sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 10), pFil[2]));
|
|
|
|
|
|
|
|
sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 12), pFil[3]));
|
|
|
|
sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 14), pFil[3]));
|
|
|
|
|
|
|
|
pSrc += 16;
|
|
|
|
pFil += 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Now sum1 and sum2 both have a filtered 2-channel sample each, but we still need
|
|
|
|
// to sum the two hi- and lo-floats of these registers together.
|
|
|
|
|
|
|
|
// post-shuffle & add the filtered values and store to dest.
|
2015-08-22 14:16:27 +00:00
|
|
|
_mm_storeu_ps(pDest, _mm_add_ps(
|
2009-02-15 05:15:39 +00:00
|
|
|
_mm_shuffle_ps(sum1, sum2, _MM_SHUFFLE(1,0,3,2)), // s2_1 s2_0 s1_3 s1_2
|
|
|
|
_mm_shuffle_ps(sum1, sum2, _MM_SHUFFLE(3,2,1,0)) // s2_3 s2_2 s1_1 s1_0
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
// Ideas for further improvement:
|
2013-04-17 10:46:57 +00:00
|
|
|
// 1. If it could be guaranteed that 'source' were always aligned to 16-byte
|
2009-02-15 05:15:39 +00:00
|
|
|
// boundary, a faster aligned '_mm_load_ps' instruction could be used.
|
2013-04-17 10:46:57 +00:00
|
|
|
// 2. If it could be guaranteed that 'dest' were always aligned to 16-byte
|
2009-02-15 05:15:39 +00:00
|
|
|
// boundary, a faster '_mm_store_ps' instruction could be used.
|
|
|
|
|
|
|
|
return (uint)count;
|
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
/* original routine in C-language. please notice the C-version has differently
|
2009-02-15 05:15:39 +00:00
|
|
|
organized coefficients though.
|
|
|
|
double suml1, suml2;
|
|
|
|
double sumr1, sumr2;
|
|
|
|
uint i, j;
|
|
|
|
|
|
|
|
for (j = 0; j < count; j += 2)
|
|
|
|
{
|
|
|
|
const float *ptr;
|
|
|
|
const float *pFil;
|
|
|
|
|
|
|
|
suml1 = sumr1 = 0.0;
|
|
|
|
suml2 = sumr2 = 0.0;
|
|
|
|
ptr = src;
|
|
|
|
pFil = filterCoeffs;
|
2013-04-17 10:46:57 +00:00
|
|
|
for (i = 0; i < lengthLocal; i ++)
|
2009-02-15 05:15:39 +00:00
|
|
|
{
|
|
|
|
// unroll loop for efficiency.
|
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
suml1 += ptr[0] * pFil[0] +
|
2009-02-15 05:15:39 +00:00
|
|
|
ptr[2] * pFil[2] +
|
|
|
|
ptr[4] * pFil[4] +
|
|
|
|
ptr[6] * pFil[6];
|
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
sumr1 += ptr[1] * pFil[1] +
|
2009-02-15 05:15:39 +00:00
|
|
|
ptr[3] * pFil[3] +
|
|
|
|
ptr[5] * pFil[5] +
|
|
|
|
ptr[7] * pFil[7];
|
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
suml2 += ptr[8] * pFil[0] +
|
2009-02-15 05:15:39 +00:00
|
|
|
ptr[10] * pFil[2] +
|
|
|
|
ptr[12] * pFil[4] +
|
|
|
|
ptr[14] * pFil[6];
|
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
sumr2 += ptr[9] * pFil[1] +
|
2009-02-15 05:15:39 +00:00
|
|
|
ptr[11] * pFil[3] +
|
|
|
|
ptr[13] * pFil[5] +
|
|
|
|
ptr[15] * pFil[7];
|
|
|
|
|
|
|
|
ptr += 16;
|
|
|
|
pFil += 8;
|
|
|
|
}
|
|
|
|
dest[0] = (float)suml1;
|
|
|
|
dest[1] = (float)sumr1;
|
|
|
|
dest[2] = (float)suml2;
|
|
|
|
dest[3] = (float)sumr2;
|
|
|
|
|
|
|
|
src += 4;
|
|
|
|
dest += 4;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
2013-04-17 10:46:57 +00:00
|
|
|
#endif // SOUNDTOUCH_ALLOW_SSE
|