From 8b26906d6d06874edf460dca7a9eaafdbdbae237 Mon Sep 17 00:00:00 2001 From: Sayed Adel Date: Wed, 24 Oct 2018 04:33:08 +0000 Subject: [PATCH] core:vsx change behavior of v_round to rounding to nearest even --- modules/core/include/opencv2/core/hal/intrin_vsx.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp index fb81986f6c..72ac45c3eb 100644 --- a/modules/core/include/opencv2/core/hal/intrin_vsx.hpp +++ b/modules/core/include/opencv2/core/hal/intrin_vsx.hpp @@ -832,10 +832,10 @@ OPENCV_HAL_IMPL_VSX_BIN_FUNC2(v_int64x2, v_uint64x2, vec_udword2_c, v_absdiff, v /** Rounding **/ inline v_int32x4 v_round(const v_float32x4& a) -{ return v_int32x4(vec_cts(vec_round(a.val))); } +{ return v_int32x4(vec_cts(vec_rint(a.val))); } inline v_int32x4 v_round(const v_float64x2& a) -{ return v_int32x4(vec_mergesqo(vec_ctso(vec_round(a.val)), vec_int4_z)); } +{ return v_int32x4(vec_mergesqo(vec_ctso(vec_rint(a.val)), vec_int4_z)); } inline v_int32x4 v_floor(const v_float32x4& a) { return v_int32x4(vec_cts(vec_floor(a.val))); }