Historical evidence, superseded guidance. This is the earlier article, preserved with its original workload, measurements and revision links. Its defaults, branch/deployment labels and recommendations are not current. Read the current recipe.

AVPlumber · Mixer optimization cookbook

DSK fades in one pass

Implementation links are pinned to develop at c20464a5 (2026-10-09). The mixer has changed since; this page was checked against develop at 8fa15c92 on 2026-10-13. Measurements retain their original workload and scope. Watch the current 192-input L4 demo.

Current scope. The single-pass alpha fade remains in the keyer. Its scope is DSK fades; it does not qualify wipe-clip preload or transition timing.

A downstream key fades by weighting its own alpha in the existing single keyer pass, so the mixer needs no second compositor and frames without a fade run exactly the old kernel code.

Status: Implemented

The idea

Downstream keys are up to 4 alpha browser pages drawn over the finished program. The clean feed stays unkeyed. Until now a key could only cut. An M/E fade needs two compositors (A/B) because it mixes two full frames. A key fade mixes nothing new: it only scales one layer's coverage. That fits in the one pass the keyer already runs.

The program and up to four keys, each with its own level, go through one keyer pass. The host picks the opacity kernel entry only while some key is below full opacity. The clean feed bypasses the keyer. key A level 1.0 · on key B level 0.4 · fading key C level 0 · off up to 4 keys Program from the M/E Keyer · ONE composite pass host: any key level < 1 ? yes → composite_planes_opacity no → old entries, byte-identical Keyed program dirty feed Clean feed no keys clean feed bypasses the keyer
Each key carries a level from 0 to 1. Key C is off, so it adds no layer. The level rides in the spare float (mul) of each 128-byte layer table entry the kernel already reads. The table keeps its size.
Level over program frames: a key fades in, is switched off mid-fade, and fades out from the level it reached. It is drawn until the level is 0. Right: the four curve shapes. 1 0.5 0 key level no reversal on off, mid-fade turns around from here key drawn (level above 0) level 0: no longer drawn program frames (model: linear curve, 12-frame fade) curves (shared with M/E) linear default, as before ease-in t² ease-out 1−(1−t)² ease-in-out smoothstep
An illustration, not a measurement. The level is computed per program frame from the program PTS with the M/E fade's rule, clip((t−start)/dur), then shaped by the curve. The fade starts on the next program frame after the command. A reversal keeps the same pace, so it covers only the distance left. A fade settles on its target on the first frame within 1 ms of its end, so millisecond-rounded timestamps (at 60 fps) do not add a frame.

At a glance

Where in the code

Source links identify the reviewed code, independently of deployment state. The kernel was verified on the T4 test host.