Skip to main content

window_indices

Function window_indices 

Source
pub fn window_indices(
    n: usize,
    behind: usize,
    ahead: usize,
    last_frame: usize,
) -> Vec<usize>
Expand description

The behind + 1 + ahead source frame indices for the window around output frame n, behind older and ahead newer, clamped so nothing runs off either end of a clip whose last valid index is last_frame.

behind and ahead come from the denoiser’s own av_denoise_core::PlanarDenoiser::window_span, so this stays correct for whichever algorithm the denoiser is running rather than assuming every algorithm needs the same symmetric window.

Frame requests and window builds both call this, so the two always agree on which frames a window at n pulls in.