4 ms·
I mass-replaced FFmpeg's MJPEG decoder with Claude Code – 4K LOC, 8% the speed
- istenesimi 7mo agoI gave Claude Code (Opus) 9 structured prompts and asked it to recreate FFmpeg's MJPEG decoder from scratch in pure C99. No dependencies. Results: 4,103 lines of C, 16 passing tests, SSIM 0.9789 vs FFmpeg output. Performance: ~8% of FFmpeg's speed at 1080p (11 FPS vs 134 FPS). The interesting part isn't that it's slower, it's that 2,403 lines of readable C99 got within an order of magnitude of 30 years of hand-tuned assembly. And the AAN fast IDCT optimization alone gave 85x speedup over the naive implementation. Repo: https://github.com/0xD8C4A475/liberated-mjpeg https://github.com/0xD8C4A475/liberated-mjpeg Built after discovering malus.sh, a satirical "Clean Room as a Service." We decided to actually try the robot recreation part.
- alpaca128 7mo ago> The interesting part isn't that it's slower — it's that Could you please use your own words to write things?