From 7005d222d5865750248183df042c4543ceb11f6e Mon Sep 17 00:00:00 2001 From: siivonek Date: Wed, 28 Sep 2022 12:38:02 +0300 Subject: [PATCH] [isp] Fix lfnst constraint check when ISP is used. Remove some obsolete comments. --- src/cu.h | 4 ++-- src/encode_coding_tree.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cu.h b/src/cu.h index de22dd89..ecb7c695 100644 --- a/src/cu.h +++ b/src/cu.h @@ -172,8 +172,8 @@ typedef struct uint8_t violates_mts_coeff_constraint : 1; uint8_t mts_last_scan_pos : 1; - uint8_t violates_lfnst_constrained_luma : 1; // Two types, luma and chroma. Luma index is 0. - uint8_t violates_lfnst_constrained_chroma : 1; // Two types, luma and chroma. Luma index is 0. + uint8_t violates_lfnst_constrained_luma : 1; + uint8_t violates_lfnst_constrained_chroma : 1; uint8_t lfnst_last_scan_pos : 1; uint8_t lfnst_idx : 2; uint8_t cr_lfnst_idx : 2; diff --git a/src/encode_coding_tree.c b/src/encode_coding_tree.c index a739cebf..f5531d63 100644 --- a/src/encode_coding_tree.c +++ b/src/encode_coding_tree.c @@ -151,7 +151,9 @@ bool uvg_is_lfnst_allowed( cu_info_t* split_cu = lcu ? LCU_GET_CU_AT_PX(lcu, local_split_x, local_split_y) : uvg_cu_array_at_const(frame->cu_array, local_split_x, local_split_y); - if (cbf_is_set(split_cu->cbf, depth, COLOR_Y)) { + //if (cbf_is_set(split_cu->cbf, depth, COLOR_Y)) { + // ISP_TODO: remove this if clause altogether if it seems it is not needed + if (true) { non_zero_coeff_non_ts_corner_8x8 |= (luma_flag && split_cu->violates_lfnst_constrained_luma) || (chroma_flag && split_cu->violates_lfnst_constrained_chroma); //last_scan_pos |= split_cu->lfnst_last_scan_pos; last_scan_pos |= true;