From fb7db943ec1f5823693341f7b879551b54035379 Mon Sep 17 00:00:00 2001 From: Adam Wieckowski <70575289+adamjw24@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:48:04 +0100 Subject: [PATCH] Add the fix version of MSVC AVX2 issue (#355) --- CMakeLists.txt | 2 +- source/Lib/CommonLib/x86/InitX86.cpp | 2 +- source/Lib/EncoderLib/EncLib.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aeb7e5778..468e909dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ set( VVENC_ENABLE_X86_SIMD TRUE CACHE BOOL "enable x86 intr set( VVENC_ENABLE_ARM_SIMD ${VVENC_ARM_SIMD_DEFAULT} CACHE BOOL "enable ARM intrinsics" ) include( vvencCompilerSupport ) -check_problematic_compiler( VVENC_PROBLEMATIC_COMPILER "MSVC" 19.38 "" ) +check_problematic_compiler( VVENC_PROBLEMATIC_COMPILER "MSVC" 19.38 19.39 ) if( VVENC_PROBLEMATIC_COMPILER ) set( VVENC_OVERRIDE_COMPILER_CHECK OFF CACHE BOOL "Build with known problematic compiler version" ) diff --git a/source/Lib/CommonLib/x86/InitX86.cpp b/source/Lib/CommonLib/x86/InitX86.cpp index f3eb6ec5c..163b0cc33 100644 --- a/source/Lib/CommonLib/x86/InitX86.cpp +++ b/source/Lib/CommonLib/x86/InitX86.cpp @@ -150,7 +150,7 @@ void RdCost::initRdCostX86() switch (vext){ case AVX512: case AVX2: -#if defined( _MSC_VER ) && _MSC_VER >= 1938 +#if defined( _MSC_VER ) && _MSC_VER >= 1938 && _MSC_VER < 1939 #else _initRdCostX86(); break; diff --git a/source/Lib/EncoderLib/EncLib.cpp b/source/Lib/EncoderLib/EncLib.cpp index bf58e6210..2a12987e5 100644 --- a/source/Lib/EncoderLib/EncLib.cpp +++ b/source/Lib/EncoderLib/EncLib.cpp @@ -112,10 +112,10 @@ void EncLib::initEncoderLib( const vvenc_config& encCfg ) // copy config parameter const_cast(m_encCfg) = encCfg; -#if defined( REAL_TARGET_X86 ) && defined( _MSC_VER ) && _MSC_VER >= 1938 +#if defined( REAL_TARGET_X86 ) && defined( _MSC_VER ) && _MSC_VER >= 1938 && _MSC_VER < 1939 if( read_x86_extension_flags() >= x86_simd::AVX2 ) { - msg.log( VVENC_WARNING, "WARNING: MSVC version >= 17.8 produces invalid AVX2 code, partially disabling AVX2!\n" ); + msg.log( VVENC_WARNING, "WARNING: MSVC version 17.8 produces invalid AVX2 code, partially disabling AVX2!\n" ); } #endif