From 73caef05006d71f13b6866fa506ab6c7f146f0d8 Mon Sep 17 00:00:00 2001 From: Adrian Grange Date: Mon, 1 Dec 2014 13:58:44 -0800 Subject: [PATCH] Use memset for initialization to 0 Change-Id: I714ca22b5d51016bf8b035cf457616c707257641 --- vp9/encoder/vp9_encoder.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 28350ef54..ba6ac1dac 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -3217,11 +3217,8 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, vp9_clear_system_state(); #if CONFIG_INTERNAL_STATS - { - int i; - for (i = 0; i < MAX_MODES; ++i) - cpi->mode_chosen_counts[i] = 0; - } + vpx_memset(cpi->mode_chosen_counts, 0, + MAX_MODES * sizeof(*cpi->mode_chosen_counts)); #endif if (cpi->sf.recode_loop == DISALLOW_RECODE) { -- GitLab