diff --git a/modules/core/include/opencv2/core/types_c.h b/modules/core/include/opencv2/core/types_c.h index 5737d4d1f..8c4dfcdee 100644 --- a/modules/core/include/opencv2/core/types_c.h +++ b/modules/core/include/opencv2/core/types_c.h @@ -323,7 +323,7 @@ CV_INLINE int cvRound( double value ) CV_INLINE int cvFloor( double value ) { -#if defined _MSC_VER && defined _M_X64 || (defined __GNUC__ && defined __SSE2__) +#if defined _MSC_VER && defined _M_X64 || (defined __GNUC__ && defined __SSE2__ && !defined __APPLE__) __m128d t = _mm_set_sd( value ); int i = _mm_cvtsd_si32(t); return i - _mm_movemask_pd(_mm_cmplt_sd(t, _mm_cvtsi32_sd(t,i))); @@ -341,7 +341,7 @@ CV_INLINE int cvFloor( double value ) CV_INLINE int cvCeil( double value ) { -#if defined _MSC_VER && defined _M_X64 || (defined __GNUC__ && defined __SSE2__) +#if defined _MSC_VER && defined _M_X64 || (defined __GNUC__ && defined __SSE2__&& !defined __APPLE__) __m128d t = _mm_set_sd( value ); int i = _mm_cvtsd_si32(t); return i + _mm_movemask_pd(_mm_cmplt_sd(_mm_cvtsi32_sd(t,i), t));