feat(libSceJxr): implement PKImageDecode query and metadata exports #15684
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15684"
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 ashwin280802 on 2026-11-04T04:33:24Z.
What
Implements the libSceJxr
PKImageDecodequery and lifetime exports (Initialize,GetPixelFormat,GetSize,GetResolution,GetFrameCount,GetColorContext,GetDescriptiveMetadata,Release) on jxrlib's ownPKImageDecode, throughsrc/NativeGlue.c, following JXRGlue.c L799-L905. The six getters call the jxrlib functions directly.InitializeandReleaseare line-for-line copies of the jxrlib bodies inNativeGlue.c, so that the guestGetPosandClosecallbacks can be called with the guest ABI.Deliberate divergences from jxrlib: a null decoder, null output, null
Releaseargument, a stream withoutGetPos, and an owned stream that is missing or has noClosethrowstd::invalid_argument, where jxrlib would dereference them.Initializesets 96 DPI, one frame andGUID_PKPixelFormatDontCare, and leaves the metadata block alone whenGetPosfails, as jxrlib does.GetColorContextandGetDescriptiveMetadatareturnWMP_errNotYetImplementedfor every input, as jxrlib never reads their arguments. The console's decoder layout is unverified; seedocs/dev/debt/libSceJxr.md.Open PRs touching the same libSceJxr files: #16402, #16403, #16404, #16405, #16406 and #16408 overlap in
Export.cpp,Api.hppand the debt file, and some also inGuestJxr.cpp,GlueHelpers.cpp,NativeGlue.candCMakeLists.txt. None of them implements these eight exports (I read #16403, which implementsPKImageDecode_Createand installs callbacks to the same jxrlib functions while its exports stay stubs; the others I judged from their titles). The overlap check could not compare these 35 PRs against the base: #7645, #14212, #15148, #15232, #15626, #15645, #15646, #15689, #15771, #15772, #15774, #16225, #16227, #16228, #16229, #16230, #16232, #16233, #16273, #16275, #16276, #16277, #16278, #16279, #16282, #16297, #16298, #16299, #16300, #16402, #16403, #16404, #16405, #16406, #16408. #16403 adds a similar set of native decode helpers under other names, so whichever of the two merges second has to reconcile them. Shared insertions need reconciling in merge order.Tested
Windows 11, MinGW-w64 GCC 15.2.0, commit a0827f1c62.
I changed 13 conditions one at a time and the test failed on all 13.
Not covered by a test: nothing (0 survivors).
The full Linux suite also ran on the same code before the last rebase onto
main, and everyguest_jxrtest passed; it was not re-run on the rebased commit.Not verified: AddressSanitizer, any title or console behaviour.
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)🤖 Generated with Claude Code