diff --git a/include/vvenc/version.h b/include/vvenc/version.h index 62f8c519a..eb3473aed 100644 --- a/include/vvenc/version.h +++ b/include/vvenc/version.h @@ -42,11 +42,11 @@ vvc@hhi.fraunhofer.de #if !defined( VVENC_VERSION ) -#define VVENC_VERSION "0.1.0.0" +#define VVENC_VERSION "0.1.0.1" #ifdef _WIN32 -#define VVENC_VS_VERSION 0.1.0.0 -#define VVENC_VS_VERSION_STR "0.1.0.0" +#define VVENC_VS_VERSION 0.1.0.1 +#define VVENC_VS_VERSION_STR "0.1.0.1" #endif #endif diff --git a/source/Lib/CommonLib/TrQuant_EMT.h b/source/Lib/CommonLib/TrQuant_EMT.h index 86d24c6f2..5c5bf846e 100644 --- a/source/Lib/CommonLib/TrQuant_EMT.h +++ b/source/Lib/CommonLib/TrQuant_EMT.h @@ -57,9 +57,9 @@ struct TCoeffOps { TCoeffOps(); - void initTCoeffOps(); + void initTCoeffOpsX86(); template - void _initTCoeffOps(); + void _initTCoeffOpsX86(); void( *cpyResi8 ) ( const TCoeff* src, Pel* dst, ptrdiff_t stride, unsigned width, unsigned height ); void( *cpyResi4 ) ( const TCoeff* src, Pel* dst, ptrdiff_t stride, unsigned width, unsigned height ); diff --git a/source/Lib/CommonLib/x86/InitX86.cpp b/source/Lib/CommonLib/x86/InitX86.cpp index 4f620fb62..335ce522c 100644 --- a/source/Lib/CommonLib/x86/InitX86.cpp +++ b/source/Lib/CommonLib/x86/InitX86.cpp @@ -303,22 +303,22 @@ void MCTF::initMCTF_X86() #endif #if ENABLE_SIMD_TRAFO -void TCoeffOps::initTCoeffOps() +void TCoeffOps::initTCoeffOpsX86() { auto vext = read_x86_extension_flags(); switch (vext){ case AVX512: case AVX2: - _initTCoeffOps(); + _initTCoeffOpsX86(); break; case AVX: - _initTCoeffOps(); + _initTCoeffOpsX86(); break; case SSE42: - _initTCoeffOps(); + _initTCoeffOpsX86(); break; case SSE41: - _initTCoeffOps(); + _initTCoeffOpsX86(); break; default: break; diff --git a/source/Lib/CommonLib/x86/TrafoX86.h b/source/Lib/CommonLib/x86/TrafoX86.h index 9bbb0801f..60f764323 100644 --- a/source/Lib/CommonLib/x86/TrafoX86.h +++ b/source/Lib/CommonLib/x86/TrafoX86.h @@ -772,7 +772,7 @@ void cpyCoeff_SSE( const Pel* src, ptrdiff_t stride, TCoeff* dst, unsigned width } template -void TCoeffOps::_initTCoeffOps() +void TCoeffOps::_initTCoeffOpsX86() { cpyResi4 = cpyResi_SSE ; cpyResi8 = cpyResi_SSE ; @@ -788,7 +788,7 @@ void TCoeffOps::_initTCoeffOps() = fastFwd_SSE ; } -template void TCoeffOps::_initTCoeffOps(); +template void TCoeffOps::_initTCoeffOpsX86(); } diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index 38c1c7e55..62017be2f 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -412,7 +412,7 @@ DecLib::DecLib() g_pelBufOP.initPelBufOpsX86(); #endif #if ENABLE_SIMD_TRAFO - g_tCoeffOps.initTCoeffOps(); + g_tCoeffOps.initTCoeffOpsX86(); #endif } diff --git a/source/Lib/vvenc/EncoderIf.cpp b/source/Lib/vvenc/EncoderIf.cpp index 8d03e4c18..adea8e3f4 100644 --- a/source/Lib/vvenc/EncoderIf.cpp +++ b/source/Lib/vvenc/EncoderIf.cpp @@ -117,7 +117,7 @@ std::string setSIMDExtension( const std::string& simdId ) g_pelBufOP.initPelBufOpsX86(); #endif #if ENABLE_SIMD_TRAFO - g_tCoeffOps.initTCoeffOps(); + g_tCoeffOps.initTCoeffOpsX86(); #endif return ret; } diff --git a/source/Lib/vvenc/vvenc.cpp b/source/Lib/vvenc/vvenc.cpp index 364714cd0..01e275549 100644 --- a/source/Lib/vvenc/vvenc.cpp +++ b/source/Lib/vvenc/vvenc.cpp @@ -92,6 +92,10 @@ int VVEnc::init( const VVEncParameter& rcVVEncParameter ) return iRet; } + // Set SIMD extension in case if it hasn't been done before, otherwise it simply reuses the current state + std::string simdOpt; + vvenc::setSIMDExtension( simdOpt ); + return VVENC_OK; }