Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
dfe3d71
docs: checkpoint the mwrap implementation and template contract
Sunrisepeak Oct 23, 2026
e4f5dd1
refactor: checkpoint upstream separation and mwrap OpenCV interfaces
Sunrisepeak Oct 23, 2026
ba8a77a
feat: isolate optional OpenCV modules and codec source catalogs
Sunrisepeak Oct 23, 2026
b2a2a80
fix: generate concrete aggregate imports before module scanning
Sunrisepeak Oct 23, 2026
a2d3be8
fix: handle CRLF checkout files in OpenCV feature selection
Sunrisepeak Oct 23, 2026
004b4a4
test: execute the OpenCV project template and state verified capabili…
Sunrisepeak Oct 23, 2026
02fb836
docs: record verified checkpoints and remaining release gates
Sunrisepeak Oct 23, 2026
2a74a82
feat: add native highgui backends and executable window template
Sunrisepeak Oct 23, 2026
f6b1e5e
feat: integrate all sixteen OpenCV main modules with algorithm tests
Sunrisepeak Oct 23, 2026
c59b226
feat: execute OpenCV DNN through the ONNX Runtime CPU engine
Sunrisepeak Oct 23, 2026
bcfcc45
feat: add native video backends and runnable file roundtrip template
Sunrisepeak Oct 23, 2026
ebf39ba
feat: map all OpenCV 5 scalar types and matrix layout helpers
Sunrisepeak Oct 23, 2026
79a8b60
feat: audit the C++ declaration surface and restore public core types
Sunrisepeak Oct 23, 2026
edadf5c
feat: close direct module imports and restore advanced stitching APIs
Sunrisepeak Oct 24, 2026
e72c09b
feat: restore FLANN C++ surface and strict consumer tool closure
Sunrisepeak Oct 24, 2026
f992363
feat: restore portable C++ enums traits logging and math exports
Sunrisepeak Oct 24, 2026
0d83595
fix: preserve SDK scalar contracts and restore portable C++ headers
Sunrisepeak Oct 24, 2026
52f4c8f
feat: restore DNN public shape helpers with SDK body-preserving adapters
Sunrisepeak Oct 24, 2026
5da7fc8
fix: deploy retained licenses for vendored static implementations
Sunrisepeak Oct 24, 2026
7e4fe39
Restore SDK persistence helpers and couple Linux exception runtime
Sunrisepeak Oct 24, 2026
8d1ee87
Expose public HAL, instrumentation and tracking extension APIs
Sunrisepeak Oct 24, 2026
16baa03
Add opt-in WebP images, animation and metadata codecs
Sunrisepeak Oct 24, 2026
7c36134
Restore SDK inline helpers and complete value operators without auto-…
Sunrisepeak Oct 24, 2026
38d1764
Document conservative local test limits and host pressure guard
Sunrisepeak Oct 24, 2026
019eaad
Deploy complete embedded upstream source notices with application bun…
Sunrisepeak Oct 24, 2026
3d02868
Preserve global OpenCV fast-math overloads through exact SDK forwards
Sunrisepeak Oct 24, 2026
27d0b50
Expose original plugin ABI types and CPU point-cloud render helpers
Sunrisepeak Oct 24, 2026
c392861
Make embedded source notice ordering identical on Windows and Unix
Sunrisepeak Oct 24, 2026
11aa896
Restore CPU CUDA helpers, feature HAL and explicit public header review
Sunrisepeak Oct 24, 2026
6d60a93
Export public SDK diagnostics and preserve original legacy global enums
Sunrisepeak Oct 24, 2026
4790e9f
Use an explicit pinned SDK float for the imported ArUco constant
Sunrisepeak Oct 24, 2026
eb1d34b
Expose baseline SIMD modules with SDK parity and GCC-safe memory forw…
Sunrisepeak Oct 24, 2026
d1c3152
Expose original software SIMD templates with scoped linkage adaptation
Sunrisepeak Oct 24, 2026
f204740
Restore original Matx and Vec templates through an imported-type prod…
Sunrisepeak Oct 24, 2026
fb27853
Expose original SIMD compatibility operators through an explicit module
Sunrisepeak Oct 24, 2026
becda22
Restore qualified FP and broadcast APIs and scope legacy operator tests
Sunrisepeak Oct 24, 2026
d17827d
Restore SDK Mat augmented assignments and audit unlisted original names
Sunrisepeak Oct 24, 2026
bc80177
Restore original DNN utilities and review exact API exclusions
Sunrisepeak Oct 24, 2026
93f2ce0
Preserve SDK Mat operand conversions and expression assignment overloads
Sunrisepeak Oct 24, 2026
c052ccf
Clarify candidate capabilities and explicitly deferred backend names
Sunrisepeak Oct 24, 2026
71d0967
Review native SSE helper inventory separately from software SIMD
Sunrisepeak Oct 24, 2026
52fa4a1
fix(gcc): import core producers before the root aggregate
Sunrisepeak Oct 24, 2026
5056249
docs: document legacy module and macro migration
Sunrisepeak Oct 24, 2026
204a560
feat: unify mwrap identity and upstream-aligned first release
Sunrisepeak Oct 24, 2026
5fd742c
fix(ci): read bilingual metadata explicitly as UTF-8
Sunrisepeak Oct 24, 2026
d95828c
docs: apply concise bilingual mwrap README layout
Sunrisepeak Oct 24, 2026
ff4c681
docs: standardize navigation and introductory layout
Sunrisepeak Oct 24, 2026
52d6e04
docs: lead quickstarts with core module imports and uniform upstream …
Sunrisepeak Oct 24, 2026
671bb17
Apply Apache-2.0 wrapper policy and retain upstream notices
Sunrisepeak Oct 24, 2026
726f016
Preserve original upstream document bytes across platform checkouts
Sunrisepeak Oct 24, 2026
867b319
Use the upstream-aligned ONNX Runtime first-release version
Sunrisepeak Oct 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
45 changes: 45 additions & 0 deletions .agents/docs/2026-10-24-implementation-checkpoints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# OpenCV mwrap implementation checkpoints

