From 36762ac4b46ccea1e5be11dee336af099ecacf9c Mon Sep 17 00:00:00 2001 From: Matt Sarett Date: Mon, 20 Jun 2016 08:59:25 -0400 Subject: [PATCH] More efficient absolute value on SSE2 --- contrib/intel/filter_sse2_intrinsics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/intel/filter_sse2_intrinsics.c b/contrib/intel/filter_sse2_intrinsics.c index aea3f86af..8197c2dd9 100644 --- a/contrib/intel/filter_sse2_intrinsics.c +++ b/contrib/intel/filter_sse2_intrinsics.c @@ -208,7 +208,7 @@ static __m128i abs_i16(__m128i x) { x = _mm_xor_si128(x, is_negative); /* +1 to negative lanes, else +0. */ - x = _mm_add_epi16(x, _mm_srli_epi16(is_negative, 15)); + x = _mm_sub_epi16(x, is_negative); return x; #endif }