release: v10.13.0 — JP3D K>0 + ROI composition closes the {K, ROI} matrix#449
Merged
Merged
Conversation
…trix
v10.12.0 shipped the per-lane batched bridge for K=0+ROI and K>0+nil
but left K>0+ROI as a known limitation. v10.13.0 closes that last
cell by removing both throws (JP3DSliceStackCodec + JP3DROIDecoder)
and making JP3DROIDecoder K-aware end-to-end.
JP3DROIDecoder(cfg).decode(data, region:) with cfg.resolutionLevel > 0
now returns a sub-volume sized
ceil(region.width / 2^K) × ceil(region.height / 2^K) × region.depth
with voxels bit-identical to JP3DDecoder(cfg).decode(data) cropped to
the downsampled-mapped region.
Four coordinated changes:
1. Both throws removed. The v10.18 fail-loud guards were Phase 5
wiring tripwires; v10.13.0 IS that Phase 5 wiring.
2. JP3DBridgeOptions.regionOfInterest standardised on full-image
coordinates (matches v10.6 decodeRegion / v10.8 decodePartial).
Bridge maps region onto the reduced grid for the crop via
`region / 2^(N − partialResolutionLevel)` (mirrors
J2KAdvancedDecoding.swift:528-543).
3. JP3DSliceStackCodec outTileWidth/outTileHeight K-aware — when
K>0 + ROI, per-slice output shape is
`ceil(roi.w / 2^K) × ceil(roi.h / 2^K)`.
4. JP3DROIDecoder K-aware composite — output roiBuffers sized
downsampled, per-tile composite uses downsampled stride for
both src and dst. Z stays full (per-slice).
The full {K, ROI} matrix is now batched:
• (K=0, no ROI) → batched (v10.11)
• (K=0, ROI) → batched (v10.12)
• (K>0, no ROI) → batched (v10.12)
• (K>0, ROI) → batched (v10.13, this commit)
Validation:
- V10_18_TrueSelectiveParityTests 9/9 PASS
(testCombinedResolutionLevelAndROI is the new K+ROI parity
oracle; previously a fail-loud tripwire, now inverted to a
success-branch check)
- V10_21_BatchedBridgeOptionsParityTests 7/7 PASS
(K=4+ROI composition test now uses full-coords ROI:
J2KRegion(x:32,y:32,w:128,h:128) in 256² source ⇒ output 64×64)
- V10_20_BatchedBridgeParityTests 5/5 PASS (unchanged)
- V10_20_BatchedInverseInt32ParityTests 12/12 PASS (unchanged)
- V10_20_JP3DBridgeParityTests 5/5 PASS (unchanged)
- `swift test --filter JP3D` regression 519/519 PASS
- Mandatory commit gate (release mode) 7/7 PASS
Codestream bytes byte-identical to v10.12.0; encoder unchanged.
MINOR per RELEASING.md — no public API removed, no signature
changed; semantics of v10.12.0's JP3DBridgeOptions.regionOfInterest
clarified as full-image coordinates.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
JP3DROIDecoder(cfg).decode(data, region:)withcfg.resolutionLevel > 0returns a downsampled sub-volume instead of throwing. Closes v10.12.0's known limitation.Correctness gate (release mode)
V10_18_TrueSelectiveParityTests(includes new K+ROI oracle)V10_21_BatchedBridgeOptionsParityTests(full-coords K+ROI)V10_20_BatchedBridgeParityTestsV10_20_BatchedInverseInt32ParityTestsV10_20_JP3DBridgeParityTestsswift test --filter JP3DregressionJ2KMedicalCorpusEncodePerformanceTestsJ2KMedicalCorpusPerformanceTestsJ2KStrictCrossCodecValidationTestsTest plan
Companion documents
RELEASE_NOTES_v10.13.0.md— full release notesv10.22-researchbranch perfeedback_research_no_main_merge.md.🤖 Generated with Claude Code