|
From: <man...@us...> - 2013-04-12 14:22:04
|
Revision: 1857
http://sourceforge.net/p/modplug/code/1857
Author: manxorist
Date: 2013-04-12 14:21:57 +0000 (Fri, 12 Apr 2013)
Log Message:
-----------
[Ref] Make the fast sinc table const.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Fastmix.cpp
trunk/OpenMPT/soundlib/Mmx_mix.cpp
trunk/OpenMPT/soundlib/Resampler.h
trunk/OpenMPT/soundlib/Tables.cpp
Modified: trunk/OpenMPT/soundlib/Fastmix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Fastmix.cpp 2013-04-12 14:03:13 UTC (rev 1856)
+++ trunk/OpenMPT/soundlib/Fastmix.cpp 2013-04-12 14:21:57 UTC (rev 1857)
@@ -20,7 +20,7 @@
// 4x256 taps polyphase FIR resampling filter
-extern short int gFastSinc[];
+#define gFastSinc CResampler::FastSincTable
/////////////////////////////////////////////////////
Modified: trunk/OpenMPT/soundlib/Mmx_mix.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Mmx_mix.cpp 2013-04-12 14:03:13 UTC (rev 1856)
+++ trunk/OpenMPT/soundlib/Mmx_mix.cpp 2013-04-12 14:21:57 UTC (rev 1857)
@@ -24,8 +24,6 @@
#include "sndfile.h"
#include "../common/Reporting.h"
-extern short int gFastSinc[];
-
#define PROCSUPPORT_CPUID 0x01
#define PROCSUPPORT_MMX 0x02
#define PROCSUPPORT_MMXEX 0x04
Modified: trunk/OpenMPT/soundlib/Resampler.h
===================================================================
--- trunk/OpenMPT/soundlib/Resampler.h 2013-04-12 14:03:13 UTC (rev 1856)
+++ trunk/OpenMPT/soundlib/Resampler.h 2013-04-12 14:21:57 UTC (rev 1857)
@@ -47,6 +47,7 @@
public:
CResamplerSettings m_Settings;
CWindowedFIR m_WindowedFIR;
+ static const short int FastSincTable[256*4];
short int gKaiserSinc[SINC_PHASES*8]; // Upsampling
#ifdef MODPLUG_TRACKER
static bool StaticTablesInitialized;
Modified: trunk/OpenMPT/soundlib/Tables.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Tables.cpp 2013-04-12 14:03:13 UTC (rev 1856)
+++ trunk/OpenMPT/soundlib/Tables.cpp 2013-04-12 14:21:57 UTC (rev 1857)
@@ -552,7 +552,7 @@
// Reversed sinc coefficients
-short int gFastSinc[256*4] =
+const short int CResampler::FastSincTable[256*4] =
{ // Cubic Spline
0, 16384, 0, 0, -31, 16383, 32, 0, -63, 16381, 65, 0, -93, 16378, 100, -1,
-124, 16374, 135, -1, -153, 16368, 172, -3, -183, 16361, 209, -4, -211, 16353, 247, -5,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|