diff --git a/include/dav1d/headers.rs b/include/dav1d/headers.rs index 245940a44..7d69d4947 100644 --- a/include/dav1d/headers.rs +++ b/include/dav1d/headers.rs @@ -2128,6 +2128,10 @@ impl Lossless { } pub fn from_array(a: [bool; RAV1D_MAX_SEGMENTS as usize]) -> Self { + // This could be further optimized quite a bit + // (https://stackoverflow.com/questions/8461126/how-to-create-a-byte-out-of-8-bool-values-and-vice-versa#answer-51750902), + // but since this is only called in `DRav1d` conversions and `mod obu`, + // neither of which are hot, the simpler, more readable code should suffice. let mut this = Self::empty(); let mut i = 0; while i < RAV1D_MAX_SEGMENTS {