Commit 0070ce20 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

next attempt to fix ticket #1121

parent 8a888cd9
...@@ -885,7 +885,7 @@ normDiffInf_(const T* src1, const T* src2, const uchar* mask, ST* _result, int l ...@@ -885,7 +885,7 @@ normDiffInf_(const T* src1, const T* src2, const uchar* mask, ST* _result, int l
{ {
len *= cn; len *= cn;
for( int i = 0; i < len; i++ ) for( int i = 0; i < len; i++ )
result = std::max(result, std::abs(src1[i] - src2[i])); result = std::max(result, (ST)std::abs(src1[i] - src2[i]));
} }
else else
{ {
...@@ -893,7 +893,7 @@ normDiffInf_(const T* src1, const T* src2, const uchar* mask, ST* _result, int l ...@@ -893,7 +893,7 @@ normDiffInf_(const T* src1, const T* src2, const uchar* mask, ST* _result, int l
if( mask[i] ) if( mask[i] )
{ {
for( int k = 0; k < cn; k++ ) for( int k = 0; k < cn; k++ )
result = std::max(result, std::abs(src1[k] - src2[k])); result = std::max(result, (ST)std::abs(src1[k] - src2[k]));
} }
} }
*_result = result; *_result = result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment