Skip to content

Split newer-toolchain compatibility fixes from Arm64 readiness - #1096

Open
yeelam-gordon wants to merge 3 commits into
OpenShot:developfrom
yeelam-gordon:feature/windows-arm64-prereqs
Open

yeelam-gordon wants to merge 3 commits into
OpenShot:developfrom
yeelam-gordon:feature/windows-arm64-prereqs

Conversation

@yeelam-gordon

Copy link
Copy Markdown
Contributor

This PR contains the non-Arm64-specific compatibility fixes that were previously bundled into #1089 while validating the Windows Arm64 CLANGARM64 toolchain.

Scope in this PR:

  • FFmpeg 9 / libavcodec 62 API compatibility and spherical metadata behavior
  • OpenCV 5 header/API compatibility
  • ImageMagick 7 buffer/lifetime fixes
  • Windows/runtime test portability fixes
  • Ninja/CMake test-target compatibility fixes

This is a prerequisite split so that #1089 can stay narrow and Arm64-specific (CI lanes, package lock, architecture validator, and native-process oracle coverage).

yeelam-gordon and others added 3 commits September 1, 2026 16:33
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Merge conflicts have been detected on this PR, please resolve.

@github-actions github-actions Bot added the conflicts A PR with unresolved merge conflicts label Sep 15, 2026

jonoomph commented Oct 3, 2026

Copy link
Copy Markdown
Member

Thanks for separating these compatibility fixes! Two concerns currently block this: TrackedObjectBBox.cpp is always built, but its protobuf generation/linking is still OpenCV-only; and the spherical tests expect zero angles on every FFmpeg version, dropping nonzero round-trip coverage. We need to preserve OpenCV-disabled builds and angle checks where supported. This also needs a rebase and coordination with #1088 to avoid duplicate capability implementations.

jonoomph added a commit that referenced this pull request Oct 17, 2026
Fix PR #1088 version and channel-layout guards, preserve legacy validation, and reject failed capability queries. Use encoder-context queries as suggested by #1096 without importing its broader changes. Add codec regression tests and FFmpeg 7.0, 7.1, and 8.0 CI coverage.

Copy link
Copy Markdown
Member

Thanks again for this work! While testing newer FFmpeg compatibility on our arm64-support integration branch, we investigated the spherical-metadata failures and found two separate issues:

  • Writer metadata loss: the existing spherical tests fail with missing metadata on FFmpeg 7.0, 7.1.3, and 8.0. Encoder initialization copies parameters into codecpar, replacing the spherical side data attached earlier. On 7.1.3, experimentally attaching it to the encoder context instead preserved the metadata without changing the writer’s initialization sequence.
  • FFmpeg reader behavior: after that fix, projection metadata survived, but orientation angles came back as zero. In FFmpeg 7.1.3, mov_read_vexu_proj() allocates a new spherical mapping, replacing the mapping populated from sv3d and losing its angles. The same code is present in 8.0. This appears to be a demuxer issue, rather than proof that the writer cannot store the angles.

Please preserve the nonzero-angle assertions where supported. They pass with our older FFmpeg 4.2.x build. For affected versions, we should separately verify the angles written into the MP4 and account for the reader defect, rather than expect zero on every version.

We’re keeping the spherical changes separate while investigating this. The earlier OpenCV-disabled build concerns also remain outstanding.

jonoomph added a commit that referenced this pull request Oct 17, 2026
Select the OpenCV header/detection and portable test-path changes from #1096 (head 37a2106). Other changes in that PR are not included.

Co-authored-by: Gordon Lam (SH) (from Dev Box) <yeelam@microsoft.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jonoomph added a commit that referenced this pull request Oct 17, 2026
Adapt the focused MagickCore linkage fix from #1096 (head 37a2106). Windows requires direct linkage for the core functions used by the image readers and writers. Retain the existing fallback for older CMake packages.

Co-authored-by: Gordon Lam (SH) (from Dev Box) <yeelam@microsoft.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts A PR with unresolved merge conflicts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants