From: Angie Chiang Date: Sat, 14 Nov 2020 02:13:14 +0000 (-0800) Subject: Fix the warning of C90 mixed declarations and code X-Git-Tag: v1.10.0-rc1~39^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4453c73ff9467d5c7cd4ce8b6070dbfa24eff37;p=libvpx Fix the warning of C90 mixed declarations and code Change-Id: I1a6c57525bbe8bf1a97057ecd64985bc23d1df2e --- diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index f4587d42d..8d60a0c00 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -7383,8 +7383,6 @@ static void accumulate_frame_tpl_stats(VP9_COMP *cpi) { // Accumulate tpl stats for each frame in the current group of picture. for (frame_idx = 1; frame_idx < gf_group->gf_group_size; ++frame_idx) { TplDepFrame *tpl_frame = &cpi->tpl_stats[frame_idx]; - if (!tpl_frame->is_valid) continue; - TplDepStats *tpl_stats = tpl_frame->tpl_stats_ptr; const int tpl_stride = tpl_frame->stride; int64_t intra_cost_base = 0; @@ -7394,6 +7392,8 @@ static void accumulate_frame_tpl_stats(VP9_COMP *cpi) { int64_t mc_flow_base = 0; int row, col; + if (!tpl_frame->is_valid) continue; + for (row = 0; row < cm->mi_rows && tpl_frame->is_valid; ++row) { for (col = 0; col < cm->mi_cols; ++col) { TplDepStats *this_stats = &tpl_stats[row * tpl_stride + col];