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:
@@ -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
|
||||
|
Reference in New Issue
Block a user