fixing build of 2.4 branch with VC12 (aka 2013)

(master branch was fixed before, no need to merge this to master!)
- disable openexr (numerous undefined std::min & std::max)
- workaround for two compilator bugs
This commit is contained in:
Andrey Pavlenko
2013-12-03 13:16:44 +04:00
parent 3ff1620086
commit bd9d3dd561
3 changed files with 10 additions and 7 deletions

View File

@@ -138,13 +138,16 @@ static void computeOrbDescriptor(const KeyPoint& kpt,
const uchar* center = &img.at<uchar>(cvRound(kpt.pt.y), cvRound(kpt.pt.x));
int step = (int)img.step;
#if 1
#define GET_VALUE(idx) \
center[cvRound(pattern[idx].x*b + pattern[idx].y*a)*step + \
cvRound(pattern[idx].x*a - pattern[idx].y*b)]
#else
float x, y;
int ix, iy;
#if 1
#define GET_VALUE(idx) \
(x = pattern[idx].x*a - pattern[idx].y*b, \
y = pattern[idx].x*b + pattern[idx].y*a, \
ix = cvRound(x), \
iy = cvRound(y), \
*(center + iy*step + ix) )
#else
#define GET_VALUE(idx) \
(x = pattern[idx].x*a - pattern[idx].y*b, \
y = pattern[idx].x*b + pattern[idx].y*a, \