- Global codebook related fixes

- Minor fix to basisu_frontend::optimize_selector_codebook() so the new_selector_cluster_indices array is initialized correctly. (The backend doesn't use this array so no harm was being done.)
This commit is contained in:
Rich Geldreich
2021-03-31 00:01:52 -04:00
parent bf13257528
commit 041ad47c27
7 changed files with 74 additions and 29 deletions

View File

@@ -7949,9 +7949,7 @@ namespace basist
}
approx_move_to_front selector_history_buf(m_selector_history_buf_size);
const uint32_t SELECTOR_HISTORY_BUF_FIRST_SYMBOL_INDEX = (uint32_t)m_local_selectors.size();
const uint32_t SELECTOR_HISTORY_BUF_RLE_SYMBOL_INDEX = m_selector_history_buf_size + SELECTOR_HISTORY_BUF_FIRST_SYMBOL_INDEX;
uint32_t cur_selector_rle_count = 0;
decoder_etc_block block;
@@ -7991,6 +7989,9 @@ namespace basist
return false;
}
const uint32_t SELECTOR_HISTORY_BUF_FIRST_SYMBOL_INDEX = (uint32_t)selectors.size();
const uint32_t SELECTOR_HISTORY_BUF_RLE_SYMBOL_INDEX = m_selector_history_buf_size + SELECTOR_HISTORY_BUF_FIRST_SYMBOL_INDEX;
for (uint32_t block_y = 0; block_y < num_blocks_y; block_y++)
{
const uint32_t cur_block_endpoint_pred_array = block_y & 1;