summaryrefslogtreecommitdiff
path: root/src/libFLAC/stream_encoder_intrin_sse2.c
diff options
context:
space:
mode:
authorlvqcl <lvqcl.mail@gmail.com>2018-09-19 20:03:37 +0300
committerErik de Castro Lopo <erikd@mega-nerd.com>2018-09-20 07:20:13 +1000
commit421961f00b505dcad41603305b47eda0b2ddfe92 (patch)
tree051990fb5c29ee092201be9562fa6479834a25f3 /src/libFLAC/stream_encoder_intrin_sse2.c
parentfaafa4c82c31e5aed7bc7c0e87a379825372c6ac (diff)
downloadflac-421961f00b505dcad41603305b47eda0b2ddfe92.tar.gz
Replace hadd with shuffle + add
Diffstat (limited to 'src/libFLAC/stream_encoder_intrin_sse2.c')
-rw-r--r--src/libFLAC/stream_encoder_intrin_sse2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libFLAC/stream_encoder_intrin_sse2.c b/src/libFLAC/stream_encoder_intrin_sse2.c
index ed94ec3e..44ee4d35 100644
--- a/src/libFLAC/stream_encoder_intrin_sse2.c
+++ b/src/libFLAC/stream_encoder_intrin_sse2.c
@@ -97,8 +97,8 @@ void FLAC__precompute_partition_info_sums_intrin_sse2(const FLAC__int32 residual
mm_sum = _mm_add_epi32(mm_sum, mm_res);
}
- mm_sum = _mm_add_epi32(mm_sum, _mm_srli_si128(mm_sum, 8));
- mm_sum = _mm_add_epi32(mm_sum, _mm_srli_si128(mm_sum, 4));
+ mm_sum = _mm_add_epi32(mm_sum, _mm_shuffle_epi32(mm_sum, _MM_SHUFFLE(1,0,3,2)));
+ mm_sum = _mm_add_epi32(mm_sum, _mm_shufflelo_epi16(mm_sum, _MM_SHUFFLE(1,0,3,2)));
abs_residual_partition_sums[partition] = (FLAC__uint32)_mm_cvtsi128_si32(mm_sum);
/* workaround for MSVC bugs (at least versions 2015 and 2017 are affected) */
#if (defined _MSC_VER) && (defined FLAC__CPU_X86_64)