fix: recognize MSVC ARM64 in minih264 NEON detection - #637
Merged
Conversation
MINIH264_ONLY_SIMD was already correctly defined for MSVC ARM64 (checks _M_ARM64), but the NEON-enabling check only tested __ARM_NEON/__aarch64__ - GCC/Clang macros that MSVC never defines on ARM64. Falls through both branches and hits the #error on Windows ARM64 builds. Closes #636
BenJule
added a commit
that referenced
this pull request
Jul 27, 2026
…) (#639) #637 got the Windows ARM64 build past the SIMD detection gate, but it then hit a real code issue further in: ``` src/minimp4/minih264e.h(5465,103): error C2078: too many initializers ``` ```c static const uint16x8_t g_ign_first = { 0, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff }; ``` GCC/Clang allow brace-elision when aggregate-initializing the underlying struct of a NEON vector type; MSVC's ARM64 NEON types don't. Adding the nested braces is valid on all compilers (it's just the explicit, non-elided form), so this doesn't touch the already-working Linux/macOS NEON builds - checked the whole file, this is the only place with this pattern. Closes #636
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nightly #166 (first run with the new windows-11-arm target) failed with:
MINIH264_ONLY_SIMDis already correctly defined for MSVC ARM64 (checks_M_ARM64), but the NEON-enabling condition only tested__ARM_NEON/__aarch64__- GCC/Clang macros MSVC never defines on ARM64 (it uses_M_ARM64instead). So MSVC/ARM64 fell through both the SSE2 and NEON branches and hit the#error.One-line fix: add
_M_ARM64to the NEON condition. Checked the CMakeLists for these files - no hardcoded SSE-specific compiler flags that would conflict on ARM64.Closes #636