docs(adr): ADR-0137 forward-lookahead (cadence-aware) denoise — design + validated premise#35
Merged
Merged
Conversation
…e — design + validated premise The causal temporal denoise only helps the TRAILING frame of each held animation drawing (2s/3s cadence): denoising A1 finds A0 (prev, same drawing, averaged), but the LEADING frame A0 sees only the previous, different drawing (tcut breaks) → no temporal help. Half the frames of every held run are under-denoised. Premise validated before proposing the build (the fp16/subgroup/per-shot-CRF lesson — check first): on a synthetic 2s-cadence clip with per-frame noise the causal filter recovers +1.53 dB (32.89 → 34.42) vs the ~+3 dB that fully averaging the two held duplicates would give. The ~+1.5 dB gap is the leading-frame deficit — real headroom, and it is PREPROCESSING (Pelorus's proven lane), not another encoder-RC bet. Design (Proposed): a forward lookahead so the temporal walk is bidirectional — a 1-frame-delay buffered model (activate + EOF flush; the filter is currently causal with no latency/flush) + a next-frame shader tap, tcut-gated like the prev taps; cadence-awareness falls out of tcut (held duplicates are low-delta both ways). lookahead=0 stays bit-identical to today. Validation: the cadence recovery must approach +3 dB; output frame count == input; live-action no-regression. First positive direction after the v0.11–v0.13 encoder-RC negatives. Build pending. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ADR-0137 (Proposed): forward-lookahead (bidirectional) temporal denoise — cadence-aware. The design + the validated premise for the next preprocessing build. No code yet.
Why (premise checked before proposing — the fp16/subgroup/per-shot-CRF lesson)
The causal temporal denoise only helps the trailing frame of each held animation drawing (2s/3s cadence): denoising
A1findsA0(prev, same drawing → averaged), but the leading frameA0sees only the previous, different drawing (tcutbreaks) → no temporal help. Half the frames of every held run are under-denoised.Measured on a synthetic 2s-cadence clip with per-frame noise:
Fully averaging the two held duplicates would give ≈ +3 dB. The causal filter captures only ~half — the leading-frame gap. Real headroom, and it's preprocessing (Pelorus's proven lane) — not another encoder-RC bet.
Design
A forward lookahead so the temporal walk is bidirectional: a 1-frame-delay buffered model (
activate()+ EOF flush — the filter is currently causal with no latency/flush) + anext0_imagesshader tap,tcut-gated like the prev taps. Cadence-awareness falls out oftcut(held duplicates are low-delta in both directions).lookahead=0stays bit-identical to today.Validation plan: cadence recovery must approach +3 dB; output frame count == input (no drop/dup at EOF);
lookahead=0bit-identical; live-action no-regression. Kill-criterion stated in the ADR.Status
This is the first validated-positive direction after the v0.11–v0.13 encoder-RC negatives (fp16, perceptual-AQ, per-shot CRF). The build is a real frame-lifecycle restructure (causal → buffered), scoped + de-risked here — ready to implement next.
🤖 Generated with Claude Code