feat(libSceJxr): release shared channel quantizers #16854
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16854"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarrasFederico on 2026-11-07T18:24:49Z.
What
freeQuantizerwas a parameterless placeholder that threw. It now follows pinned jxrlib strcodec.c: only a non-nullpQuantizer[0]is released with the guestfree, because allocateQuantizer takes one block and aliases the later channels into it. The table entries are not cleared. A null table throwsstd::invalid_argumentwhere jxrlib dereferences it.The test checks an empty table (no-op, entries unchanged), a three-channel table pointing into one guest
mallocblock (released once, channel pointers unchanged) and the null-table error.freeQuantizer - not measured on a PS5: the prototype is 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, base07c8408713ebb61e05814134a1707e6ff1c02709. No PS5 hardware or title was tested; Windows and macOS were not tested.Built
core/libs/prx/libSceJxr/allserially withnice -n 19 cmake --build build --parallel 2 --target core/libs/prx/libSceJxr/all.ctest --test-dir build -R 'guest_jxr' --output-on-failurepasses (100% tests passed out of 15).On current
mainthe export is a parameterless placeholder that throws throughNotImplemented_nid_no_patch, so the new assertions cannot pass there.python3 tools/check_conventions.py --base upstream/mainandgit diff --checkpass.Regression control: omitting the guest free makes the ownership assertion fail. Restored the source, rebuilt with the same serial limits, and all 15 JPEG XR tests pass.
pr_overlap.pyreturned 2. Compared every reported head (#14212, #15626, #15645, #15646, #15684, #15689, #15771, #15772, #15774, #16282, #16713, #16728, #16851) against its own merge base, including the original export and any new private-helper definitions: none implements the same export or helpers. Shared debt/header insertions remain. The related #16728 implements allocateQuantizer; #16827 and #16851 concern different exports. Shared header and debt-count edits need reconciliation in merge order; there is no functional dependency.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)Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-08T18:18:50Z.
Review: COMMENTED
Windows run of head
9dc01f4ac1, merged alone ontomainf35f1e5eca(clean merge). Setup: Windows 11, WinLibs GCC 15.2 (x86_64-ucrt-posix-seh), Release,BUILD_TESTING=ON.guest_jxr*tests with--repeat until-fail:5: every run passes.main'slibSceJxr/Export.cppand this PR's header, the build stops withconflicting 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.Pull request closed