Mercurial > hg > nsaunier > traffic-intelligence
diff c/optical-flow.cpp @ 1284:8e30c9a6ac6f
removed old example using KLT library by Stan Birchfield (not available anymore)
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Wed, 17 Jul 2024 12:28:01 -0400 |
| parents | bc4ea09b1743 |
| children |
line wrap: on
line diff
--- a/c/optical-flow.cpp Tue Jul 16 12:06:34 2024 -0400 +++ b/c/optical-flow.cpp Wed Jul 17 12:28:01 2024 -0400 @@ -7,23 +7,23 @@ #include <iostream> #include <ctime> -/* MSVC does not have lrintf */ -#ifdef _MSC_VER -static inline long lrintf(float f){ -/* x64 does not supported embedded assembly */ -#ifdef _M_X64 - return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f)); -#else - int i; - - _asm{ - fld f - fistp i - }; - - return i; -#endif -} +/* MSVC does not have lrintf */ +#ifdef _MSC_VER +static inline long lrintf(float f){ +/* x64 does not supported embedded assembly */ +#ifdef _M_X64 + return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f)); +#else + int i; + + _asm{ + fld f + fistp i + }; + + return i; +#endif +} #endif using namespace std;
