mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Fix jccr when inter is used
This commit is contained in:
parent
57cd9bd97e
commit
6924497bae
10
src/inter.c
10
src/inter.c
|
@ -624,7 +624,9 @@ void kvz_inter_pred_pu(const encoder_state_t * const state,
|
||||||
int i_pu)
|
int i_pu)
|
||||||
|
|
||||||
{
|
{
|
||||||
cu_info_t *cu = LCU_GET_CU_AT_PX(lcu, SUB_SCU(x), SUB_SCU(y));
|
const int x_scu = SUB_SCU(x);
|
||||||
|
const int y_scu = SUB_SCU(y);
|
||||||
|
cu_info_t *cu = LCU_GET_CU_AT_PX(lcu, x_scu, y_scu);
|
||||||
const int pu_x = PU_GET_X(cu->part_size, width, x, i_pu);
|
const int pu_x = PU_GET_X(cu->part_size, width, x, i_pu);
|
||||||
const int pu_y = PU_GET_Y(cu->part_size, width, y, i_pu);
|
const int pu_y = PU_GET_Y(cu->part_size, width, y, i_pu);
|
||||||
const int pu_w = PU_GET_W(cu->part_size, width, i_pu);
|
const int pu_w = PU_GET_W(cu->part_size, width, i_pu);
|
||||||
|
@ -673,6 +675,12 @@ void kvz_inter_pred_pu(const encoder_state_t * const state,
|
||||||
NULL,
|
NULL,
|
||||||
predict_luma, predict_chroma);
|
predict_luma, predict_chroma);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (predict_chroma && state->encoder_control->cfg.jccr) {
|
||||||
|
const int offset = x_scu / 2 + y_scu / 2 * LCU_WIDTH_C;
|
||||||
|
kvz_pixels_blit(lcu->rec.u + offset, lcu->rec.joint_u + offset, width / 2, width / 2, LCU_WIDTH_C, LCU_WIDTH_C);
|
||||||
|
kvz_pixels_blit(lcu->rec.v + offset, lcu->rec.joint_v + offset, width / 2, width / 2, LCU_WIDTH_C, LCU_WIDTH_C);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1059,6 +1059,14 @@ static double search_cu(encoder_state_t * const state, int x, int y, int depth,
|
||||||
NULL,
|
NULL,
|
||||||
lcu,
|
lcu,
|
||||||
false);
|
false);
|
||||||
|
if (cur_cu->depth == cur_cu->tr_depth && state->encoder_control->cfg.jccr && cur_cu->joint_cb_cr) {
|
||||||
|
kvz_select_jccr_mode(state,
|
||||||
|
x & ~7, y & ~7,
|
||||||
|
depth,
|
||||||
|
NULL,
|
||||||
|
lcu,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
int cbf = cbf_is_set_any(cur_cu->cbf, depth);
|
int cbf = cbf_is_set_any(cur_cu->cbf, depth);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue