From c219f97f487ce092ee5bae6e0aef88f9e3c25811 Mon Sep 17 00:00:00 2001 From: Namgoo Lee Date: Tue, 6 Mar 2018 15:50:53 +0900 Subject: [PATCH] SSE2 : use _mm_cvtpd_epi32 when converting from CV_64F to CV_32S (#10987) * SSE2 : use _mm_cvtpd_epi32 when converting from CV_64F to CV_32S * No need to define a new universal intrinsic --- modules/core/src/convert.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/src/convert.cpp b/modules/core/src/convert.cpp index 9d9790d61a..7a82611c54 100644 --- a/modules/core/src/convert.cpp +++ b/modules/core/src/convert.cpp @@ -770,10 +770,10 @@ struct Cvt_SIMD int cWidth = v_float64x2::nlanes; for (; x <= width - cWidth * 2; x += cWidth * 2) { - v_float32x4 v_src0 = v_cvt_f32(v_load(src + x)); - v_float32x4 v_src1 = v_cvt_f32(v_load(src + x + cWidth)); + v_int32x4 v_src0 = v_round(v_load(src + x)); + v_int32x4 v_src1 = v_round(v_load(src + x + cWidth)); - v_store(dst + x, v_round(v_combine_low(v_src0, v_src1))); + v_store(dst + x, v_combine_low(v_src0, v_src1)); } } return x;