Skip to content

Commit 5102093

Browse files
rom1vlu-zero
authored andcommitted
Fix tile rows count in bitstream
The number of ones to write the number of tile _rows_ in the bitstream was incorrectly computed from the minimum tile _columns_. The bug remained undetected because unless the video is larger than MAX_TILE_WIDTH or bigger than MAX_TILE_AREA: min_tile_rows_log2 = min_tile_cols_log2 = 0
1 parent a38059c commit 5102093

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/header.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ impl<W: io::Write> UncompressedHeader for BitWriter<W, BigEndian> {
630630
self.write_bit(false);
631631
}
632632

633-
let rows_ones = ti.tile_rows_log2 - ti.min_tile_cols_log2;
633+
let rows_ones = ti.tile_rows_log2 - ti.min_tile_rows_log2;
634634
for _ in 0..rows_ones {
635635
self.write_bit(true);
636636
}

0 commit comments

Comments
 (0)