Skip to content

feat(libSceJxr): release prediction rows - #16851

Closed
MarrasFederico wants to merge 3 commits into
boykopovar:mainfrom
MarrasFederico:feat/jxr-free-pred-info
Closed

MarrasFederico wants to merge 3 commits into
boykopovar:mainfrom
MarrasFederico:feat/jxr-free-pred-info

Conversation

@MarrasFederico

@MarrasFederico MarrasFederico commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

What

freePredInfo was a parameterless placeholder that threw. It now follows pinned jxrlib strPredQuant.c: a non-null pPredInfoMemory is released with the guest free and the field is cleared; the per-channel row pointers are left as they were. A codec without a block is left unchanged. A null codec throws std::invalid_argument where jxrlib dereferences it.

The test hands the codec a guest malloc block and checks that the free callback still observes the original pPredInfoMemory. After the callback returns, only that field is cleared: a full codec byte snapshot is compared, and the quantizers and prediction rows match an untouched reference copy. A second call is a no-op; a null codec throws.

freePredInfo - not measured on a PS5: prototype and layout are inferred from the export name; the debt entry is in docs/dev/debt/libSceJxr.md.

Tested

Ubuntu 26.04.1 LTS x86-64, GCC 15.2.0, Release, BUILD_TESTING=ON, base 5062ba1fa434906ad0075f4d46bc763946e21ca3. No PS5 hardware or title was tested; Windows and macOS were not tested.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 15626 docs/dev/debt/libSceJxr.md L51

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.

Pull request Shared files not compared
PR 14212 docs/dev/debt/libSceJxr.md
PR 15645 core/libs/prx/libSceJxr/Export.cpp
core/libs/prx/libSceJxr/include/Api.hpp
docs/dev/debt/libSceJxr.md
PR 15646 core/libs/prx/libSceJxr/Export.cpp
core/libs/prx/libSceJxr/include/Api.hpp
docs/dev/debt/libSceJxr.md
PR 15689 core/libs/prx/libSceJxr/Export.cpp
core/libs/prx/libSceJxr/include/Api.hpp
docs/dev/debt/libSceJxr.md
PR 15772 core/libs/prx/libSceJxr/Export.cpp
core/libs/prx/libSceJxr/include/Api.hpp
docs/dev/debt/libSceJxr.md
PR 15774 core/libs/prx/libSceJxr/Export.cpp
core/libs/prx/libSceJxr/include/Api.hpp
docs/dev/debt/libSceJxr.md
PR 16282 core/libs/prx/libSceJxr/Export.cpp
core/libs/prx/libSceJxr/include/Api.hpp
docs/dev/debt/libSceJxr.md

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Progress report (577e3d9 → bd430ed)

📈 System libraries: 32.72% (+0.0026%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceJxr freePredInfo_nid_postfix

Changed libraries (implemented exports)

Library Before After Change
libSceJxr 74/136 (54.41%) 75/136 (55.15%) +0.74%

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 7, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 8, 2026

@gabichuuuuu gabichuuuuu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows run of head bd430edbb7, merged alone onto main f35f1e5eca (clean merge). Setup: Windows 11, WinLibs GCC 15.2 (x86_64-ucrt-posix-seh), Release, BUILD_TESTING=ON.

  • All 16 guest_jxr* tests with --repeat until-fail:5: every run passes.
  • No runnable negative control: with main's libSceJxr/Export.cpp and this PR's header, the build stops with conflicting declaration of C function, because the test calls exports whose signatures only exist with this PR.

Merge order: every open libSceJxr PR from this series edits the same "remaining stubs" line in docs/dev/debt/libSceJxr.md, so each merge will conflict with the next one there.

@MarrasFederico

Copy link
Copy Markdown
Contributor Author

Superseded by #17403, which combines the libSceJxr codec structures changes into one PR so the shared stub count and test blocks stop conflicting between merges. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants