Skip to content

Colour pipeline: float-free bind-time derivation (route to buildRgbSolveMatrixFromQ16; Q16 profile storage) #4458

Closed

Description

@zackees

What's left of P9 (#4043)

The per-pixel colour pipeline is fixed point end to end. #4315 measured it reaching no float runtime, and #4454 records the budgets. What still uses float is the bind-time derivation, which runs once per profile:

Why it's separate

  • It is cross-cutting with P2's public profile type, which the legacy RGBW stack also consumes. The route to the float-free path is an API decision under the Public Settings Pattern.
  • It does not affect P9's TINY-tier criterion. On TINY the whole pipeline is compiled out, and attiny85/uno Blink link no float runtime (docs(color): record the pipeline's flash/RAM/throughput budgets (P9) #4454).
  • On the tiers where the pipeline exists, bind-time float is soft-float code linked once per sketch that binds a profile, not per pixel.

Done when

A sketch that binds a profile links no float runtime, verified by the same symbol inspection #4454 uses.

Part of #4034; split out of #4043.

Activity

  1. zackees commented on Sep 19, 2026

    @zackees
    MemberAuthor

    Measured: binding a profile adds no float runtime on the ESP32-C6, so the real target is narrower

    examples/ColorProfile built for esp32c6 (RISC-V, no FPU) with and without the binding: both link the same 39 soft-float helpers (__addsf3, __mulsf3, __divsf3, __fixsfsi, …). The ESP32 platform and the Channels API already pull them in, so the colour pipeline adds none.

    So "a sketch that binds a profile links no float runtime" is not achievable by any change to the pipeline on this target. The meaningful version of this issue is that the pipeline's own bind-time code reaches no float helper, which is the TU-level reachability #4315 measured (buildStreamingPipelineQ16 → 33 helpers). That matters on a float-free build of a smaller part, not on an ESP32.

    What it takes, for whoever picks it up:

    1. Q16 profile inputs. Chromaticity, SourceProfile and EmitterProfile store float. A Q16 mirror computed in their constexpr constructors makes named and generated profiles free at runtime. It also grows every instance, and the legacy RGBW stack shares the type (P2).
    2. Q16 builders. buildSourceMatrixQ16, buildBradfordMatrixQ16 and the gamut map's buildRgbSolveMatrixQ16 would route to buildRgbSolveMatrixFromQ16 (feat(gfx): float-free s16.16 3x3 inverse, the first half of P9 item 2 (#4043) #4305/feat(gfx): build the emitter matrix without floats, completing P9 item 2's derivation #4312), plus the white-allocation build. Each needs checking against the P5 golden corpus.

    Leaving this open as a design decision (1 is a public-type change); nothing here blocks P1–P9.

  2. moved this from Triage to Done in FastLED Trackeron Sep 19, 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