1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Fixes for IPP integration:

dotProd_16s - disabled for IPP 9.0.0;
filter2D - fixed kernel preparation;
morphology - conditions fix and disabled FilterMin and FilterMax for IPP 9.0.0;
GaussianBlur - disabled for CV_8UC1 due to buffer overflow;
integral - disabled for IPP 9.0.0;

IppAutoBuffer class was added;
This commit is contained in:
Pavel Vlasov
2015-10-12 10:51:28 +03:00
parent 441eeef319
commit 89eee6ca99
7 changed files with 93 additions and 45 deletions
@@ -241,6 +241,26 @@ static inline IppDataType ippiGetDataType(int depth)
depth == CV_64F ? ipp64f : (IppDataType)-1;
}
// IPP temporary buffer hepler
template<typename T>
class IppAutoBuffer
{
public:
IppAutoBuffer() { m_pBuffer = NULL; }
IppAutoBuffer(int size) { Alloc(size); }
~IppAutoBuffer() { Release(); }
T* Alloc(int size) { m_pBuffer = (T*)ippMalloc(size); return m_pBuffer; }
void Release() { if(m_pBuffer) ippFree(m_pBuffer); }
inline operator T* () { return (T*)m_pBuffer;}
inline operator const T* () const { return (const T*)m_pBuffer;}
private:
// Disable copy operations
IppAutoBuffer(IppAutoBuffer &) {};
IppAutoBuffer& operator =(const IppAutoBuffer &) {return *this;};
T* m_pBuffer;
};
#else
#define IPP_VERSION_X100 0
#endif
+1 -1
View File
@@ -3131,7 +3131,7 @@ static double dotProd_16u(const ushort* src1, const ushort* src2, int len)
static double dotProd_16s(const short* src1, const short* src2, int len)
{
#if (ARITHM_USE_IPP == 1)
#if (ARITHM_USE_IPP == 1) && (IPP_VERSION_X100 != 900) // bug in IPP 9.0.0
CV_IPP_CHECK()
{
double r = 0;
+6
View File
@@ -1318,6 +1318,12 @@ public:
ippFeatures = ippCPUID_SSE;
else if(env == "sse2")
ippFeatures = ippCPUID_SSE2;
else if(env == "sse3")
ippFeatures = ippCPUID_SSE3;
else if(env == "ssse3")
ippFeatures = ippCPUID_SSSE3;
else if(env == "sse41")
ippFeatures = ippCPUID_SSE41;
else if(env == "sse42")
ippFeatures = ippCPUID_SSE42;
else if(env == "avx")