summaryrefslogtreecommitdiff
path: root/media/libaom/src/aom_dsp/x86/fwd_txfm_sse2.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/libaom/src/aom_dsp/x86/fwd_txfm_sse2.h')
-rw-r--r--media/libaom/src/aom_dsp/x86/fwd_txfm_sse2.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/media/libaom/src/aom_dsp/x86/fwd_txfm_sse2.h b/media/libaom/src/aom_dsp/x86/fwd_txfm_sse2.h
index 260d8dd58e..ab3cd91557 100644
--- a/media/libaom/src/aom_dsp/x86/fwd_txfm_sse2.h
+++ b/media/libaom/src/aom_dsp/x86/fwd_txfm_sse2.h
@@ -136,16 +136,21 @@ static INLINE int check_epi16_overflow_x32(
}
static INLINE void store_output(const __m128i *poutput, tran_low_t *dst_ptr) {
- if (sizeof(tran_low_t) == 4) {
- const __m128i zero = _mm_setzero_si128();
- const __m128i sign_bits = _mm_cmplt_epi16(*poutput, zero);
- __m128i out0 = _mm_unpacklo_epi16(*poutput, sign_bits);
- __m128i out1 = _mm_unpackhi_epi16(*poutput, sign_bits);
- _mm_store_si128((__m128i *)(dst_ptr), out0);
- _mm_store_si128((__m128i *)(dst_ptr + 4), out1);
- } else {
- _mm_store_si128((__m128i *)(dst_ptr), *poutput);
- }
+ const __m128i zero = _mm_setzero_si128();
+ const __m128i sign_bits = _mm_cmplt_epi16(*poutput, zero);
+ __m128i out0 = _mm_unpacklo_epi16(*poutput, sign_bits);
+ __m128i out1 = _mm_unpackhi_epi16(*poutput, sign_bits);
+ _mm_store_si128((__m128i *)(dst_ptr), out0);
+ _mm_store_si128((__m128i *)(dst_ptr + 4), out1);
+}
+
+static INLINE void storeu_output(const __m128i *poutput, tran_low_t *dst_ptr) {
+ const __m128i zero = _mm_setzero_si128();
+ const __m128i sign_bits = _mm_cmplt_epi16(*poutput, zero);
+ __m128i out0 = _mm_unpacklo_epi16(*poutput, sign_bits);
+ __m128i out1 = _mm_unpackhi_epi16(*poutput, sign_bits);
+ _mm_storeu_si128((__m128i *)(dst_ptr), out0);
+ _mm_storeu_si128((__m128i *)(dst_ptr + 4), out1);
}
#ifdef __cplusplus