Skip to content

Commit fcecf99

Browse files
committed
Remove the use of __m128i_u entirely
It's just an internal gcc/clang type
1 parent 48a9da0 commit fcecf99

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ AS_IF([test x"$enable_intrinsics" = x"yes"],[
699699
mtest = _mm256_fmadd_ps(mtest, mtest, mtest);
700700
mtest1 = _mm256_set_m128i(_mm_loadu_si64(utest), _mm_loadu_si64(utest));
701701
mtest2 =
702-
_mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u *)utest));
702+
_mm256_cvtepi16_epi32(_mm_loadu_si128(utest));
703703
return _mm256_extract_epi16(_mm256_xor_si256(
704704
_mm256_xor_si256(mtest1, mtest2), _mm256_cvttps_epi32(mtest)), 0);
705705
]]

silk/x86/NSQ_del_dec_avx2.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ static OPUS_INLINE int verify_assumptions(const silk_encoder_state *psEncC)
7373
/* Intrinsics not defined on MSVC */
7474
#ifdef _MSC_VER
7575
#include <Intsafe.h>
76-
#define __m128i_u __m128i
7776
static inline int __builtin_sadd_overflow(opus_int32 a, opus_int32 b, opus_int32* res)
7877
{
7978
*res = a+b;
@@ -959,7 +958,7 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_avx2(
959958
{
960959
__m256i x = _mm256_cvtepi16_epi64(_mm_loadu_si64(&x16[i]));
961960
x = _mm256_slli_epi64(_mm256_mul_epi32(x, _mm256_set1_epi32(inv_gain_Q26)), 16);
962-
_mm_storeu_si128((__m128i_u*)&x_sc_Q10[i], silk_cvtepi64_epi32_high(x));
961+
_mm_storeu_si128((__m128i*)&x_sc_Q10[i], silk_cvtepi64_epi32_high(x));
963962
}
964963

965964
/* After rewhitening the LTP state is un-scaled, so scale with inv_gain_Q16 */
@@ -985,8 +984,8 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_avx2(
985984
/* Scale long-term shaping state */
986985
for (i = NSQ->sLTP_shp_buf_idx - psEncC->ltp_mem_length; i < NSQ->sLTP_shp_buf_idx; i+=4)
987986
{
988-
__m128i_u* p = (__m128i_u*)&NSQ->sLTP_shp_Q14[i];
989-
_mm_storeu_si128(p, silk_mm_smulww_epi32(_mm_loadu_si128(p), gain_adj_Q16));
987+
opus_int32 *p = &NSQ->sLTP_shp_Q14[i];
988+
_mm_storeu_si128((__m128i*)p, silk_mm_smulww_epi32(_mm_loadu_si128((__m128i*)p), gain_adj_Q16));
990989
}
991990

992991
/* Scale long-term prediction state */
@@ -1041,13 +1040,13 @@ static OPUS_INLINE void silk_LPC_analysis_filter_avx2(
10411040
/* Allowing wrap around so that two wraps can cancel each other. The rare
10421041
cases where the result wraps around can only be triggered by invalid streams*/
10431042

1044-
__m256i in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u*)&in_ptr[-8]));
1045-
__m256i B_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u*)& B[0]));
1043+
__m256i in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&in_ptr[-8]));
1044+
__m256i B_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)& B[0]));
10461045
__m256i sum = _mm256_mullo_epi32(in_v, silk_mm256_reverse_epi32(B_v));
10471046
if (order > 10)
10481047
{
1049-
in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u*)&in_ptr[-16]));
1050-
B_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i_u*)&B [8]));
1048+
in_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&in_ptr[-16]));
1049+
B_v = _mm256_cvtepi16_epi32(_mm_loadu_si128((__m128i*)&B [8]));
10511050
B_v = silk_mm256_reverse_epi32(B_v);
10521051
}
10531052
else

0 commit comments

Comments
 (0)