[mtt] Fix reading uninitialized data for local chroma tree

This commit is contained in:
Joose Sainio 2022-12-19 14:25:03 +02:00 committed by Marko Viitanen
parent 9acdab3209
commit af23c81afa

View file

@ -190,7 +190,6 @@ static INLINE void initialize_partial_work_tree(
to->top_ref = from->top_ref; to->top_ref = from->top_ref;
*LCU_GET_TOP_RIGHT_CU(to) = *LCU_GET_TOP_RIGHT_CU(from); *LCU_GET_TOP_RIGHT_CU(to) = *LCU_GET_TOP_RIGHT_CU(from);
} }
}
if (x_limit != LCU_WIDTH >> (tree_type == UVG_CHROMA_T)) { if (x_limit != LCU_WIDTH >> (tree_type == UVG_CHROMA_T)) {
for (int y = y_start; y < y_limit; y += SCU_WIDTH) { for (int y = y_start; y < y_limit; y += SCU_WIDTH) {
memset(LCU_GET_CU_AT_PX(to, x_limit, y), 0, sizeof(cu_info_t)); memset(LCU_GET_CU_AT_PX(to, x_limit, y), 0, sizeof(cu_info_t));
@ -201,6 +200,19 @@ static INLINE void initialize_partial_work_tree(
memset(LCU_GET_CU_AT_PX(to, x, y_limit), 0, sizeof(cu_info_t)); memset(LCU_GET_CU_AT_PX(to, x, y_limit), 0, sizeof(cu_info_t));
} }
} }
}
else {
if (x_limit != LCU_WIDTH >> (tree_type == UVG_CHROMA_T)) {
for (int y = y_start; y < y_limit; y += SCU_WIDTH) {
memset(LCU_GET_CU_AT_PX(to, x_limit, y), 0, sizeof(cu_info_t));
}
}
if (y_limit != LCU_WIDTH >> (tree_type == UVG_CHROMA_T)) {
for (int x = x_start; x < x_limit; x += SCU_WIDTH) {
memset(LCU_GET_CU_AT_PX(to, x, y_limit), 0, sizeof(cu_info_t));
}
}
}
} }
static INLINE void copy_cu_pixels( static INLINE void copy_cu_pixels(