Skip to content

feat(mp3): implement fixed-point minimp3 with Helix parity #4054

Closed

Description

@zackees

Context

Phase 3 / G3 of FastLED/license#14 and the clean-room conversion designed in FastLED/license#13. The required result is a CC0 fixed-point minimp3 path with measured Helix parity, not a source translation from RPSL Helix.

Proposal

Convert minimp3 stage-by-stage under the Phase 0 golden harness and Phase 1/2 audit rigs: synthesis, IMDCT/antialias, Huffman/dequant/scalefactors, stereo, and end-to-end guard-bit tracking. Commit generators for all ISO-derived tables and retain MINIMP3_ONLY_MP3 for v1.

Acceptance criteria

  • Capture RED evidence: fixed-vs-float golden tests fail because MINIMP3_FIXED_POINT is absent.
  • Add fixed-vs-float gates for every corpus file: PSNR at least 90 dB, max difference at most 8 LSB, and at least 55 dB signal-relative quality for -60 dBFS content.
  • Add per-stage dump comparison and ASan/UBSan differential fuzzing with matching accept/reject, frame consumption, and bounded PCM differences.
  • Implement synthesis, IMDCT/antialias, Huffman/dequant/scalefactors, stereo, and guard-bit tracking without copying Helix code, literals, comments, or coefficients.
  • Commit generators for every ISO-formula-derived table and document clean-room provenance.
  • For every converted stage, keep golden tests green and itemize memory/op-ledger deltas.
  • Achieve multiplies/frame no more than 1.1x Helix, working RAM no more than 24 KiB, stack no more than 2 KiB, and target inner-loop counts no more than 1.2x Helix on all four audited ISAs.
  • Validate proxy accuracy with on-target ESP32 and RP2040 cycles/frame spot checks.
  • Turn the focused RED signal GREEN, pass broader checks, and merge a PR that closes this issue and links Execution plan: vendor minimp3, optimize to Helix parity, SIMD past Helix, delete libhelix_mp3 (phased, gated) license#14.

Decisions

  • Helix is an ideas-only clean-room reference; all implementation expression remains CC0-compatible.
  • Stage boundaries stay measurable throughout conversion; no big-bang replacement.
  • This issue depends on the Phase 1 and Phase 2 ledgers and owns G3 only.

Related issues

Activity

  1. zackees commented on Aug 31, 2026

    @zackees
    MemberAuthor

    Acceptance bar set by repo owner (2026-08-31): unit tests and perf tests passing.

    An earlier revision of this comment said the perf criteria were relaxed to informational. That is withdrawn — perf tests gate too. MP3 being a low-traffic codec changes which perf evidence is required, not whether perf is enforced.

    For this issue that means:

    • Blocking — implemented for real: the fixed-point path (MINIMP3_FIXED_POINT), fixed-vs-float golden gates over the corpus, per-stage comparison, and ASan/UBSan-clean differential fuzzing. Fixed-point stays a hard blocker for chore(mp3): make minimp3 sole backend and remove libhelix #4056.
    • Blocking — perf: the repo's automated perf gates must be green with a minimp3-fixed row added: ci/codec_memory/audit.py (working RAM <= 24 KiB, stack <= 2 KiB, 2% ledger regression gate) and ci/codec_cpu/audit.py (operation ledger + 5% host trend gate + target codegen ledger across the four audited ISAs).
    • Out of scope as a test: the on-target ESP32/RP2040 cycles/frame spot checks — those need attached hardware and are not automated tests. Numbers get recorded in the ledger if hardware is available; they do not gate the merge.

    Refs FastLED/license#14.

  2. moved this from Triage to Done in FastLED Trackeron Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions