From a900048467b8199f82c31411e0f1597c267fdada Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Thu, 18 Jun 2026 21:12:33 -0700 Subject: [PATCH] [svt-av1] Work around Visual Studio 2026 MSVC bug (#52469) --- .../svt-av1/no-inline-yy_unpacklo_epi128.diff | 19 +++++++++++++++++++ ports/svt-av1/portfile.cmake | 1 + ports/svt-av1/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/s-/svt-av1.json | 5 +++++ 5 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 ports/svt-av1/no-inline-yy_unpacklo_epi128.diff diff --git a/ports/svt-av1/no-inline-yy_unpacklo_epi128.diff b/ports/svt-av1/no-inline-yy_unpacklo_epi128.diff new file mode 100644 index 0000000000..3c23c08bde --- /dev/null +++ b/ports/svt-av1/no-inline-yy_unpacklo_epi128.diff @@ -0,0 +1,19 @@ +diff --git a/Source/Lib/ASM_AVX2/synonyms_avx2.h b/Source/Lib/ASM_AVX2/synonyms_avx2.h +index f615e2569..9a7667724 100644 +--- a/Source/Lib/ASM_AVX2/synonyms_avx2.h ++++ b/Source/Lib/ASM_AVX2/synonyms_avx2.h +@@ -75,7 +75,13 @@ static INLINE __m256i yy_loadu2_128(const void *hi, const void *lo) { + return yy_set_m128i(mhi, mlo); + } + +-static INLINE __m256i yy_unpacklo_epi128(const __m256i in0, const __m256i in1) { ++#if defined(_MSC_VER) && _MSC_VER >= 1950 ++#define MAYBE_INLINE NOINLINE ++#else ++#define MAYBE_INLINE INLINE ++#endif ++ ++static MAYBE_INLINE __m256i yy_unpacklo_epi128(const __m256i in0, const __m256i in1) { + return _mm256_inserti128_si256(in0, _mm256_castsi256_si128(in1), 1); + } + diff --git a/ports/svt-av1/portfile.cmake b/ports/svt-av1/portfile.cmake index 5c38f06e64..cd5cc2456b 100644 --- a/ports/svt-av1/portfile.cmake +++ b/ports/svt-av1/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_gitlab( SHA512 4301e923965e3bff30a0fd2f74ae023d19260f91c2361d48ea7bc1718f501dcca73fa17cb8795b23392ca1bfbe1f4d55edcbb5ce06a2fa9e41da36c5166f527d PATCHES no-force-llvm.diff + no-inline-yy_unpacklo_epi128.diff no-safestringlib.diff unvendor-fastfeat.diff ) diff --git a/ports/svt-av1/vcpkg.json b/ports/svt-av1/vcpkg.json index c84f97e7a5..925218b241 100644 --- a/ports/svt-av1/vcpkg.json +++ b/ports/svt-av1/vcpkg.json @@ -1,6 +1,7 @@ { "name": "svt-av1", "version-semver": "3.1.2", + "port-version": 1, "description": "AV1 software video encoder library", "homepage": "https://gitlab.com/AOMediaCodec/SVT-AV1", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index 732d2ce7e9..929938e4b3 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -9934,7 +9934,7 @@ }, "svt-av1": { "baseline": "3.1.2", - "port-version": 0 + "port-version": 1 }, "swaggercpp": { "baseline": "0.3.0", diff --git a/versions/s-/svt-av1.json b/versions/s-/svt-av1.json index fbac0852fa..b091e9d846 100644 --- a/versions/s-/svt-av1.json +++ b/versions/s-/svt-av1.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "1a94cc62d7d93d05b2c5033681b592342021672f", + "version-semver": "3.1.2", + "port-version": 1 + }, { "git-tree": "dfc35e8860de9551f35b4cb0eb5c10898c2edfdb", "version-semver": "3.1.2",