From 505c26eef3abc9f1d09ee2d4a1ac5fb2514e9cde Mon Sep 17 00:00:00 2001 From: Joose Sainio Date: Tue, 17 Jan 2023 11:03:14 +0200 Subject: [PATCH] [DepQuant] Fix --- src/strategies/avx2/quant-avx2.c | 2 +- src/strategies/generic/quant-generic.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/strategies/avx2/quant-avx2.c b/src/strategies/avx2/quant-avx2.c index 00ef1248..7729d272 100644 --- a/src/strategies/avx2/quant-avx2.c +++ b/src/strategies/avx2/quant-avx2.c @@ -805,7 +805,7 @@ int uvg_quantize_residual_avx2(encoder_state_t *const state, void uvg_dequant_avx2(const encoder_state_t * const state, coeff_t *q_coef, coeff_t *coef, int32_t width, int32_t height,color_t color, int8_t block_type, int8_t transform_skip) { const encoder_control_t * const encoder = state->encoder_control; - if (encoder->cfg.dep_quant) { + if (encoder->cfg.dep_quant && !transform_skip) { uvg_dep_quant_dequant(state, block_type, width, height, color, q_coef, coef, encoder->cfg.scaling_list); return; } diff --git a/src/strategies/generic/quant-generic.c b/src/strategies/generic/quant-generic.c index b8db045f..ceb6b7aa 100644 --- a/src/strategies/generic/quant-generic.c +++ b/src/strategies/generic/quant-generic.c @@ -511,7 +511,7 @@ int uvg_quantize_residual_generic(encoder_state_t *const state, // Quantize coeffs. (coeff -> coeff_out) int abs_sum = 0; - if (!false && state->encoder_control->cfg.dep_quant) { + if (!use_trskip && state->encoder_control->cfg.dep_quant) { uvg_dep_quant( state, cur_cu, @@ -618,7 +618,7 @@ int uvg_quantize_residual_generic(encoder_state_t *const state, void uvg_dequant_generic(const encoder_state_t * const state, coeff_t *q_coef, coeff_t *coef, int32_t width, int32_t height,color_t color, int8_t block_type, int8_t transform_skip) { const encoder_control_t * const encoder = state->encoder_control; - if(encoder->cfg.dep_quant) { + if(encoder->cfg.dep_quant && !transform_skip) { uvg_dep_quant_dequant(state, block_type, width, height, color, q_coef, coef, encoder->cfg.scaling_list); return; }