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
This commit is contained in:
Namgoo Lee 2018-03-06 15:50:53 +09:00 committed by Vadim Pisarevsky
parent ee180d5b41
commit c219f97f48

View File

@ -770,10 +770,10 @@ struct Cvt_SIMD<double, int>
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;