## Source/interface separation checkpoint

- Fork exists at mcpplibs/opencv-m; implementation branch retains commits.
- Existing pinned upstream source moved to upstream/opencv without content changes.
- Generated snapshots moved to generated; compatibility header moved to port/include/mwrap/opencv.
- Root and submodule names changed to mcpplibs.mwrap.opencv; upstream cv API preserved.
- Macro constants moved from cv into mcpplibs::mwrap::opencv::macros.
- LLVM 23.1.3 baseline build passed (2747 units including the existing FFmpeg closure).
- Existing test suite: six binaries passed; DNN/unifont gated cases require their feature runs separately.
- Package revision 5.0.0.1 distinguishes this wrapper from the inherited v5.0.0 tag without changing upstream version.
- Remaining: source/feature catalog split, additional modules, native GUI, ORT bridge, codecs/backends, full API audit, native CI and installed/template consumers.

## Optional source catalog checkpoint

- Generated per-platform source catalogs separate mandatory core, optional modules, codecs and video backends.
- The root module aggregates only selected module interfaces; FFmpeg is a videoio-ffmpeg feature dependency.
- Build-instance configuration and build information reflect the chosen JPEG/PNG features.
- Linux LLVM 23.1.3 strict core-only and PNG/JPEG configurations passed all six test binaries. The image configuration executed both actual codec roundtrips; feature-disabled DNN/unifont binaries contain no cases and do not establish coverage for those capabilities.
- CI now runs image codec features separately from core-only and DNN/unifont configurations.
- mcpp engine is read-only. Its existing documentation/skill PR remains unmerged and is not a dependency of this work.
- Native GUI, remaining main modules and ORT bridge remain implementation work; this checkpoint does not claim full support.

## Aggregate module CI correction

- Run 40010892459 exposed imports introduced through a header: GCC rejected them, while Windows built the library but consumers could not see the aggregate's core API.
- The conventional src/opencv.cppm now directly re-exports core, macros and an internal selection module.
- build.mcpp writes that selection module into its configuration-specific output and declares it with mcpp::generated before scanning. The generated file contains concrete imports for the selected features, with no header-induced or preprocessor-conditional imports.
- Existing root-import API, header-mixing and codec tests exercise the aggregate from consumers; native Windows verification remains in CI.
- This correction requires no mcpp engine changes.

## Windows checkout newline correction

