mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
[DepQuant] Fix
This commit is contained in:
parent
dfda6810c5
commit
9f3df67718
|
@ -1257,7 +1257,7 @@ int uvg_dep_quant(
|
|||
|
||||
uint32_t blkpos_next = scan[scanIdx ? scanIdx - 1 : 0];
|
||||
uint32_t pos_y_next = blkpos_next >> log2_tr_width;
|
||||
uint32_t pos_x_next = blkpos_next - (pos_y << log2_tr_width);
|
||||
uint32_t pos_x_next = blkpos_next - (pos_y_next << log2_tr_width);
|
||||
uint32_t cg_blockpos_next = scanIdx ? cg_scan[(scanIdx -1) >> 4] : 0;
|
||||
uint32_t cg_pos_y_next = cg_blockpos_next / height_in_sbb;
|
||||
uint32_t cg_pos_x_next = cg_blockpos_next - (cg_pos_y_next * height_in_sbb);
|
||||
|
@ -1269,12 +1269,13 @@ int uvg_dep_quant(
|
|||
uint32_t nextSbbRight = (cg_pos_x_next < width_in_sbb - 1 ? cg_blockpos_next + 1 : 0);
|
||||
uint32_t nextSbbBelow = (cg_pos_y_next < height_in_sbb - 1 ? cg_blockpos_next + width_in_sbb : 0);
|
||||
|
||||
context_store* ctxs = &dep_quant_context;
|
||||
if (enableScalingLists) {
|
||||
init_quant_block(state, &dep_quant_context.m_quant, cur_tu, log2_tr_width, log2_tr_height, compID, needs_block_size_trafo_scale, q_coeff[blkpos]);
|
||||
|
||||
xDecideAndUpdate(
|
||||
&rate_estimator,
|
||||
&dep_quant_context,
|
||||
ctxs,
|
||||
abs(srcCoeff[blkpos]),
|
||||
scanIdx,
|
||||
cg_pos,
|
||||
|
@ -1296,7 +1297,7 @@ int uvg_dep_quant(
|
|||
else {
|
||||
xDecideAndUpdate(
|
||||
&rate_estimator,
|
||||
&dep_quant_context,
|
||||
ctxs,
|
||||
abs(srcCoeff[blkpos]),
|
||||
scanIdx,
|
||||
cg_pos,
|
||||
|
@ -1314,10 +1315,6 @@ int uvg_dep_quant(
|
|||
effectWidth,
|
||||
effectHeight); //tu.cu->slice->getReverseLastSigCoeffFlag());
|
||||
}
|
||||
Decision* d = dep_quant_context.m_trellis[scanIdx];
|
||||
Decision temp[8];
|
||||
memcpy(temp, d, sizeof(Decision) * 8);
|
||||
d++;
|
||||
}
|
||||
|
||||
//===== find best path =====
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
@ -519,7 +519,7 @@ int uvg_quantize_residual_generic(encoder_state_t *const state,
|
|||
height,
|
||||
coeff,
|
||||
coeff_out,
|
||||
COLOR_U,
|
||||
color,
|
||||
tree_type,
|
||||
&abs_sum,
|
||||
state->encoder_control->cfg.scaling_list);
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue