Skip to content

Commit

Permalink
[deb_quant] Revert WIP variable resetting to see if it is still neces…
Browse files Browse the repository at this point in the history
…sary
  • Loading branch information
MrAsura committed Nov 21, 2024
1 parent bc1974a commit 0844120
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/dep_quant.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,9 +857,7 @@ int uvg_dep_quant(
dep_quant_context.m_curr_state_offset = 0;
dep_quant_context.m_prev_state_offset = 4;
dep_quant_context.m_skip_state_offset = 8;
memset(dep_quant_context.m_common_context.sbb_memory, 0, sizeof(dep_quant_context.m_common_context.sbb_memory));
memset(dep_quant_context.m_common_context.level_memory, 0, sizeof(dep_quant_context.m_common_context.level_memory));


const uint32_t lfnstIdx = tree_type != UVG_CHROMA_T || compID == COLOR_Y ?
cur_tu->lfnst_idx :
cur_tu->cr_lfnst_idx;
Expand Down Expand Up @@ -893,7 +891,7 @@ int uvg_dep_quant(
dep_quant_context.m_quant = (quant_block*)&state->quant_blocks[0];
}
//TODO: no idea when it is safe not to reinit for inter
if (1 /* dep_quant_context.m_quant->needs_init || cur_tu->type == CU_INTER */) {
if (dep_quant_context.m_quant->needs_init || cur_tu->type == CU_INTER) {
init_quant_block(state, dep_quant_context.m_quant, cur_tu, log2_tr_width, log2_tr_height, compID, needs_block_size_trafo_scale, -1);
}

Expand Down Expand Up @@ -940,7 +938,7 @@ int uvg_dep_quant(
//===== real init =====
rate_estimator_t* rate_estimator = (rate_estimator_t *)(compID == COLOR_Y && cur_tu->type == CU_INTRA && cur_tu->intra.isp_mode != ISP_MODE_NO_ISP ?
&state->rate_estimator[3] : &state->rate_estimator[compID]);
if(1 /* rate_estimator->needs_init || cur_tu->type == CU_INTER */) {
if(rate_estimator->needs_init || cur_tu->type == CU_INTER) {
init_rate_esimator(rate_estimator, &state->search_cabac, compID);
xSetLastCoeffOffset(state, cur_tu, width, height, rate_estimator, compID);
rate_estimator->needs_init = false;
Expand Down

0 comments on commit 0844120

Please sign in to comment.