diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | celt/x86/x86cpu.h | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 89352b3f..c02a2cc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/celt/x86/x86cpu.h b/celt/x86/x86cpu.h index 6ce10e60..1a383cea 100644 --- a/celt/x86/x86cpu.h +++ b/celt/x86/x86cpu.h @@ -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 |