[mtt] fix

This commit is contained in:
Joose Sainio 2022-11-14 08:28:32 +02:00
parent 0b4d215456
commit 97001eab7f
2 changed files with 6 additions and 6 deletions

View file

@ -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; const unsigned offset_chroma = SUB_SCU(cu_loc->y) / 2 * LCU_WIDTH_C + SUB_SCU(cu_loc->x) / 2;
yuv_t lcu_adapter; yuv_t lcu_adapter;
lcu_adapter.size = cu_loc->width * cu_loc->height; lcu_adapter.size = cu_loc->width * cu_loc->height;
lcu_adapter.y = lcu->rec.y + offset_luma, lcu_adapter.y = lcu->rec.y + offset_luma;
lcu_adapter.u = lcu->rec.u + offset_chroma, lcu_adapter.u = lcu->rec.u + offset_chroma;
lcu_adapter.v = lcu->rec.v + offset_chroma, lcu_adapter.v = lcu->rec.v + offset_chroma;
inter_recon_unipred(state, inter_recon_unipred(state,
ref, ref,

View file

@ -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); 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){ 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.u, NULL, &chroma_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.v, NULL, &chroma_loc, 2, scan_order, 0, COEFF_ORDER_CU);
} }
else { 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);
} }
} }