Skip to content

Commit

Permalink
Merge ec49541 into 7f7209e
Browse files Browse the repository at this point in the history
  • Loading branch information
tmatth committed Jul 3, 2019
2 parents 7f7209e + ec49541 commit da6fd5e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/header.rs
Expand Up @@ -851,11 +851,10 @@ impl<W: io::Write> UncompressedHeader for BitWriter<W, BigEndian> {
assert!(fi.cdef_bits < 4);
self.write(2, fi.cdef_bits)?; // cdef bits
for i in 0..(1 << fi.cdef_bits) {
let j = i << (3 - fi.cdef_bits);
assert!(fi.cdef_y_strengths[j] < 64);
assert!(fi.cdef_uv_strengths[j] < 64);
self.write(6, fi.cdef_y_strengths[j])?; // cdef y strength
self.write(6, fi.cdef_uv_strengths[j])?; // cdef uv strength
assert!(fi.cdef_y_strengths[i] < 64);
assert!(fi.cdef_uv_strengths[i] < 64);
self.write(6, fi.cdef_y_strengths[i])?; // cdef y strength
self.write(6, fi.cdef_uv_strengths[i])?; // cdef uv strength
}
}
Ok(())
Expand Down

0 comments on commit da6fd5e

Please sign in to comment.