mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
[isp] Fix quantization function calls. Some were not getting height as input.
This commit is contained in:
parent
3bc5dcff27
commit
db0071555d
|
@ -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;
|
int8_t tr_depth = cur_cu->tr_depth - cur_cu->depth;
|
||||||
tr_depth += (cur_cu->part_size == SIZE_NxN ? 1 : 0);
|
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);
|
scan_order, cur_cu->type, tr_depth, cur_cu->cbf, lfnst_index);
|
||||||
}
|
}
|
||||||
else if (state->encoder_control->cfg.rdoq_enable && use_trskip) {
|
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);
|
scan_order);
|
||||||
}
|
}
|
||||||
else {
|
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);
|
scan_order, cur_cu->type, cur_cu->tr_idx == MTS_SKIP && color == COLOR_Y, lfnst_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -508,14 +508,14 @@ int uvg_quantize_residual_generic(encoder_state_t *const state,
|
||||||
scan_order);
|
scan_order);
|
||||||
} else {
|
} 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);
|
scan_order, cur_cu->type, cur_cu->tr_idx == MTS_SKIP && color == COLOR_Y, lfnst_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if there are any non-zero coefficients.
|
// Check if there are any non-zero coefficients.
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < width * width; ++i) {
|
for (i = 0; i < width * height; ++i) {
|
||||||
if (coeff_out[i] != 0) {
|
if (coeff_out[i] != 0) {
|
||||||
has_coeffs = 1;
|
has_coeffs = 1;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue