Commit 5fc5b4f8 authored by jaco's avatar jaco

wip windows uint64 compile error fixing

parent 21d563c0
...@@ -169,7 +169,7 @@ inline cv::Rect Vec4i2Rect( cv::Vec4i &v ) ...@@ -169,7 +169,7 @@ inline cv::Rect Vec4i2Rect( cv::Vec4i &v )
#define INT64 long long #define INT64 long long
#else #else
#define INT64 long #define INT64 long
typedef unsigned long UINT64; typedef unsigned long UINT64_;
//#define UINT64 unsigned long //#define UINT64 unsigned long
#endif #endif
......
...@@ -61,7 +61,7 @@ void FilterTIG::update( CMat &w1f ) ...@@ -61,7 +61,7 @@ void FilterTIG::update( CMat &w1f )
_coeffs1[i] = avg, _coeffs2[i] = avg * 2, _coeffs4[i] = avg * 4, _coeffs8[i] = avg * 8; _coeffs1[i] = avg, _coeffs2[i] = avg * 2, _coeffs4[i] = avg * 4, _coeffs8[i] = avg * 8;
for ( int j = 0; j < D; j++ ) for ( int j = 0; j < D; j++ )
residuals[j] -= avg * b[j]; residuals[j] -= avg * b[j];
UINT64 tig = 0; UINT64_ tig = 0;
for ( int j = 0; j < D; j++ ) for ( int j = 0; j < D; j++ )
tig = ( tig << 1 ) | ( b[j] > 0 ? 1 : 0 ); tig = ( tig << 1 ) | ( b[j] > 0 ? 1 : 0 );
_bTIGs[i] = tig; _bTIGs[i] = tig;
...@@ -74,7 +74,7 @@ void FilterTIG::reconstruct( Mat &w1f ) ...@@ -74,7 +74,7 @@ void FilterTIG::reconstruct( Mat &w1f )
float *weight = (float*) w1f.data; float *weight = (float*) w1f.data;
for ( int i = 0; i < NUM_COMP; i++ ) for ( int i = 0; i < NUM_COMP; i++ )
{ {
UINT64 tig = _bTIGs[i]; UINT64_ tig = _bTIGs[i];
for ( int j = 0; j < D; j++ ) for ( int j = 0; j < D; j++ )
weight[j] += _coeffs1[i] * ( ( ( tig >> ( 63 - j ) ) & 1 ) ? 1 : -1 ); weight[j] += _coeffs1[i] * ( ( ( tig >> ( 63 - j ) ) & 1 ) ? 1 : -1 );
} }
......
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