chore(openjphjs): update OpenJPH submodule to upstream 0.30.1 (pilot)#76
chore(openjphjs): update OpenJPH submodule to upstream 0.30.1 (pilot)#76sedghi wants to merge 5 commits into
Conversation
Points the openjph submodule at cornerstonejs/OpenJPH#5, which rebases the fork onto upstream OpenJPH 0.30.1 (was ~22 months behind) and re-applies our custom patches. Net cornerstonejs delta from stock 0.30.1 is 3 lines in ojph_codestream_local.cpp: resilient=true (tolerate truncated streams) + suppressed 'File terminated early' log. Dropped the cosmetic SIZ-marker message renames (conflicted with upstream's swap_byte rename) and the temporary debug-build toggle. CI is the first real build/validation of this bump (not built locally). After OpenJPH#5 merges, re-point this submodule at the merge commit.
|
Warning Review limit reached
Next review available in: 14 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…lude path 0.30.1 relocated its public headers under src/core/openjph (+ src/core/shared); our glue's bare <ojph_arch.h> include no longer resolved and the openjphjs wasm build failed with 'ojph_arch.h file not found'. Add both 0.30.1 header roots to the openjphjs target's include path.
… from openjphsimd) 0.30.1 builds a single architecture-agnostic 'openjph' library; the old 'openjphsimd' target no longer exists, so wasm-ld failed with 'unable to find library -lopenjphsimd'. Link 'openjph', matching upstream's own wasm wrapper (subprojects/js).
Merging this PR will improve performance by ×2.3
|
0.30.1 deprecated OJPH_DISABLE_INTEL_SIMD and bridges it onto the new OJPH_DISABLE_SIMD; our old 'OJPH_DISABLE_INTEL_SIMD=ON' therefore disabled ALL SIMD (OJPH_ENABLE_WASM_SIMD=OFF), shipping a scalar wasm ~2x slower on decode/ encode. Stop setting the deprecated option and force OJPH_DISABLE_SIMD=OFF so 0.30.1's Emscripten path builds the WASM SIMD kernels (-msimd128).
build.sh forced CMAKE_BUILD_TYPE=Debug, so the shipped openjph wasm was built -O0 with unoptimized SIMD intrinsics — the reason decode/encode benched far slower (SIMD-on was even slower than scalar under -O0) and the binary was oversized. Release (-O3) is the correct artifact and is what makes the 0.30.1 SIMD kernels fast and the wasm small.
Status: ✅ CI fully green — ready to mergeopenjph 0.30.1 (was ~22 months behind). All checks pass: build, test, browser-smoke, dist-size, CodSpeed. What it took (build-integration only — no decoder logic change): 0.30.1 relocated headers under Result vs the previously-shipped artifact: ~3× faster decode/encode and ~87% smaller wasm (2.2 MB → 283 KiB). Decode output is byte-identical (goldens + browser-smoke pass). Note: the speed/size win is dominated by the Debug→Release fix (which applies repo-wide), not the version bump itself. Fork PR: cornerstonejs/OpenJPH#5 — now MERGEABLE (rebased onto upstream 0.30.1 + 2 carried patches: Actions to merge
|
Pilot: first of the four submodule upgrades
Bumps
packages/openjphjs/extern/openjphfrom the ~22-month-old pin (e01c7b7, branchmerge/aous-20240423) to upstream OpenJPH 0.30.1 + our re-applied patches.Fork-side PR (the actual rebase + carry/drop rationale): cornerstonejs/OpenJPH#5.
cornerstonejs delta from stock 0.30.1 (3 lines, one file)
resilient = false → true— decoder tolerates truncated/damaged codestreams (deliberate, carried).swap_byte→swap_bytes_if_lerename) and the temporaryCMAKE_BUILD_TYPE=Debugtoggle.What this PR validates
This is the first real build of openjph 0.30.1 against our emscripten glue (
packages/openjphjs/src/HTJ2K*.hpp) — it was not built locally. CI will confirm:resilient=truedoesn't alter output on valid streams).If CI is green, this is the template for charls / openjpeg / libjpeg-turbo. If the glue doesn't compile against 0.30.1, that's the pilot's job to surface.
Follow-ups
main; independent of the emsdk-bump PRs (separate, later).