shithub: libvpx

Download patch

ref: d4453c73ff9467d5c7cd4ce8b6070dbfa24eff37
parent: 3f7fee29edf407e432bbbbccf4242e93cbaccc5f
author: Angie Chiang <angiebird@google.com>
date: Fri Nov 13 13:13:14 EST 2020

Fix the warning of C90 mixed declarations and code

Change-Id: I1a6c57525bbe8bf1a97057ecd64985bc23d1df2e

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -7383,8 +7383,6 @@
   // 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;
@@ -7393,6 +7391,8 @@
     int64_t mc_ref_cost_base = 0;
     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) {