[lfnst] Fix error in scan table selection.

This commit is contained in:
siivonek 2022-05-10 10:38:26 +03:00 committed by Joose Sainio
parent 1c5f7f9dfc
commit 64c5cfb127
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@
#if LCU_WIDTH!=64
#error "LCU_WIDTH!=64"
#endif
// 4 8 16 32 64
const int8_t uvg_g_convert_to_bit[LCU_WIDTH + 1] = {-1, -1, -1, -1, 0, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4};
const uint32_t uvg_g_log2_sbb_size[7 + 1][7 + 1][2] =

View file

@ -285,7 +285,7 @@ void kvz_fwd_lfnst(const cu_info_t* const cur_cu,
const uint32_t log2_block_size = kvz_g_convert_to_bit[width] + 2;
assert(log2_block_size != -1 && "LFNST: invalid block width.");
const bool whge3 = width >= 8 && height >= 8;
const uint32_t* scan = whge3 ? kvz_coef_top_left_diag_scan_8x8[log2_block_size - 1] : kvz_g_sig_last_scan[SCAN_DIAG][log2_block_size - 1];
const uint32_t* scan = whge3 ? kvz_coef_top_left_diag_scan_8x8[log2_block_size] : kvz_g_sig_last_scan[SCAN_DIAG][log2_block_size - 1];
if (is_cclm_mode) {
intra_mode = cur_cu->intra.mode;
@ -415,7 +415,7 @@ void kvz_inv_lfnst(const cu_info_t *cur_cu,
if (lfnst_index && !mts_skip && (is_separate_tree ? true : color == COLOR_Y)) {
const uint32_t log2_block_size = kvz_g_convert_to_bit[width] + 2;
const bool whge3 = width >= 8 && height >= 8;
const uint32_t* scan = whge3 ? kvz_coef_top_left_diag_scan_8x8[log2_block_size - 1] : kvz_g_sig_last_scan[SCAN_DIAG][log2_block_size - 1];
const uint32_t* scan = whge3 ? kvz_coef_top_left_diag_scan_8x8[log2_block_size] : kvz_g_sig_last_scan[SCAN_DIAG][log2_block_size - 1];
if (is_cclm_mode) {
intra_mode = cur_cu->intra.mode;