Skip to content

Commit 56380b7

Browse files
authored
fix get_num_tiles() calculation in imhex patter file (#160)
The macroblock width and height is 16. So for an example file like tile_A.apv, where `tile_width_in_mbs` is 240 and `tile_height_in_mbs` is 135, for 3840 x 2160, there is only one tile. Signed-off-by: Brad Hards <[email protected]>
1 parent d6b0dfc commit 56380b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/apv.hexpat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ fn get_num_tiles (auto tile_w_mb, auto tile_h_mb, auto w, auto h) {
122122
u32 TileCols = 0;
123123
u32 TileRows = 0;
124124

125-
w_mb = (w + 7) >> 3;
126-
h_mb = (h + 7) >> 3;
125+
w_mb = (w + 15) >> 4;
126+
h_mb = (h + 15) >> 4;
127127

128128
TileCols = 0;
129129
startMb = 0;

0 commit comments

Comments
 (0)