Repository navigation
feat(libSceJxr): implement codec row-state and coding-context reset helpers - #15689
Merged
13 commits merged intoNov 9, 2026
Merged
13 commits merged into
13 commits merged into
Conversation
…te helpers setUniformQuantizer, useDCQuantizer, useLPQuantizer, getDCACPredMode and updatePredInfo call the pinned jxrlib on the caller's codec state, after checking the tile, channel, column and color format bounds those calls rely on. The test compares every export with jxrlib on randomized codec state across tile counts, channel counts, contexts and color formats.
Progress report (947c9dc → 96c37ed)📈 System libraries: 30.44% (+0.04%, +12 implemented functions) ✅ 12 implemented
Changed libraries (implemented exports)
|
Contributor
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run this test on pull requests.
AI-assisted: yes. |
This was referenced Nov 4, 2026
Noxy-HNR
marked this pull request as ready for review
November 4, 2026 20:38
Contributor
✅ AMD GPU test: passedPR head
Unstable on main (4, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (6, not counted against this PR)Passed on retry (2, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)Validated but not compared (64, not in the main baseline's validation pass)Validation IDs already present on main (8 IDs in 675 tests)Skipped (10)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
# Conflicts: # docs/dev/debt/libSceJxr.md
12 tasks done
# Conflicts: # core/libs/prx/libSceJxr/Export.cpp # core/libs/prx/libSceJxr/include/Api.hpp # docs/dev/debt/libSceJxr.md
12 tasks done
12 tasks done
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
12 tasks done
This was referenced Nov 7, 2026
847a356
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.
What
Implements seven libSceJxr exports as thin adapters over the pinned jxrlib (
3rdparty/jxrlib,f7521879862b9085318e814c6157490dd9dbbdb4), through a C bridge injxr_lookup_native:checkImageBufferandgetTilePos(strcodec.c)initMRPtr,advanceMRPtr,advanceOneMBRowandswapMRPtr(strcodec.c)ResetCodingContext(image.c)They act on the caller's LP64
CWMImageStrCodec(35,944 bytes) and its alpha codec, or on a 704-byteCCodingContext._Static_asserts pin the sizes and the field offsets used. The prototypes come from jxrlib'sstrcodec.h; matching the export names to them is an inference.GuestArena::HostWrite. A codec, alpha codec or context that the host may not write throwsstd::invalid_argument, and no byte changes.checkImageBufferonly reads.std::invalid_argumentinstead:advanceMRPtr: a secondary codec (jxrlib asserts this), an unknown color format (it indexescblkChromas), or a null row buffer it would advanceThe debt entry records what is inferred, and the remaining-export count drops by seven.
Tested
New
guest_jxr_rowstest. It builds randomized codec pairs and runs each export on one copy and jxrlib's own function on a clone. It then compares the codecs (pointers by offset), row buffers, prediction rows and coding context. Coverage:checkImageBuffer: YUV and non-YUV data, 7 color formats, 6 bit depths, 8 unit sizes and random strides, at each of 6 widths × 7 row counts.getTilePos: walks a 12×8 macroblock grid for every 1–4 × 1–4 tile layout.initMRPtr, threeadvanceMRPtrcalls,swapMRPtrandadvanceOneMBRow.ResetCodingContext: 8 random contexts.sceKernelMprotect, andPAGE_READONLYis confirmed withVirtualQuery.checkImageBufferstill reads the codec. Each mutating export throws with every page byte-for-byte unchanged, including when only the alpha codec is read-only. After write access is restored, the calls succeed.Rows.cppremoved, the test crashes with an access violation (0xc0000005) on the read-only page. On Linux, with the jxrlib calls ingetTilePosandswapMRPtrstubbed out, it fails with "getTilePos differs from jxrlib".Results:
93b082c157, withmain04cdd52760(after feat(libSceJxr): implement quantizer remapping, AC prediction mode and zigzag scan setup #14933) and the updated feat(libSceJxr): implement quantizer sharing and DC/AC prediction state helpers #15479 merged in: Ubuntu 24.04 x86-64, GCC 13.3.0, Release,ctest -R guest_jxrpassed 12/12 (addingguest_jxr_quantizerfrommain) in each of 3 runs. Windows 11 x86-64, WinLibs GCC 15.2.0, Release: 12/12 passed.ctest -R guest_jxrpassed 10/10 in each of 3 runs. With feat(libSceJxr): implement quantizer sharing and DC/AC prediction state helpers #15479 merged in, 11/11 (addingguest_jxr_predict) in each of 3 runs.ctest -R guest_jxrpassed 10/10 in each of 3 runs, including the read-only page checks. No new warnings. With feat(libSceJxr): implement quantizer sharing and DC/AC prediction state helpers #15479 merged in, 11/11 in each of 3 runs.python3 tools/check_conventions.py --base origin/mainandgit diff --check: passed. Merges cleanly withmainat b8efa62.python3 tools/pr_overlap.py --branch claude/jxr-row-state: no open PR implements the same exports or adds the same files. The other open libSceJxr PRs overlap only on the debt count line and neighbouring lines inExport.cppandApi.hpp. feat(libSceJxr): implement quantizer sharing and DC/AC prediction state helpers #15479 changes the same debt lines, so this branch merges it in with those lines resolved, and this PR goes right after it. The check could not compare fix(tests): stage linked .prx runtime files next to test executables on Windows #7645, which conflicts withmain; itslibSceJxr/CMakeLists.txtchange applies cleanly on top of this branch.No console or retail-title test.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)