Commit Graph
22 Commits
Author SHA1 Message Date
Dean 1a55d7e89b Merge pull request #9764 from hypermoist/feat/opus-dec-ctl
feat(opusdec): implement sceOpusDecCtl and sceOpusCeltDecCtl
2026-11-02 20:58:25 +13:00
Kyon b1b2e65078 docs(libSceOpusDec): distinguish export evidence 2026-10-30 21:25:21 +00:00
Kyon 6b5baf640f feat(libSceOpusDec): declare 1 callable exports 2026-10-30 21:02:36 +00:00
hypermoistandClaude Opus 5.5 8f2335b92f fix(libSceOpusDec): clear request 4050 on reset and keep the timeout entry's source
The firmware 13.42 module writes 0 to the 4050 flag on reset, so reset
clears it again. Restore main's wording of the
sceOpusDecDecodeWithPriorityAndTimeout debt entry, which names the
module it was read from.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 03:24:00 +13:00
hypermoistandClaude Opus 5.5 f8018a0686 feat(libSceOpusDec): store request 4050 and answer request -1 before a decode
Match the firmware 13.42 modules run natively with AJM stubbed: setting
4050 to 1 is stored and read back through 4051 and survives reset, and
request -1 with two valid pointers writes 0 to both on a state that has
not decoded. Decoding with 4050 set, and request -1 after a decode, still
throw because their behaviour is not measured.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 02:14:06 +13:00
hypermoistandClaude Opus 5.5 5b2a101e36 Merge remote-tracking branch 'upstream/main' into feat/opus-dec-ctl
Resolution: kept main's merged float/priority/timeout variants and this PR's Ctl implementation, declarations and debt entries; reworded one debt line to state behaviour only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 00:17:21 +13:00
hypermoist 168ce62b20 test(libSceOpusDec): stop asserting that unsupported control requests throw
Remove the RequireThrows assertions in GuestOpusDecCtl.cpp for request -1
and setting 4050 to 1. State the gap in the debt entry without citing a
source.

Assisted-by: Antigravity:gemini-3.8-flash-medium
2026-10-25 20:49:15 +13:00
hypermistandClaude Opus 5.5 2f69cc6c24 Merge remote-tracking branch 'upstream/main' into feat/opus-dec-float-priority
Clean merge; no conflicts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 12:06:39 +13:00
hypermistandClaude Opus 5.5 3e2b46d886 docs(libSceOpusDec): cite firmware 13.60, not 12.00, for the decrypted modules
The firmware version comes from the SDK 0x13600007 recorded in each module's module-param segment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013XFS3FUfBtqCVfwmBrRQ6q
2026-10-24 01:04:59 +13:00
hypermistandClaude Opus 5.5 64b8995710 docs(libSceOpusDec): cite firmware 13.60, not 12.00, for the decrypted modules
The firmware version comes from the SDK 0x13600007 recorded in each module's module-param segment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013XFS3FUfBtqCVfwmBrRQ6q
2026-10-24 01:04:35 +13:00
hypermistandClaude Opus 5.5 aff42e2c4b fix(opus): throw for finite decode timeouts
The host decodes synchronously, so only the infinite timeout that
sceOpusDecDecode itself passes can be honoured. Other timeouts still
return the argument errors and then report the path as unimplemented,
because on the console the result depends on whether the AJM batch
finishes within the timeout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SNqSvnFwRBz3D76n476yw6
2026-10-23 13:49:28 +13:00
p3nicillin 721a2e4b73 fix(opus): decode at the requested rate with bundled libopus 2026-10-22 23:09:24 +01:00
hypermistandClaude Opus 5.5 6d1498b3e6 feat(opusdec): implement sceOpusDecCtl and sceOpusCeltDecCtl
Handles reset, sample rate, final range, gain, phase inversion and, for OpusDec, inband FEC and request 4050/4051 with the module's error codes, applying gain and phase inversion to libopus.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SNqSvnFwRBz3D76n476yw6
2026-10-23 02:25:07 +13:00
hypermistandClaude Opus 5.5 ee744b34ad Merge upstream/main into the libopus decoder branch
Keeps main's recovered decode argument errors (+0, +6 to +9, unknown
state +1) on top of the libopus backend, and drops the FFmpeg packet
size bound, which no longer applies. The debt entries keep main's
recovered facts with the backend named as libopus; the two FFmpeg delay
entries go, since libopus decodes at the requested rate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SNqSvnFwRBz3D76n476yw6
2026-10-23 02:16:48 +13:00
hypermistandClaude Opus 5.5 b5ea1d2347 docs(opus): keep the timeout entry beside the remaining unknown exports
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SNqSvnFwRBz3D76n476yw6
2026-10-23 01:40:46 +13:00
hypermistandClaude Opus 5.5 665f2f7f12 feat(opus): decode to float and with a priority in libSceOpusDec and libSceOpusCeltDec
Both modules route every decode export through one worker. Its checks
run in this order: state, packet, size, PCM pointer, capacity, then a
priority outside 20..100 (+0xA), then the state check (+1). Decode passes
priority 40.

The float exports decode 16-bit PCM into capacity / 4 * 2 bytes of the
caller's buffer and widen each sample in place, dividing positive
samples by 32767 and the rest by 32768. They return the float byte count.

The OpusDec *AndTimeout exports take a timeout for the AJM batch wait and
a pointer that receives the batch ID only when that wait fails. The host
decode is synchronous, so neither is used; the debt entry records this.

Read from libSceOpusDec.sprx and libSceOpusCeltDec.sprx, firmware 12.00,
not measured on a console.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SNqSvnFwRBz3D76n476yw6
2026-10-23 01:40:46 +13:00
boykopovar d109d51f43 fix(opus): restore decoder validation errors and precedence 2026-10-21 21:54:18 +03:00
p3nicillin 66de92a2ab fix(opus): decode at the requested rate with bundled libopus 2026-10-20 23:59:59 +01:00
juanpimg 2f0ed638dc feat(prx): declare the missing PS5 3.20 system exports
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
2026-10-19 23:16:55 +02:00
snipeTRandClaude Opus 5.5 5b697f8c47 feat(opus): decode at 8, 12, 16 and 24 kHz
Accept every creation rate listed by the public decoder research in
libSceOpusDec and libSceOpusCeltDec, resampling FFmpeg's 48 kHz output.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 00:06:48 +03:00
RickandClaude Opus 5.5 fb41f1082b fix(libSceOpusDec): decode narrowband SILK packets
FFmpeg resamples narrowband SILK (TOC configurations 0-3) from 8 kHz and
holds back 24 samples of the first narrowband packet after the decoder
starts or after a packet of another bandwidth: a 20 ms packet decodes to
936 samples and the next wider packet to 984. sceOpusDecDecode required
exactly the packet's duration and threw, so ProsperoRadio aborted on a
narrowband Opus station.

The decoder now keeps FFmpeg's output in a queue and returns exactly the
packet's duration, as libopus does: the first narrowband packet starts
with 24 samples of silence and the held-back samples follow in the next
calls. The new test decodes three libopus 6 kb/s narrowband packets and
a wideband packet after them; it aborts on main.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-13 16:44:19 +02:00
Adrià FranchandClaude 342a8c4590 docs(debt): move library entries to one file per library
Co-Authored-By: Claude <[email protected]>
2026-10-12 20:38:29 +02:00