From 5cd0554a7dd300abaf165fddccc3aa9743297689 Mon Sep 17 00:00:00 2001 From: Joose Sainio Date: Mon, 28 Mar 2022 14:08:35 +0300 Subject: [PATCH] fix correct chroma cost calculation --- src/search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.c b/src/search.c index 9f5e1406..2fa6ce45 100644 --- a/src/search.c +++ b/src/search.c @@ -563,7 +563,7 @@ static double cu_rd_cost_tr_split_accurate(const encoder_state_t* const state, const int chroma_width = (depth <= MAX_DEPTH) ? LCU_WIDTH >> (depth + 1) : LCU_WIDTH >> depth; int8_t scan_order = kvz_get_scan_order(pred_cu->type, pred_cu->intra.mode_chroma, depth); const unsigned index = xy_to_zorder(LCU_WIDTH_C, lcu_px.x, lcu_px.y); - if(pred_cu->joint_cb_cr != 0) { + if(pred_cu->joint_cb_cr == 0) { if (!state->encoder_control->cfg.lossless) { int index = lcu_px.y * LCU_WIDTH_C + lcu_px.x; unsigned ssd_u = kvz_pixels_calc_ssd(&lcu->ref.u[index], &lcu->rec.u[index],