[mtt] minor fixes

This commit is contained in:
Joose Sainio 2022-12-14 12:02:00 +02:00
parent 10cda40b87
commit 68f3191dd4
2 changed files with 2 additions and 2 deletions

View file

@ -413,7 +413,7 @@ int uvg_get_possible_splits(const encoder_state_t * const state,
splits[NO_SPLIT] = splits[QT_SPLIT] = splits[BT_HOR_SPLIT] = splits[TT_HOR_SPLIT] = splits[BT_VER_SPLIT] = splits[TT_VER_SPLIT] = true;
bool can_btt = split_tree.mtt_depth < max_btd;
const enum split_type last_split = GET_SPLITDATA(&split_tree, 0);
const enum split_type last_split = GET_SPLITDATA(&split_tree, split_tree.current_depth - 1);
const enum split_type parl_split = last_split == TT_HOR_SPLIT ? BT_HOR_SPLIT : BT_VER_SPLIT;
// don't allow QT-splitting below a BT split

View file

@ -1540,7 +1540,7 @@ static double search_cu(
default:
assert(0 && "Incorrect_slice_type");
}
if(minimum_split_amount > max_btd && !is_implicit) {
if(minimum_split_amount > max_btd && !is_implicit && can_split[1]) {
// If search should not be performed at depths that cannot be reached after a maximum mtt split amount
// we are in trouble, therefore prevent mtt splits in such situation
can_split[2] = can_split[3] = can_split[4] = can_split[5] = false;