shithub: libvpx

Download patch

ref: a44cf4592ac9a54034c2b028d878a03c78b30534
parent: b5d77a48d740e211a130c8e45d9353ef8c154a47
parent: 4e7fd0273ade37a1f128ad131ed1d6a263f13d22
author: Angie Chiang <angiebird@google.com>
date: Tue Nov 17 16:40:55 EST 2020

Merge changes I12a72d3a,I1a6c5752

* changes:
  Fix uninitialized warning in resize_test.cc
  Fix the warning of C90 mixed declarations and code

--- a/test/resize_test.cc
+++ b/test/resize_test.cc
@@ -271,8 +271,8 @@
  protected:
   virtual void Next() {
     ++frame_;
-    unsigned int width;
-    unsigned int height;
+    unsigned int width = 0;
+    unsigned int height = 0;
     ScaleForFrameNumber(frame_, kInitialWidth, kInitialHeight, &width, &height,
                         flag_codec_, smaller_width_larger_size_);
     SetSize(width, height);
--- 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) {