Drop fast_abs

This commit is contained in:
Andrey Kamaev 2013-03-30 22:11:35 +04:00
parent 6fea48c54f
commit b28f594917
3 changed files with 3 additions and 11 deletions

View File

@ -333,7 +333,7 @@ _AccTp normL1(const _Tp* a, int n)
}
#endif
for( ; i < n; i++ )
s += fast_abs(a[i]);
s += std::abs(a[i]);
return s;
}

View File

@ -63,14 +63,6 @@
namespace cv
{
inline int fast_abs(uchar v) { return v; }
inline int fast_abs(schar v) { return std::abs((int)v); }
inline int fast_abs(ushort v) { return v; }
inline int fast_abs(short v) { return std::abs((int)v); }
inline int fast_abs(int v) { return std::abs(v); }
inline float fast_abs(float v) { return std::abs(v); }
inline double fast_abs(double v) { return std::abs(v); }
namespace internal
{

View File

@ -1111,7 +1111,7 @@ normInf_(const T* src, const uchar* mask, ST* _result, int len, int cn)
if( mask[i] )
{
for( int k = 0; k < cn; k++ )
result = std::max(result, ST(fast_abs(src[k])));
result = std::max(result, ST(std::abs(src[k])));
}
}
*_result = result;
@ -1132,7 +1132,7 @@ normL1_(const T* src, const uchar* mask, ST* _result, int len, int cn)
if( mask[i] )
{
for( int k = 0; k < cn; k++ )
result += fast_abs(src[k]);
result += std::abs(src[k]);
}
}
*_result = result;