From 17540abb762d2bd0bb29a14dbb722de34794c15c Mon Sep 17 00:00:00 2001 From: Joose Sainio Date: Tue, 20 Dec 2022 08:23:01 +0200 Subject: [PATCH] [lfnst] Also chroma can only use lfnst if dimensions are minimum 4 --- src/search_intra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search_intra.c b/src/search_intra.c index 3224029e..cc1c71f9 100644 --- a/src/search_intra.c +++ b/src/search_intra.c @@ -1445,7 +1445,7 @@ int8_t uvg_search_intra_chroma_rdo( const int offset = ((cu_loc->local_x) >> 1) + ((cu_loc->local_y) >> 1)* LCU_WIDTH_C; int lfnst_modes_to_check[3]; - if((is_separate || tree_type == UVG_CHROMA_T) && state->encoder_control->cfg.lfnst && PU_IS_TU(&chroma_data->pred_cu) ) { + if((is_separate || tree_type == UVG_CHROMA_T) && state->encoder_control->cfg.lfnst && PU_IS_TU(&chroma_data->pred_cu) && chroma_height >= 4 && chroma_width >= 4) { for (int i = 0; i < 3; ++i) { lfnst_modes_to_check[i] = i; }