Commit a1cdb534 authored by Pavel Frolov's avatar Pavel Frolov
Browse files

Fix get_tile_size()


Change-Id: I24d9487f13809e92239467403bae0c6c9fcb4c39
parent 2408c22d
......@@ -226,8 +226,9 @@ int get_tile_size(int mi_frame_size, int log2_tile_num, int *ntiles) {
// the max superblock size. To do this, shift right (and round up) to get the
// tile size in max super-blocks and then shift left again to convert it to
// mi units.
const int shift = log2_tile_num + MAX_MIB_SIZE_LOG2;
const int max_sb_tile_size =
ROUND_POWER_OF_TWO(mi_frame_size, log2_tile_num + MAX_MIB_SIZE_LOG2);
ALIGN_POWER_OF_TWO(mi_frame_size, shift) >> shift;
const int mi_tile_size = max_sb_tile_size << MAX_MIB_SIZE_LOG2;
// The actual number of tiles is the ceiling of the frame size in mi units
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment