Skip to content

Commit c219f97

Browse files
ngleevpisarev
authored andcommitted
SSE2 : use _mm_cvtpd_epi32 when converting from CV_64F to CV_32S (opencv#10987)
* SSE2 : use _mm_cvtpd_epi32 when converting from CV_64F to CV_32S * No need to define a new universal intrinsic
1 parent ee180d5 commit c219f97

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/core/src/convert.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,10 +770,10 @@ struct Cvt_SIMD<double, int>
770770
int cWidth = v_float64x2::nlanes;
771771
for (; x <= width - cWidth * 2; x += cWidth * 2)
772772
{
773-
v_float32x4 v_src0 = v_cvt_f32(v_load(src + x));
774-
v_float32x4 v_src1 = v_cvt_f32(v_load(src + x + cWidth));
773+
v_int32x4 v_src0 = v_round(v_load(src + x));
774+
v_int32x4 v_src1 = v_round(v_load(src + x + cWidth));
775775

776-
v_store(dst + x, v_round(v_combine_low(v_src0, v_src1)));
776+
v_store(dst + x, v_combine_low(v_src0, v_src1));
777777
}
778778
}
779779
return x;

0 commit comments

Comments
 (0)