Repository navigation
Conversation
Progress report (d1ae628 → d2f6368)📈 System libraries: 26.49% (+0.02%, +7 implemented functions) ✅ 7 implemented
Changed libraries (implemented exports)
|
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
putBit16z,putBit16,putBit32,fillToByte,getSizeRead,getSizeWriteandgetPosRead(libSceJxr) over theBitIOInfolayout already used byreadISandwriteIS, following the non-ARM bit writer and size helpers in the pinned jxrlibstrcodec.c(f7521879862b9085318e814c6157490dd9dbbdb4, lines 980-1060). They threwNotImplemented_nid_no_patchas parameterless placeholders before; those and their declarations are replaced by real prototypes, anddocs/dev/debt/libSceJxr.mdgoes from 132 to 125 additional exports.(bitsUsed >> 3) & 2bytes through theiMaskpointer mask and keepsbitsUsed & 15.putBit32splits widths above 16,fillToBytepads withputBit16z(0, (16 - bitsUsed) & 7), and the size helpers compute the ring-buffer distances of the reference.std::invalid_argumentis thrown and the state is left unchanged: a null state, a width above 16 (32 forputBit32), a value wider than its width inputBit16z, and a null cursor before or after the write. With no pending bit and a width of 0 the reference shifts by 32, which is undefined; the x86-64 result is reproduced and checked against the native build. This is listed in the debt doc with a pinned source link. The prototypes are inferred from the shared names; nothing was measured on a PS5.flushToByte(needsflushBit16from the reader, which is a separate change), so it still throws. This PR is based onmainand does not depend on the reader code.guest_jxr_bit_writerchecks hand-computed bytes and states, the size helpers, ring wrap-around and the rejected arguments, then runs 256,000 random operations against the natively built vendored jxrlib on identical state and compares results, all 48 bytes of state and the whole 8 KiB ring after every step.Tested
Linux x86_64, GCC 14.2 (g++ extracted from Debian trixie packages),
-DBUILD_TESTING=ON, full configure with all submodules. Hardware and titles: not tested.libSceJxrand the Jxr test executables.ctest -R jxrpasses all 10 tests,guest_jxr_bit_writerin 0.03 s.core/libs/tests/test_public_headers.py --audit-onlypasses (one declaration per export).tools/check_conventions.py --base origin/mainandtools/check_test_registration.pypass.tools/pr_overlap.py --branch feat/jxr-bit-writerfinds no PR with the same exports or new files. It reports textual overlap only with feat(libSceJxr): implement PKAlloc #14425 (CMakeLists.txt,docs/dev/debt/libSceJxr.md), feat(libSceJxr): implement WMPAlloc, WMPFree and the memory stream #14631 (docs/dev/debt/libSceJxr.md) and feat(libSceJxr): implement the pixel format hash, image IID lookups, aligned allocation and IDPEmpty #14905 (CMakeLists.txt,Api.hpp,docs/dev/debt/libSceJxr.md); none implements these exports. The 132 to 125 count line in the debt doc will also conflict textually with any other PR that changes that count, such as the bit reader (132 to 126), and needs a trivial rebase.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)