- Reproduced the Windows selection problem locally by feeding CRLF versions of the tracked configuration files to the real build program: selected.cppm incorrectly contained no optional module imports.
- Module and source catalog lines now strip CRLF carriage returns; cvconfig is normalized before optional codec definitions are disabled.
- tools/test_build_config.py executes the compiled build program against LF and CRLF fixtures and verifies identical selected modules, source directives and codec configuration. It passed locally and is included in the Linux GCC CI job.
- GCC 16 and musl static core-only tests passed, as did GCC 16 and LLVM 23 PNG/JPEG roundtrips after the aggregate correction. Windows core tests passed in run 40015097526; complete feature verification follows on the new CI head.

## Executable quickstart and documentation checkpoint

- tools/test_template.py invoked the actual mcpp installed-package template renderer, verified the qualified self.name/version dependency, then built and ran the generated candidate consumer under LLVM 23.1.3. It wrote a 64x64 out.png successfully. This is a staged-source template test, not a published archive installation test.
- Added this actual template flow to the Linux LLVM CI leg.
- English/Chinese README now describe current feature selection, module and macro names, verified coverage and unfinished native GUI/ORT/full-module work. Removed inherited full-featured claims and broken example links.
- Package metadata now agrees with the existing Apache-2.0 root LICENSE, without replacing or relicensing the existing license file. The image example explicitly selects required PNG/JPEG features.
280 changes: 280 additions & 0 deletions .agents/docs/2026-10-24-mwrap-repository-and-module-standard.md

Large diffs are not rendered by default.

507 changes: 507 additions & 0 deletions .agents/docs/2026-10-24-opencv-5-full-and-onnxruntime-plan.md

Large diffs are not rendered by default.

900 changes: 900 additions & 0 deletions .agents/docs/2026-10-24-readiness-audit.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions .agents/docs/2026-10-25-unified-mwrap-checkpoint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Unified mwrap first release

Package/module: `mcpplibs.mwrap.opencv`; upstream version: `5.0.0`.

This checkpoint migrates wrapper identity while retaining upstream API names and SDK sources.
Default README is English with a mandatory Chinese counterpart; original section order is preserved.
Validation and release evidence are recorded in the PR and the index ecosystem ledger.
No old release tag or source resource is rewritten.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Generated text must compare byte-for-byte on Windows as well as Unix.
* text=auto eol=lf
# Retain the pinned archive's original bytes, including third-party assets.
upstream/** -text -whitespace
*.onnx -text
*.png -text
*.jpg -text
*.jpeg -text
*.ttf -text
211 changes: 188 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@ concurrency:
cancel-in-progress: true

env:
# 0.0.102 (mcpp#258): OS-conditional [target.'cfg(os)'.build].flags, which
# this manifest uses to keep -msse3 on the library TUs but off the module
# interfaces. 0.0.101 rejects `flags` under a cfg section. (0.0.102 also
# carries #261 — the windows scan-deps command-line fix.) The pin tracks
# the latest release; 0.0.103 adds the mcpplibs index org migration +
# per-repo artifact adoption (mcpp#267/#269) — no manifest-grammar change,
# the package floor stays 0.0.102.
MCPP_VERSION: "2026.8.5.4"
# Latest stable release verified on 2026-10-24; keep this pin and
# .xlings.json/release.yml aligned. Engine sources stay unchanged.
MCPP_VERSION: "2026.10.24.1"

jobs:
# ── Platform × toolchain matrix ─────────────────────────────────────────
Expand All @@ -36,7 +31,7 @@ jobs:
# signature); merged as e83ed49, green since.
# windows — per-glob flags live in [target.'cfg(windows)'.build.flags]
# (mcpp#258, landed in 0.0.102), still keyed on the
# gen/windows/tu/w*/ stub paths; removing the stub layer
# generated/windows/tu/w*/ stub paths; removing the stub layer
# itself is tracked in #17.
test:
name: ${{ matrix.name }}
Expand All @@ -48,6 +43,7 @@ jobs:
matrix:
include:
- name: linux-gcc
ort_toolchain: gcc@16.1.0
os: ubuntu-latest
suffix: linux-x86_64
ext: tar.gz
Expand All @@ -59,6 +55,7 @@ jobs:
features: true
examples: true
- name: linux-llvm-22
ort_toolchain: llvm@22.1.8
os: ubuntu-latest
suffix: linux-x86_64
ext: tar.gz
Expand Down Expand Up @@ -87,6 +84,7 @@ jobs:
features: false
examples: false
- name: macos-llvm
ort_toolchain: llvm@23.1.3
os: macos-15
suffix: macosx-arm64
ext: tar.gz
Expand All @@ -96,6 +94,7 @@ jobs:
features: false
examples: false
- name: windows-llvm
ort_toolchain: llvm@23.1.3
os: windows-latest
suffix: windows-x86_64
ext: zip
Expand All @@ -108,6 +107,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Mwrap identity and bilingual README contract
run: python3 tools/check_mwrap_release.py

