OpenMPT Legacy: Remove modifications from library

There were some leftover modifications to the 0.5.x tree I was using,
which were supposed to be speed optimizations, but they're probably
pointless anyway. The NEON optimizations were especially pointless,
since this plugin version isn't used on any macOS version that runs on
Apple Silicon.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
CQTexperiment
Christopher Snowhill 2022-02-08 00:15:49 -08:00
parent 0763b28f38
commit 52ddc26bb9
5 changed files with 15 additions and 8850 deletions

View File

@ -183,12 +183,12 @@
//#define MPT_WITH_MEDIAFOUNDATION
//#define MPT_WITH_MINIMP3
//#define MPT_WITH_MINIZ
//#define MPT_WITH_MPG123
//#define MPT_WITH_OGG
#define MPT_WITH_MPG123
#define MPT_WITH_OGG
//#define MPT_WITH_STBVORBIS
//#define MPT_WITH_VORBIS
//#define MPT_WITH_VORBISFILE
//#define MPT_WITH_ZLIB
#define MPT_WITH_VORBIS
#define MPT_WITH_VORBISFILE
#define MPT_WITH_ZLIB
#endif // LIBOPENMPT_BUILD
@ -405,6 +405,10 @@
#endif
#endif
#if !MPT_COMPILER_MSVC && defined(ENABLE_ASM)
#undef ENABLE_ASM // inline assembly requires MSVC compiler
#endif
#if defined(ENABLE_ASM)
#if MPT_COMPILER_MSVC && defined(_M_IX86)
@ -444,24 +448,6 @@
// Generate AVX2 instructions (only used when the CPU supports it).
#define ENABLE_AVX2
#elif MPT_BUILD_XCODE && defined(__x86_64__)
// No CPUID enabled, only one code path supported anyway
// #define ENABLE_CPUID
// Enable the SSE2 intrinsic functions unconditionally
#define ENABLE_SSE2
#elif MPT_BUILD_XCODE && defined(__arm64__)
// No CPUID, it's kind of a pain on ARM anyway
// #define ENABLE_CPUID
// Enable the NEON intrinsic functions unconditionally
#define ENABLE_NEON
#else
#undef ENABLE_ASM
#endif // arch
#endif // ENABLE_ASM

File diff suppressed because it is too large Load Diff

View File

