mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Remove unnecessary memory initialization to zero
Values in interval [last_scanpos, 0] are overwritten in following for loop, except for the sig_coeff_inc value.
This commit is contained in:
parent
c32f5fafc9
commit
acd12cba1e
|
@ -584,6 +584,7 @@ void kvz_rdoq(encoder_state_t * const state, coeff_t *coef, coeff_t *dest_coeff,
|
||||||
last_scanpos = scanpos;
|
last_scanpos = scanpos;
|
||||||
ctx_set = (scanpos > 0 && type == 0) ? 2 : 0;
|
ctx_set = (scanpos > 0 && type == 0) ? 2 : 0;
|
||||||
cg_last_scanpos = cg_scanpos;
|
cg_last_scanpos = cg_scanpos;
|
||||||
|
sh_rates.sig_coeff_inc[blkpos] = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dest_coeff[blkpos] = 0;
|
dest_coeff[blkpos] = 0;
|
||||||
|
@ -597,11 +598,6 @@ void kvz_rdoq(encoder_state_t * const state, coeff_t *coef, coeff_t *dest_coeff,
|
||||||
|
|
||||||
FILL_ARRAY(cost_coeff, 0, max_num_coeff);
|
FILL_ARRAY(cost_coeff, 0, max_num_coeff);
|
||||||
FILL_ARRAY(cost_sig, 0, max_num_coeff);
|
FILL_ARRAY(cost_sig, 0, max_num_coeff);
|
||||||
|
|
||||||
if (encoder->cfg.signhide_enable) {
|
|
||||||
memset(&sh_rates, 0, sizeof(sh_rates));
|
|
||||||
}
|
|
||||||
|
|
||||||
FILL(cost_coeffgroup_sig, 0);
|
FILL(cost_coeffgroup_sig, 0);
|
||||||
FILL(sig_coeffgroup_flag, 0);
|
FILL(sig_coeffgroup_flag, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue