Skip to main content

fastest_decode_gpu

Function fastest_decode_gpu 

Source
pub fn fastest_decode_gpu(
    codec_name: &str,
    info: &StreamInfo,
    input: &Bytes,
    candidates: &[u32],
    measure_frames: usize,
) -> Option<u32>
Expand description

Benchmark each candidate GPU by decoding a short prefix of input on it and return the fastest gpu_index (what --decode-with-fastest pins the pump to). Construction + first-frame latency is excluded — the clock starts after a small warmup — so the number reflects steady-state decode throughput, not driver init. Candidates that fail to construct or decode are skipped; returns None if no candidate produced frames or fewer than two candidates were given (nothing to choose).