diff --git a/src/strategies/avx2/quant-avx2.c b/src/strategies/avx2/quant-avx2.c index 125bfdf2..babb3d1f 100644 --- a/src/strategies/avx2/quant-avx2.c +++ b/src/strategies/avx2/quant-avx2.c @@ -685,15 +685,15 @@ int uvg_quantize_residual_avx2(encoder_state_t *const state, { int8_t tr_depth = cur_cu->tr_depth - cur_cu->depth; tr_depth += (cur_cu->part_size == SIZE_NxN ? 1 : 0); - uvg_rdoq(state, coeff, coeff_out, width, width, color, + uvg_rdoq(state, coeff, coeff_out, width, height, color, scan_order, cur_cu->type, tr_depth, cur_cu->cbf, lfnst_index); } else if (state->encoder_control->cfg.rdoq_enable && use_trskip) { - uvg_ts_rdoq(state, coeff, coeff_out, width, width, color, + uvg_ts_rdoq(state, coeff, coeff_out, width, height, color, scan_order); } else { - uvg_quant(state, coeff, coeff_out, width, width, color, + uvg_quant(state, coeff, coeff_out, width, height, color, scan_order, cur_cu->type, cur_cu->tr_idx == MTS_SKIP && color == COLOR_Y, lfnst_index); } diff --git a/src/strategies/generic/quant-generic.c b/src/strategies/generic/quant-generic.c index 3cfc3194..a02a5413 100644 --- a/src/strategies/generic/quant-generic.c +++ b/src/strategies/generic/quant-generic.c @@ -508,14 +508,14 @@ int uvg_quantize_residual_generic(encoder_state_t *const state, scan_order); } else { - uvg_quant(state, coeff, coeff_out, width, width, color, + uvg_quant(state, coeff, coeff_out, width, height, color, scan_order, cur_cu->type, cur_cu->tr_idx == MTS_SKIP && color == COLOR_Y, lfnst_index); } // Check if there are any non-zero coefficients. { int i; - for (i = 0; i < width * width; ++i) { + for (i = 0; i < width * height; ++i) { if (coeff_out[i] != 0) { has_coeffs = 1; break;