Skip to content

fix(color): define and verify temporal-dither accuracy under variable frame dwell #4500

Closed

Description

@zackees

Context

#4452 fixed #4156 R8's phase-correlated dropped submission case: a channel now advances its phase only when its driver accepts a frame. The remaining timing requirement in docs/color-pipeline-contracts.md is to evaluate dither accuracy using time-weighted emitted XYZ over a declared cadence and observation window, including irregular dwell. Current temporal dither (src/fl/channels/color_managed_source.cpp.hpp) advances through eight fixed thresholds once per accepted frame. A frame held twice as long contributes twice the light, so presentation-count balance alone does not establish the time-weighted mean. The tests describe gaps between attempts as “irregular dwell” but do not weight emitted output by actual hold duration.

Proposal

Define the supported presentation-timing contract for managed dither and validate it. If the desired claim includes variable dwell, make the dither allocator duration-aware or add a documented cadence requirement/fallback for drivers without duration feedback. Preserve the accepted-frame phase fix.

Acceptance criteria

  • Capture RED evidence with identical source/profile and eight accepted frames but unequal hold durations: show the time-weighted emitted XYZ differs from the intended mean. Implement the chosen timing behavior, then make its stated accuracy bound GREEN.
  • Cover regular cadence, variable dwell, dropped attempts, and a deliberately phase-correlated duration pattern. Compute light over elapsed time before perceptual error, using a declared observation window.
  • Specify the accuracy claim for drivers with actual presentation/hold timing versus unknown timing; use feat(channels): expose actual presentation timing for duration-aware dither #4517 for the optional timing capability and avoid advancing phase on a rejected frame.
  • Check throughput and state cost on representative channel types.

Decisions

Related issues

Activity

  1. moved this from Triage to Done in FastLED Trackeron Sep 23, 2026
  2. zackees commented on Sep 23, 2026

    @zackees
    MemberAuthor

    Fixing this is too costly in ramifications for the engine.If the user can't do frames fast enough then they should shut off to their

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