FreeBSD Bugzilla – Attachment 172552 Details for
Bug 210505
[exp-run] graphics/opencv: Update to 3.4.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix: implicit declaration of function 'cvRound'
patch-modules_core_include_opencv2_core_types__c.h (text/plain), 1.27 KB, created by
Ivan Rozhuk
on 2016-07-15 12:35:08 UTC
(
hide
)
Description:
fix: implicit declaration of function 'cvRound'
Filename:
MIME Type:
Creator:
Ivan Rozhuk
Created:
2016-07-15 12:35:08 UTC
Size:
1.27 KB
patch
obsolete
>--- modules/core/include/opencv2/core/types_c.h 2015-12-18 18:02:16.000000000 +0300 >+++ modules/core/include/opencv2/core/types_c.h 2016-07-15 15:17:03.724241000 +0300 >@@ -197,6 +197,38 @@ > #define cvInvSqrt(value) ((float)(1./sqrt(value))) > #define cvSqrt(value) ((float)sqrt(value)) > >+#ifndef __cplusplus >+CV_INLINE int cvRound(float value) >+{ >+#if ((defined _MSC_VER && defined _M_X64) || (defined __GNUC__ && defined __x86_64__ && \ >+ defined __SSE2__ && !defined __APPLE__)) && !defined(__CUDACC__) >+ __m128 t = _mm_set_ss( value ); >+ return _mm_cvtss_si32(t); >+#elif defined _MSC_VER && defined _M_IX86 >+ int t; >+ __asm >+ { >+ fld value; >+ fistp t; >+ } >+ return t; >+#elif ((defined _MSC_VER && defined _M_ARM) || defined CV_ICC || \ >+ defined __GNUC__) && defined HAVE_TEGRA_OPTIMIZATION >+ TEGRA_ROUND_FLT(value); >+#elif defined CV_ICC || defined __GNUC__ >+# if CV_VFP >+ ARM_ROUND_FLT(value); >+# else >+ return (int)lrintf(value); >+# endif >+#else >+ /* it's ok if round does not comply with IEEE754 standard; >+ the tests should allow +/-1 difference when the tested functions use round */ >+ return (int)(value + (value >= 0 ? 0.5f : -0.5f)); >+#endif >+} >+#endif >+ > > /*************** Random number generation *******************/ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210505
:
171727
|
171728
|
171788
|
172552
|
172569
|
172570
|
172597
|
175624
|
178719
|
179617
|
181772
|
181804
|
181817
|
191690
|
192271
|
192856
|
192857
|
192875
|
192885
|
193009
|
193190
|
193196