fn adaptive_filter( f: impl Fn(&[u8]) -> u64, bpp: usize, len: usize, previous: &[u8], current: &[u8], output: &mut [u8], ) -> RowFilter