From 2908111b0f5a6934e526cd67f1f6ac170cca269a Mon Sep 17 00:00:00 2001 From: Gabriel Hege Date: Wed, 4 Dec 2024 10:21:16 +0100 Subject: [PATCH 1/5] locally disable -Wmaybe-uninitialized --- source/Lib/CommonLib/arm/BufferARM.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/Lib/CommonLib/arm/BufferARM.h b/source/Lib/CommonLib/arm/BufferARM.h index aa85d12fc..6107f40a3 100644 --- a/source/Lib/CommonLib/arm/BufferARM.h +++ b/source/Lib/CommonLib/arm/BufferARM.h @@ -325,6 +325,8 @@ void applyLut_SIMD( const Pel* src, const ptrdiff_t srcStride, Pel* dst, const p { for( int x = 0; x < width; x += 8 ) { + GCC_WARNING_DISABLE_maybe_uninitialized + xtmp1 = vsetq_lane_s16( lut[ src[ x + 0 ] ], xtmp1, 0 ); xtmp1 = vsetq_lane_s16( lut[ src[ x + 1 ] ], xtmp1, 1 ); xtmp1 = vsetq_lane_s16( lut[ src[ x + 2 ] ], xtmp1, 2 ); @@ -361,6 +363,8 @@ void applyLut_SIMD( const Pel* src, const ptrdiff_t srcStride, Pel* dst, const p xtmp4 = vsetq_lane_s16( lut[ src[ x + 3 * srcStride + 6 ] ], xtmp4, 6 ); xtmp4 = vsetq_lane_s16( lut[ src[ x + 3 * srcStride + 7 ] ], xtmp4, 7 ); + GCC_WARNING_RESET + vst1q_s16( &dst[ x ], xtmp1 ); vst1q_s16( &dst[ x + 1 * dstStride ], xtmp2 ); vst1q_s16( &dst[ x + 2 * dstStride ], xtmp3 ); From 3765d487ac296193ad8d51ff7138065cc47b8eea Mon Sep 17 00:00:00 2001 From: Gabriel Hege Date: Wed, 4 Dec 2024 10:32:55 +0100 Subject: [PATCH 2/5] cmake don't add ${ARM_SRC_FILES} twice --- source/Lib/vvenc/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/Lib/vvenc/CMakeLists.txt b/source/Lib/vvenc/CMakeLists.txt index 9fc3cf3c2..50970c1db 100644 --- a/source/Lib/vvenc/CMakeLists.txt +++ b/source/Lib/vvenc/CMakeLists.txt @@ -49,7 +49,7 @@ if( VVENC_ENABLE_ARM_SIMD ) file( GLOB ARM_INC_FILES CONFIGURE_DEPENDS "../CommonLib/arm/*.h" ) file( GLOB ARM_NEON_SRC_FILES CONFIGURE_DEPENDS "../CommonLib/arm/neon/*.cpp" ) - file( GLOB ARM_SVE_SRC_FILES CONFIGURE_DEPENDS "../CommonLib/arm/sve/*.cpp" ) + file( GLOB ARM_SVE_SRC_FILES CONFIGURE_DEPENDS "../CommonLib/arm/sve/*.cpp" ) file( GLOB ARM_SVE2_SRC_FILES CONFIGURE_DEPENDS "../CommonLib/arm/sve2/*.cpp" ) endif() @@ -142,21 +142,21 @@ if( VVENC_ENABLE_ARM_SIMD ) set_if_compiler_supports_flag( FLAG_mfpu_neon "-mfpu=neon" ) set_property( SOURCE ${ARM_NEON_SRC_FILES} APPEND PROPERTY COMPILE_FLAGS "${FLAG_mfpu_neon}" ) endif() - list(APPEND ARM_SRC_FILES ${ARM_NEON_SRC_FILES}) + list( APPEND ARM_SIMD_SRC_FILES ${ARM_NEON_SRC_FILES} ) if( VVENC_ENABLE_ARM_SIMD_SVE ) set_property( SOURCE ${ARM_SVE_SRC_FILES} APPEND PROPERTY COMPILE_DEFINITIONS USE_NEON USE_SVE ) set_property( SOURCE ${ARM_SVE_SRC_FILES} APPEND PROPERTY COMPILE_FLAGS ${FLAG_sve} ) - list(APPEND ARM_SRC_FILES ${ARM_SVE_SRC_FILES}) + list( APPEND ARM_SIMD_SRC_FILES ${ARM_SVE_SRC_FILES} ) endif() if( VVENC_ENABLE_ARM_SIMD_SVE2 ) set_property( SOURCE ${ARM_SVE2_SRC_FILES} APPEND PROPERTY COMPILE_DEFINITIONS USE_NEON USE_SVE USE_SVE2 ) set_property( SOURCE ${ARM_SVE2_SRC_FILES} APPEND PROPERTY COMPILE_FLAGS ${FLAG_sve2} ) - list(APPEND ARM_SRC_FILES ${ARM_SVE2_SRC_FILES}) + list( APPEND ARM_SIMD_SRC_FILES ${ARM_SVE2_SRC_FILES} ) endif() - add_library( ${LIB_NAME}_arm_simd OBJECT ${ARM_SRC_FILES} ) + add_library( ${LIB_NAME}_arm_simd OBJECT ${ARM_SIMD_SRC_FILES} ) # Disable LTO for the files compiled with special architecture flags. set_target_properties( ${LIB_NAME}_arm_simd PROPERTIES From 38bcbbfe0fdf06df778e1c4040de51faf8a2c69e Mon Sep 17 00:00:00 2001 From: Gabriel Hege Date: Wed, 4 Dec 2024 10:48:55 +0100 Subject: [PATCH 3/5] gh-actions: build shared also --- .github/workflows/Build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 229f18fb2..c1bfc13fb 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -67,16 +67,16 @@ jobs: - name: Ubuntu/Mac OS X/MinGW build if: ${{ !contains( matrix.config.generators, 'Visual Studio' ) }} run: | - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release "-DCMAKE_OSX_ARCHITECTURES=${{ matrix.config.osx_arch }}" - cmake --build . + cmake -S . -B build/static -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 "-DCMAKE_OSX_ARCHITECTURES=${{ matrix.config.osx_arch }}" + cmake --build build/static + cmake -S . -B build/shared -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 "-DCMAKE_OSX_ARCHITECTURES=${{ matrix.config.osx_arch }}" + cmake --build build/shared - name: MSVC build if: contains( matrix.config.generators, 'Visual Studio' ) run: | - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release -DVVENC_OVERRIDE_COMPILER_CHECK=ON -A "${{ matrix.config.msvc_arch }}" - cmake --build . --config Release + cmake -S . -B build/static -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=0 -DVVENC_OVERRIDE_COMPILER_CHECK=ON -A "${{ matrix.config.msvc_arch }}" + cmake --build build/static --config Release + cmake -S . -B build/shared -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DVVENC_OVERRIDE_COMPILER_CHECK=ON -A "${{ matrix.config.msvc_arch }}" + cmake --build build/shared --config Release shell: cmd From 192705f466a0d6cdf2b41c53d48cad1a30e3c252 Mon Sep 17 00:00:00 2001 From: Gabriel Hege Date: Wed, 4 Dec 2024 11:08:52 +0100 Subject: [PATCH 4/5] gh-actions: use MSVC 2022 for 32 Bit build also --- .github/workflows/Build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index c1bfc13fb..2ceb9cbeb 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -24,9 +24,9 @@ jobs: } - { name: "Windows MSVC 32 Bit", - os: windows-2019, - environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars32.bat", - generators: "Visual Studio 16 2019", + os: windows-2022, + environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat", + generators: "Visual Studio 17 2022", msvc_arch: Win32 } - { From 717112ad3388986d61e7d4a98806e3f0fe324abc Mon Sep 17 00:00:00 2001 From: Gabriel Hege Date: Wed, 4 Dec 2024 11:51:03 +0100 Subject: [PATCH 5/5] use vcvars32.bat for 32 bit windows build --- .github/workflows/Build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 2ceb9cbeb..d819b7a48 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -25,7 +25,7 @@ jobs: - { name: "Windows MSVC 32 Bit", os: windows-2022, - environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat", + environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars32.bat", generators: "Visual Studio 17 2022", msvc_arch: Win32 }