diff --git a/src/intra.c b/src/intra.c index f5f255f6..e3606eb9 100644 --- a/src/intra.c +++ b/src/intra.c @@ -1429,7 +1429,8 @@ static void intra_recon_tb_leaf( else { kvz_intra_predict(state, &refs, log2width, intra_mode, color, pred, filter_boundary, multi_ref_index); } - } else { + } + else { kvz_pixels_blit(&state->tile->frame->cclm_luma_rec[x / 2 + (y * stride) / 4], pred, width, width, stride / 2, width); if (LCU_GET_CU_AT_PX(lcu, x_scu, y_scu)->depth != depth) { cclm_parameters_t temp_params; @@ -1439,7 +1440,6 @@ static void intra_recon_tb_leaf( else { linear_transform_cclm(&intra_paramas->cclm_parameters[color == COLOR_U ? 0 : 1], pred, pred, width, width); } - } const int index = lcu_px.x + lcu_px.y * lcu_width; diff --git a/src/search_intra.c b/src/search_intra.c index 8a6e24b1..d896c091 100644 --- a/src/search_intra.c +++ b/src/search_intra.c @@ -829,8 +829,8 @@ static int8_t search_intra_rdo(encoder_state_t * const state, pred_cu.joint_cb_cr = 0; FILL(pred_cu.cbf, 0); - int rdo_bitcost = kvz_luma_mode_bits(state, &pred_cu, x_px, y_px, depth, lcu); - *mode_cost_p = rdo_bitcost * (int)(state->lambda + 0.5); + double rdo_bitcost = kvz_luma_mode_bits(state, &pred_cu, x_px, y_px, depth, lcu); + *mode_cost_p = rdo_bitcost * state->lambda; // Reset transform split data in lcu.cu for this area. kvz_lcu_fill_trdepth(lcu, x_px, y_px, depth, depth);