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:
Ari Lemmetti 2017-01-30 15:18:02 +02:00
parent c32f5fafc9
commit acd12cba1e

View file

@ -584,6 +584,7 @@ void kvz_rdoq(encoder_state_t * const state, coeff_t *coef, coeff_t *dest_coeff,
last_scanpos = scanpos;
ctx_set = (scanpos > 0 && type == 0) ? 2 : 0;
cg_last_scanpos = cg_scanpos;
sh_rates.sig_coeff_inc[blkpos] = 0;
break;
}
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_sig, 0, max_num_coeff);
if (encoder->cfg.signhide_enable) {
memset(&sh_rates, 0, sizeof(sh_rates));
}
FILL(cost_coeffgroup_sig, 0);
FILL(sig_coeffgroup_flag, 0);