runtime: optimize MDEC FMV hot paths

Reconstruct the shareable pieces from PR #58 onto current master: add contiguous MDEC DMA input bursts, reduce per-pixel/per-byte MDEC output overhead, add sparse IDCT fast paths, and keep the MDEC activity stamp sane across rematches.

Also quiet the heavy debug trace recorders while MDEC video is active so debug builds can query state without starving FMV playback.

Regression testing was done with non-debug OpenGL builds across multiple FMV-heavy titles. Debug-tool FMV playback was also exercised with the quiet gate enabled.

Co-authored-by: Alex Vanderveen <alex@technicallycomputers.ca>

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Matthew Stanley
2026-07-21 14:29:38 -07:00
parent a66c50c656
commit e4e27f02b5
6 changed files with 218 additions and 36 deletions
+6
View File
@@ -91,6 +91,12 @@ void debug_server_get_status(int *listening, int *port, int *error);
* Call once per vblank. */
void debug_server_poll(void);
/* FMV quiet mode suppresses high-frequency trace rings while MDEC video is
* active. The TCP command pump stays live; expensive per-dispatch/per-frame
* recording backs off so debug builds can still play FMVs at speed. */
void debug_server_set_fmv_quiet(int quiet);
int debug_server_fmv_quiet(void);
/* TCP serve-stall telemetry: cumulative main-thread ms spent inside
* bounded TCP sends, and clients dropped for exceeding the send budget.
* Surfaced in the freeze heartbeat / wedge dumps so a TCP-throttled run