Files
moonwell-client-core/docs
Sam Sung b4f1eb723c Decode 1.12.1's intro movies: an AVI reader and an MPEG-4 decoder (#2391)
benilla could not decode 1.12.1's intro movies, the loose AVIs in `Interface/Cinematics`.

1.12.1 reads the AVI's `hdrl` and `idx1` (`0x78c360`). Index entries whose id's third letter is `d` are video, and `w` entries are audio. It hands the video to a DivX decoder (`0x78c7a0`), which refuses widths other than 1024 and 800.

This adds `benilla-movie`: that AVI reader, plus an MPEG-4 Part 2 decoder written from the published standard. It covers I and P frames, half-pel motion, AC/DC prediction, H.263 quantization and an IEEE 1180 IDCT. It decodes frames one at a time to YUV or RGBA, and returns the MP3 audio bytes. It has no codec dependency.

Tests: the tables, IDCT accuracy, the AVI reader and garbage input. Against the install, all four movies decode every frame. Compared with ffmpeg, the worst frame is 55 dB luma PSNR, and the intro decodes at about 24× realtime.

Part of #968

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 11:17:04 +07:00
..