mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
[mtt] Fix trying to get split data from depth -1
This commit is contained in:
parent
3d236153e3
commit
01023c8a34
2
src/cu.c
2
src/cu.c
|
@ -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 = (split_tree.split_tree >> (split_tree.current_depth * 3 - 3)) & 7;
|
||||
const enum split_type last_split = GET_SPLITDATA(&split_tree, 0);
|
||||
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
|
||||
|
|
2
src/cu.h
2
src/cu.h
|
@ -613,7 +613,7 @@ static INLINE void cbf_copy(uint16_t *cbf, uint16_t src, color_t plane)
|
|||
*cbf |= src & (1 << plane);
|
||||
}
|
||||
|
||||
#define GET_SPLITDATA(CU,curDepth) (((CU)->split_tree >> ((curDepth) * 3)) & 7)
|
||||
#define GET_SPLITDATA(CU,curDepth) ((CU)->split_tree >> ((MAX((curDepth), 0) * 3)) & 7)
|
||||
#define PU_IS_TU(cu) ((cu)->log2_width <= TR_MAX_LOG2_SIZE && (cu)->log2_height <= TR_MAX_LOG2_SIZE)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue