From 1493a2616c88bc48538d38609e8df16c0975e4f1 Mon Sep 17 00:00:00 2001 From: Joose Sainio Date: Wed, 14 Dec 2022 12:33:24 +0200 Subject: [PATCH] [mtt] fix getting collocated chroma for edge cus --- src/search.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/search.c b/src/search.c index 5a8ef639..b316107b 100644 --- a/src/search.c +++ b/src/search.c @@ -166,6 +166,14 @@ static INLINE void initialize_partial_work_tree(lcu_t* from, lcu_t *to, const cu for (int y = y_start; y < y_limit; y += SCU_WIDTH) { *LCU_GET_CU_AT_PX(to, x_start, y) = *LCU_GET_CU_AT_PX(from, x_start, y); } + + for(int y = chroma_loc->local_y; y < chroma_loc->local_y + chroma_loc->height; y += SCU_WIDTH) { + for (int x = chroma_loc->local_x; x < chroma_loc->local_x + chroma_loc->width; x += SCU_WIDTH) { + if(x >= cu_loc->local_x && y>= cu_loc->local_y) continue; + *LCU_GET_CU_AT_PX(to, x, y) = *LCU_GET_CU_AT_PX(from, x, y); + } + } + if (chroma_loc->local_x == 0) { to->left_ref = from->left_ref; *LCU_GET_TOP_RIGHT_CU(to) = *LCU_GET_TOP_RIGHT_CU(from);