mirror of https://github.com/AxioDL/boo.git
Windows compile fixes
This commit is contained in:
parent
2a49a8d447
commit
55d1a5bc93
|
@ -16,7 +16,11 @@ set(IPP_STATIC ON)
|
|||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if(WIN32)
|
||||
set(IPP_ROOT $ENV{PROGRAMFILES\(X86\)}/IntelSWTools/compilers_and_libraries/windows/ipp CACHE PATH "Folder contains IPP")
|
||||
else()
|
||||
set(IPP_ROOT /opt/intel/ipp CACHE PATH "Folder contains IPP")
|
||||
endif()
|
||||
|
||||
# Find header file dir
|
||||
find_path(IPP_INCLUDE_DIR ipp.h
|
||||
|
@ -53,7 +57,7 @@ macro(find_ipp_library IPP_COMPONENT)
|
|||
string(TOLOWER ${IPP_COMPONENT} IPP_COMPONENT_LOWER)
|
||||
|
||||
find_library(IPP_LIB_${IPP_COMPONENT} ipp${IPP_COMPONENT_LOWER}${IPP_LIBNAME_SUFFIX}
|
||||
PATHS ${IPP_ROOT}/lib/ia32/ ${IPP_ROOT}/lib)
|
||||
PATHS ${IPP_ROOT}/lib/intel64/ ${IPP_ROOT}/lib)
|
||||
endmacro()
|
||||
|
||||
# IPP components
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#include "LtRtProcessing.hpp"
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
namespace boo
|
||||
{
|
||||
|
@ -27,6 +31,10 @@ inline T ClampFull(float in)
|
|||
|
||||
#if INTEL_IPP
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846 /* pi */
|
||||
#endif
|
||||
|
||||
WindowedHilbert::WindowedHilbert(int windowSamples)
|
||||
: m_windowSamples(windowSamples), m_halfSamples(windowSamples / 2),
|
||||
m_inputBuf(new Ipp32f[m_windowSamples * 2 + m_halfSamples]),
|
||||
|
@ -158,7 +166,10 @@ template <> float* LtRtProcessing::_getOutBuf<float>() { return m_fltBuffer.get(
|
|||
|
||||
LtRtProcessing::LtRtProcessing(int _5msFrames, const AudioVoiceEngineMixInfo& mixInfo)
|
||||
: m_inMixInfo(mixInfo), m_5msFrames(_5msFrames), m_5msFramesHalf(_5msFrames / 2),
|
||||
m_outputOffset(m_5msFrames * 5 * 2), m_hilbertSL(_5msFrames), m_hilbertSR(_5msFrames)
|
||||
m_outputOffset(m_5msFrames * 5 * 2)
|
||||
#if INTEL_IPP
|
||||
, m_hilbertSL(_5msFrames), m_hilbertSR(_5msFrames)
|
||||
#endif
|
||||
{
|
||||
m_inMixInfo.m_channels = AudioChannelSet::Surround51;
|
||||
m_inMixInfo.m_channelMap.m_channelCount = 5;
|
||||
|
@ -205,8 +216,10 @@ void LtRtProcessing::Process(const T* input, T* output, int frameCount)
|
|||
{
|
||||
T* in = &inBuf[bufIdx * m_5msFrames * 5];
|
||||
T* out = &outBuf[bufIdx * m_5msFrames * 2];
|
||||
#if INTEL_IPP
|
||||
m_hilbertSL.AddWindow(in + 3, 5);
|
||||
m_hilbertSR.AddWindow(in + 4, 5);
|
||||
#endif
|
||||
|
||||
// x(:,1) + sqrt(.5)*x(:,3) + sqrt(19/25)*x(:,4) + sqrt(6/25)*x(:,5)
|
||||
// x(:,2) + sqrt(.5)*x(:,3) - sqrt(6/25)*x(:,4) - sqrt(19/25)*x(:,5)
|
||||
|
|
|
@ -324,7 +324,7 @@ class D3D11TextureR : public ITextureR
|
|||
D3D11_RTV_DIMENSION rtvDim;
|
||||
D3D11_DSV_DIMENSION dsvDim;
|
||||
|
||||
if (samples > 1)
|
||||
if (m_samples > 1)
|
||||
{
|
||||
rtvDim = D3D11_RTV_DIMENSION_TEXTURE2DMS;
|
||||
dsvDim = D3D11_DSV_DIMENSION_TEXTURE2DMS;
|
||||
|
@ -1311,7 +1311,7 @@ public:
|
|||
}
|
||||
|
||||
ITextureS* newStaticTexture(size_t width, size_t height, size_t mips, TextureFormat fmt,
|
||||
const void* data, size_t sz)
|
||||
TextureClampMode clampMode, const void* data, size_t sz)
|
||||
{
|
||||
D3D11Data* d = static_cast<D3D11Data*>(m_deferredData);
|
||||
D3D11TextureS* retval = new D3D11TextureS(d, m_parent.m_ctx, width, height, mips, fmt, data, sz);
|
||||
|
@ -1320,7 +1320,7 @@ public:
|
|||
}
|
||||
|
||||
ITextureSA* newStaticArrayTexture(size_t width, size_t height, size_t layers, size_t mips,
|
||||
TextureFormat fmt, const void* data, size_t sz)
|
||||
TextureFormat fmt, TextureClampMode clampMode, const void* data, size_t sz)
|
||||
{
|
||||
D3D11Data* d = static_cast<D3D11Data*>(m_deferredData);
|
||||
D3D11TextureSA* retval = new D3D11TextureSA(d, m_parent.m_ctx, width, height, layers, mips, fmt, data, sz);
|
||||
|
@ -1328,7 +1328,7 @@ public:
|
|||
return retval;
|
||||
}
|
||||
|
||||
ITextureD* newDynamicTexture(size_t width, size_t height, TextureFormat fmt)
|
||||
ITextureD* newDynamicTexture(size_t width, size_t height, TextureFormat fmt, TextureClampMode clampMode)
|
||||
{
|
||||
D3D11Data* d = static_cast<D3D11Data*>(m_deferredData);
|
||||
D3D11CommandQueue* q = static_cast<D3D11CommandQueue*>(m_parent.m_parent->getCommandQueue());
|
||||
|
@ -1337,7 +1337,7 @@ public:
|
|||
return retval;
|
||||
}
|
||||
|
||||
ITextureR* newRenderTexture(size_t width, size_t height,
|
||||
ITextureR* newRenderTexture(size_t width, size_t height, TextureClampMode clampMode,
|
||||
size_t colorBindCount, size_t depthBindCount)
|
||||
{
|
||||
D3D11Data* d = static_cast<D3D11Data*>(m_deferredData);
|
||||
|
|
|
@ -1788,7 +1788,7 @@ public:
|
|||
}
|
||||
|
||||
ITextureS* newStaticTexture(size_t width, size_t height, size_t mips, TextureFormat fmt,
|
||||
const void* data, size_t sz)
|
||||
TextureClampMode clampMode, const void* data, size_t sz)
|
||||
{
|
||||
D3D12Data* d = D3D12DataFactory::m_deferredData;
|
||||
D3D12TextureS* retval = new D3D12TextureS(d, m_parent.m_ctx, width, height, mips, fmt, data, sz);
|
||||
|
@ -1797,7 +1797,7 @@ public:
|
|||
}
|
||||
|
||||
ITextureSA* newStaticArrayTexture(size_t width, size_t height, size_t layers, size_t mips,
|
||||
TextureFormat fmt, const void* data, size_t sz)
|
||||
TextureFormat fmt, TextureClampMode clampMode, const void* data, size_t sz)
|
||||
{
|
||||
D3D12Data* d = D3D12DataFactory::m_deferredData;
|
||||
D3D12TextureSA* retval = new D3D12TextureSA(d, m_parent.m_ctx, width, height, layers, mips, fmt, data, sz);
|
||||
|
@ -1805,7 +1805,7 @@ public:
|
|||
return retval;
|
||||
}
|
||||
|
||||
ITextureD* newDynamicTexture(size_t width, size_t height, TextureFormat fmt)
|
||||
ITextureD* newDynamicTexture(size_t width, size_t height, TextureFormat fmt, TextureClampMode clampMode)
|
||||
{
|
||||
D3D12Data* d = D3D12DataFactory::m_deferredData;
|
||||
D3D12CommandQueue* q = static_cast<D3D12CommandQueue*>(m_parent.m_parent->getCommandQueue());
|
||||
|
@ -1814,7 +1814,7 @@ public:
|
|||
return retval;
|
||||
}
|
||||
|
||||
ITextureR* newRenderTexture(size_t width, size_t height,
|
||||
ITextureR* newRenderTexture(size_t width, size_t height, TextureClampMode clampMode,
|
||||
size_t colorBindCount, size_t depthBindCount)
|
||||
{
|
||||
D3D12Data* d = D3D12DataFactory::m_deferredData;
|
||||
|
|
Loading…
Reference in New Issue