From 1373a7ac1dd098e08826653bbef67d2c5e8af550 Mon Sep 17 00:00:00 2001 From: Joose Sainio Date: Wed, 4 Jan 2023 11:19:01 +0200 Subject: [PATCH] [mtt] correct indexing for chroma tree --- src/search.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/search.c b/src/search.c index 08d046f1..b8bb7a63 100644 --- a/src/search.c +++ b/src/search.c @@ -1806,7 +1806,10 @@ static double search_cu( // If there is no separate chroma the block will always have chroma, otherwise it is the last block of the split that has the chroma if (split_type == QT_SPLIT && completely_inside) { - const cu_info_t * const t = LCU_GET_CU_AT_PX(&split_lcu[0], new_cu_loc[split].local_x, new_cu_loc[split].local_y); + const cu_info_t * const t = LCU_GET_CU_AT_PX( + &split_lcu[0], + new_cu_loc[split].local_x >> (tree_type == UVG_CHROMA_T), + new_cu_loc[split].local_y >> (tree_type == UVG_CHROMA_T)); stop_to_qt |= GET_SPLITDATA(t, depth + 1) == QT_SPLIT; }