@ -19,10 +19,6 @@
#include <emmintrin.h>
#endif
#ifdef ENABLE_NEON
#include "../common/sse2neon.h"
#endif
#endif // NO_REVERB
@ -32,7 +28,7 @@ OPENMPT_NAMESPACE_BEGIN
#ifndef NO_REVERB
#if defined(ENABLE_SSE2) || defined(ENABLE_NEON)
#ifdef ENABLE_SSE2
// Load two 32-bit values
static MPT_FORCEINLINE __m128i Load64SSE(const int32 *x) { return _mm_loadl_epi64(reinterpret_cast<const __m128i *>(x)); }
// Load four 16-bit values
@ -598,11 +594,6 @@ void CReverb::ReverbProcessPostFiltering1x(const int32 * MPT_RESTRICT pRvb, int3
{
#ifdef ENABLE_SSE2
if(GetProcSupport() & PROCSUPPORT_SSE2)
#endif
#ifdef ENABLE_NEON
if(GetProcSupport() & PROCSUPPORT_NEON)
#endif
#if defined(ENABLE_SSE2) || defined(ENABLE_NEON)
{
__m128i nDCRRvb_Y1 = Load64SSE(gnDCRRvb_Y1);
__m128i nDCRRvb_X1 = Load64SSE(gnDCRRvb_X1);
@ -665,11 +656,6 @@ void CReverb::ReverbDCRemoval(int32 * MPT_RESTRICT pBuffer, uint32 nSamples)
{
#ifdef ENABLE_SSE2
if(GetProcSupport() & PROCSUPPORT_SSE2)
#endif
#ifdef ENABLE_NEON
if(GetProcSupport() & PROCSUPPORT_NEON)
#endif
#if defined(ENABLE_SSE2) || defined(ENABLE_NEON)
{
__m128i nDCRRvb_Y1 = Load64SSE(gnDCRRvb_Y1);
__m128i nDCRRvb_X1 = Load64SSE(gnDCRRvb_X1);
@ -735,11 +721,6 @@ void CReverb::ProcessPreDelay(SWRvbRefDelay * MPT_RESTRICT pPreDelay, const int3
uint32 delayPos = pPreDelay->nDelayPos - 1;
#ifdef ENABLE_SSE2
if(GetProcSupport() & PROCSUPPORT_SSE2)
#endif
#ifdef ENABLE_NEON
if(GetProcSupport() & PROCSUPPORT_NEON)
#endif
#if defined(ENABLE_SSE2) || defined(ENABLE_NEON)
{
__m128i coeffs = _mm_cvtsi32_si128(pPreDelay->nCoeffs.lr);
__m128i history = _mm_cvtsi32_si128(pPreDelay->History.lr);
@ -812,11 +793,6 @@ void CReverb::ProcessReflections(SWRvbRefDelay * MPT_RESTRICT pPreDelay, LR16 *
{
#ifdef ENABLE_SSE2
if(GetProcSupport() & PROCSUPPORT_SSE2)
#endif
#ifdef ENABLE_NEON
if(GetProcSupport() & PROCSUPPORT_NEON)
#endif
#if defined(ENABLE_SSE2) || defined(ENABLE_NEON)
{
union
{
@ -912,11 +888,6 @@ void CReverb::ProcessLateReverb(SWLateReverb * MPT_RESTRICT pReverb, LR16 * MPT_
#ifdef ENABLE_SSE2
if(GetProcSupport() & PROCSUPPORT_SSE2)
#endif
#ifdef ENABLE_NEON
if(GetProcSupport() & PROCSUPPORT_NEON)
#endif
#if defined(ENABLE_SSE2) || defined(ENABLE_NEON)
{
int delayPos = pReverb->nDelayPos & RVBDLY_MASK;
__m128i rvbOutGains = Load64SSE(pReverb->RvbOutGains);

View File

@ -18,9 +18,6 @@
#ifdef ENABLE_SSE2
#include <emmintrin.h>
#endif
#ifdef ENABLE_NEON
#include "../common/sse2neon.h"
#endif
OPENMPT_NAMESPACE_BEGIN
@ -28,7 +25,7 @@ OPENMPT_NAMESPACE_BEGIN
///////////////////////////////////////////////////////////////////////////////////////
// SSE Optimizations
#if defined(ENABLE_SSE2) || defined(ENABLE_NEON)
#ifdef ENABLE_SSE2
static void SSE2_StereoMixToFloat(const int32 *pSrc, float *pOut1, float *pOut2, uint32 nCount, const float _i2fc)
{
@ -185,17 +182,12 @@ void StereoMixToFloat(const int32 *pSrc, float *pOut1, float *pOut2, uint32 nCou
#ifdef ENABLE_SSE2
if(GetProcSupport() & PROCSUPPORT_SSE2)
#endif
#ifdef ENABLE_NEON
if(GetProcSupport() & PROCSUPPORT_NEON)
#endif
#if defined(ENABLE_SSE2) || defined(ENABLE_NEON)
{
SSE2_StereoMixToFloat(pSrc, pOut1, pOut2, nCount, _i2fc);
return;
}
#endif // ENABLE_SSE2 || ENABLE_NEON
#endif // ENABLE_SSE2
{
C_StereoMixToFloat(pSrc, pOut1, pOut2, nCount, _i2fc);
}
@ -207,17 +199,12 @@ void FloatToStereoMix(const float *pIn1, const float *pIn2, int32 *pOut, uint32
{
#ifdef ENABLE_SSE2
if(GetProcSupport() & PROCSUPPORT_SSE2)
#endif
#ifdef ENABLE_NEON
if(GetProcSupport() & PROCSUPPORT_NEON)
#endif
#if defined(ENABLE_SSE2) || defined(ENABLE_NEON)
{
SSE2_FloatToStereoMix(pIn1, pIn2, pOut, nCount, _f2ic);
return;
}
#endif // ENABLE_SSE2 || ENABLE_NEON
#endif // ENABLE_SSE2
{
C_FloatToStereoMix(pIn1, pIn2, pOut, nCount, _f2ic);
}

View File

@ -13,8 +13,5 @@
#define MPT_WITH_ZLIB 1
#define MPT_BUILD_XCODE 1
#define ENABLE_ASM 1
#endif