Skip to content

feat(power): complete the shared managed-channel power prepass and frame bound #4499

Closed

Description

@zackees

Context

The R3/R4 power defects measured in #4344 and #4342 have received useful fixes: controller_unscaled_power_mW() now evaluates solved drives on the large-memory tier, and controller_dither_reserve_mW() charges an upward reserve. Those issues are closed. The full contract in docs/color-pipeline-contracts.md still calls for a stable two-pass evaluation across all channels, one wide shared scalar, response/current-field/quantization-aware demand, and a bound on each latched frame. CFastLED::show() still calls an eight-bit mPPowerFunc before controller traversal; calculate_max_brightness_for_power_mW() estimates each controller independently at full scale and maps total demand to a u8 brightness. On smaller tiers the estimator explicitly falls back to source RGB, and TINY omits the reserve. Thus the current fixes do not prove the full managed electrical contract.

Proposal

Implement or explicitly scope a shared managed power prepass that observes stable source/profile snapshots, solves the same emitter contributions the encoder will use, accounts for response inversion and native current/brightness fields, then supplies one wide scalar to encoding without moving dither state. Aggregate managed and legacy channels on the same budget. Specify what can be guaranteed on smaller tiers and below unavoidable idle power; report infeasible budgets.

Acceptance criteria

  • Capture focused RED evidence for a mixed legacy/managed multi-channel frame where a source-based or full-scale-linear estimate misses final encoded demand; implement, then make it GREEN. Include dim emitters, nonlinear response (once feat(color): apply per-emitter response LUTs after flux scaling #4497 lands), managed RGBW/RGBWW after feat(color): connect profiled RGBW/RGBWW emitters to managed output #4515 supplies physical white-emitter output and electrical terms (do not count the current legacy fallback as managed coverage), and channel-order invariance.
  • Compare the model against the final encoded frame for every dither phase and current-field choice, with stated rounding allowance. Verify one shared limit, sub-eight-bit headroom, and no dither advancement during prepass.
  • Test source/profile mutation or rebind across a frame boundary and document stable-input/lifetime requirements. Benchmark prepass plus encode throughput on representative tiers.
  • Retain byte-identical unbound output and zero-link footprint when unused. If a tier cannot meet the same bound, expose that limit in its API/docs instead of silently claiming a frame bound.

Decisions

Related issues

Activity

  1. zackees commented on Sep 23, 2026

    @zackees
    MemberAuthor

    Completed in merged PR #4542. Focused regression tests cover mixed legacy/managed RGB/RGBW/RGBWW final encoded-frame demand, all wide temporal-dither phases, native field choices, channel order, source mutation/rebind, below-idle infeasibility, and byte-identical unbound output. CI passed 24/24 checks. ESP32-S3 unbound Blink is 383,134 B versus master 383,139 B with identical 40,819 B RAM; the baseline was not raised. Host and capture-only ESP32-C6 prepass+encode throughput are recorded on the PR. Hardware photometric accuracy remains P10 #4044, not claimed here.

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