mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 18:59:04 +02:00
The VSH's UMD Video player reads what the ME writes beside each decoded picture, which games' mpeg.prx only passes through (pspautotests video/mpeg/avcdetail, recorded on a PSP): - Given a 0x540-byte buffer at ctx+0x38, as mpeg_vsh.prx provides in the modes the player uses, the ME points each picture descriptor's +0x24 and +0x28 at two 0xA4-byte records for it. The first is the picture's SEI record: cpb_removal_delay at +0x18, dpb_output_delay at +0x1C, the pic_struct at +0x20 (which the player picks a duration with), and flags of 7 for a keyframe and 2 otherwise. sceVideocodecGetSEI writes the record of the last access unit decoded to the buffer at ctx+0x50. - A descriptor's +0x20 is 1 for a keyframe. The player drops every picture after starting or seeking until it sees one. - The 0x64 bytes at ctx+0x30 carry the VUI timing (num_units_in_tick at 240000 ticks a second), which the player checks against 5005 for film. All of it comes from what ffmpeg's H.264 parser reports per access unit, which AvcDecoder now hands back with each picture. Each picture also goes into the next of the four frame stores, as the ME rotates through its own: the player converts a picture in strips spread over its next few frames, while decoding goes on. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>