diff --git a/src/inter.c b/src/inter.c index be8dbc03..0b4cee27 100644 --- a/src/inter.c +++ b/src/inter.c @@ -653,9 +653,9 @@ void uvg_inter_pred_pu( const unsigned offset_chroma = SUB_SCU(cu_loc->y) / 2 * LCU_WIDTH_C + SUB_SCU(cu_loc->x) / 2; yuv_t lcu_adapter; lcu_adapter.size = cu_loc->width * cu_loc->height; - lcu_adapter.y = lcu->rec.y + offset_luma, - lcu_adapter.u = lcu->rec.u + offset_chroma, - lcu_adapter.v = lcu->rec.v + offset_chroma, + lcu_adapter.y = lcu->rec.y + offset_luma; + lcu_adapter.u = lcu->rec.u + offset_chroma; + lcu_adapter.v = lcu->rec.v + offset_chroma; inter_recon_unipred(state, ref, diff --git a/src/search.c b/src/search.c index f6094b3b..b5719ed0 100644 --- a/src/search.c +++ b/src/search.c @@ -544,11 +544,11 @@ double uvg_cu_rd_cost_chroma( uvg_cu_loc_ctor(&chroma_loc, lcu_px.x, lcu_px.y, cu_loc->width, cu_loc->height); if((pred_cu->joint_cb_cr & 3) == 0){ - coeff_bits += uvg_get_coeff_cost(state, lcu->coeff.u, NULL, cu_loc, 2, scan_order, 0, COEFF_ORDER_CU); - coeff_bits += uvg_get_coeff_cost(state, lcu->coeff.v, NULL, cu_loc, 2, scan_order, 0, COEFF_ORDER_CU); + coeff_bits += uvg_get_coeff_cost(state, lcu->coeff.u, NULL, &chroma_loc, 2, scan_order, 0, COEFF_ORDER_CU); + coeff_bits += uvg_get_coeff_cost(state, lcu->coeff.v, NULL, &chroma_loc, 2, scan_order, 0, COEFF_ORDER_CU); } else { - coeff_bits += uvg_get_coeff_cost(state, lcu->coeff.joint_uv, NULL, cu_loc, 2, scan_order, 0, COEFF_ORDER_CU); + coeff_bits += uvg_get_coeff_cost(state, lcu->coeff.joint_uv, NULL, &chroma_loc, 2, scan_order, 0, COEFF_ORDER_CU); } }