mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 19:50:38 +08:00
Drop fast_abs
This commit is contained in:
parent
6fea48c54f
commit
b28f594917
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user