Skip to main content

prescreen

Function prescreen 

Source
pub fn prescreen(
    x: &[f32],
    dims: &[usize],
    bound: ErrorBound,
) -> (Vec<Candidate>, Vec<Candidate>, usize)
Expand description

Which candidates the pre-screen keeps for a bound, before any full encode.

  • wavelet: always (coded with compact: the configured model, the hand model or the tiled hand model, whichever is smallest);
  • Tucker: PSNR/RMSE targets on ≥2D data;
  • interpolation: always (max-abs directly; RMSE/PSNR through its rate-controlled bound, about half a wavelet encode);
  • Lorenzo: always (one encode per prediction mode at max-abs, then rate control of one mode at RMSE/PSNR; cheaper than interpolation);
  • QTT residual-only: max-abs targets (a few % of a wavelet encode);
  • full QTT: only when qtt_probe (stride 2, ranks capped at QTT_PROBE_CAP) keeps every rank below the cap — the field is genuinely low-TT-rank, so QTT is both cheap and possibly smallest. At max-abs a probe rank ≤ 1 means the TT part was dropped (the residual stream alone won), which the residual-only candidate already covers.

Returns (kept, skipped, probe max rank).