for (r = 0; r < tile_rows; ++r) {
for (c = 0; c < tile_cols; ++c, ++tc) {
- const int is_last = (r == tile_rows - 1) && (c == tile_cols - 1);
TileBufferDec *const buf = &tile_buffers[r][c];
hdr_offset = (tc && tc == first_tile_in_tg) ? hdr_size : 0;
}
first_tile_in_tg += tc == first_tile_in_tg ? pbi->tg_size : 0;
data += hdr_offset;
- get_tile_buffer(data_end, pbi->tile_size_bytes, is_last,
- &pbi->common.error, &data, pbi->decrypt_cb,
- pbi->decrypt_state, buf);
+ get_tile_buffer(data_end, pbi->tile_size_bytes, 0, &pbi->common.error,
+ &data, pbi->decrypt_cb, pbi->decrypt_state, buf);
}
}
#else
for (tile_col = 0; tile_col < tile_cols; tile_col++) {
TileBufferEnc *const buf = &tile_buffers[tile_row][tile_col];
const int is_last_col = (tile_col == tile_cols - 1);
- const int is_last_tile = is_last_col && is_last_row;
unsigned int tile_size;
const TOKENEXTRA *tok = tok_buffers[tile_row][tile_col];
const TOKENEXTRA *tok_end = tok + cpi->tok_count[tile_row][tile_col];
-
-#if CONFIG_TILE_GROUPS
+#if !CONFIG_TILE_GROUPS
+ const int is_last_tile = is_last_col && is_last_row;
+#else
const int tile_idx = tile_row * tile_cols + tile_col;
+ // All tiles in a tile group have a length
+ const int is_last_tile = 0;
if (tile_count >= tg_size) {
// Copy uncompressed header
memcpy(dst + total_size, dst, uncompressed_hdr_size * sizeof(uint8_t));