mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 00:22:57 -05:00
AnyPS5 resolves a title's imports by NID, so a title that imports a system function no library provides fails to load with an unresolved import. The PS5 3.20 export inventory lists 193 such exports across 37 PS5 system libraries AnyPS5 implements but does not provide. Declare them as throwing stubs so those titles load and reach their next blocker. Each declaration calls NotImplemented_nid_no_patch and returns 0; none of them implements the function. Declarations with a credible prototype use it and cite the source with a pinned commit, and the rest are declared without parameters, which resolves the import without making an ABI claim. The technical-debt files record the limitation per library. libSceMbus and libSceSystemService are left out because pull request #7821 declares them. libSceAgc is left out because its exports are versioned, so the 3.20 NID names a different symbol from the one AnyPS5 ships. libSceAvPlayer.native is left out because it compiles libSceAvPlayer's Export.cpp. Names and NIDs come from the PS5 3.20 export inventory at https://github.com/DNNDHH/PS5-3.20_Libs/tree/b2a77c09cd71c01f34c790cfbe98c751a13262ad
2.6 KiB
2.6 KiB
libSceOpusDec technical debt
Unknown function info
- sceOpusDecCancel, sceOpusDecCreate, sceOpusDecCtl, sceOpusDecDecodeFloat, sceOpusDecDecodeFloatWithPriority, sceOpusDecDecodeFloatWithPriorityAndTimeout, sceOpusDecDecodeWithPriority and sceOpusDecDecodeWithPriorityAndTimeout (libSceOpusDec) - names and NIDs are present in the PS5 3.20 export inventory, but no credible prototypes were found. They are declared without parameters solely to resolve known imports; this is not an ABI claim.
Functional
- libSceOpusDec uses FFmpeg for mono/stereo signed-16 decoding at the creation rates the research lists: 8000, 12000, 16000, 24000 and 48000 Hz. The six signatures, 640-byte opaque state allocation and byte-count return follow public PS5 decoder research and ProsperoRadio. Console PCM equivalence and error codes are unverified. Other sample rates, packet loss concealment, invalid inputs and termination with live decoders throw. Context identifiers and host decoder state are private registries; the firmware's opaque state layout and error recovery are unknown.
- sceOpusDecDecode (libSceOpusDec) returns exactly the packet's duration, as libopus does. FFmpeg resamples narrowband SILK from 8 kHz and holds back 24 samples of the first narrowband packet after the decoder starts or after a packet of another bandwidth, releasing them with the next packet that is not narrowband. The decoder keeps FFmpeg's output in order and pads the start with silence, so such a packet begins with 24 samples (0.5 ms) of silence and the output after it is 24 samples late; libopus has no such gap
- sceOpusDecDecode (libSceOpusDec, libSceOpusCeltDec) decodes at 48000 Hz and converts to a lower creation rate with FFmpeg's resampler, where libopus decodes at that rate directly. The resampler's filter delay is padded with silence at the start of the stream like the narrowband delay above, so the output is late by that delay and is not sample-identical to libopus; which of the two the console matches is not measured