From 29770e13e8486832add5bedf6db065e82e03b049 Mon Sep 17 00:00:00 2001 From: Vitaly Tuzov Date: Thu, 13 Sep 2018 18:20:27 +0300 Subject: [PATCH] Fixed bit-exact resize SIMD implementation for AVX2 baseline --- modules/imgproc/src/resize.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/imgproc/src/resize.cpp b/modules/imgproc/src/resize.cpp index 8b27fd0..4e87616 100644 --- a/modules/imgproc/src/resize.cpp +++ b/modules/imgproc/src/resize.cpp @@ -531,7 +531,6 @@ void hlineResizeCn(uint8_t* src, int, int *o { v_store((uint16_t*)dst, v_src_0); } - vx_cleanup(); #endif for (; i < dst_width; i++) { @@ -588,7 +587,6 @@ void hlineResizeCn(uint8_t* src, int, int *o { v_store((uint16_t*)dst, v_srccn); } - vx_cleanup(); #endif for (; i < dst_width; i++) { @@ -661,7 +659,6 @@ void hlineResizeCn(uint8_t* src, int, int *o { v_store((uint16_t*)dst, v_srccn); } - vx_cleanup(); #endif if (i < dst_width) { @@ -710,7 +707,6 @@ void hlineResizeCn(uint16_t* src, int, int { v_store((uint32_t*)dst, v_src_0); } - vx_cleanup(); #endif for (; i < dst_width; i++) { @@ -741,7 +737,6 @@ void vlineSet(ufixedpoint16* src, uint8_t* dst, int dst_ v_store(dst, v_pack(v_res0, v_res1)); } - vx_cleanup(); #endif for (; i < dst_width; i++) *(dst++) = *(src++); @@ -793,7 +788,6 @@ void vlineResize(ufixedpoint16* src, size_t src_step, v_store(dst, v_reinterpret_as_u8(v_sub_wrap(v_res, v_128_16))); } - vx_cleanup(); #endif for (; i < dst_width; i++) { @@ -899,6 +893,9 @@ public: hResize((ET*)(src + (src_height - 1) * src_step), cn, xoffsets, xcoeffs, endline, min_x, max_x, dst_width); for (; dy < range.end; dy++) vlineSet(endline, (ET*)(dst + dst_step * dy), dst_width*cn); +#if CV_SIMD + vx_cleanup(); +#endif } private: -- 2.7.4