Make EXPERIMENTAL_EQ_SSE_THREADED compilable, at least on Windows.
This commit is contained in:
parent
e9e6ceab5b
commit
3ced1503ee
|
@ -2993,4 +2993,4 @@ void ReorderToTime4xFastMathBR16(HFFT hFFT, fft_type *buffer, fft_type *TimeOut)
|
|||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -893,7 +893,7 @@ void EffectEqualization::PopulateOrExchange(ShuttleGui & S)
|
|||
S.EndMultiColumn();
|
||||
|
||||
#ifdef EXPERIMENTAL_EQ_SSE_THREADED
|
||||
if (m_pEffect->mEffectEqualization48x)
|
||||
if (mEffectEqualization48x)
|
||||
{
|
||||
// -------------------------------------------------------------------
|
||||
// ROW 6: Processing routine selection
|
||||
|
@ -2860,15 +2860,15 @@ void EffectEqualization::OnProcessingRadio(wxCommandEvent & event)
|
|||
int testEvent=event.GetId();
|
||||
switch(testEvent)
|
||||
{
|
||||
case defaultMathRadioID: EffectEqualization48x::SetMathPath(MATH_FUNCTION_ORIGINAL);
|
||||
case ID_DefaultMath: EffectEqualization48x::SetMathPath(MATH_FUNCTION_ORIGINAL);
|
||||
break;
|
||||
case sSERadioID: EffectEqualization48x::SetMathPath(MATH_FUNCTION_SSE);
|
||||
case ID_SSE: EffectEqualization48x::SetMathPath(MATH_FUNCTION_SSE);
|
||||
break;
|
||||
case sSEThreadedRadioID: EffectEqualization48x::SetMathPath(MATH_FUNCTION_THREADED | MATH_FUNCTION_SSE);
|
||||
case ID_SSEThreaded: EffectEqualization48x::SetMathPath(MATH_FUNCTION_THREADED | MATH_FUNCTION_SSE);
|
||||
break;
|
||||
case aVXRadioID: testEvent=2;
|
||||
case ID_AVX: testEvent = 2;
|
||||
break;
|
||||
case aVXThreadedRadioID: testEvent=2;
|
||||
case ID_AVXThreaded: testEvent = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2876,8 +2876,8 @@ void EffectEqualization::OnProcessingRadio(wxCommandEvent & event)
|
|||
|
||||
void EffectEqualization::OnBench( wxCommandEvent & event)
|
||||
{
|
||||
m_pEffect->mBench=true;
|
||||
OnOk(event);
|
||||
mBench=true;
|
||||
// OnOk(event);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -3612,35 +3612,6 @@ void EditCurvesDialog::OnDefaults( wxCommandEvent & WXUNUSED(event))
|
|||
PopulateList(0); // update the EditCurvesDialog dialog
|
||||
}
|
||||
|
||||
#ifdef EXPERIMENTAL_EQ_SSE_THREADED
|
||||
|
||||
void EqualizationDialog::OnProcessingRadio(wxCommandEvent & event)
|
||||
{
|
||||
int testEvent=event.GetId();
|
||||
switch(testEvent)
|
||||
{
|
||||
case defaultMathRadioID: EffectEqualization48x::SetMathPath(MATH_FUNCTION_ORIGINAL);
|
||||
break;
|
||||
case sSERadioID: EffectEqualization48x::SetMathPath(MATH_FUNCTION_SSE);
|
||||
break;
|
||||
case sSEThreadedRadioID: EffectEqualization48x::SetMathPath(MATH_FUNCTION_THREADED | MATH_FUNCTION_SSE);
|
||||
break;
|
||||
case aVXRadioID: testEvent=2;
|
||||
break;
|
||||
case aVXThreadedRadioID: testEvent=2;
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
void EqualizationDialog::OnBench( wxCommandEvent & event)
|
||||
{
|
||||
m_pEffect->mBench=true;
|
||||
OnOk(event);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void EditCurvesDialog::OnOK(wxCommandEvent & WXUNUSED(event))
|
||||
{
|
||||
// Make a backup of the current curves
|
||||
|
|
|
@ -235,9 +235,6 @@ private:
|
|||
wxSizer *szrH;
|
||||
wxSizer *szrI;
|
||||
wxSizer *szrL;
|
||||
#ifdef EXPERIMENTAL_EQ_SSE_THREADED
|
||||
wxSizer *szrM;
|
||||
#endif
|
||||
wxSizer *szr1;
|
||||
wxSizer *szr2;
|
||||
wxSizer *szr3;
|
||||
|
|
|
@ -14,11 +14,12 @@
|
|||
*//****************************************************************/
|
||||
|
||||
#include "../Audacity.h"
|
||||
#include "../Project.h"
|
||||
#include "../Experimental.h"
|
||||
#ifdef EXPERIMENTAL_EQ_SSE_THREADED
|
||||
#include "../Project.h"
|
||||
#include "Equalization.h"
|
||||
#include "../WaveTrack.h"
|
||||
#include "float_cast.h"
|
||||
#include "../float_cast.h"
|
||||
#include <vector>
|
||||
|
||||
#include <wx/dcmemory.h>
|
||||
|
@ -333,7 +334,7 @@ bool EffectEqualization48x::TrackCompare()
|
|||
SecondIMap.Clear();
|
||||
SecondOMap.Clear();
|
||||
|
||||
TrackList SecondOutputTracks(true);
|
||||
TrackList SecondOutputTracks;
|
||||
|
||||
//iterate over tracks of type trackType (All types if Track::All)
|
||||
TrackListOfKindIterator aIt(mEffectEqualization->mOutputTracksType, mEffectEqualization->mTracks);
|
||||
|
@ -344,10 +345,10 @@ bool EffectEqualization48x::TrackCompare()
|
|||
if (aTrack->GetSelected() ||
|
||||
(mEffectEqualization->mOutputTracksType == Track::All && aTrack->IsSyncLockSelected()))
|
||||
{
|
||||
Track *o = aTrack->Duplicate();
|
||||
SecondOutputTracks.Add(o);
|
||||
auto o = aTrack->Duplicate();
|
||||
SecondIMap.Add(aTrack);
|
||||
SecondIMap.Add(o);
|
||||
SecondIMap.Add(o.get());
|
||||
SecondOutputTracks.Add(std::move(o));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -407,7 +408,7 @@ bool EffectEqualization48x::DeltaTrack(WaveTrack * t, WaveTrack * t2, sampleCoun
|
|||
float *buffer2 = new float[trackBlockSize];
|
||||
|
||||
AudacityProject *p = GetActiveProject();
|
||||
WaveTrack *output=p->GetTrackFactory()->NewWaveTrack(floatSample, t->GetRate());
|
||||
auto output=p->GetTrackFactory()->NewWaveTrack(floatSample, t->GetRate());
|
||||
sampleCount originalLen = len;
|
||||
sampleCount currentSample = start;
|
||||
|
||||
|
@ -425,8 +426,7 @@ bool EffectEqualization48x::DeltaTrack(WaveTrack * t, WaveTrack * t2, sampleCoun
|
|||
delete[] buffer2;
|
||||
output->Flush();
|
||||
len=originalLen;
|
||||
ProcessTail(t, output, start, len);
|
||||
delete output;
|
||||
ProcessTail(t, output.get(), start, len);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -548,15 +548,14 @@ bool EffectEqualization48x::ProcessTail(WaveTrack * t, WaveTrack * output, sampl
|
|||
//now go thru and replace the old clips with NEW
|
||||
for(unsigned int i=0;i<clipStartEndTimes.size();i++)
|
||||
{
|
||||
Track *toClipOutput;
|
||||
//remove the old audio and get the NEW
|
||||
t->Clear(clipStartEndTimes[i].first,clipStartEndTimes[i].second);
|
||||
// output->Copy(clipStartEndTimes[i].first-startT+offsetT0,clipStartEndTimes[i].second-startT+offsetT0, &toClipOutput);
|
||||
output->Copy(clipStartEndTimes[i].first-startT,clipStartEndTimes[i].second-startT, &toClipOutput);
|
||||
// output->Copy(clipStartEndTimes[i].first-startT+offsetT0,clipStartEndTimes[i].second-startT+offsetT0, &toClipOutput);
|
||||
auto toClipOutput = output->Copy(clipStartEndTimes[i].first-startT, clipStartEndTimes[i].second-startT);
|
||||
if(toClipOutput)
|
||||
{
|
||||
//put the processed audio in
|
||||
bool bResult = t->Paste(clipStartEndTimes[i].first, toClipOutput);
|
||||
bool bResult = t->Paste(clipStartEndTimes[i].first, toClipOutput.get());
|
||||
wxASSERT(bResult); // TO DO: Actually handle this.
|
||||
//if the clip was only partially selected, the Paste will have created a split line. Join is needed to take care of this
|
||||
//This is not true when the selection is fully contained within one clip (second half of conditional)
|
||||
|
@ -565,7 +564,6 @@ bool EffectEqualization48x::ProcessTail(WaveTrack * t, WaveTrack * output, sampl
|
|||
!(clipRealStartEndTimes[i].first <= startT &&
|
||||
clipRealStartEndTimes[i].second >= startT+lenT) )
|
||||
t->Join(clipRealStartEndTimes[i].first,clipRealStartEndTimes[i].second);
|
||||
delete toClipOutput;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -634,7 +632,7 @@ bool EffectEqualization48x::ProcessOne1x(int count, WaveTrack * t,
|
|||
sampleCount trackBlockSize = t->GetMaxBlockSize();
|
||||
|
||||
AudacityProject *p = GetActiveProject();
|
||||
WaveTrack *output=p->GetTrackFactory()->NewWaveTrack(floatSample, t->GetRate());
|
||||
auto output = p->GetTrackFactory()->NewWaveTrack(floatSample, t->GetRate());
|
||||
|
||||
mEffectEqualization->TrackProgress(count, 0.0);
|
||||
int subBufferSize=mBufferCount==8?(mSubBufferSize>>1):mSubBufferSize; // half the buffers if avx is active
|
||||
|
@ -674,8 +672,7 @@ bool EffectEqualization48x::ProcessOne1x(int count, WaveTrack * t,
|
|||
}
|
||||
output->Flush();
|
||||
if(!bBreakLoop)
|
||||
ProcessTail(t, output, start, len);
|
||||
delete output;
|
||||
ProcessTail(t, output.get(), start, len);
|
||||
return bBreakLoop;
|
||||
}
|
||||
|
||||
|
@ -820,7 +817,7 @@ bool EffectEqualization48x::ProcessOne4x(int count, WaveTrack * t,
|
|||
sampleCount trackBlockSize = t->GetMaxBlockSize();
|
||||
|
||||
AudacityProject *p = GetActiveProject();
|
||||
WaveTrack *output=p->GetTrackFactory()->NewWaveTrack(floatSample, t->GetRate());
|
||||
auto output = p->GetTrackFactory()->NewWaveTrack(floatSample, t->GetRate());
|
||||
|
||||
mEffectEqualization->TrackProgress(count, 0.0);
|
||||
int bigRuns=len/(subBufferSize-mBlockSize);
|
||||
|
@ -857,8 +854,7 @@ bool EffectEqualization48x::ProcessOne4x(int count, WaveTrack * t,
|
|||
}
|
||||
output->Flush();
|
||||
if(!bBreakLoop)
|
||||
ProcessTail(t, output, start, len);
|
||||
delete output;
|
||||
ProcessTail(t, output.get(), start, len);
|
||||
return bBreakLoop;
|
||||
}
|
||||
void *EQWorker::Entry()
|
||||
|
@ -905,7 +901,7 @@ bool EffectEqualization48x::ProcessOne1x4xThreaded(int count, WaveTrack * t,
|
|||
mEQWorkers[i].mProcessingType=processingType;
|
||||
|
||||
AudacityProject *p = GetActiveProject();
|
||||
WaveTrack *output=p->GetTrackFactory()->NewWaveTrack(floatSample, t->GetRate());
|
||||
auto output = p->GetTrackFactory()->NewWaveTrack(floatSample, t->GetRate());
|
||||
|
||||
sampleCount trackBlockSize = t->GetMaxBlockSize();
|
||||
mEffectEqualization->TrackProgress(count, 0.0);
|
||||
|
@ -969,8 +965,7 @@ bool EffectEqualization48x::ProcessOne1x4xThreaded(int count, WaveTrack * t,
|
|||
}
|
||||
output->Flush();
|
||||
if(!bBreakLoop)
|
||||
ProcessTail(t, output, start, len);
|
||||
delete output;
|
||||
ProcessTail(t, output.get(), start, len);
|
||||
return bBreakLoop;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#ifdef EXPERIMENTAL_EQ_SSE_THREADED
|
||||
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
@ -13,6 +11,9 @@ Intrinsics (SSE/AVX) and Threaded Equalization
|
|||
#ifndef __AUDACITY_EFFECT_EQUALIZATION48X__
|
||||
#define __AUDACITY_EFFECT_EQUALIZATION48X__
|
||||
|
||||
#include "../Experimental.h"
|
||||
#ifdef EXPERIMENTAL_EQ_SSE_THREADED
|
||||
|
||||
#ifdef __AVX_ENABLED
|
||||
#define __MAXBUFFERCOUNT 8
|
||||
#else
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
<ClCompile Include="..\..\..\src\DirManager.cpp" />
|
||||
<ClCompile Include="..\..\..\src\Dither.cpp" />
|
||||
<ClCompile Include="..\..\..\src\effects\EffectRack.cpp" />
|
||||
<ClCompile Include="..\..\..\src\effects\Equalization48x.cpp" />
|
||||
<ClCompile Include="..\..\..\src\effects\NoiseReduction.cpp" />
|
||||
<ClCompile Include="..\..\..\src\effects\Phaser.cpp" />
|
||||
<ClCompile Include="..\..\..\src\effects\VST\VSTControlMSW.cpp" />
|
||||
|
@ -182,6 +183,7 @@
|
|||
<ClCompile Include="..\..\..\src\Profiler.cpp" />
|
||||
<ClCompile Include="..\..\..\src\Project.cpp" />
|
||||
<ClCompile Include="..\..\..\src\RealFFTf.cpp" />
|
||||
<ClCompile Include="..\..\..\src\RealFFTf48x.cpp" />
|
||||
<ClCompile Include="..\..\..\src\Resample.cpp" />
|
||||
<ClCompile Include="..\..\..\src\RingBuffer.cpp" />
|
||||
<ClCompile Include="..\..\..\src\SampleFormat.cpp" />
|
||||
|
@ -412,6 +414,7 @@
|
|||
<ClInclude Include="..\..\..\src\DeviceChange.h" />
|
||||
<ClInclude Include="..\..\..\src\Diags.h" />
|
||||
<ClInclude Include="..\..\..\src\effects\EffectRack.h" />
|
||||
<ClInclude Include="..\..\..\src\effects\Equalization48x.h" />
|
||||
<ClInclude Include="..\..\..\src\effects\NoiseReduction.h" />
|
||||
<ClInclude Include="..\..\..\src\effects\Phaser.h" />
|
||||
<ClInclude Include="..\..\..\src\effects\VST\VSTControlMSW.h" />
|
||||
|
@ -426,6 +429,7 @@
|
|||
<ClInclude Include="..\..\..\src\prefs\SpectrogramSettings.h" />
|
||||
<ClInclude Include="..\..\..\src\prefs\WaveformPrefs.h" />
|
||||
<ClInclude Include="..\..\..\src\prefs\WaveformSettings.h" />
|
||||
<ClInclude Include="..\..\..\src\RealFFTf48x.h" />
|
||||
<ClInclude Include="..\..\..\src\RevisionIdent.h" />
|
||||
<ClInclude Include="..\..\..\src\SelectedRegion.h" />
|
||||
<ClInclude Include="..\..\..\src\SseMathFuncs.h" />
|
||||
|
|
|
@ -851,6 +851,12 @@
|
|||
<ClCompile Include="..\..\..\src\effects\VST\VSTControlMSW.cpp">
|
||||
<Filter>src\effects\VST</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\effects\Equalization48x.cpp">
|
||||
<Filter>src\effects</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\src\RealFFTf48x.cpp">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\AboutDialog.h">
|
||||
|
@ -1717,6 +1723,12 @@
|
|||
<ClInclude Include="..\..\..\src\MemoryX.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\effects\Equalization48x.h">
|
||||
<Filter>src\effects</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\RealFFTf48x.h">
|
||||
<Filter>src</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\..\audacity.ico">
|
||||
|
|
Loading…
Reference in New Issue