- name: Restore mcpp registry cache
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -173,10 +175,49 @@ jobs:
done < <(find templates -name '*.cpp.in' -o -name '*.cc.in' -o -name '*.cpp' -o -name '*.cc')
exit $fail

- name: Generated macro mappings match pinned headers
shell: bash
run: python3 tools/generate_macros.py --check

- name: Embedded upstream notices match retained sources
shell: bash
run: |
python3 tools/test_source_notices.py
python3 tools/generate_source_notices.py --check

- name: Generated scalar conversions match the pinned SDK
shell: bash
run: python3 tools/generate_saturate.py --check

- name: Generated DNN shape helpers match the pinned SDK
shell: bash
run: python3 tools/generate_dnn_shapes.py --check

- name: Generated persistence helpers match the pinned SDK
shell: bash
run: python3 tools/generate_persistence.py --check

- name: Generated portable helpers and value operators match the pinned SDK
shell: bash
run: |
python3 tools/generate_inline_helpers.py --check
python3 tools/generate_cuda_helpers.py --check
python3 tools/generate_simd.py --check
python3 tools/generate_simd_legacy.py --check
python3 tools/generate_objdetect_constants.py --check
python3 tools/generate_type_ops.py --check
python3 tools/generate_mat_aug_ops.py --check
python3 tools/test_export_diagnostics.py

- name: Build
shell: bash
run: mcpp build

- name: Build configuration newline regression
if: matrix.name == 'linux-gcc'
shell: bash
run: python3 tools/test_build_config.py target/.build-mcpp/build.mcpp.bin

# Guard the module-interface BMIs against non-baseline target features.
# A src/*.cppm compiled with -msse3/-mavx/-march=… bakes that feature
# into opencv.<mod>.pcm; a consumer TU compiled at plain baseline then
Expand All @@ -185,31 +226,155 @@ jobs:
# (OpenCV's x86_64 baseline), so it is applied per-glob to the library
# TUs only — this asserts it never leaked back onto an interface unit.
- name: Module-interface baseline guard
if: matrix.features
shell: bash
run: |
ninja=$(find target -name build.ninja | head -1)
[ -n "$ninja" ] || { echo "no build.ninja found"; exit 1; }
bad=0
for m in opencv cv core imgproc imgcodecs videoio highgui flann geometry; do
hits=$(grep -E "[ =/]src/${m}\.cppm" "$ninja" | grep -oE '\-m(sse[0-9._]*|avx[0-9_]*|arch=[^ ]+)' | sort -u || true)
if [ -n "$hits" ]; then
echo "::error::src/${m}.cppm carries non-baseline target feature(s): $hits — its BMI will be unloadable by baseline consumers"
bad=1
fi
done
[ $bad -eq 0 ] && echo "module interfaces are baseline (no target-feature flags)."
exit $bad
run: python3 tools/check_interface_flags.py

- name: Test
shell: bash
run: mcpp test

- name: Candidate codec and ORT index
uses: actions/checkout@v4
with:
repository: mcpplibs/mcpp-index
ref: 7e5a54ccee615e2f8b1a32b34dd9cd7d5c2c55cb
path: .candidate-index

- name: WebP lossless alpha, animation and metadata
shell: bash
run: |
if [[ "${{ matrix.name }}" == "linux-musl-static" ]]; then
python3 tools/test_candidate.py --index .candidate-index --toolchain gcc@16.1.0 --target x86_64-linux-musl --features imgcodecs-webp --filter webp_codec
else
python3 tools/test_candidate.py --index .candidate-index --toolchain "${{ matrix.ort_toolchain }}" --features imgcodecs-webp --filter webp_codec
fi

- name: WebP disabled dependency boundary
if: matrix.name == 'linux-llvm-22'
shell: bash
run: python3 tools/test_candidate.py --index .candidate-index --toolchain llvm@22.1.8 --features imgcodecs --filter webp_codec --absent-dependency compat.libwebp

