An attempt at an MPEG-2 Part 3 decoder in Rust.
This is a toy project, use at your own risk!
- Find a simple reference implementation
- It should be in C and contain as few as possible assembly and no threading
- It should have a compatible license
- It should have a test suite
- It should be simple to read and port (no assembly, no complex SIMD)
- Compile the reference implementation as submodule with Cargo
- Make the reference implementation callable from Rust (C2Rust?)
- Reimplement each component and compare with reference implementation
Layer I being so simple, a reference implementation may not be needed.
- Learn Rust
- Learn MP3 file format
- Learn audio signal processing
- Use safe Rust as much as possible
- No explicit panic
- Dump MPEG-2 structure
- Dump MPEG-2 packets
- Output PCM
- 100% test coverage
- Compare struct dump to reference
- Compare packets dump to reference
- PCM output is identical to reference excluding rounding errors
- Stretch: Assembly generated never calls
panic!
Reference should be generatable from fmprobe
and ffmpeg
.
Implementation | SIMD | Layer | License | ISO | Note |
---|---|---|---|---|---|
Jon Olick's | [ ] | I | Public | [?] | archive |
PDMP2 | [ ] | II | Zlib | [?] | |
mp3-decoder | [ ] | III | GPL | [ ] | |
minimp3 | [X] | All | CC0 | [X] | |
libmad | [X] | All | GPL | [X] | |
PDMP3 | [ ] | All? | CC0 | [?] | |
[?] | II | LGPL | [X] | Encoder only |