Files
ppsspp/Core/HLE
Henrik RydgårdandClaude Opus 5.5 8d2fbf7079 sceVideocodec: Hand pictures back when the PSP's decoder does
The PSP's AVC decoder follows the H.264 output process (Annex C),
measured in the new pspautotests video/mp4/avchold on streams that
differ only in their headers, and video/mpeg/decodeend. With HRD
parameters and picture timing SEI, a picture comes out dpb_output_delay
after its access unit; Sony's movies have a one frame delay. Without, it
is bumped out of a buffer three frames deep, whatever the stream
declares. sceMpegAvcDecodeStop hands back what's left, and streams with
more than three reference frames are refused with 0x80628002.

We handed each picture back as soon as it was decoded. MGS Peace
Walker's movie player only checks for the end of a movie while its
clock is short of the movie's length, so its last picture landed right
on that limit and the game hung on a black screen after the cutscene.

ffmpeg still decodes the pixels, in display order; each access unit is
tagged with its index so frames can be matched back, and ffmpeg's H.264
parser supplies the picture timing. A call can now hand back several
pictures, as consecutive 0x2C byte descriptors the way mpeg.prx's
sceMpegAvcDecodeStop reads them, each in a frame buffer slot of its own
(reallocated when a savestate brings a block too small for that).

Not followed: with B-frames and no picture timing, the PSP can complete
several pictures in one call; here they come out one a call. All of
the game movies checked have picture timing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-18 11:25:55 +02:00
..
2026-08-11 10:28:36 +02:00
2025-08-06 17:44:54 +02:00
…
…
…
…
…
2026-10-06 04:59:56 +08:00
…
…
…
…
…
2026-08-11 10:28:36 +02:00
…
2026-08-11 10:28:47 +02:00
2026-08-11 10:28:47 +02:00
2026-08-24 09:30:44 +02:00
…
…
2026-08-11 20:14:01 +02:00
…
…