release: v10.16.0 — JP3DDecoder partial-decode discoverable convenience overloads#452
Merged
Merged
Conversation
…ce overloads Closes a discoverability gap: the v10.18-research partial-resolution pipeline (production-default since v10.10.0) and the v10.13.0 K+ROI composition matrix have been mature for ~5 days, but the canonical `JP3DDecoder` exposed only a single `decode(_:)` entry point. Consumers had to know to either construct a `JP3DDecoderConfiguration(resolutionLevel:)` or switch to `JP3DROIDecoder`. v10.16.0 surfaces all three options as discoverable convenience overloads on `JP3DDecoder` itself: - decode(_:resolutionLevel:) → 2.2-3.1× faster at K=1 (v10.18 P2) - decode(_:region:) → 3.4-4.1× faster, 1/4 extent (P3+P6) - decode(_:region:resolutionLevel:) → K+ROI (v10.13.0 matrix) The overloads are thin wrappers — they construct a transient inner decoder / JP3DROIDecoder with the requested options and delegate. No hot-path code changes; same v10.18-research / v10.13.0 pipelines run underneath. The actor's configuration (tolerateErrors, maxQualityLayers) propagates; negative levels clamp to 0; level 0 is bit-exact equivalent to decode(_:). Companion encoder-preWarm probe (V10_27, research diagnostic): killed the natural symmetric ship to v10.15.0's JP3DDecoder.preWarm — leftover encoder- specific cold cost +0.10 / -1.25 ms on 128/256-cube fixtures. The existing JP3DDecoder.preWarm(includeWarmupDispatch: true) warmup-dispatch (a real synthetic 256² encode+decode round-trip) already amortises encoder Metal init via the shared J2KMetalSession.processShared. A dedicated encoder preWarm would be a no-op API; per feedback_no_half_releases.md, NOT shipped. Also bumps the stale `getVersion()` constant 10.9.2 → 10.16.0 (had drifted across 8 releases since v10.9.2; v10.8.0 set the precedent for catching it up during MINOR ships). Validation: - V10_28_JP3DDecoderPartialOverloadsParityTests 6/6 PASS (bit-exact) - swift test --filter JP3D regression 528/528 PASS (1 pre-existing skip) - Mandatory commit gate (release mode) 7/7 PASS MINOR per RELEASING.md — additive public API only, no signature changes, no perf change on existing paths, codestream bytes byte-identical to v10.15.0. 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
JP3DDecoder—decode(_:resolutionLevel:),decode(_:region:),decode(_:region:resolutionLevel:)— that surface the JP3D partial-decode pipelines behind the canonicalJP3DDecodertype. The underlying pipelines (v10.18-research partial-resolution + v10.13.0 K+ROI composition) have been production-default since v10.10.0; the gap was discoverability — consumers had to know to either construct aJP3DDecoderConfiguration(resolutionLevel:)or switch toJP3DROIDecoder.JP3DROIDecoderwith the requested options and delegate. No hot-path code changes; same pipelines run underneath.Speedups surfaced (existing pipelines)
Correctness gate (release mode)
V10_28_JP3DDecoderPartialOverloadsParityTests6/6 PASS (bit-exact: all three overloads byte-identical to existing JP3DDecoderConfiguration + JP3DROIDecoder usage; no-op level (0) bit-exact todecode(_:); negative level clamped; outer-configuration propagation verified)swift test --filter JP3Dregression 528/528 PASS (519 pre-existing + 9 new = 2 V10_27 probe + 6 V10_28 parity + 1 pre-existing skip)J2KMedicalCorpusEncodePerformanceTests2/2 PASSJ2KMedicalCorpusPerformanceTests2/2 PASSJ2KStrictCrossCodecValidationTests3/3 PASSMandatory commit gate: 7/7 PASS release mode.
Companion probe — encoder preWarm wash
The natural symmetric ship to v10.15.0's
JP3DDecoder.preWarmwould have beenJP3DEncoder.preWarm. V10_27 cold-start probe (research diagnostic, on this RC) measured the leftover encoder-specific cold cost AFTERJP3DDecoder.preWarm(includeWarmupDispatch: true):Both fixtures show < 3 ms leftover — the existing decoder preWarm's warmup-dispatch (a real synthetic 256² encode+decode) already amortises encoder Metal init via
J2KMetalSession.processShared. A dedicated encoder preWarm would be a no-op API. Perfeedback_no_half_releases.md, NOT shipped.Test plan
getVersion()constant bumped 10.9.2 → 10.16.0 (had drifted across 8 releases)🤖 Generated with Claude Code