From acd12cba1e1aaac6e15090552fe9e1b22bbb6eb7 Mon Sep 17 00:00:00 2001 From: Ari Lemmetti Date: Mon, 30 Jan 2017 15:18:02 +0200 Subject: [PATCH] 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. --- src/rdo.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/rdo.c b/src/rdo.c index 8b0e8162..e542fe9e 100644 --- a/src/rdo.c +++ b/src/rdo.c @@ -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);