mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
[DepQuant] Fix
This commit is contained in:
parent
5abe9e57c6
commit
c6087230a8
|
@ -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 =====
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue