[deltaqp] Fix uvg_get_cu_ref_qp for first cu of row

This commit is contained in:
Joose Sainio 2022-05-04 12:41:14 +03:00
parent 3a0c5b78a3
commit 900ce314ef

View file

@ -1842,6 +1842,9 @@ int uvg_get_cu_ref_qp(const encoder_state_t *state, int x, int y, int last_qp)
// Coordinates of the top-left corner of the quantization group
const int x_qg = x & ~(qg_width - 1);
const int y_qg = y & ~(qg_width - 1);
if(x_qg == 0 && y_qg > 0 && y_qg % LCU_WIDTH == 0) {
return uvg_cu_array_at_const(cua, x_qg, y_qg - 1)->qp;
}
int qp_pred_a = last_qp;
if (x_qg % LCU_WIDTH > 0) {