Skip to content

docs(adr): ADR-0137 forward-lookahead (cadence-aware) denoise — design + validated premise#35

Merged
lusoris merged 1 commit into
masterfrom
docs/denoise-cadence-design
Jun 20, 2026
Merged

docs(adr): ADR-0137 forward-lookahead (cadence-aware) denoise — design + validated premise#35
lusoris merged 1 commit into
masterfrom
docs/denoise-cadence-design

Conversation

@lusoris

@lusoris lusoris commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

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 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.

Measured on a synthetic 2s-cadence clip with per-frame noise:

PSNR vs clean
noisy (baseline) 32.89 dB
causal denoise 34.42 dB (+1.53 dB)

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) + a next0_images shader tap, tcut-gated like the prev taps. Cadence-awareness falls out of tcut (held duplicates are low-delta in both directions). lookahead=0 stays bit-identical to today.

Validation plan: cadence recovery must approach +3 dB; output frame count == input (no drop/dup at EOF); lookahead=0 bit-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

…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>
@lusoris
lusoris merged commit f638dda into master Jun 20, 2026
3 checks passed
@lusoris
lusoris deleted the docs/denoise-cadence-design branch June 20, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant