feat(libSceJxr): implement the PKFormatConverter exports #17400
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17400"
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-08T18:59:15Z.
What
Consolidates #16696, #16698, #16700, #16701, #16702, #16704, #16731, #16732 into one topic so the shared remaining-stub count, test blocks, and build registrations do not cause cascading conflicts between individual merges. Preserves their published library implementations, with identical shared helpers and declarations kept once.
Implemented exports:
PKFormatConverter_GetPixelFormatPKFormatConverter_GetSizePKFormatConverter_ReleasePKFormatConverter_GetSourcePixelFormatPKFormatConverter_GetResolutionPKFormatConverter_CopyPKFormatConverter_InitializeConvertPKFormatConverter_InitializeThe default
PKFormatConverter_ConvertreturnsWMP_errSuccessas on currentmain(integrated via #15626), matching firmware 13.42 disassembly and jxrlibJXRGluePFC.c:2319-2327.A debt fragment records the converter gaps and updates the inventory from the resulting
Export.cpp: 6 remainingNotImplemented_nid_no_patch(__func__)calls. Main’s debt entries are preserved; source-definition anchors affected by the merge are refreshed through the fragment.The original converter test blocks have separate local scopes to avoid duplicate variable declarations.
Tested
Ubuntu 26.04.1 LTS, kernel 7.0.0-43-generic, GCC 15.2.0, Release,
BUILD_TESTING=ON, CMake 4.4.4 with Ninja. Merged main9659ce01e4cba30f74faf1b4211eac4e5e3b0a24into the published head2a49cacd2awith normal merge commit6a692957be24f2b048e09dc0cd6a3a67cd9e86cd. History was not rewritten. This verification ran entirely on the laptop; no Windows, macOS, console or title execution was performed locally.GlueHelpers.cppandNativeGlue.c, retaining both converter helpers and main’s tile/BitIO helpers. TheGuestJxr.cppallocator keeps both the converter release counter and main’s tile-free recording. Main’s implementations and tests from #17403 are retained.core/libs/prx/libSceJxr/allusingnice -n 19 cmake --build build --parallel 7 --target core/libs/prx/libSceJxr/all.ctest --test-dir build -R '^guest_jxr' --output-on-failure: 23/23 pass, none skipped or Not Run, 0.79 seconds.python3 tools/check_conventions.py --base upstream/main: All conventions checks passed.python3 core/libs/tests/test_public_headers.py --audit-only: 413 libraries, 34,557 exports, unique declarations and umbrella coverage verified.git diff --check upstream/main...HEAD: clean. The JXR debt fragment applies cleanly in isolation and leaves a single inventory entry with the source-counted 6 placeholders. No existing main debt entries are deleted.PKFormatConverter_EnumConversionsstill throws here and is not one of this PR’s eight implemented exports.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-08T19:55:53Z.
Review: COMMENTED
Windows run of head
3d9a085f07, merged alone ontomain095ff72367(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 tests call exports that only exist with this PR.The four consolidations still conflict with each other. Merged onto
maintwo at a time, every pair of #17400, #17401, #17402 and #17403 conflicts. For this one, that's with #17401, #17402, #17403. The conflicts are indocs/dev/debt/libSceJxr.md(the remaining-stub line) in every pair, plusGlueHelpers.cpp,NativeGlue.c,Api.hpp,CMakeLists.txt,GuestJxr.cpporGuestJxrGlue.cppdepending on the pair. So the cascade the description wants to avoid is now four-way instead of 22-way: after the first one merges, the other three each need a rebase. Stacking them (each based on the previous) or one PR for the shared helpers and debt line would remove it.The default
Convertstill throws.PKFormatConverter_InitializeinstallsPKFormatConverter_Convert_nid_postfix(Export.cpp:205), which still callsNotImplemented_nid_no_patch(Export.cpp:247-249). In jxrlib,PKFormatConverter_Convert(JXRGluePFC.c:2319-2327) does nothing and returnsWMP_errSuccess, andPKCodecFactory_CreateFormatConverterinstalls it as the default (JXRGlue.c:448). So a same-format copy that reaches the converter throws where jxrlib succeeds. This is the gap I noted on #16704, #16731 and #16732, which this PR consolidates.