Using the same condition for enabling rtcd
for cmake, force PRESEUME_SSE4_1 on PRESUME_AVX2
This commit is contained in:
parent
3e18d96759
commit
f5821193e6
2 changed files with 6 additions and 1 deletions
|
@ -485,6 +485,7 @@ if(NOT OPUS_DISABLE_INTRINSICS)
|
|||
endif()
|
||||
if(OPUS_X86_PRESUME_AVX2)
|
||||
target_compile_definitions(opus PRIVATE OPUS_X86_PRESUME_AVX2)
|
||||
target_compile_definitions(opus PRIVATE OPUS_X86_PRESUME_SSE4_1)
|
||||
if(NOT MSVC)
|
||||
target_compile_options(opus PRIVATE -mavx2 -mfma -mavx)
|
||||
endif()
|
||||
|
|
|
@ -52,7 +52,11 @@
|
|||
# define MAY_HAVE_AVX2(name) name ## _c
|
||||
# endif
|
||||
|
||||
# if defined(OPUS_HAVE_RTCD)
|
||||
# if defined(OPUS_HAVE_RTCD) && \
|
||||
((defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \
|
||||
(defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \
|
||||
(defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \
|
||||
(defined(OPUS_X86_MAY_HAVE_AVX2) && !defined(OPUS_X86_PRESUME_AVX2)))
|
||||
int opus_select_arch(void);
|
||||
# endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue