fn nearest_index(q: u32, quantizer: impl Fn(i32) -> u32) -> u32
The quality index in 0..=51 whose quantizer is nearest q, the lowest on a tie.
0..=51
q