- name: Image codec feature tests
shell: bash
run: mcpp test --features imgcodecs-png,imgcodecs-jpeg

- name: All main modules and generated-input algorithm behavior
shell: bash
run: |
mcpp test --features all-modules,simd --strict --timeout 120
python3 tools/check_interface_flags.py
python3 tools/check_cpp_contracts.py

- name: C++ declaration and header coverage inventory
if: matrix.name == 'linux-llvm-22'
shell: bash
run: |
python3 tools/test_audit_api.py
python3 tools/check_interface_flags.py
python3 tools/audit_api.py --verify-exports
python3 tools/probe_unlisted_api.py
python3 tools/check_entity_review.py --require-complete
python3 tools/check_header_review.py

- name: Preserve C++ inventory for review
if: matrix.name == 'linux-llvm-22' && always()
uses: actions/upload-artifact@v4
with:
name: opencv-cpp-inventory
path: |
target/api-audit/inventory.json
target/api-audit/includes.log
target/api-audit/export-consumer.log
target/api-audit/unlisted-import-probe/
if-no-files-found: error

- name: Actual default project template
if: matrix.name == 'linux-llvm-22'
shell: bash
run: python3 tools/test_template.py --toolchain llvm@22.1.8

- name: Native SDK versus module persistence formats
shell: bash
run: python3 tools/check_persistence_format.py

- name: Native SDK versus module portable helper behavior
shell: bash
run: python3 tools/check_utility_helpers.py

- name: Original SDK versus module Matx and Vec template contracts
shell: bash
run: python3 tools/check_matx_templates.py

- name: Original SDK versus qualified FP state and opaque videoio APIs
shell: bash
run: python3 tools/check_fp_state.py

- name: Original SDK versus Mat augmented assignment signatures and behavior
shell: bash
run: python3 tools/check_mat_aug.py

- name: Original SDK versus DNN equality and unavailable backend contracts
shell: bash
run: python3 tools/check_dnn_compat.py

- name: Native SDK versus module baseline SIMD behavior
shell: bash
run: |
python3 tools/check_simd.py
python3 tools/check_interface_flags.py

- name: Original SDK versus module software SIMD behavior
shell: bash
run: |
python3 tools/check_simd.py --emulated
python3 tools/check_interface_flags.py

- name: Optimized software SIMD behavior
if: matrix.name == 'linux-gcc'
shell: bash
run: python3 tools/check_simd.py --emulated --profile release

- name: Features without the optional DNN surface
if: matrix.name == 'linux-llvm-22'
shell: bash
run: mcpp test --features features --strict --timeout 120

- name: Feature tests (dnn + unifont module interfaces)
if: matrix.features
shell: bash
run: mcpp test --features dnn,unifont

- name: Linux native GTK3 window and actual window template
if: matrix.name == 'linux-llvm-22'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y xvfb pkg-config
xvfb-run -a mcpp test --features highgui-native --timeout 60
xvfb-run -a python3 tools/test_template.py --toolchain llvm@22.1.8 --template window --run-arg=--smoke-test

- name: Native Win32 or Cocoa window
if: runner.os == 'Windows' || runner.os == 'macOS'
shell: bash
run: mcpp test --features highgui-native --timeout 60

- name: Native video backend and FFmpeg file roundtrips
shell: bash
run: mcpp test --features videoio-native,videoio-ffmpeg --strict --timeout 120

- name: Actual video project template
if: matrix.ort_toolchain
shell: bash
run: python3 tools/test_template.py --toolchain "${{ matrix.ort_toolchain }}" --template video

- name: OpenCV ONNX Runtime CPU execution proof and actual project template
if: matrix.ort_toolchain
shell: bash
run: |
python3 tools/generate_ort_model.py --check
python3 tools/test_candidate.py --index .candidate-index --toolchain "${{ matrix.ort_toolchain }}"
python3 tools/test_template.py --index .candidate-index --template onnxruntime --toolchain "${{ matrix.ort_toolchain }}"

# NOTE examples are exercised locally, not here: each one is a path-dep
# consumer that cold-rebuilds the whole vendored OpenCV (+ffmpeg) in its
# own target/ (~40 min per example on a 4-core runner) while adding
Expand Down
Loading
Loading